From a5ee5b4ad29d31480834ad5d3ff0ef7be474f289 Mon Sep 17 00:00:00 2001 From: William Poulin Date: Wed, 27 Sep 2023 13:57:50 -0400 Subject: [PATCH] fix(aura): Fix LP Farms underlying tokens --- src/apps/aura/aura.module.ts | 2 +- .../aura.farm.contract-position-fetcher.ts | 63 +- .../contracts/abis/aura-base-reward-pool.json | 1209 ++++++++--------- .../aura/contracts/abis/aura-stash-token.json | 112 ++ .../contracts/ethers/AuraBaseRewardPool.ts | 631 ++++++++- .../aura/contracts/ethers/AuraStashToken.ts | 335 +++++ .../factories/AuraBaseRewardPool__factory.ts | 739 ++++++++-- .../factories/AuraStashToken__factory.ts | 234 ++++ .../aura/contracts/ethers/factories/index.ts | 1 + src/apps/aura/contracts/ethers/index.ts | 2 + src/apps/aura/contracts/index.ts | 5 + 11 files changed, 2512 insertions(+), 821 deletions(-) create mode 100644 src/apps/aura/contracts/abis/aura-stash-token.json create mode 100644 src/apps/aura/contracts/ethers/AuraStashToken.ts create mode 100644 src/apps/aura/contracts/ethers/factories/AuraStashToken__factory.ts diff --git a/src/apps/aura/aura.module.ts b/src/apps/aura/aura.module.ts index 781366dee..14a4070fc 100644 --- a/src/apps/aura/aura.module.ts +++ b/src/apps/aura/aura.module.ts @@ -24,8 +24,8 @@ import { OptimismAuraDepositTokenFetcher } from './optimism/aura.deposit.token-f ArbitrumAuraDepositTokenFetcher, // Ethereum EthereumAuraAuraBalTokenFetcher, - EthereumAuraDepositTokenFetcher, EthereumAuraChefContractPositionFetcher, + EthereumAuraDepositTokenFetcher, EthereumAuraLpFarmContractPositionFetcher, EthereumAuraLockerContractPositionFetcher, EthereumAuraAuraBalStakingContractPositionFetcher, diff --git a/src/apps/aura/common/aura.farm.contract-position-fetcher.ts b/src/apps/aura/common/aura.farm.contract-position-fetcher.ts index 6aa7cdcb0..60f53c8da 100644 --- a/src/apps/aura/common/aura.farm.contract-position-fetcher.ts +++ b/src/apps/aura/common/aura.farm.contract-position-fetcher.ts @@ -1,6 +1,6 @@ import { Inject } from '@nestjs/common'; import { BigNumber, BigNumberish } from 'ethers'; -import { range } from 'lodash'; +import { compact, range } from 'lodash'; import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; import { isClaimable } from '~position/position.utils'; @@ -97,11 +97,33 @@ export abstract class AuraFarmContractPositionFetcher extends SingleStakingFarmD range(0, Number(await contract.extraRewardsLength())).map(async v => { const vbpAddress = await contract.extraRewards(v); const vbp = this.contractFactory.auraVirtualBalanceRewardPool({ address: vbpAddress, network: this.network }); - return multicall.wrap(vbp).rewardToken(); + const stashTokenAddressRaw = await multicall.wrap(vbp).rewardToken(); + let rewardTokenAddress = stashTokenAddressRaw.toLowerCase(); + + const stashTokenContract = this.contractFactory.auraStashToken({ + address: rewardTokenAddress, + network: this.network, + }); + + const isStash = await multicall + .wrap(stashTokenContract) + .stash() + .then(() => true) + .catch(() => false); + + if (isStash) { + const rewardTokenAddressRaw = await multicall.wrap(stashTokenContract).baseToken(); + rewardTokenAddress = rewardTokenAddressRaw.toLowerCase(); + } + + // We will combine AURA extra rewards with the amount minted + if (rewardTokenAddress === primaryRewardTokenAddresses[1]) return null; + + return rewardTokenAddress; }), ); - return [...primaryRewardTokenAddresses, ...extraRewardTokenAddresses]; + return [...primaryRewardTokenAddresses, ...compact(extraRewardTokenAddresses)]; } async getRewardRates({ @@ -139,17 +161,18 @@ export abstract class AuraFarmContractPositionFetcher extends SingleStakingFarmD multicall, }: GetTokenBalancesParams) { const rewardTokens = contractPosition.tokens.filter(isClaimable); - const [, auraRewardToken, ...extraRewards] = rewardTokens; + const [, auraRewardToken] = rewardTokens; const auraTokenContract = multicall.wrap(this.contractFactory.erc20(auraRewardToken)); const currentAuraSupply = await auraTokenContract.totalSupply(); const balBalanceBN = await contract.earned(address); const balBalanceRaw = balBalanceBN.toString(); - const auraBalanceRaw = claimedBalToMintedAura(balBalanceRaw, currentAuraSupply.toString()); + let auraBalanceRaw = claimedBalToMintedAura(balBalanceRaw, currentAuraSupply.toString()); + const numExtraRewards = await multicall.wrap(contract).extraRewardsLength(); const extraRewardBalances = await Promise.all( - extraRewards.map(async (_, i) => { + range(0, Number(numExtraRewards)).map(async (_, i) => { const extraRewardAddress = await contract.extraRewards(i); const extraRewardContract = this.contractFactory.auraVirtualBalanceRewardPool({ address: extraRewardAddress, @@ -157,10 +180,34 @@ export abstract class AuraFarmContractPositionFetcher extends SingleStakingFarmD }); const earnedBN = await multicall.wrap(extraRewardContract).earned(address); - return earnedBN.toString(); + const extraRewardStashTokenAddressRaw = await multicall.wrap(extraRewardContract).rewardToken(); + let extraRewardStashTokenAddress = extraRewardStashTokenAddressRaw.toLowerCase(); + const stashTokenContract = this.contractFactory.auraStashToken({ + address: extraRewardStashTokenAddress, + network: this.network, + }); + + const isStash = await multicall + .wrap(stashTokenContract) + .stash() + .then(() => true) + .catch(() => false); + + if (isStash) { + const extraRewardTokenAddressRaw = await multicall.wrap(stashTokenContract).baseToken(); + extraRewardStashTokenAddress = extraRewardTokenAddressRaw.toLowerCase(); + } + + // We will combine AURA extra rewards with the amount minted + if (extraRewardStashTokenAddress === auraRewardToken.address) { + auraBalanceRaw = auraBalanceRaw.add(earnedBN); + return null; + } + + return earnedBN; }), ); - return [balBalanceRaw, auraBalanceRaw, ...extraRewardBalances]; + return [balBalanceRaw, auraBalanceRaw, ...compact(extraRewardBalances)]; } } diff --git a/src/apps/aura/contracts/abis/aura-base-reward-pool.json b/src/apps/aura/contracts/abis/aura-base-reward-pool.json index 7f525d89b..0d2d02ea8 100644 --- a/src/apps/aura/contracts/abis/aura-base-reward-pool.json +++ b/src/apps/aura/contracts/abis/aura-base-reward-pool.json @@ -1,679 +1,530 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "BaseRewardPool", - "sourceName": "convex-platform/contracts/contracts/BaseRewardPool.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "uint256", - "name": "pid_", - "type": "uint256" - }, - { - "internalType": "address", - "name": "stakingToken_", - "type": "address" - }, - { - "internalType": "address", - "name": "rewardToken_", - "type": "address" - }, - { - "internalType": "address", - "name": "operator_", - "type": "address" - }, - { - "internalType": "address", - "name": "rewardManager_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "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": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Staked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Withdrawn", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_reward", - "type": "address" - } - ], - "name": "addExtraReward", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "clearExtraRewards", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "currentRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "donate", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "duration", - "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": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "extraRewards", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "extraRewardsLength", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getReward", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "bool", - "name": "_claimExtras", - "type": "bool" - } - ], - "name": "getReward", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "historicalRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "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": [], - "name": "newRewardRatio", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "operator", - "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": "pid", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "processIdleRewards", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_rewards", - "type": "uint256" - } - ], - "name": "queueNewRewards", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "queuedRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rewardManager", - "outputs": [ - { - "internalType": "address", - "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": [], - "name": "rewardToken", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "rewards", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "stake", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "stakeAll", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_for", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "stakeFor", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "stakingToken", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "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" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "claim", - "type": "bool" - } - ], - "name": "withdraw", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bool", - "name": "claim", - "type": "bool" - } - ], - "name": "withdrawAll", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bool", - "name": "claim", - "type": "bool" - } - ], - "name": "withdrawAllAndUnwrap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "claim", - "type": "bool" - } - ], - "name": "withdrawAndUnwrap", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x61012060405260008055600060015560006004556000600555600060065534801561002957600080fd5b50604051611d09380380611d09833981810160405260a081101561004c57600080fd5b50805160208201516040830151606080850151608095860151610100959095526001600160601b031993821b841660a05291811b8316909452831b811660c052911b1660e05260805160601c60a05160601c60c05160601c60e05160601c61010051611beb61011e60003980610cd4528061106d528061175e5250806105ae52806106305280610acd52508061099c52806109cb5280610ca5528061179552508061069d52806108975280610e595280610eab5280610f75525080610c7c528061109e52806110dd5250611beb6000f3fe608060405234801561001057600080fd5b50600436106102265760003560e01c80636c8bcee811610130578063a694fc3a116100b8578063df136d651161007c578063df136d65146104f6578063ebe2b12b146104fe578063f106845414610506578063f14faf6f1461050e578063f7c618c11461052b57610226565b8063a694fc3a1461049c578063c32e7202146104b9578063c8f33c91146104de578063cd3daf9d146104e6578063d55a23f4146104ee57610226565b80637b0a47ee116100ff5780637b0a47ee1461045657806380faa57d1461045e5780638b876347146104665780638dcb40611461048c578063901a7d531461049457610226565b80636c8bcee8146103f25780637050ccd9146103fa57806370a082311461042857806372f702f31461044e57610226565b806338d07436116101b357806349f039a21161018257806349f039a214610380578063570ca7351461039f578063590a41f5146103a75780635e43c47b146103c457806363d38c3b146103ea57610226565b806338d074361461032e5780633d18b912146103535780633e8b83e31461035b57806340c354461461036357610226565b80630fb5a6b4116101fa5780630fb5a6b4146102b757806318160ddd146102bf5780631c1c6fe5146102c7578063262d3d6d146102e65780632ee40908146102ee57610226565b80628cc2621461022b5780630569d388146102635780630700037d1461026d5780630f4ef8a614610293575b600080fd5b6102516004803603602081101561024157600080fd5b50356001600160a01b0316610533565b60408051918252519081900360200190f35b61026b6105a3565b005b6102516004803603602081101561028357600080fd5b50356001600160a01b031661061c565b61029b61062e565b604080516001600160a01b039092168252519081900360200190f35b610251610652565b610251610659565b61026b600480360360208110156102dd57600080fd5b50351515610660565b61025161067e565b61031a6004803603604081101561030457600080fd5b506001600160a01b038135169060200135610684565b604080519115158252519081900360200190f35b61031a6004803603604081101561034457600080fd5b5080359060200135151561070e565b61031a610919565b61026b61092e565b61029b6004803603602081101561037957600080fd5b5035610959565b61026b6004803603602081101561039657600080fd5b50351515610980565b61029b61099a565b61031a600480360360208110156103bd57600080fd5b50356109be565b61031a600480360360208110156103da57600080fd5b50356001600160a01b0316610ac0565b610251610be0565b610251610be6565b61031a6004803603604081101561041057600080fd5b506001600160a01b0381351690602001351515610bec565b6102516004803603602081101561043e57600080fd5b50356001600160a01b0316610e3c565b61029b610e57565b610251610e7b565b610251610e81565b6102516004803603602081101561047c57600080fd5b50356001600160a01b0316610e94565b61031a610ea6565b610251610f56565b61031a600480360360208110156104b257600080fd5b5035610f5c565b61031a600480360360408110156104cf57600080fd5b50803590602001351515610fdb565b610251611005565b61025161100b565b610251611059565b61025161105f565b610251611065565b61025161106b565b61031a6004803603602081101561052457600080fd5b503561108f565b61029b6110db565b6001600160a01b038116600090815260096020908152604080832054600890925282205461059b919061059590670de0b6b3a76400009061058f906105809061057a61100b565b906110ff565b61058988610e3c565b9061115c565b906111bc565b90611223565b90505b919050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461060e576040805162461bcd60e51b815260206004820152600b60248201526a08585d5d1a1bdc9a5e995960aa1b604482015290519081900360640190fd5b61061a600b6000611b0a565b565b60096020526000908152604090205481565b7f000000000000000000000000000000000000000000000000000000000000000081565b62093a8081565b6007545b90565b336000908152600a602052604090205461067a908261070e565b5050565b60065481565b6000610690828461127d565b6106c56001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085611419565b6040805183815290516001600160a01b038516917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25060015b92915050565b60003361071961100b565b600355610724610e81565b6002556001600160a01b0381161561076b5761073f81610533565b6001600160a01b0382166000908152600960209081526040808320939093556003546008909152919020555b600084116107c0576040805162461bcd60e51b815260206004820152601e60248201527f526577617264506f6f6c203a2043616e6e6f7420776974686472617720300000604482015290519081900360640190fd5b60005b600b5481101561085357600b81815481106107da57fe5b60009182526020822001546040805163f3fef3a360e01b81523360048201526024810189905290516001600160a01b039092169263f3fef3a39260448084019382900301818387803b15801561082f57600080fd5b505af1158015610843573d6000803e3d6000fd5b5050600190920191506107c39050565b5060075461086190856110ff565b600755336000908152600a602052604090205461087e90856110ff565b336000818152600a60205260409020919091556108c6907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169086611479565b60408051858152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a2821561090f5761090d336001610bec565b505b5060019392505050565b6000610926336001610bec565b506001905090565b600054421015801561094257506000600454115b1561061a576109526004546114d0565b6000600455565b600b818154811061096657fe5b6000918252602090912001546001600160a01b0316905081565b336000908152600a602052604090205461067a9082610fdb565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610a2b576040805162461bcd60e51b815260206004820152600b60248201526a08585d5d1a1bdc9a5e995960aa1b604482015290519081900360640190fd5b600454610a39908390611223565b91506000544210610a5a57610a4d826114d0565b506000600455600161059e565b60008054610a7690610a6f9062093a806110ff565b42906110ff565b60015490915081026000610a908561058f846103e861115c565b905061033e811015610aaf57610aa5856114d0565b6000600455610ab5565b60048590555b506001949350505050565b6000336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610b2d576040805162461bcd60e51b815260206004820152600b60248201526a08585d5d1a1bdc9a5e995960aa1b604482015290519081900360640190fd5b6001600160a01b038216610b7a576040805162461bcd60e51b815260206004820152600f60248201526e217265776172642073657474696e6760881b604482015290519081900360640190fd5b600b54600c11610b8c5750600061059e565b50600b8054600181810183556000929092527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db90180546001600160a01b0384166001600160a01b0319909116179055919050565b60045481565b61033e81565b600082610bf761100b565b600355610c02610e81565b6002556001600160a01b03811615610c4957610c1d81610533565b6001600160a01b0382166000908152600960209081526040808320939093556003546008909152919020555b6000610c5485610533565b90508015610d9a576001600160a01b03808616600090815260096020526040812055610ca3907f0000000000000000000000000000000000000000000000000000000000000000168683611479565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166371192b177f000000000000000000000000000000000000000000000000000000000000000087846040518463ffffffff1660e01b815260040180848152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015610d4257600080fd5b505af1158015610d56573d6000803e3d6000fd5b50506040805184815290516001600160a01b03891693507fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e048692509081900360200190a25b8315610ab55760005b600b54811015610e3057600b8181548110610dba57fe5b600091825260208220015460408051630c00007b60e41b81526001600160a01b038a811660048301529151919092169263c00007b0926024808201939182900301818387803b158015610e0c57600080fd5b505af1158015610e20573d6000803e3d6000fd5b505060019092019150610da39050565b50506001949350505050565b6001600160a01b03166000908152600a602052604090205490565b7f000000000000000000000000000000000000000000000000000000000000000081565b60015481565b6000610e8f426000546115f4565b905090565b60086020526000908152604090205481565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f1657600080fd5b505afa158015610f2a573d6000803e3d6000fd5b505050506040513d6020811015610f4057600080fd5b50519050610f4d81610f5c565b50600191505090565b60055481565b6000610f68823361127d565b610f9d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085611419565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a2506001919050565b6000610fe883333361160a565b508115610ffc57610ffa336001610bec565b505b50600192915050565b60025481565b6000611015610659565b611022575060035461065d565b610e8f611050611030610659565b61058f670de0b6b3a764000061058960015461058960025461057a610e81565b60035490611223565b600b5490565b60035481565b60005481565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006110c66001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085611419565b6004546110d39083611223565b600455919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600082821115611156576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008261116b57506000610708565b8282028284828161117857fe5b04146111b55760405162461bcd60e51b8152600401808060200182810382526021815260200180611b6b6021913960400191505060405180910390fd5b9392505050565b6000808211611212576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161121b57fe5b049392505050565b6000828201838110156111b5576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b8061128661100b565b600355611291610e81565b6002556001600160a01b038116156112d8576112ac81610533565b6001600160a01b0382166000908152600960209081526040808320939093556003546008909152919020555b6000831161132d576040805162461bcd60e51b815260206004820152601b60248201527f526577617264506f6f6c203a2043616e6e6f74207374616b6520300000000000604482015290519081900360640190fd5b60005b600b548110156113c457600b818154811061134757fe5b6000918252602082200154604080516356e4bb9760e11b81526001600160a01b038781166004830152602482018990529151919092169263adc9772e926044808201939182900301818387803b1580156113a057600080fd5b505af11580156113b4573d6000803e3d6000fd5b5050600190920191506113309050565b506007546113d29084611223565b6007556001600160a01b0382166000908152600a60205260409020546113f89084611223565b6001600160a01b039092166000908152600a60205260409020919091555050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261147390859061183c565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526114cb90849061183c565b505050565b60006114da61100b565b6003556114e5610e81565b6002556001600160a01b0381161561152c5761150081610533565b6001600160a01b0382166000908152600960209081526040808320939093556003546008909152919020555b6006546115399083611223565b600655600054421061155a576115528262093a806111bc565b6001556115a2565b6000805461156890426110ff565b905060006115816001548361115c90919063ffffffff16565b905061158d8482611223565b935061159c8462093a806111bc565b60015550505b60058290554260028190556115ba9062093a80611223565b6000556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15050565b600081831061160357816111b5565b5090919050565b60008261161561100b565b600355611620610e81565b6002556001600160a01b038116156116675761163b81610533565b6001600160a01b0382166000908152600960209081526040808320939093556003546008909152919020555b60005b600b548110156116fe57600b818154811061168157fe5b60009182526020822001546040805163f3fef3a360e01b81526001600160a01b038981166004830152602482018b90529151919092169263f3fef3a3926044808201939182900301818387803b1580156116da57600080fd5b505af11580156116ee573d6000803e3d6000fd5b50506001909201915061166a9050565b5060075461170c90866110ff565b6007556001600160a01b0384166000908152600a602052604090205461173290866110ff565b6001600160a01b038086166000908152600a60205260408082209390935582516305335c3960e21b81527f0000000000000000000000000000000000000000000000000000000000000000600482015260248101899052868316604482015292517f0000000000000000000000000000000000000000000000000000000000000000909216926314cd70e4926064808301939282900301818387803b1580156117da57600080fd5b505af11580156117ee573d6000803e3d6000fd5b50506040805188815290516001600160a01b03881693507f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d592509081900360200190a2506001949350505050565b6060611891826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166118ed9092919063ffffffff16565b8051909150156114cb578080602001905160208110156118b057600080fd5b50516114cb5760405162461bcd60e51b815260040180806020018281038252602a815260200180611b8c602a913960400191505060405180910390fd5b60606118fc8484600085611904565b949350505050565b6060824710156119455760405162461bcd60e51b8152600401808060200182810382526026815260200180611b456026913960400191505060405180910390fd5b61194e85611a60565b61199f576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106119de5780518252601f1990920191602091820191016119bf565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611a40576040519150601f19603f3d011682016040523d82523d6000602084013e611a45565b606091505b5091509150611a55828286611a66565b979650505050505050565b3b151590565b60608315611a755750816111b5565b825115611a855782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611acf578181015183820152602001611ab7565b50505050905090810190601f168015611afc5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5080546000825590600052602060002090810190611b289190611b2b565b50565b5b80821115611b405760008155600101611b2c565b509056fe416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220d0d4834e546c839bf06d5243f76bcbd47043cf984843f141cd50e7972377895864736f6c634300060c0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102265760003560e01c80636c8bcee811610130578063a694fc3a116100b8578063df136d651161007c578063df136d65146104f6578063ebe2b12b146104fe578063f106845414610506578063f14faf6f1461050e578063f7c618c11461052b57610226565b8063a694fc3a1461049c578063c32e7202146104b9578063c8f33c91146104de578063cd3daf9d146104e6578063d55a23f4146104ee57610226565b80637b0a47ee116100ff5780637b0a47ee1461045657806380faa57d1461045e5780638b876347146104665780638dcb40611461048c578063901a7d531461049457610226565b80636c8bcee8146103f25780637050ccd9146103fa57806370a082311461042857806372f702f31461044e57610226565b806338d07436116101b357806349f039a21161018257806349f039a214610380578063570ca7351461039f578063590a41f5146103a75780635e43c47b146103c457806363d38c3b146103ea57610226565b806338d074361461032e5780633d18b912146103535780633e8b83e31461035b57806340c354461461036357610226565b80630fb5a6b4116101fa5780630fb5a6b4146102b757806318160ddd146102bf5780631c1c6fe5146102c7578063262d3d6d146102e65780632ee40908146102ee57610226565b80628cc2621461022b5780630569d388146102635780630700037d1461026d5780630f4ef8a614610293575b600080fd5b6102516004803603602081101561024157600080fd5b50356001600160a01b0316610533565b60408051918252519081900360200190f35b61026b6105a3565b005b6102516004803603602081101561028357600080fd5b50356001600160a01b031661061c565b61029b61062e565b604080516001600160a01b039092168252519081900360200190f35b610251610652565b610251610659565b61026b600480360360208110156102dd57600080fd5b50351515610660565b61025161067e565b61031a6004803603604081101561030457600080fd5b506001600160a01b038135169060200135610684565b604080519115158252519081900360200190f35b61031a6004803603604081101561034457600080fd5b5080359060200135151561070e565b61031a610919565b61026b61092e565b61029b6004803603602081101561037957600080fd5b5035610959565b61026b6004803603602081101561039657600080fd5b50351515610980565b61029b61099a565b61031a600480360360208110156103bd57600080fd5b50356109be565b61031a600480360360208110156103da57600080fd5b50356001600160a01b0316610ac0565b610251610be0565b610251610be6565b61031a6004803603604081101561041057600080fd5b506001600160a01b0381351690602001351515610bec565b6102516004803603602081101561043e57600080fd5b50356001600160a01b0316610e3c565b61029b610e57565b610251610e7b565b610251610e81565b6102516004803603602081101561047c57600080fd5b50356001600160a01b0316610e94565b61031a610ea6565b610251610f56565b61031a600480360360208110156104b257600080fd5b5035610f5c565b61031a600480360360408110156104cf57600080fd5b50803590602001351515610fdb565b610251611005565b61025161100b565b610251611059565b61025161105f565b610251611065565b61025161106b565b61031a6004803603602081101561052457600080fd5b503561108f565b61029b6110db565b6001600160a01b038116600090815260096020908152604080832054600890925282205461059b919061059590670de0b6b3a76400009061058f906105809061057a61100b565b906110ff565b61058988610e3c565b9061115c565b906111bc565b90611223565b90505b919050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461060e576040805162461bcd60e51b815260206004820152600b60248201526a08585d5d1a1bdc9a5e995960aa1b604482015290519081900360640190fd5b61061a600b6000611b0a565b565b60096020526000908152604090205481565b7f000000000000000000000000000000000000000000000000000000000000000081565b62093a8081565b6007545b90565b336000908152600a602052604090205461067a908261070e565b5050565b60065481565b6000610690828461127d565b6106c56001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085611419565b6040805183815290516001600160a01b038516917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25060015b92915050565b60003361071961100b565b600355610724610e81565b6002556001600160a01b0381161561076b5761073f81610533565b6001600160a01b0382166000908152600960209081526040808320939093556003546008909152919020555b600084116107c0576040805162461bcd60e51b815260206004820152601e60248201527f526577617264506f6f6c203a2043616e6e6f7420776974686472617720300000604482015290519081900360640190fd5b60005b600b5481101561085357600b81815481106107da57fe5b60009182526020822001546040805163f3fef3a360e01b81523360048201526024810189905290516001600160a01b039092169263f3fef3a39260448084019382900301818387803b15801561082f57600080fd5b505af1158015610843573d6000803e3d6000fd5b5050600190920191506107c39050565b5060075461086190856110ff565b600755336000908152600a602052604090205461087e90856110ff565b336000818152600a60205260409020919091556108c6907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169086611479565b60408051858152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a2821561090f5761090d336001610bec565b505b5060019392505050565b6000610926336001610bec565b506001905090565b600054421015801561094257506000600454115b1561061a576109526004546114d0565b6000600455565b600b818154811061096657fe5b6000918252602090912001546001600160a01b0316905081565b336000908152600a602052604090205461067a9082610fdb565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610a2b576040805162461bcd60e51b815260206004820152600b60248201526a08585d5d1a1bdc9a5e995960aa1b604482015290519081900360640190fd5b600454610a39908390611223565b91506000544210610a5a57610a4d826114d0565b506000600455600161059e565b60008054610a7690610a6f9062093a806110ff565b42906110ff565b60015490915081026000610a908561058f846103e861115c565b905061033e811015610aaf57610aa5856114d0565b6000600455610ab5565b60048590555b506001949350505050565b6000336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610b2d576040805162461bcd60e51b815260206004820152600b60248201526a08585d5d1a1bdc9a5e995960aa1b604482015290519081900360640190fd5b6001600160a01b038216610b7a576040805162461bcd60e51b815260206004820152600f60248201526e217265776172642073657474696e6760881b604482015290519081900360640190fd5b600b54600c11610b8c5750600061059e565b50600b8054600181810183556000929092527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db90180546001600160a01b0384166001600160a01b0319909116179055919050565b60045481565b61033e81565b600082610bf761100b565b600355610c02610e81565b6002556001600160a01b03811615610c4957610c1d81610533565b6001600160a01b0382166000908152600960209081526040808320939093556003546008909152919020555b6000610c5485610533565b90508015610d9a576001600160a01b03808616600090815260096020526040812055610ca3907f0000000000000000000000000000000000000000000000000000000000000000168683611479565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166371192b177f000000000000000000000000000000000000000000000000000000000000000087846040518463ffffffff1660e01b815260040180848152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015610d4257600080fd5b505af1158015610d56573d6000803e3d6000fd5b50506040805184815290516001600160a01b03891693507fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e048692509081900360200190a25b8315610ab55760005b600b54811015610e3057600b8181548110610dba57fe5b600091825260208220015460408051630c00007b60e41b81526001600160a01b038a811660048301529151919092169263c00007b0926024808201939182900301818387803b158015610e0c57600080fd5b505af1158015610e20573d6000803e3d6000fd5b505060019092019150610da39050565b50506001949350505050565b6001600160a01b03166000908152600a602052604090205490565b7f000000000000000000000000000000000000000000000000000000000000000081565b60015481565b6000610e8f426000546115f4565b905090565b60086020526000908152604090205481565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f1657600080fd5b505afa158015610f2a573d6000803e3d6000fd5b505050506040513d6020811015610f4057600080fd5b50519050610f4d81610f5c565b50600191505090565b60055481565b6000610f68823361127d565b610f9d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085611419565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a2506001919050565b6000610fe883333361160a565b508115610ffc57610ffa336001610bec565b505b50600192915050565b60025481565b6000611015610659565b611022575060035461065d565b610e8f611050611030610659565b61058f670de0b6b3a764000061058960015461058960025461057a610e81565b60035490611223565b600b5490565b60035481565b60005481565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006110c66001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085611419565b6004546110d39083611223565b600455919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600082821115611156576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008261116b57506000610708565b8282028284828161117857fe5b04146111b55760405162461bcd60e51b8152600401808060200182810382526021815260200180611b6b6021913960400191505060405180910390fd5b9392505050565b6000808211611212576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161121b57fe5b049392505050565b6000828201838110156111b5576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b8061128661100b565b600355611291610e81565b6002556001600160a01b038116156112d8576112ac81610533565b6001600160a01b0382166000908152600960209081526040808320939093556003546008909152919020555b6000831161132d576040805162461bcd60e51b815260206004820152601b60248201527f526577617264506f6f6c203a2043616e6e6f74207374616b6520300000000000604482015290519081900360640190fd5b60005b600b548110156113c457600b818154811061134757fe5b6000918252602082200154604080516356e4bb9760e11b81526001600160a01b038781166004830152602482018990529151919092169263adc9772e926044808201939182900301818387803b1580156113a057600080fd5b505af11580156113b4573d6000803e3d6000fd5b5050600190920191506113309050565b506007546113d29084611223565b6007556001600160a01b0382166000908152600a60205260409020546113f89084611223565b6001600160a01b039092166000908152600a60205260409020919091555050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261147390859061183c565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526114cb90849061183c565b505050565b60006114da61100b565b6003556114e5610e81565b6002556001600160a01b0381161561152c5761150081610533565b6001600160a01b0382166000908152600960209081526040808320939093556003546008909152919020555b6006546115399083611223565b600655600054421061155a576115528262093a806111bc565b6001556115a2565b6000805461156890426110ff565b905060006115816001548361115c90919063ffffffff16565b905061158d8482611223565b935061159c8462093a806111bc565b60015550505b60058290554260028190556115ba9062093a80611223565b6000556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15050565b600081831061160357816111b5565b5090919050565b60008261161561100b565b600355611620610e81565b6002556001600160a01b038116156116675761163b81610533565b6001600160a01b0382166000908152600960209081526040808320939093556003546008909152919020555b60005b600b548110156116fe57600b818154811061168157fe5b60009182526020822001546040805163f3fef3a360e01b81526001600160a01b038981166004830152602482018b90529151919092169263f3fef3a3926044808201939182900301818387803b1580156116da57600080fd5b505af11580156116ee573d6000803e3d6000fd5b50506001909201915061166a9050565b5060075461170c90866110ff565b6007556001600160a01b0384166000908152600a602052604090205461173290866110ff565b6001600160a01b038086166000908152600a60205260408082209390935582516305335c3960e21b81527f0000000000000000000000000000000000000000000000000000000000000000600482015260248101899052868316604482015292517f0000000000000000000000000000000000000000000000000000000000000000909216926314cd70e4926064808301939282900301818387803b1580156117da57600080fd5b505af11580156117ee573d6000803e3d6000fd5b50506040805188815290516001600160a01b03881693507f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d592509081900360200190a2506001949350505050565b6060611891826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166118ed9092919063ffffffff16565b8051909150156114cb578080602001905160208110156118b057600080fd5b50516114cb5760405162461bcd60e51b815260040180806020018281038252602a815260200180611b8c602a913960400191505060405180910390fd5b60606118fc8484600085611904565b949350505050565b6060824710156119455760405162461bcd60e51b8152600401808060200182810382526026815260200180611b456026913960400191505060405180910390fd5b61194e85611a60565b61199f576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106119de5780518252601f1990920191602091820191016119bf565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611a40576040519150601f19603f3d011682016040523d82523d6000602084013e611a45565b606091505b5091509150611a55828286611a66565b979650505050505050565b3b151590565b60608315611a755750816111b5565b825115611a855782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611acf578181015183820152602001611ab7565b50505050905090810190601f168015611afc5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5080546000825590600052602060002090810190611b289190611b2b565b50565b5b80821115611b405760008155600101611b2c565b509056fe416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220d0d4834e546c839bf06d5243f76bcbd47043cf984843f141cd50e7972377895864736f6c634300060c0033", - "linkReferences": {}, - "deployedLinkReferences": {} -} +[ + { + "inputs": [ + { "internalType": "uint256", "name": "pid_", "type": "uint256" }, + { "internalType": "address", "name": "stakingToken_", "type": "address" }, + { "internalType": "address", "name": "rewardToken_", "type": "address" }, + { "internalType": "address", "name": "operator_", "type": "address" }, + { "internalType": "address", "name": "rewardManager_", "type": "address" }, + { "internalType": "address", "name": "lptoken_", "type": "address" } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "caller", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "assets", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "shares", "type": "uint256" } + ], + "name": "Deposit", + "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": true, "internalType": "address", "name": "user", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "Staked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "caller", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "receiver", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "assets", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "shares", "type": "uint256" } + ], + "name": "Withdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "Withdrawn", + "type": "event" + }, + { + "inputs": [{ "internalType": "address", "name": "_reward", "type": "address" }], + "name": "addExtraReward", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "owner", "type": "address" }, + { "internalType": "address", "name": "spender", "type": "address" } + ], + "name": "allowance", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "approve", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "asset", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], + "name": "balanceOf", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { "inputs": [], "name": "clearExtraRewards", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], + "name": "convertToAssets", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], + "name": "convertToShares", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "currentRewards", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "assets", "type": "uint256" }, + { "internalType": "address", "name": "receiver", "type": "address" } + ], + "name": "deposit", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "duration", + "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": "uint256", "name": "", "type": "uint256" }], + "name": "extraRewards", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "extraRewardsLength", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getReward", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_account", "type": "address" }, + { "internalType": "bool", "name": "_claimExtras", "type": "bool" } + ], + "name": "getReward", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "historicalRewards", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "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": "", "type": "address" }], + "name": "maxDeposit", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }], + "name": "maxMint", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }], + "name": "maxRedeem", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }], + "name": "maxWithdraw", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "shares", "type": "uint256" }, + { "internalType": "address", "name": "receiver", "type": "address" } + ], + "name": "mint", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "newRewardRatio", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "operator", + "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": "pid", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], + "name": "previewDeposit", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], + "name": "previewMint", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], + "name": "previewRedeem", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], + "name": "previewWithdraw", + "outputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { "inputs": [], "name": "processIdleRewards", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [{ "internalType": "uint256", "name": "_rewards", "type": "uint256" }], + "name": "queueNewRewards", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "queuedRewards", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "shares", "type": "uint256" }, + { "internalType": "address", "name": "receiver", "type": "address" }, + { "internalType": "address", "name": "owner", "type": "address" } + ], + "name": "redeem", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "rewardManager", + "outputs": [{ "internalType": "address", "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": [], + "name": "rewardToken", + "outputs": [{ "internalType": "contract IERC20", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "rewards", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "_amount", "type": "uint256" }], + "name": "stake", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "stakeAll", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_for", "type": "address" }, + { "internalType": "uint256", "name": "_amount", "type": "uint256" } + ], + "name": "stakeFor", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "stakingToken", + "outputs": [{ "internalType": "contract IERC20", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalAssets", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "", "type": "address" }, + { "internalType": "uint256", "name": "", "type": "uint256" } + ], + "name": "transfer", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "", "type": "address" }, + { "internalType": "address", "name": "", "type": "address" }, + { "internalType": "uint256", "name": "", "type": "uint256" } + ], + "name": "transferFrom", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "userRewardPerTokenPaid", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { "internalType": "bool", "name": "claim", "type": "bool" } + ], + "name": "withdraw", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "assets", "type": "uint256" }, + { "internalType": "address", "name": "receiver", "type": "address" }, + { "internalType": "address", "name": "owner", "type": "address" } + ], + "name": "withdraw", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "bool", "name": "claim", "type": "bool" }], + "name": "withdrawAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "bool", "name": "claim", "type": "bool" }], + "name": "withdrawAllAndUnwrap", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { "internalType": "bool", "name": "claim", "type": "bool" } + ], + "name": "withdrawAndUnwrap", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/src/apps/aura/contracts/abis/aura-stash-token.json b/src/apps/aura/contracts/abis/aura-stash-token.json new file mode 100644 index 000000000..e72b24167 --- /dev/null +++ b/src/apps/aura/contracts/abis/aura-stash-token.json @@ -0,0 +1,112 @@ +[ + { + "inputs": [{ "internalType": "address", "name": "_stash", "type": "address" }], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "MAX_TOTAL_SUPPLY", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "baseToken", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_operator", "type": "address" }, + { "internalType": "address", "name": "_rewardPool", "type": "address" }, + { "internalType": "address", "name": "_baseToken", "type": "address" } + ], + "name": "init", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isImplementation", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isValid", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "_amount", "type": "uint256" }], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "operator", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardPool", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "bool", "name": "_isValid", "type": "bool" }], + "name": "setIsValid", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "stash", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_to", "type": "address" }, + { "internalType": "uint256", "name": "_amount", "type": "uint256" } + ], + "name": "transfer", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/src/apps/aura/contracts/ethers/AuraBaseRewardPool.ts b/src/apps/aura/contracts/ethers/AuraBaseRewardPool.ts index d153eb562..d1e22ce77 100644 --- a/src/apps/aura/contracts/ethers/AuraBaseRewardPool.ts +++ b/src/apps/aura/contracts/ethers/AuraBaseRewardPool.ts @@ -20,10 +20,16 @@ import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrVal export interface AuraBaseRewardPoolInterface extends utils.Interface { functions: { 'addExtraReward(address)': FunctionFragment; + 'allowance(address,address)': FunctionFragment; + 'approve(address,uint256)': FunctionFragment; + 'asset()': FunctionFragment; 'balanceOf(address)': FunctionFragment; 'clearExtraRewards()': FunctionFragment; + 'convertToAssets(uint256)': FunctionFragment; + 'convertToShares(uint256)': FunctionFragment; 'currentRewards()': FunctionFragment; - 'donate(uint256)': FunctionFragment; + 'decimals()': FunctionFragment; + 'deposit(uint256,address)': FunctionFragment; 'duration()': FunctionFragment; 'earned(address)': FunctionFragment; 'extraRewards(uint256)': FunctionFragment; @@ -33,13 +39,24 @@ export interface AuraBaseRewardPoolInterface extends utils.Interface { 'historicalRewards()': FunctionFragment; 'lastTimeRewardApplicable()': FunctionFragment; 'lastUpdateTime()': FunctionFragment; + 'maxDeposit(address)': FunctionFragment; + 'maxMint(address)': FunctionFragment; + 'maxRedeem(address)': FunctionFragment; + 'maxWithdraw(address)': FunctionFragment; + 'mint(uint256,address)': FunctionFragment; + 'name()': FunctionFragment; 'newRewardRatio()': FunctionFragment; 'operator()': FunctionFragment; 'periodFinish()': FunctionFragment; 'pid()': FunctionFragment; + 'previewDeposit(uint256)': FunctionFragment; + 'previewMint(uint256)': FunctionFragment; + 'previewRedeem(uint256)': FunctionFragment; + 'previewWithdraw(uint256)': FunctionFragment; 'processIdleRewards()': FunctionFragment; 'queueNewRewards(uint256)': FunctionFragment; 'queuedRewards()': FunctionFragment; + 'redeem(uint256,address,address)': FunctionFragment; 'rewardManager()': FunctionFragment; 'rewardPerToken()': FunctionFragment; 'rewardPerTokenStored()': FunctionFragment; @@ -50,9 +67,14 @@ export interface AuraBaseRewardPoolInterface extends utils.Interface { 'stakeAll()': FunctionFragment; 'stakeFor(address,uint256)': FunctionFragment; 'stakingToken()': FunctionFragment; + 'symbol()': FunctionFragment; + 'totalAssets()': FunctionFragment; 'totalSupply()': FunctionFragment; + 'transfer(address,uint256)': FunctionFragment; + 'transferFrom(address,address,uint256)': FunctionFragment; 'userRewardPerTokenPaid(address)': FunctionFragment; 'withdraw(uint256,bool)': FunctionFragment; + 'withdraw(uint256,address,address)': FunctionFragment; 'withdrawAll(bool)': FunctionFragment; 'withdrawAllAndUnwrap(bool)': FunctionFragment; 'withdrawAndUnwrap(uint256,bool)': FunctionFragment; @@ -61,10 +83,16 @@ export interface AuraBaseRewardPoolInterface extends utils.Interface { getFunction( nameOrSignatureOrTopic: | 'addExtraReward' + | 'allowance' + | 'approve' + | 'asset' | 'balanceOf' | 'clearExtraRewards' + | 'convertToAssets' + | 'convertToShares' | 'currentRewards' - | 'donate' + | 'decimals' + | 'deposit' | 'duration' | 'earned' | 'extraRewards' @@ -74,13 +102,24 @@ export interface AuraBaseRewardPoolInterface extends utils.Interface { | 'historicalRewards' | 'lastTimeRewardApplicable' | 'lastUpdateTime' + | 'maxDeposit' + | 'maxMint' + | 'maxRedeem' + | 'maxWithdraw' + | 'mint' + | 'name' | 'newRewardRatio' | 'operator' | 'periodFinish' | 'pid' + | 'previewDeposit' + | 'previewMint' + | 'previewRedeem' + | 'previewWithdraw' | 'processIdleRewards' | 'queueNewRewards' | 'queuedRewards' + | 'redeem' | 'rewardManager' | 'rewardPerToken' | 'rewardPerTokenStored' @@ -91,19 +130,36 @@ export interface AuraBaseRewardPoolInterface extends utils.Interface { | 'stakeAll' | 'stakeFor' | 'stakingToken' + | 'symbol' + | 'totalAssets' | 'totalSupply' + | 'transfer' + | 'transferFrom' | 'userRewardPerTokenPaid' - | 'withdraw' + | 'withdraw(uint256,bool)' + | 'withdraw(uint256,address,address)' | 'withdrawAll' | 'withdrawAllAndUnwrap' | 'withdrawAndUnwrap', ): FunctionFragment; encodeFunctionData(functionFragment: 'addExtraReward', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'allowance', values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData( + functionFragment: 'approve', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'asset', values?: undefined): string; encodeFunctionData(functionFragment: 'balanceOf', values: [PromiseOrValue]): string; encodeFunctionData(functionFragment: 'clearExtraRewards', values?: undefined): string; + encodeFunctionData(functionFragment: 'convertToAssets', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'convertToShares', values: [PromiseOrValue]): string; encodeFunctionData(functionFragment: 'currentRewards', values?: undefined): string; - encodeFunctionData(functionFragment: 'donate', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'decimals', values?: undefined): string; + encodeFunctionData( + functionFragment: 'deposit', + values: [PromiseOrValue, PromiseOrValue], + ): string; encodeFunctionData(functionFragment: 'duration', values?: undefined): string; encodeFunctionData(functionFragment: 'earned', values: [PromiseOrValue]): string; encodeFunctionData(functionFragment: 'extraRewards', values: [PromiseOrValue]): string; @@ -116,13 +172,27 @@ export interface AuraBaseRewardPoolInterface extends utils.Interface { encodeFunctionData(functionFragment: 'historicalRewards', values?: undefined): string; encodeFunctionData(functionFragment: 'lastTimeRewardApplicable', values?: undefined): string; encodeFunctionData(functionFragment: 'lastUpdateTime', values?: undefined): string; + encodeFunctionData(functionFragment: 'maxDeposit', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'maxMint', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'maxRedeem', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'maxWithdraw', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'mint', values: [PromiseOrValue, PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'name', values?: undefined): string; encodeFunctionData(functionFragment: 'newRewardRatio', values?: undefined): string; encodeFunctionData(functionFragment: 'operator', values?: undefined): string; encodeFunctionData(functionFragment: 'periodFinish', values?: undefined): string; encodeFunctionData(functionFragment: 'pid', values?: undefined): string; + encodeFunctionData(functionFragment: 'previewDeposit', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'previewMint', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'previewRedeem', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'previewWithdraw', values: [PromiseOrValue]): string; encodeFunctionData(functionFragment: 'processIdleRewards', values?: undefined): string; encodeFunctionData(functionFragment: 'queueNewRewards', values: [PromiseOrValue]): string; encodeFunctionData(functionFragment: 'queuedRewards', values?: undefined): string; + encodeFunctionData( + functionFragment: 'redeem', + values: [PromiseOrValue, PromiseOrValue, PromiseOrValue], + ): string; encodeFunctionData(functionFragment: 'rewardManager', values?: undefined): string; encodeFunctionData(functionFragment: 'rewardPerToken', values?: undefined): string; encodeFunctionData(functionFragment: 'rewardPerTokenStored', values?: undefined): string; @@ -136,12 +206,26 @@ export interface AuraBaseRewardPoolInterface extends utils.Interface { values: [PromiseOrValue, PromiseOrValue], ): string; encodeFunctionData(functionFragment: 'stakingToken', values?: undefined): string; + encodeFunctionData(functionFragment: 'symbol', values?: undefined): string; + encodeFunctionData(functionFragment: 'totalAssets', values?: undefined): string; encodeFunctionData(functionFragment: 'totalSupply', values?: undefined): string; + encodeFunctionData( + functionFragment: 'transfer', + values: [PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData( + functionFragment: 'transferFrom', + values: [PromiseOrValue, PromiseOrValue, PromiseOrValue], + ): string; encodeFunctionData(functionFragment: 'userRewardPerTokenPaid', values: [PromiseOrValue]): string; encodeFunctionData( - functionFragment: 'withdraw', + functionFragment: 'withdraw(uint256,bool)', values: [PromiseOrValue, PromiseOrValue], ): string; + encodeFunctionData( + functionFragment: 'withdraw(uint256,address,address)', + values: [PromiseOrValue, PromiseOrValue, PromiseOrValue], + ): string; encodeFunctionData(functionFragment: 'withdrawAll', values: [PromiseOrValue]): string; encodeFunctionData(functionFragment: 'withdrawAllAndUnwrap', values: [PromiseOrValue]): string; encodeFunctionData( @@ -150,10 +234,16 @@ export interface AuraBaseRewardPoolInterface extends utils.Interface { ): string; decodeFunctionResult(functionFragment: 'addExtraReward', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'allowance', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'approve', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'asset', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'balanceOf', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'clearExtraRewards', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'convertToAssets', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'convertToShares', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'currentRewards', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'donate', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'decimals', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'deposit', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'duration', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'earned', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'extraRewards', data: BytesLike): Result; @@ -163,13 +253,24 @@ export interface AuraBaseRewardPoolInterface extends utils.Interface { decodeFunctionResult(functionFragment: 'historicalRewards', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'lastTimeRewardApplicable', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'lastUpdateTime', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'maxDeposit', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'maxMint', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'maxRedeem', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'maxWithdraw', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'mint', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'name', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'newRewardRatio', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'operator', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'periodFinish', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'pid', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'previewDeposit', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'previewMint', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'previewRedeem', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'previewWithdraw', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'processIdleRewards', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'queueNewRewards', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'queuedRewards', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'redeem', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'rewardManager', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'rewardPerToken', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'rewardPerTokenStored', data: BytesLike): Result; @@ -180,26 +281,58 @@ export interface AuraBaseRewardPoolInterface extends utils.Interface { decodeFunctionResult(functionFragment: 'stakeAll', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'stakeFor', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'stakingToken', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'symbol', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'totalAssets', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'totalSupply', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'transfer', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'transferFrom', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'userRewardPerTokenPaid', data: BytesLike): Result; - decodeFunctionResult(functionFragment: 'withdraw', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'withdraw(uint256,bool)', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'withdraw(uint256,address,address)', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'withdrawAll', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'withdrawAllAndUnwrap', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'withdrawAndUnwrap', data: BytesLike): Result; events: { + 'Approval(address,address,uint256)': EventFragment; + 'Deposit(address,address,uint256,uint256)': EventFragment; 'RewardAdded(uint256)': EventFragment; 'RewardPaid(address,uint256)': EventFragment; 'Staked(address,uint256)': EventFragment; + 'Transfer(address,address,uint256)': EventFragment; + 'Withdraw(address,address,address,uint256,uint256)': EventFragment; 'Withdrawn(address,uint256)': EventFragment; }; + getEvent(nameOrSignatureOrTopic: 'Approval'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Deposit'): EventFragment; getEvent(nameOrSignatureOrTopic: 'RewardAdded'): EventFragment; getEvent(nameOrSignatureOrTopic: 'RewardPaid'): EventFragment; getEvent(nameOrSignatureOrTopic: 'Staked'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Transfer'): EventFragment; + getEvent(nameOrSignatureOrTopic: 'Withdraw'): EventFragment; getEvent(nameOrSignatureOrTopic: 'Withdrawn'): EventFragment; } +export interface ApprovalEventObject { + owner: string; + spender: string; + value: BigNumber; +} +export type ApprovalEvent = TypedEvent<[string, string, BigNumber], ApprovalEventObject>; + +export type ApprovalEventFilter = TypedEventFilter; + +export interface DepositEventObject { + caller: string; + owner: string; + assets: BigNumber; + shares: BigNumber; +} +export type DepositEvent = TypedEvent<[string, string, BigNumber, BigNumber], DepositEventObject>; + +export type DepositEventFilter = TypedEventFilter; + export interface RewardAddedEventObject { reward: BigNumber; } @@ -223,6 +356,26 @@ export type StakedEvent = TypedEvent<[string, BigNumber], StakedEventObject>; export type StakedEventFilter = TypedEventFilter; +export interface TransferEventObject { + from: string; + to: string; + value: BigNumber; +} +export type TransferEvent = TypedEvent<[string, string, BigNumber], TransferEventObject>; + +export type TransferEventFilter = TypedEventFilter; + +export interface WithdrawEventObject { + caller: string; + receiver: string; + owner: string; + assets: BigNumber; + shares: BigNumber; +} +export type WithdrawEvent = TypedEvent<[string, string, string, BigNumber, BigNumber], WithdrawEventObject>; + +export type WithdrawEventFilter = TypedEventFilter; + export interface WithdrawnEventObject { user: string; amount: BigNumber; @@ -259,14 +412,35 @@ export interface AuraBaseRewardPool extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue }, ): Promise; + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber]>; + + approve( + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + asset(overrides?: CallOverrides): Promise<[string]>; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; clearExtraRewards(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + convertToAssets(shares: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + convertToShares(assets: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + currentRewards(overrides?: CallOverrides): Promise<[BigNumber]>; - donate( - _amount: PromiseOrValue, + decimals(overrides?: CallOverrides): Promise<[number]>; + + deposit( + assets: PromiseOrValue, + receiver: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue }, ): Promise; @@ -292,6 +466,22 @@ export interface AuraBaseRewardPool extends BaseContract { lastUpdateTime(overrides?: CallOverrides): Promise<[BigNumber]>; + maxDeposit(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + maxMint(owner: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + maxRedeem(owner: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + maxWithdraw(owner: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + mint( + shares: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + name(overrides?: CallOverrides): Promise<[string]>; + newRewardRatio(overrides?: CallOverrides): Promise<[BigNumber]>; operator(overrides?: CallOverrides): Promise<[string]>; @@ -300,6 +490,17 @@ export interface AuraBaseRewardPool extends BaseContract { pid(overrides?: CallOverrides): Promise<[BigNumber]>; + previewDeposit(assets: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + previewMint(shares: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + previewRedeem(shares: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; + + previewWithdraw( + assets: PromiseOrValue, + overrides?: CallOverrides, + ): Promise<[BigNumber] & { shares: BigNumber }>; + processIdleRewards(overrides?: Overrides & { from?: PromiseOrValue }): Promise; queueNewRewards( @@ -309,6 +510,13 @@ export interface AuraBaseRewardPool extends BaseContract { queuedRewards(overrides?: CallOverrides): Promise<[BigNumber]>; + redeem( + shares: PromiseOrValue, + receiver: PromiseOrValue, + owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + rewardManager(overrides?: CallOverrides): Promise<[string]>; rewardPerToken(overrides?: CallOverrides): Promise<[BigNumber]>; @@ -336,16 +544,40 @@ export interface AuraBaseRewardPool extends BaseContract { stakingToken(overrides?: CallOverrides): Promise<[string]>; + symbol(overrides?: CallOverrides): Promise<[string]>; + + totalAssets(overrides?: CallOverrides): Promise<[BigNumber]>; + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + transfer( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + transferFrom( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + userRewardPerTokenPaid(arg0: PromiseOrValue, overrides?: CallOverrides): Promise<[BigNumber]>; - withdraw( + 'withdraw(uint256,bool)'( amount: PromiseOrValue, claim: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue }, ): Promise; + 'withdraw(uint256,address,address)'( + assets: PromiseOrValue, + receiver: PromiseOrValue, + owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + withdrawAll( claim: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue }, @@ -368,14 +600,35 @@ export interface AuraBaseRewardPool extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue }, ): Promise; + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + approve( + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + asset(overrides?: CallOverrides): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; clearExtraRewards(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + convertToAssets(shares: PromiseOrValue, overrides?: CallOverrides): Promise; + + convertToShares(assets: PromiseOrValue, overrides?: CallOverrides): Promise; + currentRewards(overrides?: CallOverrides): Promise; - donate( - _amount: PromiseOrValue, + decimals(overrides?: CallOverrides): Promise; + + deposit( + assets: PromiseOrValue, + receiver: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue }, ): Promise; @@ -401,6 +654,22 @@ export interface AuraBaseRewardPool extends BaseContract { lastUpdateTime(overrides?: CallOverrides): Promise; + maxDeposit(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + + maxMint(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + + maxRedeem(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + + maxWithdraw(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + + mint( + shares: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + name(overrides?: CallOverrides): Promise; + newRewardRatio(overrides?: CallOverrides): Promise; operator(overrides?: CallOverrides): Promise; @@ -409,6 +678,14 @@ export interface AuraBaseRewardPool extends BaseContract { pid(overrides?: CallOverrides): Promise; + previewDeposit(assets: PromiseOrValue, overrides?: CallOverrides): Promise; + + previewMint(shares: PromiseOrValue, overrides?: CallOverrides): Promise; + + previewRedeem(shares: PromiseOrValue, overrides?: CallOverrides): Promise; + + previewWithdraw(assets: PromiseOrValue, overrides?: CallOverrides): Promise; + processIdleRewards(overrides?: Overrides & { from?: PromiseOrValue }): Promise; queueNewRewards( @@ -418,6 +695,13 @@ export interface AuraBaseRewardPool extends BaseContract { queuedRewards(overrides?: CallOverrides): Promise; + redeem( + shares: PromiseOrValue, + receiver: PromiseOrValue, + owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + rewardManager(overrides?: CallOverrides): Promise; rewardPerToken(overrides?: CallOverrides): Promise; @@ -445,16 +729,40 @@ export interface AuraBaseRewardPool extends BaseContract { stakingToken(overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + + totalAssets(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + transferFrom( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + userRewardPerTokenPaid(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; - withdraw( + 'withdraw(uint256,bool)'( amount: PromiseOrValue, claim: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue }, ): Promise; + 'withdraw(uint256,address,address)'( + assets: PromiseOrValue, + receiver: PromiseOrValue, + owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + withdrawAll( claim: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue }, @@ -474,13 +782,37 @@ export interface AuraBaseRewardPool extends BaseContract { callStatic: { addExtraReward(_reward: PromiseOrValue, overrides?: CallOverrides): Promise; + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + approve( + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + asset(overrides?: CallOverrides): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; clearExtraRewards(overrides?: CallOverrides): Promise; + convertToAssets(shares: PromiseOrValue, overrides?: CallOverrides): Promise; + + convertToShares(assets: PromiseOrValue, overrides?: CallOverrides): Promise; + currentRewards(overrides?: CallOverrides): Promise; - donate(_amount: PromiseOrValue, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + + deposit( + assets: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; duration(overrides?: CallOverrides): Promise; @@ -504,6 +836,22 @@ export interface AuraBaseRewardPool extends BaseContract { lastUpdateTime(overrides?: CallOverrides): Promise; + maxDeposit(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + + maxMint(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + + maxRedeem(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + + maxWithdraw(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + + mint( + shares: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + name(overrides?: CallOverrides): Promise; + newRewardRatio(overrides?: CallOverrides): Promise; operator(overrides?: CallOverrides): Promise; @@ -512,12 +860,27 @@ export interface AuraBaseRewardPool extends BaseContract { pid(overrides?: CallOverrides): Promise; + previewDeposit(assets: PromiseOrValue, overrides?: CallOverrides): Promise; + + previewMint(shares: PromiseOrValue, overrides?: CallOverrides): Promise; + + previewRedeem(shares: PromiseOrValue, overrides?: CallOverrides): Promise; + + previewWithdraw(assets: PromiseOrValue, overrides?: CallOverrides): Promise; + processIdleRewards(overrides?: CallOverrides): Promise; queueNewRewards(_rewards: PromiseOrValue, overrides?: CallOverrides): Promise; queuedRewards(overrides?: CallOverrides): Promise; + redeem( + shares: PromiseOrValue, + receiver: PromiseOrValue, + owner: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + rewardManager(overrides?: CallOverrides): Promise; rewardPerToken(overrides?: CallOverrides): Promise; @@ -542,16 +905,40 @@ export interface AuraBaseRewardPool extends BaseContract { stakingToken(overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + + totalAssets(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + transferFrom( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + userRewardPerTokenPaid(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; - withdraw( + 'withdraw(uint256,bool)'( amount: PromiseOrValue, claim: PromiseOrValue, overrides?: CallOverrides, ): Promise; + 'withdraw(uint256,address,address)'( + assets: PromiseOrValue, + receiver: PromiseOrValue, + owner: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + withdrawAll(claim: PromiseOrValue, overrides?: CallOverrides): Promise; withdrawAllAndUnwrap(claim: PromiseOrValue, overrides?: CallOverrides): Promise; @@ -564,6 +951,30 @@ export interface AuraBaseRewardPool extends BaseContract { }; filters: { + 'Approval(address,address,uint256)'( + owner?: PromiseOrValue | null, + spender?: PromiseOrValue | null, + value?: null, + ): ApprovalEventFilter; + Approval( + owner?: PromiseOrValue | null, + spender?: PromiseOrValue | null, + value?: null, + ): ApprovalEventFilter; + + 'Deposit(address,address,uint256,uint256)'( + caller?: PromiseOrValue | null, + owner?: PromiseOrValue | null, + assets?: null, + shares?: null, + ): DepositEventFilter; + Deposit( + caller?: PromiseOrValue | null, + owner?: PromiseOrValue | null, + assets?: null, + shares?: null, + ): DepositEventFilter; + 'RewardAdded(uint256)'(reward?: null): RewardAddedEventFilter; RewardAdded(reward?: null): RewardAddedEventFilter; @@ -573,6 +984,32 @@ export interface AuraBaseRewardPool extends BaseContract { 'Staked(address,uint256)'(user?: PromiseOrValue | null, amount?: null): StakedEventFilter; Staked(user?: PromiseOrValue | null, amount?: null): StakedEventFilter; + 'Transfer(address,address,uint256)'( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + value?: null, + ): TransferEventFilter; + Transfer( + from?: PromiseOrValue | null, + to?: PromiseOrValue | null, + value?: null, + ): TransferEventFilter; + + 'Withdraw(address,address,address,uint256,uint256)'( + caller?: PromiseOrValue | null, + receiver?: PromiseOrValue | null, + owner?: PromiseOrValue | null, + assets?: null, + shares?: null, + ): WithdrawEventFilter; + Withdraw( + caller?: PromiseOrValue | null, + receiver?: PromiseOrValue | null, + owner?: PromiseOrValue | null, + assets?: null, + shares?: null, + ): WithdrawEventFilter; + 'Withdrawn(address,uint256)'(user?: PromiseOrValue | null, amount?: null): WithdrawnEventFilter; Withdrawn(user?: PromiseOrValue | null, amount?: null): WithdrawnEventFilter; }; @@ -583,14 +1020,35 @@ export interface AuraBaseRewardPool extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue }, ): Promise; + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + approve( + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + asset(overrides?: CallOverrides): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; clearExtraRewards(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + convertToAssets(shares: PromiseOrValue, overrides?: CallOverrides): Promise; + + convertToShares(assets: PromiseOrValue, overrides?: CallOverrides): Promise; + currentRewards(overrides?: CallOverrides): Promise; - donate( - _amount: PromiseOrValue, + decimals(overrides?: CallOverrides): Promise; + + deposit( + assets: PromiseOrValue, + receiver: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue }, ): Promise; @@ -616,6 +1074,22 @@ export interface AuraBaseRewardPool extends BaseContract { lastUpdateTime(overrides?: CallOverrides): Promise; + maxDeposit(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + + maxMint(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + + maxRedeem(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + + maxWithdraw(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + + mint( + shares: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + name(overrides?: CallOverrides): Promise; + newRewardRatio(overrides?: CallOverrides): Promise; operator(overrides?: CallOverrides): Promise; @@ -624,6 +1098,14 @@ export interface AuraBaseRewardPool extends BaseContract { pid(overrides?: CallOverrides): Promise; + previewDeposit(assets: PromiseOrValue, overrides?: CallOverrides): Promise; + + previewMint(shares: PromiseOrValue, overrides?: CallOverrides): Promise; + + previewRedeem(shares: PromiseOrValue, overrides?: CallOverrides): Promise; + + previewWithdraw(assets: PromiseOrValue, overrides?: CallOverrides): Promise; + processIdleRewards(overrides?: Overrides & { from?: PromiseOrValue }): Promise; queueNewRewards( @@ -633,6 +1115,13 @@ export interface AuraBaseRewardPool extends BaseContract { queuedRewards(overrides?: CallOverrides): Promise; + redeem( + shares: PromiseOrValue, + receiver: PromiseOrValue, + owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + rewardManager(overrides?: CallOverrides): Promise; rewardPerToken(overrides?: CallOverrides): Promise; @@ -660,16 +1149,40 @@ export interface AuraBaseRewardPool extends BaseContract { stakingToken(overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + + totalAssets(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + transferFrom( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + userRewardPerTokenPaid(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; - withdraw( + 'withdraw(uint256,bool)'( amount: PromiseOrValue, claim: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue }, ): Promise; + 'withdraw(uint256,address,address)'( + assets: PromiseOrValue, + receiver: PromiseOrValue, + owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + withdrawAll( claim: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue }, @@ -693,14 +1206,35 @@ export interface AuraBaseRewardPool extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue }, ): Promise; + allowance( + owner: PromiseOrValue, + spender: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + approve( + spender: PromiseOrValue, + amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + asset(overrides?: CallOverrides): Promise; + balanceOf(account: PromiseOrValue, overrides?: CallOverrides): Promise; clearExtraRewards(overrides?: Overrides & { from?: PromiseOrValue }): Promise; + convertToAssets(shares: PromiseOrValue, overrides?: CallOverrides): Promise; + + convertToShares(assets: PromiseOrValue, overrides?: CallOverrides): Promise; + currentRewards(overrides?: CallOverrides): Promise; - donate( - _amount: PromiseOrValue, + decimals(overrides?: CallOverrides): Promise; + + deposit( + assets: PromiseOrValue, + receiver: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue }, ): Promise; @@ -726,6 +1260,22 @@ export interface AuraBaseRewardPool extends BaseContract { lastUpdateTime(overrides?: CallOverrides): Promise; + maxDeposit(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; + + maxMint(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + + maxRedeem(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + + maxWithdraw(owner: PromiseOrValue, overrides?: CallOverrides): Promise; + + mint( + shares: PromiseOrValue, + receiver: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + name(overrides?: CallOverrides): Promise; + newRewardRatio(overrides?: CallOverrides): Promise; operator(overrides?: CallOverrides): Promise; @@ -734,6 +1284,14 @@ export interface AuraBaseRewardPool extends BaseContract { pid(overrides?: CallOverrides): Promise; + previewDeposit(assets: PromiseOrValue, overrides?: CallOverrides): Promise; + + previewMint(shares: PromiseOrValue, overrides?: CallOverrides): Promise; + + previewRedeem(shares: PromiseOrValue, overrides?: CallOverrides): Promise; + + previewWithdraw(assets: PromiseOrValue, overrides?: CallOverrides): Promise; + processIdleRewards(overrides?: Overrides & { from?: PromiseOrValue }): Promise; queueNewRewards( @@ -743,6 +1301,13 @@ export interface AuraBaseRewardPool extends BaseContract { queuedRewards(overrides?: CallOverrides): Promise; + redeem( + shares: PromiseOrValue, + receiver: PromiseOrValue, + owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + rewardManager(overrides?: CallOverrides): Promise; rewardPerToken(overrides?: CallOverrides): Promise; @@ -770,16 +1335,40 @@ export interface AuraBaseRewardPool extends BaseContract { stakingToken(overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + + totalAssets(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + transferFrom( + arg0: PromiseOrValue, + arg1: PromiseOrValue, + arg2: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + userRewardPerTokenPaid(arg0: PromiseOrValue, overrides?: CallOverrides): Promise; - withdraw( + 'withdraw(uint256,bool)'( amount: PromiseOrValue, claim: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue }, ): Promise; + 'withdraw(uint256,address,address)'( + assets: PromiseOrValue, + receiver: PromiseOrValue, + owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + withdrawAll( claim: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue }, diff --git a/src/apps/aura/contracts/ethers/AuraStashToken.ts b/src/apps/aura/contracts/ethers/AuraStashToken.ts new file mode 100644 index 000000000..308582f33 --- /dev/null +++ b/src/apps/aura/contracts/ethers/AuraStashToken.ts @@ -0,0 +1,335 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from 'ethers'; +import type { FunctionFragment, Result } from '@ethersproject/abi'; +import type { Listener, Provider } from '@ethersproject/providers'; +import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrValue } from './common'; + +export interface AuraStashTokenInterface extends utils.Interface { + functions: { + 'MAX_TOTAL_SUPPLY()': FunctionFragment; + 'baseToken()': FunctionFragment; + 'init(address,address,address)': FunctionFragment; + 'isImplementation()': FunctionFragment; + 'isValid()': FunctionFragment; + 'mint(uint256)': FunctionFragment; + 'name()': FunctionFragment; + 'operator()': FunctionFragment; + 'rewardPool()': FunctionFragment; + 'setIsValid(bool)': FunctionFragment; + 'stash()': FunctionFragment; + 'symbol()': FunctionFragment; + 'totalSupply()': FunctionFragment; + 'transfer(address,uint256)': FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | 'MAX_TOTAL_SUPPLY' + | 'baseToken' + | 'init' + | 'isImplementation' + | 'isValid' + | 'mint' + | 'name' + | 'operator' + | 'rewardPool' + | 'setIsValid' + | 'stash' + | 'symbol' + | 'totalSupply' + | 'transfer', + ): FunctionFragment; + + encodeFunctionData(functionFragment: 'MAX_TOTAL_SUPPLY', values?: undefined): string; + encodeFunctionData(functionFragment: 'baseToken', values?: undefined): string; + encodeFunctionData( + functionFragment: 'init', + values: [PromiseOrValue, PromiseOrValue, PromiseOrValue], + ): string; + encodeFunctionData(functionFragment: 'isImplementation', values?: undefined): string; + encodeFunctionData(functionFragment: 'isValid', values?: undefined): string; + encodeFunctionData(functionFragment: 'mint', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'name', values?: undefined): string; + encodeFunctionData(functionFragment: 'operator', values?: undefined): string; + encodeFunctionData(functionFragment: 'rewardPool', values?: undefined): string; + encodeFunctionData(functionFragment: 'setIsValid', values: [PromiseOrValue]): string; + encodeFunctionData(functionFragment: 'stash', values?: undefined): string; + encodeFunctionData(functionFragment: 'symbol', values?: undefined): string; + encodeFunctionData(functionFragment: 'totalSupply', values?: undefined): string; + encodeFunctionData( + functionFragment: 'transfer', + values: [PromiseOrValue, PromiseOrValue], + ): string; + + decodeFunctionResult(functionFragment: 'MAX_TOTAL_SUPPLY', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'baseToken', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'init', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'isImplementation', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'isValid', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'mint', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'name', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'operator', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'rewardPool', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'setIsValid', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'stash', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'symbol', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'totalSupply', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'transfer', data: BytesLike): Result; + + events: {}; +} + +export interface AuraStashToken extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: AuraStashTokenInterface; + + 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_TOTAL_SUPPLY(overrides?: CallOverrides): Promise<[BigNumber]>; + + baseToken(overrides?: CallOverrides): Promise<[string]>; + + init( + _operator: PromiseOrValue, + _rewardPool: PromiseOrValue, + _baseToken: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + isImplementation(overrides?: CallOverrides): Promise<[boolean]>; + + isValid(overrides?: CallOverrides): Promise<[boolean]>; + + mint( + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + name(overrides?: CallOverrides): Promise<[string]>; + + operator(overrides?: CallOverrides): Promise<[string]>; + + rewardPool(overrides?: CallOverrides): Promise<[string]>; + + setIsValid( + _isValid: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + stash(overrides?: CallOverrides): Promise<[string]>; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + _to: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + }; + + MAX_TOTAL_SUPPLY(overrides?: CallOverrides): Promise; + + baseToken(overrides?: CallOverrides): Promise; + + init( + _operator: PromiseOrValue, + _rewardPool: PromiseOrValue, + _baseToken: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + isImplementation(overrides?: CallOverrides): Promise; + + isValid(overrides?: CallOverrides): Promise; + + mint( + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + name(overrides?: CallOverrides): Promise; + + operator(overrides?: CallOverrides): Promise; + + rewardPool(overrides?: CallOverrides): Promise; + + setIsValid( + _isValid: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + stash(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + _to: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + callStatic: { + MAX_TOTAL_SUPPLY(overrides?: CallOverrides): Promise; + + baseToken(overrides?: CallOverrides): Promise; + + init( + _operator: PromiseOrValue, + _rewardPool: PromiseOrValue, + _baseToken: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + isImplementation(overrides?: CallOverrides): Promise; + + isValid(overrides?: CallOverrides): Promise; + + mint(_amount: PromiseOrValue, overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + operator(overrides?: CallOverrides): Promise; + + rewardPool(overrides?: CallOverrides): Promise; + + setIsValid(_isValid: PromiseOrValue, overrides?: CallOverrides): Promise; + + stash(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + _to: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + }; + + filters: {}; + + estimateGas: { + MAX_TOTAL_SUPPLY(overrides?: CallOverrides): Promise; + + baseToken(overrides?: CallOverrides): Promise; + + init( + _operator: PromiseOrValue, + _rewardPool: PromiseOrValue, + _baseToken: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + isImplementation(overrides?: CallOverrides): Promise; + + isValid(overrides?: CallOverrides): Promise; + + mint( + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + name(overrides?: CallOverrides): Promise; + + operator(overrides?: CallOverrides): Promise; + + rewardPool(overrides?: CallOverrides): Promise; + + setIsValid( + _isValid: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + stash(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + _to: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + }; + + populateTransaction: { + MAX_TOTAL_SUPPLY(overrides?: CallOverrides): Promise; + + baseToken(overrides?: CallOverrides): Promise; + + init( + _operator: PromiseOrValue, + _rewardPool: PromiseOrValue, + _baseToken: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + isImplementation(overrides?: CallOverrides): Promise; + + isValid(overrides?: CallOverrides): Promise; + + mint( + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + name(overrides?: CallOverrides): Promise; + + operator(overrides?: CallOverrides): Promise; + + rewardPool(overrides?: CallOverrides): Promise; + + setIsValid( + _isValid: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + stash(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + transfer( + _to: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + }; +} diff --git a/src/apps/aura/contracts/ethers/factories/AuraBaseRewardPool__factory.ts b/src/apps/aura/contracts/ethers/factories/AuraBaseRewardPool__factory.ts index 84bb4eef9..729b839a0 100644 --- a/src/apps/aura/contracts/ethers/factories/AuraBaseRewardPool__factory.ts +++ b/src/apps/aura/contracts/ethers/factories/AuraBaseRewardPool__factory.ts @@ -1,9 +1,9 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import { Signer, utils, Contract, ContractFactory, BigNumberish, Overrides } from 'ethers'; -import type { Provider, TransactionRequest } from '@ethersproject/providers'; -import type { PromiseOrValue } from '../common'; + +import { Contract, Signer, utils } from 'ethers'; +import type { Provider } from '@ethersproject/providers'; import type { AuraBaseRewardPool, AuraBaseRewardPoolInterface } from '../AuraBaseRewardPool'; const _abi = [ @@ -34,10 +34,71 @@ const _abi = [ name: 'rewardManager_', type: 'address', }, + { + internalType: 'address', + name: 'lptoken_', + type: 'address', + }, ], stateMutability: 'nonpayable', type: 'constructor', }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'spender', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'value', + type: 'uint256', + }, + ], + name: 'Approval', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'caller', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'assets', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'shares', + type: 'uint256', + }, + ], + name: 'Deposit', + type: 'event', + }, { anonymous: false, inputs: [ @@ -89,6 +150,68 @@ const _abi = [ name: 'Staked', type: 'event', }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'from', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'to', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'value', + type: 'uint256', + }, + ], + name: 'Transfer', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'caller', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'receiver', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'assets', + type: 'uint256', + }, + { + indexed: false, + internalType: 'uint256', + name: 'shares', + type: 'uint256', + }, + ], + name: 'Withdraw', + type: 'event', + }, { anonymous: false, inputs: [ @@ -127,6 +250,67 @@ const _abi = [ stateMutability: 'nonpayable', type: 'function', }, + { + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + { + internalType: 'address', + name: 'spender', + type: 'address', + }, + ], + name: 'allowance', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'spender', + type: 'address', + }, + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'approve', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'asset', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, { inputs: [ { @@ -153,9 +337,224 @@ const _abi = [ stateMutability: 'nonpayable', type: 'function', }, + { + inputs: [ + { + internalType: 'uint256', + name: 'shares', + type: 'uint256', + }, + ], + name: 'convertToAssets', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'assets', + type: 'uint256', + }, + ], + name: 'convertToShares', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'currentRewards', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'decimals', + outputs: [ + { + internalType: 'uint8', + name: '', + type: 'uint8', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'assets', + type: 'uint256', + }, + { + internalType: 'address', + name: 'receiver', + type: 'address', + }, + ], + name: 'deposit', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'duration', + 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: 'uint256', + name: '', + type: 'uint256', + }, + ], + name: 'extraRewards', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'extraRewardsLength', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'getReward', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_account', + type: 'address', + }, + { + internalType: 'bool', + name: '_claimExtras', + type: 'bool', + }, + ], + name: 'getReward', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'historicalRewards', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'lastTimeRewardApplicable', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, { inputs: [], - name: 'currentRewards', + name: 'lastUpdateTime', outputs: [ { internalType: 'uint256', @@ -169,25 +568,31 @@ const _abi = [ { inputs: [ { - internalType: 'uint256', - name: '_amount', - type: 'uint256', + internalType: 'address', + name: '', + type: 'address', }, ], - name: 'donate', + name: 'maxDeposit', outputs: [ { - internalType: 'bool', + internalType: 'uint256', name: '', - type: 'bool', + type: 'uint256', }, ], - stateMutability: 'nonpayable', + stateMutability: 'view', type: 'function', }, { - inputs: [], - name: 'duration', + inputs: [ + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + ], + name: 'maxMint', outputs: [ { internalType: 'uint256', @@ -202,11 +607,11 @@ const _abi = [ inputs: [ { internalType: 'address', - name: 'account', + name: 'owner', type: 'address', }, ], - name: 'earned', + name: 'maxRedeem', outputs: [ { internalType: 'uint256', @@ -220,25 +625,36 @@ const _abi = [ { inputs: [ { - internalType: 'uint256', - name: '', - type: 'uint256', + internalType: 'address', + name: 'owner', + type: 'address', }, ], - name: 'extraRewards', + name: 'maxWithdraw', outputs: [ { - internalType: 'address', + internalType: 'uint256', name: '', - type: 'address', + type: 'uint256', }, ], stateMutability: 'view', type: 'function', }, { - inputs: [], - name: 'extraRewardsLength', + inputs: [ + { + internalType: 'uint256', + name: 'shares', + type: 'uint256', + }, + { + internalType: 'address', + name: 'receiver', + type: 'address', + }, + ], + name: 'mint', outputs: [ { internalType: 'uint256', @@ -246,54 +662,43 @@ const _abi = [ type: 'uint256', }, ], - stateMutability: 'view', + stateMutability: 'nonpayable', type: 'function', }, { inputs: [], - name: 'getReward', + name: 'name', outputs: [ { - internalType: 'bool', + internalType: 'string', name: '', - type: 'bool', + type: 'string', }, ], - stateMutability: 'nonpayable', + stateMutability: 'view', type: 'function', }, { - inputs: [ - { - internalType: 'address', - name: '_account', - type: 'address', - }, - { - internalType: 'bool', - name: '_claimExtras', - type: 'bool', - }, - ], - name: 'getReward', + inputs: [], + name: 'newRewardRatio', outputs: [ { - internalType: 'bool', + internalType: 'uint256', name: '', - type: 'bool', + type: 'uint256', }, ], - stateMutability: 'nonpayable', + stateMutability: 'view', type: 'function', }, { inputs: [], - name: 'historicalRewards', + name: 'operator', outputs: [ { - internalType: 'uint256', + internalType: 'address', name: '', - type: 'uint256', + type: 'address', }, ], stateMutability: 'view', @@ -301,7 +706,7 @@ const _abi = [ }, { inputs: [], - name: 'lastTimeRewardApplicable', + name: 'periodFinish', outputs: [ { internalType: 'uint256', @@ -314,7 +719,7 @@ const _abi = [ }, { inputs: [], - name: 'lastUpdateTime', + name: 'pid', outputs: [ { internalType: 'uint256', @@ -326,8 +731,14 @@ const _abi = [ type: 'function', }, { - inputs: [], - name: 'newRewardRatio', + inputs: [ + { + internalType: 'uint256', + name: 'assets', + type: 'uint256', + }, + ], + name: 'previewDeposit', outputs: [ { internalType: 'uint256', @@ -339,21 +750,33 @@ const _abi = [ type: 'function', }, { - inputs: [], - name: 'operator', + inputs: [ + { + internalType: 'uint256', + name: 'shares', + type: 'uint256', + }, + ], + name: 'previewMint', outputs: [ { - internalType: 'address', + internalType: 'uint256', name: '', - type: 'address', + type: 'uint256', }, ], stateMutability: 'view', type: 'function', }, { - inputs: [], - name: 'periodFinish', + inputs: [ + { + internalType: 'uint256', + name: 'shares', + type: 'uint256', + }, + ], + name: 'previewRedeem', outputs: [ { internalType: 'uint256', @@ -365,12 +788,18 @@ const _abi = [ type: 'function', }, { - inputs: [], - name: 'pid', + inputs: [ + { + internalType: 'uint256', + name: 'assets', + type: 'uint256', + }, + ], + name: 'previewWithdraw', outputs: [ { internalType: 'uint256', - name: '', + name: 'shares', type: 'uint256', }, ], @@ -416,6 +845,35 @@ const _abi = [ stateMutability: 'view', type: 'function', }, + { + inputs: [ + { + internalType: 'uint256', + name: 'shares', + type: 'uint256', + }, + { + internalType: 'address', + name: 'receiver', + type: 'address', + }, + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + ], + name: 'redeem', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, { inputs: [], name: 'rewardManager', @@ -569,6 +1027,32 @@ const _abi = [ stateMutability: 'view', type: 'function', }, + { + inputs: [], + name: 'symbol', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'totalAssets', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, { inputs: [], name: 'totalSupply', @@ -582,6 +1066,59 @@ const _abi = [ stateMutability: 'view', type: 'function', }, + { + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + name: 'transfer', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + { + internalType: 'address', + name: '', + type: 'address', + }, + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + name: 'transferFrom', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, { inputs: [ { @@ -625,6 +1162,35 @@ const _abi = [ stateMutability: 'nonpayable', type: 'function', }, + { + inputs: [ + { + internalType: 'uint256', + name: 'assets', + type: 'uint256', + }, + { + internalType: 'address', + name: 'receiver', + type: 'address', + }, + { + internalType: 'address', + name: 'owner', + type: 'address', + }, + ], + name: 'withdraw', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, { inputs: [ { @@ -677,58 +1243,7 @@ const _abi = [ }, ]; -const _bytecode = - '0x61012060405260008055600060015560006004556000600555600060065534801561002957600080fd5b50604051611d09380380611d09833981810160405260a081101561004c57600080fd5b50805160208201516040830151606080850151608095860151610100959095526001600160601b031993821b841660a05291811b8316909452831b811660c052911b1660e05260805160601c60a05160601c60c05160601c60e05160601c61010051611beb61011e60003980610cd4528061106d528061175e5250806105ae52806106305280610acd52508061099c52806109cb5280610ca5528061179552508061069d52806108975280610e595280610eab5280610f75525080610c7c528061109e52806110dd5250611beb6000f3fe608060405234801561001057600080fd5b50600436106102265760003560e01c80636c8bcee811610130578063a694fc3a116100b8578063df136d651161007c578063df136d65146104f6578063ebe2b12b146104fe578063f106845414610506578063f14faf6f1461050e578063f7c618c11461052b57610226565b8063a694fc3a1461049c578063c32e7202146104b9578063c8f33c91146104de578063cd3daf9d146104e6578063d55a23f4146104ee57610226565b80637b0a47ee116100ff5780637b0a47ee1461045657806380faa57d1461045e5780638b876347146104665780638dcb40611461048c578063901a7d531461049457610226565b80636c8bcee8146103f25780637050ccd9146103fa57806370a082311461042857806372f702f31461044e57610226565b806338d07436116101b357806349f039a21161018257806349f039a214610380578063570ca7351461039f578063590a41f5146103a75780635e43c47b146103c457806363d38c3b146103ea57610226565b806338d074361461032e5780633d18b912146103535780633e8b83e31461035b57806340c354461461036357610226565b80630fb5a6b4116101fa5780630fb5a6b4146102b757806318160ddd146102bf5780631c1c6fe5146102c7578063262d3d6d146102e65780632ee40908146102ee57610226565b80628cc2621461022b5780630569d388146102635780630700037d1461026d5780630f4ef8a614610293575b600080fd5b6102516004803603602081101561024157600080fd5b50356001600160a01b0316610533565b60408051918252519081900360200190f35b61026b6105a3565b005b6102516004803603602081101561028357600080fd5b50356001600160a01b031661061c565b61029b61062e565b604080516001600160a01b039092168252519081900360200190f35b610251610652565b610251610659565b61026b600480360360208110156102dd57600080fd5b50351515610660565b61025161067e565b61031a6004803603604081101561030457600080fd5b506001600160a01b038135169060200135610684565b604080519115158252519081900360200190f35b61031a6004803603604081101561034457600080fd5b5080359060200135151561070e565b61031a610919565b61026b61092e565b61029b6004803603602081101561037957600080fd5b5035610959565b61026b6004803603602081101561039657600080fd5b50351515610980565b61029b61099a565b61031a600480360360208110156103bd57600080fd5b50356109be565b61031a600480360360208110156103da57600080fd5b50356001600160a01b0316610ac0565b610251610be0565b610251610be6565b61031a6004803603604081101561041057600080fd5b506001600160a01b0381351690602001351515610bec565b6102516004803603602081101561043e57600080fd5b50356001600160a01b0316610e3c565b61029b610e57565b610251610e7b565b610251610e81565b6102516004803603602081101561047c57600080fd5b50356001600160a01b0316610e94565b61031a610ea6565b610251610f56565b61031a600480360360208110156104b257600080fd5b5035610f5c565b61031a600480360360408110156104cf57600080fd5b50803590602001351515610fdb565b610251611005565b61025161100b565b610251611059565b61025161105f565b610251611065565b61025161106b565b61031a6004803603602081101561052457600080fd5b503561108f565b61029b6110db565b6001600160a01b038116600090815260096020908152604080832054600890925282205461059b919061059590670de0b6b3a76400009061058f906105809061057a61100b565b906110ff565b61058988610e3c565b9061115c565b906111bc565b90611223565b90505b919050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461060e576040805162461bcd60e51b815260206004820152600b60248201526a08585d5d1a1bdc9a5e995960aa1b604482015290519081900360640190fd5b61061a600b6000611b0a565b565b60096020526000908152604090205481565b7f000000000000000000000000000000000000000000000000000000000000000081565b62093a8081565b6007545b90565b336000908152600a602052604090205461067a908261070e565b5050565b60065481565b6000610690828461127d565b6106c56001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085611419565b6040805183815290516001600160a01b038516917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25060015b92915050565b60003361071961100b565b600355610724610e81565b6002556001600160a01b0381161561076b5761073f81610533565b6001600160a01b0382166000908152600960209081526040808320939093556003546008909152919020555b600084116107c0576040805162461bcd60e51b815260206004820152601e60248201527f526577617264506f6f6c203a2043616e6e6f7420776974686472617720300000604482015290519081900360640190fd5b60005b600b5481101561085357600b81815481106107da57fe5b60009182526020822001546040805163f3fef3a360e01b81523360048201526024810189905290516001600160a01b039092169263f3fef3a39260448084019382900301818387803b15801561082f57600080fd5b505af1158015610843573d6000803e3d6000fd5b5050600190920191506107c39050565b5060075461086190856110ff565b600755336000908152600a602052604090205461087e90856110ff565b336000818152600a60205260409020919091556108c6907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169086611479565b60408051858152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a2821561090f5761090d336001610bec565b505b5060019392505050565b6000610926336001610bec565b506001905090565b600054421015801561094257506000600454115b1561061a576109526004546114d0565b6000600455565b600b818154811061096657fe5b6000918252602090912001546001600160a01b0316905081565b336000908152600a602052604090205461067a9082610fdb565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610a2b576040805162461bcd60e51b815260206004820152600b60248201526a08585d5d1a1bdc9a5e995960aa1b604482015290519081900360640190fd5b600454610a39908390611223565b91506000544210610a5a57610a4d826114d0565b506000600455600161059e565b60008054610a7690610a6f9062093a806110ff565b42906110ff565b60015490915081026000610a908561058f846103e861115c565b905061033e811015610aaf57610aa5856114d0565b6000600455610ab5565b60048590555b506001949350505050565b6000336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610b2d576040805162461bcd60e51b815260206004820152600b60248201526a08585d5d1a1bdc9a5e995960aa1b604482015290519081900360640190fd5b6001600160a01b038216610b7a576040805162461bcd60e51b815260206004820152600f60248201526e217265776172642073657474696e6760881b604482015290519081900360640190fd5b600b54600c11610b8c5750600061059e565b50600b8054600181810183556000929092527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db90180546001600160a01b0384166001600160a01b0319909116179055919050565b60045481565b61033e81565b600082610bf761100b565b600355610c02610e81565b6002556001600160a01b03811615610c4957610c1d81610533565b6001600160a01b0382166000908152600960209081526040808320939093556003546008909152919020555b6000610c5485610533565b90508015610d9a576001600160a01b03808616600090815260096020526040812055610ca3907f0000000000000000000000000000000000000000000000000000000000000000168683611479565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166371192b177f000000000000000000000000000000000000000000000000000000000000000087846040518463ffffffff1660e01b815260040180848152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015610d4257600080fd5b505af1158015610d56573d6000803e3d6000fd5b50506040805184815290516001600160a01b03891693507fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e048692509081900360200190a25b8315610ab55760005b600b54811015610e3057600b8181548110610dba57fe5b600091825260208220015460408051630c00007b60e41b81526001600160a01b038a811660048301529151919092169263c00007b0926024808201939182900301818387803b158015610e0c57600080fd5b505af1158015610e20573d6000803e3d6000fd5b505060019092019150610da39050565b50506001949350505050565b6001600160a01b03166000908152600a602052604090205490565b7f000000000000000000000000000000000000000000000000000000000000000081565b60015481565b6000610e8f426000546115f4565b905090565b60086020526000908152604090205481565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231336040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610f1657600080fd5b505afa158015610f2a573d6000803e3d6000fd5b505050506040513d6020811015610f4057600080fd5b50519050610f4d81610f5c565b50600191505090565b60055481565b6000610f68823361127d565b610f9d6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085611419565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a2506001919050565b6000610fe883333361160a565b508115610ffc57610ffa336001610bec565b505b50600192915050565b60025481565b6000611015610659565b611022575060035461065d565b610e8f611050611030610659565b61058f670de0b6b3a764000061058960015461058960025461057a610e81565b60035490611223565b600b5490565b60035481565b60005481565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006110c66001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085611419565b6004546110d39083611223565b600455919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600082821115611156576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008261116b57506000610708565b8282028284828161117857fe5b04146111b55760405162461bcd60e51b8152600401808060200182810382526021815260200180611b6b6021913960400191505060405180910390fd5b9392505050565b6000808211611212576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161121b57fe5b049392505050565b6000828201838110156111b5576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b8061128661100b565b600355611291610e81565b6002556001600160a01b038116156112d8576112ac81610533565b6001600160a01b0382166000908152600960209081526040808320939093556003546008909152919020555b6000831161132d576040805162461bcd60e51b815260206004820152601b60248201527f526577617264506f6f6c203a2043616e6e6f74207374616b6520300000000000604482015290519081900360640190fd5b60005b600b548110156113c457600b818154811061134757fe5b6000918252602082200154604080516356e4bb9760e11b81526001600160a01b038781166004830152602482018990529151919092169263adc9772e926044808201939182900301818387803b1580156113a057600080fd5b505af11580156113b4573d6000803e3d6000fd5b5050600190920191506113309050565b506007546113d29084611223565b6007556001600160a01b0382166000908152600a60205260409020546113f89084611223565b6001600160a01b039092166000908152600a60205260409020919091555050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261147390859061183c565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526114cb90849061183c565b505050565b60006114da61100b565b6003556114e5610e81565b6002556001600160a01b0381161561152c5761150081610533565b6001600160a01b0382166000908152600960209081526040808320939093556003546008909152919020555b6006546115399083611223565b600655600054421061155a576115528262093a806111bc565b6001556115a2565b6000805461156890426110ff565b905060006115816001548361115c90919063ffffffff16565b905061158d8482611223565b935061159c8462093a806111bc565b60015550505b60058290554260028190556115ba9062093a80611223565b6000556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15050565b600081831061160357816111b5565b5090919050565b60008261161561100b565b600355611620610e81565b6002556001600160a01b038116156116675761163b81610533565b6001600160a01b0382166000908152600960209081526040808320939093556003546008909152919020555b60005b600b548110156116fe57600b818154811061168157fe5b60009182526020822001546040805163f3fef3a360e01b81526001600160a01b038981166004830152602482018b90529151919092169263f3fef3a3926044808201939182900301818387803b1580156116da57600080fd5b505af11580156116ee573d6000803e3d6000fd5b50506001909201915061166a9050565b5060075461170c90866110ff565b6007556001600160a01b0384166000908152600a602052604090205461173290866110ff565b6001600160a01b038086166000908152600a60205260408082209390935582516305335c3960e21b81527f0000000000000000000000000000000000000000000000000000000000000000600482015260248101899052868316604482015292517f0000000000000000000000000000000000000000000000000000000000000000909216926314cd70e4926064808301939282900301818387803b1580156117da57600080fd5b505af11580156117ee573d6000803e3d6000fd5b50506040805188815290516001600160a01b03881693507f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d592509081900360200190a2506001949350505050565b6060611891826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166118ed9092919063ffffffff16565b8051909150156114cb578080602001905160208110156118b057600080fd5b50516114cb5760405162461bcd60e51b815260040180806020018281038252602a815260200180611b8c602a913960400191505060405180910390fd5b60606118fc8484600085611904565b949350505050565b6060824710156119455760405162461bcd60e51b8152600401808060200182810382526026815260200180611b456026913960400191505060405180910390fd5b61194e85611a60565b61199f576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106119de5780518252601f1990920191602091820191016119bf565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611a40576040519150601f19603f3d011682016040523d82523d6000602084013e611a45565b606091505b5091509150611a55828286611a66565b979650505050505050565b3b151590565b60608315611a755750816111b5565b825115611a855782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611acf578181015183820152602001611ab7565b50505050905090810190601f168015611afc5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5080546000825590600052602060002090810190611b289190611b2b565b50565b5b80821115611b405760008155600101611b2c565b509056fe416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220d0d4834e546c839bf06d5243f76bcbd47043cf984843f141cd50e7972377895864736f6c634300060c0033'; - -type AuraBaseRewardPoolConstructorParams = [signer?: Signer] | ConstructorParameters; - -const isSuperArgs = (xs: AuraBaseRewardPoolConstructorParams): xs is ConstructorParameters => - xs.length > 1; - -export class AuraBaseRewardPool__factory extends ContractFactory { - constructor(...args: AuraBaseRewardPoolConstructorParams) { - if (isSuperArgs(args)) { - super(...args); - } else { - super(_abi, _bytecode, args[0]); - } - } - - override deploy( - pid_: PromiseOrValue, - stakingToken_: PromiseOrValue, - rewardToken_: PromiseOrValue, - operator_: PromiseOrValue, - rewardManager_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, - ): Promise { - return super.deploy( - pid_, - stakingToken_, - rewardToken_, - operator_, - rewardManager_, - overrides || {}, - ) as Promise; - } - override getDeployTransaction( - pid_: PromiseOrValue, - stakingToken_: PromiseOrValue, - rewardToken_: PromiseOrValue, - operator_: PromiseOrValue, - rewardManager_: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue }, - ): TransactionRequest { - return super.getDeployTransaction(pid_, stakingToken_, rewardToken_, operator_, rewardManager_, overrides || {}); - } - override attach(address: string): AuraBaseRewardPool { - return super.attach(address) as AuraBaseRewardPool; - } - override connect(signer: Signer): AuraBaseRewardPool__factory { - return super.connect(signer) as AuraBaseRewardPool__factory; - } - - static readonly bytecode = _bytecode; +export class AuraBaseRewardPool__factory { static readonly abi = _abi; static createInterface(): AuraBaseRewardPoolInterface { return new utils.Interface(_abi) as AuraBaseRewardPoolInterface; diff --git a/src/apps/aura/contracts/ethers/factories/AuraStashToken__factory.ts b/src/apps/aura/contracts/ethers/factories/AuraStashToken__factory.ts new file mode 100644 index 000000000..27424b7f8 --- /dev/null +++ b/src/apps/aura/contracts/ethers/factories/AuraStashToken__factory.ts @@ -0,0 +1,234 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from 'ethers'; +import type { Provider } from '@ethersproject/providers'; +import type { AuraStashToken, AuraStashTokenInterface } from '../AuraStashToken'; + +const _abi = [ + { + inputs: [ + { + internalType: 'address', + name: '_stash', + type: 'address', + }, + ], + stateMutability: 'nonpayable', + type: 'constructor', + }, + { + inputs: [], + name: 'MAX_TOTAL_SUPPLY', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'baseToken', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_operator', + type: 'address', + }, + { + internalType: 'address', + name: '_rewardPool', + type: 'address', + }, + { + internalType: 'address', + name: '_baseToken', + type: 'address', + }, + ], + name: 'init', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'isImplementation', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'isValid', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: '_amount', + type: 'uint256', + }, + ], + name: 'mint', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'name', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'operator', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'rewardPool', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'bool', + name: '_isValid', + type: 'bool', + }, + ], + name: 'setIsValid', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'stash', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'symbol', + outputs: [ + { + internalType: 'string', + name: '', + type: 'string', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'totalSupply', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_to', + type: 'address', + }, + { + internalType: 'uint256', + name: '_amount', + type: 'uint256', + }, + ], + name: 'transfer', + outputs: [ + { + internalType: 'bool', + name: '', + type: 'bool', + }, + ], + stateMutability: 'nonpayable', + type: 'function', + }, +]; + +export class AuraStashToken__factory { + static readonly abi = _abi; + static createInterface(): AuraStashTokenInterface { + return new utils.Interface(_abi) as AuraStashTokenInterface; + } + static connect(address: string, signerOrProvider: Signer | Provider): AuraStashToken { + return new Contract(address, _abi, signerOrProvider) as AuraStashToken; + } +} diff --git a/src/apps/aura/contracts/ethers/factories/index.ts b/src/apps/aura/contracts/ethers/factories/index.ts index b00a36aa4..e45ac80e2 100644 --- a/src/apps/aura/contracts/ethers/factories/index.ts +++ b/src/apps/aura/contracts/ethers/factories/index.ts @@ -10,5 +10,6 @@ export { AuraBooster__factory } from './AuraBooster__factory'; export { AuraDepositToken__factory } from './AuraDepositToken__factory'; export { AuraLocker__factory } from './AuraLocker__factory'; export { AuraMasterchef__factory } from './AuraMasterchef__factory'; +export { AuraStashToken__factory } from './AuraStashToken__factory'; export { AuraToken__factory } from './AuraToken__factory'; export { AuraVirtualBalanceRewardPool__factory } from './AuraVirtualBalanceRewardPool__factory'; diff --git a/src/apps/aura/contracts/ethers/index.ts b/src/apps/aura/contracts/ethers/index.ts index eab29729f..29292f87c 100644 --- a/src/apps/aura/contracts/ethers/index.ts +++ b/src/apps/aura/contracts/ethers/index.ts @@ -10,6 +10,7 @@ export type { AuraBooster } from './AuraBooster'; export type { AuraDepositToken } from './AuraDepositToken'; export type { AuraLocker } from './AuraLocker'; export type { AuraMasterchef } from './AuraMasterchef'; +export type { AuraStashToken } from './AuraStashToken'; export type { AuraToken } from './AuraToken'; export type { AuraVirtualBalanceRewardPool } from './AuraVirtualBalanceRewardPool'; export * as factories from './factories'; @@ -22,5 +23,6 @@ export { AuraBooster__factory } from './factories/AuraBooster__factory'; export { AuraDepositToken__factory } from './factories/AuraDepositToken__factory'; export { AuraLocker__factory } from './factories/AuraLocker__factory'; export { AuraMasterchef__factory } from './factories/AuraMasterchef__factory'; +export { AuraStashToken__factory } from './factories/AuraStashToken__factory'; export { AuraToken__factory } from './factories/AuraToken__factory'; export { AuraVirtualBalanceRewardPool__factory } from './factories/AuraVirtualBalanceRewardPool__factory'; diff --git a/src/apps/aura/contracts/index.ts b/src/apps/aura/contracts/index.ts index baec70937..a4e3d8c9c 100644 --- a/src/apps/aura/contracts/index.ts +++ b/src/apps/aura/contracts/index.ts @@ -14,6 +14,7 @@ import { AuraDepositToken__factory, AuraLocker__factory, AuraMasterchef__factory, + AuraStashToken__factory, AuraToken__factory, AuraVirtualBalanceRewardPool__factory, } from './ethers'; @@ -54,6 +55,9 @@ export class AuraContractFactory extends ContractFactory { auraMasterchef({ address, network }: ContractOpts) { return AuraMasterchef__factory.connect(address, this.appToolkit.getNetworkProvider(network)); } + auraStashToken({ address, network }: ContractOpts) { + return AuraStashToken__factory.connect(address, this.appToolkit.getNetworkProvider(network)); + } auraToken({ address, network }: ContractOpts) { return AuraToken__factory.connect(address, this.appToolkit.getNetworkProvider(network)); } @@ -71,5 +75,6 @@ export type { AuraBooster } from './ethers'; export type { AuraDepositToken } from './ethers'; export type { AuraLocker } from './ethers'; export type { AuraMasterchef } from './ethers'; +export type { AuraStashToken } from './ethers'; export type { AuraToken } from './ethers'; export type { AuraVirtualBalanceRewardPool } from './ethers';