/* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ import { Contract, Signer, utils } from "ethers"; import { Provider } from "@ethersproject/providers"; import type { IStake, IStakeInterface } from "../IStake"; const _abi = [ { anonymous: false, inputs: [ { indexed: false, internalType: "enum Types.Grade", name: "grade", type: "uint8", }, ], name: "AddPool", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "candidate", type: "address", }, { indexed: false, internalType: "uint256", name: "amount", type: "uint256", }, ], name: "CandidateAllocated", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "uint256", name: "period", type: "uint256", }, ], name: "ClaimFrozenPeriodUpdated", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "candidate", type: "address", }, { indexed: false, internalType: "address", name: "to", type: "address", }, { indexed: false, internalType: "uint256", name: "pending", type: "uint256", }, ], name: "Claimed", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "candidate", type: "address", }, { indexed: false, internalType: "enum Types.Grade", name: "fromGrade", type: "uint8", }, { indexed: false, internalType: "enum Types.Grade", name: "toGrade", type: "uint8", }, ], name: "Downgrade", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "candidate", type: "address", }, { indexed: false, internalType: "uint256", name: "pendingSlash", type: "uint256", }, ], name: "DraftSlash", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "contract IElection", name: "election", type: "address", }, ], name: "ElectionUpdated", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "candidate", type: "address", }, { indexed: false, internalType: "uint256", name: "pendingSlash", type: "uint256", }, { indexed: false, internalType: "address[]", name: "beneficiaries", type: "address[]", }, { indexed: false, internalType: "uint256[]", name: "amounts", type: "uint256[]", }, { indexed: false, internalType: "uint256", name: "burned", type: "uint256", }, ], name: "ExcuteSlash", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "contract IMajorCandidates", name: "majorCandidates", type: "address", }, ], name: "IMajorCandidatesUpdated", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "uint256", name: "maxCoef", type: "uint256", }, ], name: "MaxCoefUpdated", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "uint256", name: "amount", type: "uint256", }, ], name: "MinStakeUpdated", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "enum Types.Grade", name: "grade", type: "uint8", }, ], name: "PoolUpdated", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "uint256", name: "precision", type: "uint256", }, ], name: "PrecisionUpdated", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "enum Types.Grade", name: "grade", type: "uint8", }, { indexed: false, internalType: "address", name: "candidate", type: "address", }, ], name: "Quit", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "candidate", type: "address", }, ], name: "Register", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "candidate", type: "address", }, { indexed: false, internalType: "uint256", name: "pendingSlash", type: "uint256", }, ], name: "RejectSlash", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "uint256", name: "rewardPerSecond", type: "uint256", }, ], name: "RewardPerSecondUpdated", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "contract IRewarder", name: "rewarder", type: "address", }, ], name: "RewarderUpdated", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "contract ISlasher", name: "slasher", type: "address", }, ], name: "SlasherUpdated", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "from", type: "address", }, { indexed: false, internalType: "address", name: "candidate", type: "address", }, { indexed: false, internalType: "uint256", name: "amount", type: "uint256", }, ], name: "Stake", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "uint256", name: "period", type: "uint256", }, ], name: "StakeFrozenPeriodUpdated", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "contract IERC20", name: "token", type: "address", }, ], name: "TokenUpdated", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "candidate", type: "address", }, { indexed: false, internalType: "enum Types.Grade", name: "fromGrade", type: "uint8", }, { indexed: false, internalType: "enum Types.Grade", name: "toGrade", type: "uint8", }, ], name: "Upgrade", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "uint256", name: "coef", type: "uint256", }, ], name: "VoteRewardCoefUpdated", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "candidate", type: "address", }, { indexed: false, internalType: "uint256", name: "amount", type: "uint256", }, ], name: "VoterAllocated", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "candidate", type: "address", }, { indexed: false, internalType: "address", name: "to", type: "address", }, { indexed: false, internalType: "uint256", name: "amount", type: "uint256", }, ], name: "Withdrawn", type: "event", }, { inputs: [], name: "ACC_PRECISION", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "MAXCOEF", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", name: "candidate", type: "address", }, ], name: "candidateInfo", outputs: [ { components: [ { internalType: "enum Types.Grade", name: "grade", type: "uint8", }, { internalType: "uint256", name: "amount", type: "uint256", }, { internalType: "int256", name: "rewardDebt", type: "int256", }, { internalType: "uint256", name: "allocation", type: "uint256", }, { internalType: "string", name: "manifest", type: "string", }, ], internalType: "struct Types.CandidateInfo", name: "", type: "tuple", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", name: "to", type: "address", }, ], name: "claim", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", name: "candidate", type: "address", }, ], name: "downgrade", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", name: "candidate", type: "address", }, { internalType: "uint256", name: "amount", type: "uint256", }, ], name: "draftSlash", outputs: [ { internalType: "uint256", name: "pendingSlash", type: "uint256", }, ], stateMutability: "nonpayable", type: "function", }, { inputs: [], name: "election", outputs: [ { internalType: "contract IElection", name: "", type: "address", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", name: "candidate", type: "address", }, { internalType: "uint256", name: "slash", type: "uint256", }, { internalType: "address[]", name: "beneficiaries", type: "address[]", }, { internalType: "uint256[]", name: "amounts", type: "uint256[]", }, { internalType: "uint256", name: "burned", type: "uint256", }, ], name: "executeSlash", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", name: "candidate", type: "address", }, ], name: "gradeOf", outputs: [ { internalType: "enum Types.Grade", name: "", type: "uint8", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", name: "candidate", type: "address", }, ], name: "isCandidateRegistered", outputs: [ { internalType: "bool", name: "", type: "bool", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "majorCandidates", outputs: [ { internalType: "contract IMajorCandidates", name: "", type: "address", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "string", name: "manifest", type: "string", }, ], name: "manifestMap", outputs: [ { internalType: "address", name: "", type: "address", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", name: "candidate", type: "address", }, ], name: "pendingCandidateAllocation", outputs: [ { internalType: "uint256", name: "pending", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", name: "candidate", type: "address", }, ], name: "pendingReward", outputs: [ { internalType: "uint256", name: "pending", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", name: "candidate", type: "address", }, ], name: "pendingVoterAllocation", outputs: [ { internalType: "uint256", name: "pending", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "enum Types.Grade", name: "grade", type: "uint8", }, ], name: "poolInfo", outputs: [ { components: [ { internalType: "uint256", name: "accPerShare", type: "uint256", }, { internalType: "uint256", name: "lastRewardTime", type: "uint256", }, { internalType: "uint256", name: "allocPoint", type: "uint256", }, ], internalType: "struct Types.PoolInfo", name: "", type: "tuple", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", name: "to", type: "address", }, ], name: "quit", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "string", name: "manifest", type: "string", }, ], name: "register", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256", name: "amount", type: "uint256", }, { internalType: "string", name: "manifest", type: "string", }, ], name: "registerAndStake", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", name: "candidate", type: "address", }, { internalType: "uint256", name: "pendingSlash", type: "uint256", }, ], name: "rejectSlash", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], name: "rewardPerSecond", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "rewarder", outputs: [ { internalType: "contract IRewarder", name: "", type: "address", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "uint256", name: "coef", type: "uint256", }, ], name: "setVoteRewardCoef", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], name: "slasher", outputs: [ { internalType: "contract ISlasher", name: "", type: "address", }, ], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "uint256", name: "amount", type: "uint256", }, ], name: "stake", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], name: "token", outputs: [ { internalType: "contract IERC20", name: "", type: "address", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "totalAllocPoint", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "enum Types.Grade", name: "grade", type: "uint8", }, ], name: "updatePool", outputs: [ { components: [ { internalType: "uint256", name: "accPerShare", type: "uint256", }, { internalType: "uint256", name: "lastRewardTime", type: "uint256", }, { internalType: "uint256", name: "allocPoint", type: "uint256", }, ], internalType: "struct Types.PoolInfo", name: "pool", type: "tuple", }, ], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", name: "candidate", type: "address", }, ], name: "upgrade", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address", name: "candidate", type: "address", }, ], name: "voteRewardCoef", outputs: [ { internalType: "uint256", name: "coef", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", name: "candidate", type: "address", }, ], name: "voterAllocate", outputs: [], stateMutability: "nonpayable", type: "function", }, ]; export class IStake__factory { static readonly abi = _abi; static createInterface(): IStakeInterface { return new utils.Interface(_abi) as IStakeInterface; } static connect(address: string, signerOrProvider: Signer | Provider): IStake { return new Contract(address, _abi, signerOrProvider) as IStake; } }