diff --git a/src/apps/kwenta/contracts/abis/kwenta-staking-v-2.json b/src/apps/kwenta/contracts/abis/kwenta-staking-v-2.json new file mode 100644 index 000000000..fa726dd37 --- /dev/null +++ b/src/apps/kwenta/contracts/abis/kwenta-staking-v-2.json @@ -0,0 +1,1356 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "_kwenta", + "type": "address" + }, + { + "internalType": "address", + "name": "_rewardEscrow", + "type": "address" + }, + { + "internalType": "address", + "name": "_rewardsNotifier", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AmountZero", + "type": "error" + }, + { + "inputs": [], + "name": "CannotApproveSelf", + "type": "error" + }, + { + "inputs": [], + "name": "CannotRecoverStakingToken", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "maxCooldownPeriod", + "type": "uint256" + } + ], + "name": "CooldownPeriodTooHigh", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "minCooldownPeriod", + "type": "uint256" + } + ], + "name": "CooldownPeriodTooLow", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "availableBalance", + "type": "uint256" + } + ], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "unstakedEscrow", + "type": "uint256" + } + ], + "name": "InsufficientUnstakedEscrow", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "canUnstakeAt", + "type": "uint256" + } + ], + "name": "MustWaitForUnlock", + "type": "error" + }, + { + "inputs": [], + "name": "NotApproved", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyRewardEscrow", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyRewardsNotifier", + "type": "error" + }, + { + "inputs": [], + "name": "RewardsDurationCannotBeZero", + "type": "error" + }, + { + "inputs": [], + "name": "RewardsPeriodNotComplete", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "cooldownPeriod", + "type": "uint256" + } + ], + "name": "CooldownPeriodUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "EscrowStaked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "EscrowUnstaked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "OperatorApproved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Recovered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "reward", + "type": "uint256" + } + ], + "name": "RewardAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "reward", + "type": "uint256" + } + ], + "name": "RewardPaid", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "newDuration", + "type": "uint256" + } + ], + "name": "RewardsDurationUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Staked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Unstaked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "MAX_COOLDOWN_PERIOD", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIN_COOLDOWN_PERIOD", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "_approved", + "type": "bool" + } + ], + "name": "approveOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + } + ], + "name": "balanceAtTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "balancesCheckpoints", + "outputs": [ + { + "internalType": "uint64", + "name": "ts", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "blk", + "type": "uint64" + }, + { + "internalType": "uint128", + "name": "value", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "balancesCheckpointsLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "compound", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "compoundOnBehalf", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "cooldownPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "earned", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + } + ], + "name": "escrowedBalanceAtTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "escrowedBalanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "escrowedBalancesCheckpoints", + "outputs": [ + { + "internalType": "uint64", + "name": "ts", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "blk", + "type": "uint64" + }, + { + "internalType": "uint128", + "name": "value", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "escrowedBalancesCheckpointsLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "exit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getReward", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getRewardForDuration", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "getRewardOnBehalf", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_contractOwner", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "kwenta", + "outputs": [ + { + "internalType": "contract IKwenta", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastTimeRewardApplicable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastUpdateTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "nonEscrowedBalanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_reward", + "type": "uint256" + } + ], + "name": "notifyRewardAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "operatorApprovals", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pauseStakingRewards", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "periodFinish", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokenAmount", + "type": "uint256" + } + ], + "name": "recoverERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "rewardEscrow", + "outputs": [ + { + "internalType": "contract IRewardEscrowV2", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardPerToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardPerTokenStored", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "rewards", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardsDuration", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardsNotifier", + "outputs": [ + { + "internalType": "contract IStakingRewardsNotifier", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_cooldownPeriod", + "type": "uint256" + } + ], + "name": "setCooldownPeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_rewardsDuration", + "type": "uint256" + } + ], + "name": "setRewardsDuration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "stake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "stakeEscrow", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "stakeEscrowOnBehalf", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + } + ], + "name": "totalSupplyAtTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "totalSupplyCheckpoints", + "outputs": [ + { + "internalType": "uint64", + "name": "ts", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "blk", + "type": "uint64" + }, + { + "internalType": "uint128", + "name": "value", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupplyCheckpointsLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpauseStakingRewards", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "unstake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "unstakeEscrow", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "unstakeEscrowSkipCooldown", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "unstakedEscrowedBalanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userLastStakeTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userRewardPerTokenPaid", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/src/apps/kwenta/contracts/ethers/KwentaStakingV2.ts b/src/apps/kwenta/contracts/ethers/KwentaStakingV2.ts new file mode 100644 index 000000000..5ad5af327 --- /dev/null +++ b/src/apps/kwenta/contracts/ethers/KwentaStakingV2.ts @@ -0,0 +1,1619 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from 'ethers'; +import type { FunctionFragment, Result, EventFragment } from '@ethersproject/abi'; +import type { Listener, Provider } from '@ethersproject/providers'; +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrValue } from './common'; + +export interface KwentaStakingV2Interface extends utils.Interface { + functions: { + 'MAX_COOLDOWN_PERIOD()': FunctionFragment; + 'MIN_COOLDOWN_PERIOD()': FunctionFragment; + 'acceptOwnership()': FunctionFragment; + 'approveOperator(address,bool)': FunctionFragment; + 'balanceAtTime(address,uint256)': FunctionFragment; + 'balanceOf(address)': FunctionFragment; + 'balancesCheckpoints(address,uint256)': FunctionFragment; + 'balancesCheckpointsLength(address)': FunctionFragment; + 'compound()': FunctionFragment; + 'compoundOnBehalf(address)': FunctionFragment; + 'cooldownPeriod()': FunctionFragment; + 'earned(address)': FunctionFragment; + 'escrowedBalanceAtTime(address,uint256)': FunctionFragment; + 'escrowedBalanceOf(address)': FunctionFragment; + 'escrowedBalancesCheckpoints(address,uint256)': FunctionFragment; + 'escrowedBalancesCheckpointsLength(address)': FunctionFragment; + 'exit()': FunctionFragment; + 'getReward()': FunctionFragment; + 'getRewardForDuration()': FunctionFragment; + 'getRewardOnBehalf(address)': FunctionFragment; + 'initialize(address)': FunctionFragment; + 'kwenta()': FunctionFragment; + 'lastTimeRewardApplicable()': FunctionFragment; + 'lastUpdateTime()': FunctionFragment; + 'nonEscrowedBalanceOf(address)': FunctionFragment; + 'notifyRewardAmount(uint256)': FunctionFragment; + 'operatorApprovals(address,address)': FunctionFragment; + 'owner()': FunctionFragment; + 'pauseStakingRewards()': FunctionFragment; + 'paused()': FunctionFragment; + 'pendingOwner()': FunctionFragment; + 'periodFinish()': FunctionFragment; + 'proxiableUUID()': FunctionFragment; + 'recoverERC20(address,uint256)': FunctionFragment; + 'renounceOwnership()': FunctionFragment; + 'rewardEscrow()': FunctionFragment; + 'rewardPerToken()': FunctionFragment; + 'rewardPerTokenStored()': FunctionFragment; + 'rewardRate()': FunctionFragment; + 'rewards(address)': FunctionFragment; + 'rewardsDuration()': FunctionFragment; + 'rewardsNotifier()': FunctionFragment; + 'setCooldownPeriod(uint256)': FunctionFragment; + 'setRewardsDuration(uint256)': FunctionFragment; + 'stake(uint256)': FunctionFragment; + 'stakeEscrow(uint256)': FunctionFragment; + 'stakeEscrowOnBehalf(address,uint256)': FunctionFragment; + 'totalSupply()': FunctionFragment; + 'totalSupplyAtTime(uint256)': FunctionFragment; + 'totalSupplyCheckpoints(uint256)': FunctionFragment; + 'totalSupplyCheckpointsLength()': FunctionFragment; + 'transferOwnership(address)': FunctionFragment; + 'unpauseStakingRewards()': FunctionFragment; + 'unstake(uint256)': FunctionFragment; + 'unstakeEscrow(uint256)': FunctionFragment; + 'unstakeEscrowSkipCooldown(address,uint256)': FunctionFragment; + 'unstakedEscrowedBalanceOf(address)': FunctionFragment; + 'upgradeTo(address)': FunctionFragment; + 'upgradeToAndCall(address,bytes)': FunctionFragment; + 'userLastStakeTime(address)': FunctionFragment; + 'userRewardPerTokenPaid(address)': FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | 'MAX_COOLDOWN_PERIOD' + | 'MIN_COOLDOWN_PERIOD' + | 'acceptOwnership' + | 'approveOperator' + | 'balanceAtTime' + | 'balanceOf' + | 'balancesCheckpoints' + | 'balancesCheckpointsLength' + | 'compound' + | 'compoundOnBehalf' + | 'cooldownPeriod' + | 'earned' + | 'escrowedBalanceAtTime' + | 'escrowedBalanceOf' + | 'escrowedBalancesCheckpoints' + | 'escrowedBalancesCheckpointsLength' + | 'exit' + | 'getReward' + | 'getRewardForDuration' + | 'getRewardOnBehalf' + | 'initialize' + | 'kwenta' + | 'lastTimeRewardApplicable' + | 'lastUpdateTime' + | 'nonEscrowedBalanceOf' + | 'notifyRewardAmount' + | 'operatorApprovals' + | 'owner' + | 'pauseStakingRewards' + | 'paused' + | 'pendingOwner' + | 'periodFinish' + | 'proxiableUUID' + | 'recoverERC20' + | 'renounceOwnership' + | 'rewardEscrow' + | 'rewardPerToken' + | 'rewardPerTokenStored' + | 'rewardRate' + | 'rewards' + | 'rewardsDuration' + | 'rewardsNotifier' + | 'setCooldownPeriod' + | 'setRewardsDuration' + | 'stake' + | 'stakeEscrow' + | 'stakeEscrowOnBehalf' + | 'totalSupply' + | 'totalSupplyAtTime' + | 'totalSupplyCheckpoints' + | 'totalSupplyCheckpointsLength' + | 'transferOwnership' + | 'unpauseStakingRewards' + | 'unstake' + | 'unstakeEscrow' + | 'unstakeEscrowSkipCooldown' + | 'unstakedEscrowedBalanceOf' + | 'upgradeTo' + | 'upgradeToAndCall' + | 'userLastStakeTime' + | 'userRewardPerTokenPaid', + ): FunctionFragment; + + encodeFunctionData(functionFragment: 'MAX_COOLDOWN_PERIOD', values?: undefined): string; + encodeFunctionData(functionFragment: 'MIN_COOLDOWN_PERIOD', values?: undefined): string; + encodeFunctionData(functionFragment: 'acceptOwnership', values?: undefined): string; + encodeFunctionData( + functionFragment: 'approveOperator', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'balanceAtTime', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'balanceOf', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'balancesCheckpoints', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'balancesCheckpointsLength', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'compound', values?: undefined): string; + encodeFunctionData(functionFragment: 'compoundOnBehalf', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'cooldownPeriod', values?: undefined): string; + encodeFunctionData(functionFragment: 'earned', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'escrowedBalanceAtTime', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'escrowedBalanceOf', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'escrowedBalancesCheckpoints', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'escrowedBalancesCheckpointsLength', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'exit', values?: undefined): string; + encodeFunctionData(functionFragment: 'getReward', values?: undefined): string; + encodeFunctionData(functionFragment: 'getRewardForDuration', values?: undefined): string; + encodeFunctionData(functionFragment: 'getRewardOnBehalf', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'initialize', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'kwenta', values?: undefined): string; + encodeFunctionData(functionFragment: 'lastTimeRewardApplicable', values?: undefined): string; + encodeFunctionData(functionFragment: 'lastUpdateTime', values?: undefined): string; + encodeFunctionData(functionFragment: 'nonEscrowedBalanceOf', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'notifyRewardAmount', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'operatorApprovals', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'owner', values?: undefined): string; + encodeFunctionData(functionFragment: 'pauseStakingRewards', values?: undefined): string; + encodeFunctionData(functionFragment: 'paused', values?: undefined): string; + encodeFunctionData(functionFragment: 'pendingOwner', values?: undefined): string; + encodeFunctionData(functionFragment: 'periodFinish', values?: undefined): string; + encodeFunctionData(functionFragment: 'proxiableUUID', values?: undefined): string; + encodeFunctionData( + functionFragment: 'recoverERC20', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'renounceOwnership', values?: undefined): string; + encodeFunctionData(functionFragment: 'rewardEscrow', values?: undefined): string; + encodeFunctionData(functionFragment: 'rewardPerToken', values?: undefined): string; + encodeFunctionData(functionFragment: 'rewardPerTokenStored', values?: undefined): string; + encodeFunctionData(functionFragment: 'rewardRate', values?: undefined): string; + encodeFunctionData(functionFragment: 'rewards', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'rewardsDuration', values?: undefined): string; + encodeFunctionData(functionFragment: 'rewardsNotifier', values?: undefined): string; + encodeFunctionData(functionFragment: 'setCooldownPeriod', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'setRewardsDuration', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'stake', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'stakeEscrow', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'stakeEscrowOnBehalf', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'totalSupply', values?: undefined): string; + encodeFunctionData(functionFragment: 'totalSupplyAtTime', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'totalSupplyCheckpoints', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'totalSupplyCheckpointsLength', values?: undefined): string; + encodeFunctionData(functionFragment: 'transferOwnership', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'unpauseStakingRewards', values?: undefined): string; + encodeFunctionData(functionFragment: 'unstake', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'unstakeEscrow', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'unstakeEscrowSkipCooldown', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'unstakedEscrowedBalanceOf', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'upgradeTo', values: [PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'upgradeToAndCall', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'userLastStakeTime', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'userRewardPerTokenPaid', values: [PromiseOrValue]): string; + + decodeFunctionResult(functionFragment: 'MAX_COOLDOWN_PERIOD', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'MIN_COOLDOWN_PERIOD', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'acceptOwnership', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'approveOperator', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'balanceAtTime', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'balanceOf', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'balancesCheckpoints', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'balancesCheckpointsLength', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'compound', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'compoundOnBehalf', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'cooldownPeriod', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'earned', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'escrowedBalanceAtTime', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'escrowedBalanceOf', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'escrowedBalancesCheckpoints', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'escrowedBalancesCheckpointsLength', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'exit', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getReward', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getRewardForDuration', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'getRewardOnBehalf', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'initialize', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'kwenta', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'lastTimeRewardApplicable', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'lastUpdateTime', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'nonEscrowedBalanceOf', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'notifyRewardAmount', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'operatorApprovals', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'owner', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'pauseStakingRewards', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'paused', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'pendingOwner', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'periodFinish', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'proxiableUUID', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'recoverERC20', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'renounceOwnership', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'rewardEscrow', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'rewardPerToken', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'rewardPerTokenStored', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'rewardRate', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'rewards', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'rewardsDuration', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'rewardsNotifier', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setCooldownPeriod', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setRewardsDuration', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'stake', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'stakeEscrow', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'stakeEscrowOnBehalf', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'totalSupply', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'totalSupplyAtTime', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'totalSupplyCheckpoints', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'totalSupplyCheckpointsLength', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'transferOwnership', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'unpauseStakingRewards', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'unstake', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'unstakeEscrow', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'unstakeEscrowSkipCooldown', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'unstakedEscrowedBalanceOf', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'upgradeTo', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'upgradeToAndCall', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'userLastStakeTime', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'userRewardPerTokenPaid', data: BytesLike): Result; + + events: { + 'AdminChanged(address,address)': EventFragment; + 'BeaconUpgraded(address)': EventFragment; + 'CooldownPeriodUpdated(uint256)': EventFragment; + 'EscrowStaked(address,uint256)': EventFragment; + 'EscrowUnstaked(address,uint256)': EventFragment; + 'Initialized(uint8)': EventFragment; + 'OperatorApproved(address,address,bool)': EventFragment; + 'OwnershipTransferStarted(address,address)': EventFragment; + 'OwnershipTransferred(address,address)': EventFragment; + 'Paused(address)': EventFragment; + 'Recovered(address,uint256)': EventFragment; + 'RewardAdded(uint256)': EventFragment; + 'RewardPaid(address,uint256)': EventFragment; + 'RewardsDurationUpdated(uint256)': EventFragment; + 'Staked(address,uint256)': EventFragment; + 'Unpaused(address)': EventFragment; + 'Unstaked(address,uint256)': EventFragment; + 'Upgraded(address)': EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: 'AdminChanged'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'BeaconUpgraded'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'CooldownPeriodUpdated'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'EscrowStaked'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'EscrowUnstaked'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Initialized'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'OperatorApproved'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'OwnershipTransferStarted'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'OwnershipTransferred'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Paused'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Recovered'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'RewardAdded'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'RewardPaid'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'RewardsDurationUpdated'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Staked'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Unpaused'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Unstaked'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Upgraded'): EventFragment; +} + +export interface AdminChangedEventObject { + previousAdmin: string; + newAdmin: string; +} +export type AdminChangedEvent = TypedEvent<[string, string], AdminChangedEventObject>; + +export type AdminChangedEventFilter = TypedEventFilter; + +export interface BeaconUpgradedEventObject { + beacon: string; +} +export type BeaconUpgradedEvent = TypedEvent<[string], BeaconUpgradedEventObject>; + +export type BeaconUpgradedEventFilter = TypedEventFilter; + +export interface CooldownPeriodUpdatedEventObject { + cooldownPeriod: BigNumber; +} +export type CooldownPeriodUpdatedEvent = TypedEvent<[BigNumber], CooldownPeriodUpdatedEventObject>; + +export type CooldownPeriodUpdatedEventFilter = TypedEventFilter; + +export interface EscrowStakedEventObject { + user: string; + amount: BigNumber; +} +export type EscrowStakedEvent = TypedEvent<[string, BigNumber], EscrowStakedEventObject>; + +export type EscrowStakedEventFilter = TypedEventFilter; + +export interface EscrowUnstakedEventObject { + user: string; + amount: BigNumber; +} +export type EscrowUnstakedEvent = TypedEvent<[string, BigNumber], EscrowUnstakedEventObject>; + +export type EscrowUnstakedEventFilter = TypedEventFilter; + +export interface InitializedEventObject { + version: number; +} +export type InitializedEvent = TypedEvent<[number], InitializedEventObject>; + +export type InitializedEventFilter = TypedEventFilter; + +export interface OperatorApprovedEventObject { + owner: string; + operator: string; + approved: boolean; +} +export type OperatorApprovedEvent = TypedEvent<[string, string, boolean], OperatorApprovedEventObject>; + +export type OperatorApprovedEventFilter = TypedEventFilter; + +export interface OwnershipTransferStartedEventObject { + previousOwner: string; + newOwner: string; +} +export type OwnershipTransferStartedEvent = TypedEvent<[string, string], OwnershipTransferStartedEventObject>; + +export type OwnershipTransferStartedEventFilter = TypedEventFilter; + +export interface OwnershipTransferredEventObject { + previousOwner: string; + newOwner: string; +} +export type OwnershipTransferredEvent = TypedEvent<[string, string], OwnershipTransferredEventObject>; + +export type OwnershipTransferredEventFilter = TypedEventFilter; + +export interface PausedEventObject { + account: string; +} +export type PausedEvent = TypedEvent<[string], PausedEventObject>; + +export type PausedEventFilter = TypedEventFilter; + +export interface RecoveredEventObject { + token: string; + amount: BigNumber; +} +export type RecoveredEvent = TypedEvent<[string, BigNumber], RecoveredEventObject>; + +export type RecoveredEventFilter = TypedEventFilter; + +export interface RewardAddedEventObject { + reward: BigNumber; +} +export type RewardAddedEvent = TypedEvent<[BigNumber], RewardAddedEventObject>; + +export type RewardAddedEventFilter = TypedEventFilter; + +export interface RewardPaidEventObject { + user: string; + reward: BigNumber; +} +export type RewardPaidEvent = TypedEvent<[string, BigNumber], RewardPaidEventObject>; + +export type RewardPaidEventFilter = TypedEventFilter; + +export interface RewardsDurationUpdatedEventObject { + newDuration: BigNumber; +} +export type RewardsDurationUpdatedEvent = TypedEvent<[BigNumber], RewardsDurationUpdatedEventObject>; + +export type RewardsDurationUpdatedEventFilter = TypedEventFilter; + +export interface StakedEventObject { + user: string; + amount: BigNumber; +} +export type StakedEvent = TypedEvent<[string, BigNumber], StakedEventObject>; + +export type StakedEventFilter = TypedEventFilter; + +export interface UnpausedEventObject { + account: string; +} +export type UnpausedEvent = TypedEvent<[string], UnpausedEventObject>; + +export type UnpausedEventFilter = TypedEventFilter; + +export interface UnstakedEventObject { + user: string; + amount: BigNumber; +} +export type UnstakedEvent = TypedEvent<[string, BigNumber], UnstakedEventObject>; + +export type UnstakedEventFilter = TypedEventFilter; + +export interface UpgradedEventObject { + implementation: string; +} +export type UpgradedEvent = TypedEvent<[string], UpgradedEventObject>; + +export type UpgradedEventFilter = TypedEventFilter; + +export interface KwentaStakingV2 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: KwentaStakingV2Interface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined, + ): Promise>; + + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + MAX_COOLDOWN_PERIOD(overrides?: CallOverrides): Promise<[BigNumber]>; + + MIN_COOLDOWN_PERIOD(overrides?: CallOverrides): Promise<[BigNumber]>; + + acceptOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + approveOperator( + _operator: PromiseOrValue, + _approved: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + balanceAtTime( + _account: PromiseOrValue, + _timestamp: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + balanceOf(_account: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + balancesCheckpoints( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + ts: BigNumber; + blk: BigNumber; + value: BigNumber; + } + >; + + balancesCheckpointsLength(_account: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + compound(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + compoundOnBehalf( + _account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + cooldownPeriod(overrides?: CallOverrides): Promise<[BigNumber]>; + + earned(_account: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + escrowedBalanceAtTime( + _account: PromiseOrValue, + _timestamp: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + escrowedBalanceOf(_account: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + escrowedBalancesCheckpoints( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + ts: BigNumber; + blk: BigNumber; + value: BigNumber; + } + >; + + escrowedBalancesCheckpointsLength( + _account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + exit(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + getReward(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + getRewardForDuration(overrides?: CallOverrides): Promise<[BigNumber]>; + + getRewardOnBehalf( + _account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + initialize( + _contractOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + kwenta(overrides?: CallOverrides): Promise<[string]>; + + lastTimeRewardApplicable(overrides?: CallOverrides): Promise<[BigNumber]>; + + lastUpdateTime(overrides?: CallOverrides): Promise<[BigNumber]>; + + nonEscrowedBalanceOf(_account: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + notifyRewardAmount( + _reward: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + operatorApprovals( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[boolean]>; + + owner(overrides?: CallOverrides): Promise<[string]>; + + pauseStakingRewards(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + paused(overrides?: CallOverrides): Promise<[boolean]>; + + pendingOwner(overrides?: CallOverrides): Promise<[string]>; + + periodFinish(overrides?: CallOverrides): Promise<[BigNumber]>; + + proxiableUUID(overrides?: CallOverrides): Promise<[string]>; + + recoverERC20( + _tokenAddress: PromiseOrValue, + _tokenAmount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + rewardEscrow(overrides?: CallOverrides): Promise<[string]>; + + rewardPerToken(overrides?: CallOverrides): Promise<[BigNumber]>; + + rewardPerTokenStored(overrides?: CallOverrides): Promise<[BigNumber]>; + + rewardRate(overrides?: CallOverrides): Promise<[BigNumber]>; + + rewards(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + rewardsDuration(overrides?: CallOverrides): Promise<[BigNumber]>; + + rewardsNotifier(overrides?: CallOverrides): Promise<[string]>; + + setCooldownPeriod( + _cooldownPeriod: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setRewardsDuration( + _rewardsDuration: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + stake( + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + stakeEscrow( + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + stakeEscrowOnBehalf( + _account: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + totalSupplyAtTime(_timestamp: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + totalSupplyCheckpoints( + arg0: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + ts: BigNumber; + blk: BigNumber; + value: BigNumber; + } + >; + + totalSupplyCheckpointsLength(overrides?: CallOverrides): Promise<[BigNumber]>; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + unpauseStakingRewards(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + unstake( + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + unstakeEscrow( + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + unstakeEscrowSkipCooldown( + _account: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + unstakedEscrowedBalanceOf(_account: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + userLastStakeTime(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + userRewardPerTokenPaid(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + }; + + MAX_COOLDOWN_PERIOD(overrides?: CallOverrides): Promise; + + MIN_COOLDOWN_PERIOD(overrides?: CallOverrides): Promise; + + acceptOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + approveOperator( + _operator: PromiseOrValue, + _approved: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + balanceAtTime( + _account: PromiseOrValue, + _timestamp: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + balanceOf(_account: PromiseOrValue, overrides?: CallOverrides): Promise; + + balancesCheckpoints( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + ts: BigNumber; + blk: BigNumber; + value: BigNumber; + } + >; + + balancesCheckpointsLength(_account: PromiseOrValue, overrides?: CallOverrides): Promise; + + compound(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + compoundOnBehalf( + _account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + cooldownPeriod(overrides?: CallOverrides): Promise; + + earned(_account: PromiseOrValue, overrides?: CallOverrides): Promise; + + escrowedBalanceAtTime( + _account: PromiseOrValue, + _timestamp: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + escrowedBalanceOf(_account: PromiseOrValue, overrides?: CallOverrides): Promise; + + escrowedBalancesCheckpoints( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + ts: BigNumber; + blk: BigNumber; + value: BigNumber; + } + >; + + escrowedBalancesCheckpointsLength(_account: PromiseOrValue, overrides?: CallOverrides): Promise; + + exit(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + getReward(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + getRewardForDuration(overrides?: CallOverrides): Promise; + + getRewardOnBehalf( + _account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + initialize( + _contractOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + kwenta(overrides?: CallOverrides): Promise; + + lastTimeRewardApplicable(overrides?: CallOverrides): Promise; + + lastUpdateTime(overrides?: CallOverrides): Promise; + + nonEscrowedBalanceOf(_account: PromiseOrValue, overrides?: CallOverrides): Promise; + + notifyRewardAmount( + _reward: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + operatorApprovals( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + pauseStakingRewards(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + paused(overrides?: CallOverrides): Promise; + + pendingOwner(overrides?: CallOverrides): Promise; + + periodFinish(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + recoverERC20( + _tokenAddress: PromiseOrValue, + _tokenAmount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + rewardEscrow(overrides?: CallOverrides): Promise; + + rewardPerToken(overrides?: CallOverrides): Promise; + + rewardPerTokenStored(overrides?: CallOverrides): Promise; + + rewardRate(overrides?: CallOverrides): Promise; + + rewards(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + + rewardsDuration(overrides?: CallOverrides): Promise; + + rewardsNotifier(overrides?: CallOverrides): Promise; + + setCooldownPeriod( + _cooldownPeriod: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setRewardsDuration( + _rewardsDuration: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + stake( + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + stakeEscrow( + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + stakeEscrowOnBehalf( + _account: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + totalSupplyAtTime(_timestamp: PromiseOrValue, overrides?: CallOverrides): Promise; + + totalSupplyCheckpoints( + arg0: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + ts: BigNumber; + blk: BigNumber; + value: BigNumber; + } + >; + + totalSupplyCheckpointsLength(overrides?: CallOverrides): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + unpauseStakingRewards(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + unstake( + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + unstakeEscrow( + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + unstakeEscrowSkipCooldown( + _account: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + unstakedEscrowedBalanceOf(_account: PromiseOrValue, overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + userLastStakeTime(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + + userRewardPerTokenPaid(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + + callStatic: { + MAX_COOLDOWN_PERIOD(overrides?: CallOverrides): Promise; + + MIN_COOLDOWN_PERIOD(overrides?: CallOverrides): Promise; + + acceptOwnership(overrides?: CallOverrides): Promise; + + approveOperator( + _operator: PromiseOrValue, + _approved: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + balanceAtTime( + _account: PromiseOrValue, + _timestamp: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + balanceOf(_account: PromiseOrValue, overrides?: CallOverrides): Promise; + + balancesCheckpoints( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + ts: BigNumber; + blk: BigNumber; + value: BigNumber; + } + >; + + balancesCheckpointsLength(_account: PromiseOrValue, overrides?: CallOverrides): Promise; + + compound(overrides?: CallOverrides): Promise; + + compoundOnBehalf(_account: PromiseOrValue, overrides?: CallOverrides): Promise; + + cooldownPeriod(overrides?: CallOverrides): Promise; + + earned(_account: PromiseOrValue, overrides?: CallOverrides): Promise; + + escrowedBalanceAtTime( + _account: PromiseOrValue, + _timestamp: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + escrowedBalanceOf(_account: PromiseOrValue, overrides?: CallOverrides): Promise; + + escrowedBalancesCheckpoints( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + ts: BigNumber; + blk: BigNumber; + value: BigNumber; + } + >; + + escrowedBalancesCheckpointsLength(_account: PromiseOrValue, overrides?: CallOverrides): Promise; + + exit(overrides?: CallOverrides): Promise; + + getReward(overrides?: CallOverrides): Promise; + + getRewardForDuration(overrides?: CallOverrides): Promise; + + getRewardOnBehalf(_account: PromiseOrValue, overrides?: CallOverrides): Promise; + + initialize(_contractOwner: PromiseOrValue, overrides?: CallOverrides): Promise; + + kwenta(overrides?: CallOverrides): Promise; + + lastTimeRewardApplicable(overrides?: CallOverrides): Promise; + + lastUpdateTime(overrides?: CallOverrides): Promise; + + nonEscrowedBalanceOf(_account: PromiseOrValue, overrides?: CallOverrides): Promise; + + notifyRewardAmount(_reward: PromiseOrValue, overrides?: CallOverrides): Promise; + + operatorApprovals( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + pauseStakingRewards(overrides?: CallOverrides): Promise; + + paused(overrides?: CallOverrides): Promise; + + pendingOwner(overrides?: CallOverrides): Promise; + + periodFinish(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + recoverERC20( + _tokenAddress: PromiseOrValue, + _tokenAmount: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + renounceOwnership(overrides?: CallOverrides): Promise; + + rewardEscrow(overrides?: CallOverrides): Promise; + + rewardPerToken(overrides?: CallOverrides): Promise; + + rewardPerTokenStored(overrides?: CallOverrides): Promise; + + rewardRate(overrides?: CallOverrides): Promise; + + rewards(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + + rewardsDuration(overrides?: CallOverrides): Promise; + + rewardsNotifier(overrides?: CallOverrides): Promise; + + setCooldownPeriod(_cooldownPeriod: PromiseOrValue, overrides?: CallOverrides): Promise; + + setRewardsDuration(_rewardsDuration: PromiseOrValue, overrides?: CallOverrides): Promise; + + stake(_amount: PromiseOrValue, overrides?: CallOverrides): Promise; + + stakeEscrow(_amount: PromiseOrValue, overrides?: CallOverrides): Promise; + + stakeEscrowOnBehalf( + _account: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + totalSupplyAtTime(_timestamp: PromiseOrValue, overrides?: CallOverrides): Promise; + + totalSupplyCheckpoints( + arg0: PromiseOrValue, + overrides?: CallOverrides, + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + ts: BigNumber; + blk: BigNumber; + value: BigNumber; + } + >; + + totalSupplyCheckpointsLength(overrides?: CallOverrides): Promise; + + transferOwnership(newOwner: PromiseOrValue, overrides?: CallOverrides): Promise; + + unpauseStakingRewards(overrides?: CallOverrides): Promise; + + unstake(_amount: PromiseOrValue, overrides?: CallOverrides): Promise; + + unstakeEscrow(_amount: PromiseOrValue, overrides?: CallOverrides): Promise; + + unstakeEscrowSkipCooldown( + _account: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + unstakedEscrowedBalanceOf(_account: PromiseOrValue, overrides?: CallOverrides): Promise; + + upgradeTo(newImplementation: PromiseOrValue, overrides?: CallOverrides): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + userLastStakeTime(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + + userRewardPerTokenPaid(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + }; + + filters: { + 'AdminChanged(address,address)'(previousAdmin?: null, newAdmin?: null): AdminChangedEventFilter; + AdminChanged(previousAdmin?: null, newAdmin?: null): AdminChangedEventFilter; + + 'BeaconUpgraded(address)'(beacon?: PromiseOrValue | null): BeaconUpgradedEventFilter; + BeaconUpgraded(beacon?: PromiseOrValue | null): BeaconUpgradedEventFilter; + + 'CooldownPeriodUpdated(uint256)'(cooldownPeriod?: null): CooldownPeriodUpdatedEventFilter; + CooldownPeriodUpdated(cooldownPeriod?: null): CooldownPeriodUpdatedEventFilter; + + 'EscrowStaked(address,uint256)'(user?: PromiseOrValue | null, amount?: null): EscrowStakedEventFilter; + EscrowStaked(user?: PromiseOrValue | null, amount?: null): EscrowStakedEventFilter; + + 'EscrowUnstaked(address,uint256)'(user?: null, amount?: null): EscrowUnstakedEventFilter; + EscrowUnstaked(user?: null, amount?: null): EscrowUnstakedEventFilter; + + 'Initialized(uint8)'(version?: null): InitializedEventFilter; + Initialized(version?: null): InitializedEventFilter; + + 'OperatorApproved(address,address,bool)'( + owner?: null, + operator?: null, + approved?: null, + ): OperatorApprovedEventFilter; + OperatorApproved(owner?: null, operator?: null, approved?: null): OperatorApprovedEventFilter; + + 'OwnershipTransferStarted(address,address)'( + previousOwner?: PromiseOrValue | null, + newOwner?: PromiseOrValue | null, + ): OwnershipTransferStartedEventFilter; + OwnershipTransferStarted( + previousOwner?: PromiseOrValue | null, + newOwner?: PromiseOrValue | null, + ): OwnershipTransferStartedEventFilter; + + 'OwnershipTransferred(address,address)'( + previousOwner?: PromiseOrValue | null, + newOwner?: PromiseOrValue | null, + ): OwnershipTransferredEventFilter; + OwnershipTransferred( + previousOwner?: PromiseOrValue | null, + newOwner?: PromiseOrValue | null, + ): OwnershipTransferredEventFilter; + + 'Paused(address)'(account?: null): PausedEventFilter; + Paused(account?: null): PausedEventFilter; + + 'Recovered(address,uint256)'(token?: null, amount?: null): RecoveredEventFilter; + Recovered(token?: null, amount?: null): RecoveredEventFilter; + + 'RewardAdded(uint256)'(reward?: null): RewardAddedEventFilter; + RewardAdded(reward?: null): RewardAddedEventFilter; + + 'RewardPaid(address,uint256)'(user?: PromiseOrValue | null, reward?: null): RewardPaidEventFilter; + RewardPaid(user?: PromiseOrValue | null, reward?: null): RewardPaidEventFilter; + + 'RewardsDurationUpdated(uint256)'(newDuration?: null): RewardsDurationUpdatedEventFilter; + RewardsDurationUpdated(newDuration?: null): RewardsDurationUpdatedEventFilter; + + 'Staked(address,uint256)'(user?: PromiseOrValue | null, amount?: null): StakedEventFilter; + Staked(user?: PromiseOrValue | null, amount?: null): StakedEventFilter; + + 'Unpaused(address)'(account?: null): UnpausedEventFilter; + Unpaused(account?: null): UnpausedEventFilter; + + 'Unstaked(address,uint256)'(user?: PromiseOrValue | null, amount?: null): UnstakedEventFilter; + Unstaked(user?: PromiseOrValue | null, amount?: null): UnstakedEventFilter; + + 'Upgraded(address)'(implementation?: PromiseOrValue | null): UpgradedEventFilter; + Upgraded(implementation?: PromiseOrValue | null): UpgradedEventFilter; + }; + + estimateGas: { + MAX_COOLDOWN_PERIOD(overrides?: CallOverrides): Promise; + + MIN_COOLDOWN_PERIOD(overrides?: CallOverrides): Promise; + + acceptOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + approveOperator( + _operator: PromiseOrValue, + _approved: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + balanceAtTime( + _account: PromiseOrValue, + _timestamp: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + balanceOf(_account: PromiseOrValue, overrides?: CallOverrides): Promise; + + balancesCheckpoints( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + balancesCheckpointsLength(_account: PromiseOrValue, overrides?: CallOverrides): Promise; + + compound(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + compoundOnBehalf( + _account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + cooldownPeriod(overrides?: CallOverrides): Promise; + + earned(_account: PromiseOrValue, overrides?: CallOverrides): Promise; + + escrowedBalanceAtTime( + _account: PromiseOrValue, + _timestamp: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + escrowedBalanceOf(_account: PromiseOrValue, overrides?: CallOverrides): Promise; + + escrowedBalancesCheckpoints( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + escrowedBalancesCheckpointsLength(_account: PromiseOrValue, overrides?: CallOverrides): Promise; + + exit(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + getReward(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + getRewardForDuration(overrides?: CallOverrides): Promise; + + getRewardOnBehalf( + _account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + initialize( + _contractOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + kwenta(overrides?: CallOverrides): Promise; + + lastTimeRewardApplicable(overrides?: CallOverrides): Promise; + + lastUpdateTime(overrides?: CallOverrides): Promise; + + nonEscrowedBalanceOf(_account: PromiseOrValue, overrides?: CallOverrides): Promise; + + notifyRewardAmount( + _reward: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + operatorApprovals( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + pauseStakingRewards(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + paused(overrides?: CallOverrides): Promise; + + pendingOwner(overrides?: CallOverrides): Promise; + + periodFinish(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + recoverERC20( + _tokenAddress: PromiseOrValue, + _tokenAmount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + rewardEscrow(overrides?: CallOverrides): Promise; + + rewardPerToken(overrides?: CallOverrides): Promise; + + rewardPerTokenStored(overrides?: CallOverrides): Promise; + + rewardRate(overrides?: CallOverrides): Promise; + + rewards(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + + rewardsDuration(overrides?: CallOverrides): Promise; + + rewardsNotifier(overrides?: CallOverrides): Promise; + + setCooldownPeriod( + _cooldownPeriod: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setRewardsDuration( + _rewardsDuration: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + stake( + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + stakeEscrow( + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + stakeEscrowOnBehalf( + _account: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + totalSupplyAtTime(_timestamp: PromiseOrValue, overrides?: CallOverrides): Promise; + + totalSupplyCheckpoints(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + + totalSupplyCheckpointsLength(overrides?: CallOverrides): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + unpauseStakingRewards(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + unstake( + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + unstakeEscrow( + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + unstakeEscrowSkipCooldown( + _account: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + unstakedEscrowedBalanceOf(_account: PromiseOrValue, overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + userLastStakeTime(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + + userRewardPerTokenPaid(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + MAX_COOLDOWN_PERIOD(overrides?: CallOverrides): Promise; + + MIN_COOLDOWN_PERIOD(overrides?: CallOverrides): Promise; + + acceptOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + approveOperator( + _operator: PromiseOrValue, + _approved: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + balanceAtTime( + _account: PromiseOrValue, + _timestamp: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + balanceOf(_account: PromiseOrValue, overrides?: CallOverrides): Promise; + + balancesCheckpoints( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + balancesCheckpointsLength( + _account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + compound(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + compoundOnBehalf( + _account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + cooldownPeriod(overrides?: CallOverrides): Promise; + + earned(_account: PromiseOrValue, overrides?: CallOverrides): Promise; + + escrowedBalanceAtTime( + _account: PromiseOrValue, + _timestamp: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + escrowedBalanceOf(_account: PromiseOrValue, overrides?: CallOverrides): Promise; + + escrowedBalancesCheckpoints( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + escrowedBalancesCheckpointsLength( + _account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + exit(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + getReward(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + getRewardForDuration(overrides?: CallOverrides): Promise; + + getRewardOnBehalf( + _account: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + initialize( + _contractOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + kwenta(overrides?: CallOverrides): Promise; + + lastTimeRewardApplicable(overrides?: CallOverrides): Promise; + + lastUpdateTime(overrides?: CallOverrides): Promise; + + nonEscrowedBalanceOf(_account: PromiseOrValue, overrides?: CallOverrides): Promise; + + notifyRewardAmount( + _reward: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + operatorApprovals( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + pauseStakingRewards(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + paused(overrides?: CallOverrides): Promise; + + pendingOwner(overrides?: CallOverrides): Promise; + + periodFinish(overrides?: CallOverrides): Promise; + + proxiableUUID(overrides?: CallOverrides): Promise; + + recoverERC20( + _tokenAddress: PromiseOrValue, + _tokenAmount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + renounceOwnership(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + rewardEscrow(overrides?: CallOverrides): Promise; + + rewardPerToken(overrides?: CallOverrides): Promise; + + rewardPerTokenStored(overrides?: CallOverrides): Promise; + + rewardRate(overrides?: CallOverrides): Promise; + + rewards(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + + rewardsDuration(overrides?: CallOverrides): Promise; + + rewardsNotifier(overrides?: CallOverrides): Promise; + + setCooldownPeriod( + _cooldownPeriod: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + setRewardsDuration( + _rewardsDuration: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + stake( + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + stakeEscrow( + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + stakeEscrowOnBehalf( + _account: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + totalSupplyAtTime( + _timestamp: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + totalSupplyCheckpoints( + arg0: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + totalSupplyCheckpointsLength(overrides?: CallOverrides): Promise; + + transferOwnership( + newOwner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + unpauseStakingRewards(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + + unstake( + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + unstakeEscrow( + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + unstakeEscrowSkipCooldown( + _account: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + unstakedEscrowedBalanceOf( + _account: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + upgradeTo( + newImplementation: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + upgradeToAndCall( + newImplementation: PromiseOrValue, + data: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue }, + ): Promise; + + userLastStakeTime(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + + userRewardPerTokenPaid(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + }; +} diff --git a/src/apps/kwenta/contracts/ethers/factories/KwentaAccountResolver__factory.ts b/src/apps/kwenta/contracts/ethers/factories/KwentaAccountResolver__factory.ts index 121326534..27e439425 100644 --- a/src/apps/kwenta/contracts/ethers/factories/KwentaAccountResolver__factory.ts +++ b/src/apps/kwenta/contracts/ethers/factories/KwentaAccountResolver__factory.ts @@ -267,7 +267,7 @@ const _abi = [ stateMutability: 'nonpayable', type: 'function', }, -]; +] as const; export class KwentaAccountResolver__factory { static readonly abi = _abi; diff --git a/src/apps/kwenta/contracts/ethers/factories/KwentaEscrow__factory.ts b/src/apps/kwenta/contracts/ethers/factories/KwentaEscrow__factory.ts index 36a1dfd43..5666d8632 100644 --- a/src/apps/kwenta/contracts/ethers/factories/KwentaEscrow__factory.ts +++ b/src/apps/kwenta/contracts/ethers/factories/KwentaEscrow__factory.ts @@ -667,7 +667,7 @@ const _abi = [ stateMutability: 'view', type: 'function', }, -]; +] as const; export class KwentaEscrow__factory { static readonly abi = _abi; diff --git a/src/apps/kwenta/contracts/ethers/factories/KwentaStakingV2__factory.ts b/src/apps/kwenta/contracts/ethers/factories/KwentaStakingV2__factory.ts new file mode 100644 index 000000000..6ae4c71f3 --- /dev/null +++ b/src/apps/kwenta/contracts/ethers/factories/KwentaStakingV2__factory.ts @@ -0,0 +1,1374 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from 'ethers'; +import type { Provider } from '@ethersproject/providers'; +import type { KwentaStakingV2, KwentaStakingV2Interface } from '../KwentaStakingV2'; + +const _abi = [ + { + inputs: [ + { + internalType: 'address', + name: '_kwenta', + type: 'address', + }, + { + internalType: 'address', + name: '_rewardEscrow', + type: 'address', + }, + { + internalType: 'address', + name: '_rewardsNotifier', + type: 'address', + }, + ], + stateMutability: 'nonpayable', + type: 'constructor', + }, + { + inputs: [], + name: 'AmountZero', + type: 'error', + }, + { + inputs: [], + name: 'CannotApproveSelf', + type: 'error', + }, + { + inputs: [], + name: 'CannotRecoverStakingToken', + type: 'error', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'maxCooldownPeriod', + type: 'uint256', + }, + ], + name: 'CooldownPeriodTooHigh', + type: 'error', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'minCooldownPeriod', + type: 'uint256', + }, + ], + name: 'CooldownPeriodTooLow', + type: 'error', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'availableBalance', + type: 'uint256', + }, + ], + name: 'InsufficientBalance', + type: 'error', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'unstakedEscrow', + type: 'uint256', + }, + ], + name: 'InsufficientUnstakedEscrow', + type: 'error', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'canUnstakeAt', + type: 'uint256', + }, + ], + name: 'MustWaitForUnlock', + type: 'error', + }, + { + inputs: [], + name: 'NotApproved', + type: 'error', + }, + { + inputs: [], + name: 'OnlyRewardEscrow', + type: 'error', + }, + { + inputs: [], + name: 'OnlyRewardsNotifier', + type: 'error', + }, + { + inputs: [], + name: 'RewardsDurationCannotBeZero', + type: 'error', + }, + { + inputs: [], + name: 'RewardsPeriodNotComplete', + type: 'error', + }, + { + inputs: [], + name: 'ZeroAddress', + type: 'error', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'previousAdmin', + type: 'address', + }, + { + indexed: false, + internalType: 'address', + name: 'newAdmin', + type: 'address', + }, + ], + name: 'AdminChanged', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'beacon', + type: 'address', + }, + ], + name: 'BeaconUpgraded', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint256', + name: 'cooldownPeriod', + type: 'uint256', + }, + ], + name: 'CooldownPeriodUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'user', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'EscrowStaked', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'user', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'EscrowUnstaked', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint8', + name: 'version', + type: 'uint8', + }, + ], + name: 'Initialized', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + indexed: false, + internalType: 'address', + name: 'operator', + type: 'address', + }, + { + indexed: false, + internalType: 'bool', + name: 'approved', + type: 'bool', + }, + ], + name: 'OperatorApproved', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'previousOwner', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'newOwner', + type: 'address', + }, + ], + name: 'OwnershipTransferStarted', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'previousOwner', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'newOwner', + type: 'address', + }, + ], + name: 'OwnershipTransferred', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'Paused', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'token', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'Recovered', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint256', + name: 'reward', + type: 'uint256', + }, + ], + name: 'RewardAdded', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'user', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'reward', + type: 'uint256', + }, + ], + name: 'RewardPaid', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint256', + name: 'newDuration', + type: 'uint256', + }, + ], + name: 'RewardsDurationUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'user', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'Staked', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'Unpaused', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'user', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'Unstaked', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'implementation', + type: 'address', + }, + ], + name: 'Upgraded', + type: 'event', + }, + { + inputs: [], + name: 'MAX_COOLDOWN_PERIOD', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'MIN_COOLDOWN_PERIOD', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'acceptOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_operator', + type: 'address', + }, + { + internalType: 'bool', + name: '_approved', + type: 'bool', + }, + ], + name: 'approveOperator', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_account', + type: 'address', + }, + { + internalType: 'uint256', + name: '_timestamp', + type: 'uint256', + }, + ], + name: 'balanceAtTime', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_account', + type: 'address', + }, + ], + name: 'balanceOf', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + name: 'balancesCheckpoints', + outputs: [ + { + internalType: 'uint64', + name: 'ts', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'blk', + type: 'uint64', + }, + { + internalType: 'uint128', + name: 'value', + type: 'uint128', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_account', + type: 'address', + }, + ], + name: 'balancesCheckpointsLength', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'compound', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_account', + type: 'address', + }, + ], + name: 'compoundOnBehalf', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'cooldownPeriod', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_account', + type: 'address', + }, + ], + name: 'earned', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_account', + type: 'address', + }, + { + internalType: 'uint256', + name: '_timestamp', + type: 'uint256', + }, + ], + name: 'escrowedBalanceAtTime', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_account', + type: 'address', + }, + ], + name: 'escrowedBalanceOf', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + name: 'escrowedBalancesCheckpoints', + outputs: [ + { + internalType: 'uint64', + name: 'ts', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'blk', + type: 'uint64', + }, + { + internalType: 'uint128', + name: 'value', + type: 'uint128', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_account', + type: 'address', + }, + ], + name: 'escrowedBalancesCheckpointsLength', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'exit', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'getReward', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'getRewardForDuration', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_account', + type: 'address', + }, + ], + name: 'getRewardOnBehalf', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_contractOwner', + type: 'address', + }, + ], + name: 'initialize', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'kwenta', + outputs: [ + { + internalType: 'contract IKwenta', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'lastTimeRewardApplicable', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'lastUpdateTime', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_account', + type: 'address', + }, + ], + name: 'nonEscrowedBalanceOf', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: '_reward', + type: 'uint256', + }, + ], + name: 'notifyRewardAmount', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'operatorApprovals', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'owner', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'pauseStakingRewards', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'paused', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'pendingOwner', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'periodFinish', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'proxiableUUID', + outputs: [ + { + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_tokenAddress', + type: 'address', + }, + { + internalType: 'uint256', + name: '_tokenAmount', + type: 'uint256', + }, + ], + name: 'recoverERC20', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'renounceOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'rewardEscrow', + outputs: [ + { + internalType: 'contract IRewardEscrowV2', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'rewardPerToken', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'rewardPerTokenStored', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'rewardRate', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'rewards', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'rewardsDuration', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'rewardsNotifier', + outputs: [ + { + internalType: 'contract IStakingRewardsNotifier', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: '_cooldownPeriod', + type: 'uint256', + }, + ], + name: 'setCooldownPeriod', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: '_rewardsDuration', + type: 'uint256', + }, + ], + name: 'setRewardsDuration', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: '_amount', + type: 'uint256', + }, + ], + name: 'stake', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: '_amount', + type: 'uint256', + }, + ], + name: 'stakeEscrow', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_account', + type: 'address', + }, + { + internalType: 'uint256', + name: '_amount', + type: 'uint256', + }, + ], + name: 'stakeEscrowOnBehalf', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'totalSupply', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: '_timestamp', + type: 'uint256', + }, + ], + name: 'totalSupplyAtTime', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + name: 'totalSupplyCheckpoints', + outputs: [ + { + internalType: 'uint64', + name: 'ts', + type: 'uint64', + }, + { + internalType: 'uint64', + name: 'blk', + type: 'uint64', + }, + { + internalType: 'uint128', + name: 'value', + type: 'uint128', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'totalSupplyCheckpointsLength', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newOwner', + type: 'address', + }, + ], + name: 'transferOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'unpauseStakingRewards', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: '_amount', + type: 'uint256', + }, + ], + name: 'unstake', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: '_amount', + type: 'uint256', + }, + ], + name: 'unstakeEscrow', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_account', + type: 'address', + }, + { + internalType: 'uint256', + name: '_amount', + type: 'uint256', + }, + ], + name: 'unstakeEscrowSkipCooldown', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_account', + type: 'address', + }, + ], + name: 'unstakedEscrowedBalanceOf', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newImplementation', + type: 'address', + }, + ], + name: 'upgradeTo', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'newImplementation', + type: 'address', + }, + { + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, + ], + name: 'upgradeToAndCall', + outputs: [], + stateMutability: 'payable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'userLastStakeTime', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'userRewardPerTokenPaid', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, +] as const; + +export class KwentaStakingV2__factory { + static readonly abi = _abi; + static createInterface(): KwentaStakingV2Interface { + return new utils.Interface(_abi) as KwentaStakingV2Interface; + } + static connect(address: string, signerOrProvider: Signer | Provider): KwentaStakingV2 { + return new Contract(address, _abi, signerOrProvider) as KwentaStakingV2; + } +} diff --git a/src/apps/kwenta/contracts/ethers/factories/KwentaStaking__factory.ts b/src/apps/kwenta/contracts/ethers/factories/KwentaStaking__factory.ts index b564b4db0..0d3bbe7c5 100644 --- a/src/apps/kwenta/contracts/ethers/factories/KwentaStaking__factory.ts +++ b/src/apps/kwenta/contracts/ethers/factories/KwentaStaking__factory.ts @@ -689,7 +689,7 @@ const _abi = [ stateMutability: 'view', type: 'function', }, -]; +] as const; export class KwentaStaking__factory { static readonly abi = _abi; diff --git a/src/apps/kwenta/contracts/ethers/factories/index.ts b/src/apps/kwenta/contracts/ethers/factories/index.ts index 7ec5c0220..f86ea4349 100644 --- a/src/apps/kwenta/contracts/ethers/factories/index.ts +++ b/src/apps/kwenta/contracts/ethers/factories/index.ts @@ -4,3 +4,4 @@ export { KwentaAccountResolver__factory } from './KwentaAccountResolver__factory'; export { KwentaEscrow__factory } from './KwentaEscrow__factory'; export { KwentaStaking__factory } from './KwentaStaking__factory'; +export { KwentaStakingV2__factory } from './KwentaStakingV2__factory'; diff --git a/src/apps/kwenta/contracts/ethers/index.ts b/src/apps/kwenta/contracts/ethers/index.ts index 8621cc8be..01d722987 100644 --- a/src/apps/kwenta/contracts/ethers/index.ts +++ b/src/apps/kwenta/contracts/ethers/index.ts @@ -4,7 +4,9 @@ export type { KwentaAccountResolver } from './KwentaAccountResolver'; export type { KwentaEscrow } from './KwentaEscrow'; export type { KwentaStaking } from './KwentaStaking'; +export type { KwentaStakingV2 } from './KwentaStakingV2'; export * as factories from './factories'; export { KwentaAccountResolver__factory } from './factories/KwentaAccountResolver__factory'; export { KwentaEscrow__factory } from './factories/KwentaEscrow__factory'; +export { KwentaStakingV2__factory } from './factories/KwentaStakingV2__factory'; export { KwentaStaking__factory } from './factories/KwentaStaking__factory'; diff --git a/src/apps/kwenta/contracts/index.ts b/src/apps/kwenta/contracts/index.ts index e38bc84cc..173192eba 100644 --- a/src/apps/kwenta/contracts/index.ts +++ b/src/apps/kwenta/contracts/index.ts @@ -4,7 +4,12 @@ import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; import { ContractFactory } from '~contract/contracts'; import { Network } from '~types/network.interface'; -import { KwentaAccountResolver__factory, KwentaEscrow__factory, KwentaStaking__factory } from './ethers'; +import { + KwentaAccountResolver__factory, + KwentaEscrow__factory, + KwentaStaking__factory, + KwentaStakingV2__factory, +} from './ethers'; // eslint-disable-next-line type ContractOpts = { address: string; network: Network }; @@ -24,8 +29,12 @@ export class KwentaContractFactory extends ContractFactory { kwentaStaking({ address, network }: ContractOpts) { return KwentaStaking__factory.connect(address, this.appToolkit.getNetworkProvider(network)); } + kwentaStakingV2({ address, network }: ContractOpts) { + return KwentaStakingV2__factory.connect(address, this.appToolkit.getNetworkProvider(network)); + } } export type { KwentaAccountResolver } from './ethers'; export type { KwentaEscrow } from './ethers'; export type { KwentaStaking } from './ethers'; +export type { KwentaStakingV2 } from './ethers'; diff --git a/src/apps/kwenta/kwenta.module.ts b/src/apps/kwenta/kwenta.module.ts index ee232eae3..56e4b8c97 100644 --- a/src/apps/kwenta/kwenta.module.ts +++ b/src/apps/kwenta/kwenta.module.ts @@ -9,6 +9,7 @@ import { OptimismKwentaEscrowContractPositionFetcher } from './optimism/kwenta.e import { OptimismKwentaPerpV1CrossMarginContractPositionFetcher } from './optimism/kwenta.perp-v1-cross-margin.contract-position-fetcher'; import { OptimismKwentaPerpV2SmartMarginContractPositionFetcher } from './optimism/kwenta.perp-v2-smart-margin.contract-position-fetcher'; import { OptimismKwentaStakingContractPositionFetcher } from './optimism/kwenta.staking.contract-position-fetcher'; +import { OptimismKwentaStakingV2ContractPositionFetcher } from './optimism/kwenta.staking-v2.contract-position-fetcher'; @Module({ providers: [ @@ -18,6 +19,7 @@ import { OptimismKwentaStakingContractPositionFetcher } from './optimism/kwenta. OptimismKwentaPerpV2SmartMarginContractPositionFetcher, OptimismKwentaStakingContractPositionFetcher, OptimismKwentaEscrowContractPositionFetcher, + OptimismKwentaStakingV2ContractPositionFetcher, ], }) -export class KwentaAppModule extends AbstractApp() {} +export class KwentaAppModule extends AbstractApp() { } diff --git a/src/apps/kwenta/optimism/kwenta.staking-v2.contract-position-fetcher.ts b/src/apps/kwenta/optimism/kwenta.staking-v2.contract-position-fetcher.ts new file mode 100644 index 000000000..80adb32ae --- /dev/null +++ b/src/apps/kwenta/optimism/kwenta.staking-v2.contract-position-fetcher.ts @@ -0,0 +1,67 @@ +import { Inject } from '@nestjs/common'; + +import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; +import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; +import { getLabelFromToken } from '~app-toolkit/helpers/presentation/image.present'; +import { isSupplied } from '~position/position.utils'; +import { + GetDataPropsParams, + GetDisplayPropsParams, + GetTokenBalancesParams, +} from '~position/template/contract-position.template.types'; +import { + SingleStakingFarmDataProps, + SingleStakingFarmDefinition, + SingleStakingFarmTemplateContractPositionFetcher, +} from '~position/template/single-staking.template.contract-position-fetcher'; + +import { KwentaContractFactory, KwentaStakingV2 } from '../contracts'; + +const FARMS = [ + { + address: '0x61294940ce7cd1bda10e349adc5b538b722ceb88', + stakedTokenAddress: '0x920cf626a271321c151d027030d5d08af699456b', // Kwenta + rewardTokenAddresses: ['0x920cf626a271321c151d027030d5d08af699456b'], // Kwenta + }, +]; + +@PositionTemplate() +export class OptimismKwentaStakingV2ContractPositionFetcher extends SingleStakingFarmTemplateContractPositionFetcher { + groupLabel = 'Staking V2'; + + constructor( + @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, + @Inject(KwentaContractFactory) protected readonly contractFactory: KwentaContractFactory, + ) { + super(appToolkit); + } + + getContract(address: string): KwentaStakingV2 { + return this.contractFactory.kwentaStakingV2({ address, network: this.network }); + } + + async getLabel({ contractPosition }: GetDisplayPropsParams) { + const suppliedToken = contractPosition.tokens.find(isSupplied)!; + return `Staked ${getLabelFromToken(suppliedToken)}`; + } + + async getFarmDefinitions(): Promise { + return FARMS; + } + + getRewardRates({ contract }: GetDataPropsParams) { + return contract.rewardRate(); + } + + getIsActive({ contract }: GetDataPropsParams) { + return contract.rewardRate().then(rate => rate.gt(0)); + } + + getStakedTokenBalance({ contract, address }: GetTokenBalancesParams) { + return contract.balanceOf(address); + } + + getRewardTokenBalances({ contract, address }: GetTokenBalancesParams) { + return contract.earned(address); + } +}