diff --git a/lib/aave-v3-origin b/lib/aave-v3-origin index 6948864f..105baafd 160000 --- a/lib/aave-v3-origin +++ b/lib/aave-v3-origin @@ -1 +1 @@ -Subproject commit 6948864fc7e74b2b29fadfe2007998992060f84b +Subproject commit 105baafdb65ab700859b55f2280530cc767cc0dc diff --git a/scripts/configs/abis.ts b/scripts/configs/abis.ts index dc987214..c095ffb6 100644 --- a/scripts/configs/abis.ts +++ b/scripts/configs/abis.ts @@ -3,6 +3,7 @@ import {mainnetProtoV3Pool} from './pools/ethereum'; /** * @dev These abis can be inferred directly from code as they exist as a dependency + * For contracts that are not unique, the path needs to be prefixed */ export const ABI_INTERFACES = [ 'ICollector', @@ -15,11 +16,11 @@ export const ABI_INTERFACES = [ 'IGovernancePowerStrategy', 'IDataWarehouse', 'IExecutorWithTimelock', - 'IERC20', + 'lib/aave-v3-origin/src/core/contracts/dependencies/openzeppelin/contracts/IERC20.sol:IERC20', 'IERC20Detailed', 'IAToken', 'IDefaultInterestRateStrategy', - 'IAaveOracle', + 'lib/aave-v3-origin/src/core/contracts/interfaces/IAaveOracle.sol:IAaveOracle', 'IExecutor', 'ICrossChainController', 'IWithGuardian', @@ -32,8 +33,8 @@ export const ABI_INTERFACES = [ 'IPoolAddressesProvider', 'IPoolConfigurator', 'IStakeToken', - 'IStaticATokenFactory', - 'IStaticATokenLM', + 'IStataTokenFactory', + 'IStataTokenV2', ]; /** diff --git a/scripts/generateABIs.ts b/scripts/generateABIs.ts index 08409239..50b2aefc 100644 --- a/scripts/generateABIs.ts +++ b/scripts/generateABIs.ts @@ -15,8 +15,11 @@ export async function generateABIs(removeExisting: boolean) { } else { mkdirSync('./src/ts/abis'); } - for (const INTERFACE of ABI_INTERFACES) { - const {stdout, stderr} = await awaitableExec(`forge inspect ${INTERFACE} abi`); + const imports: string[] = []; + for (const INTERFACE_PATH of ABI_INTERFACES) { + const {stdout, stderr} = await awaitableExec(`forge inspect ${INTERFACE_PATH} abi`); + const INTERFACE = + INTERFACE_PATH.split(':').length > 1 ? INTERFACE_PATH.split(':')[1] : INTERFACE_PATH; if (stderr) { throw new Error(`Failed to generate abi for ${INTERFACE}`); } diff --git a/scripts/generator/abis.ts b/scripts/generator/abis.ts index b45f2076..3b5104a8 100644 --- a/scripts/generator/abis.ts +++ b/scripts/generator/abis.ts @@ -2,7 +2,9 @@ import {ABI_INTERFACES, DOWNLOAD_ABI_INTERFACES} from '../configs/abis'; export function generateABIImports() { const jsExports: string[] = []; - for (const INTERFACE of ABI_INTERFACES) { + for (const INTERFACE_PATH of ABI_INTERFACES) { + const INTERFACE = + INTERFACE_PATH.split(':').length > 1 ? INTERFACE_PATH.split(':')[1] : INTERFACE_PATH; const varName = `${INTERFACE}_ABI`; jsExports.push(`export {${varName}} from './abis/${INTERFACE}';`); } diff --git a/src/AaveV2.sol b/src/AaveV2.sol index be889d7d..d7239489 100644 --- a/src/AaveV2.sol +++ b/src/AaveV2.sol @@ -2,8 +2,6 @@ pragma solidity >=0.6.0; pragma experimental ABIEncoderV2; -import {AggregatorInterface} from './common/AggregatorInterface.sol'; - library DataTypes { // refer to the whitepaper, section 1.1 basic concepts for a formal description of these properties. struct ReserveData { diff --git a/src/common/AggregatorInterface.sol b/src/common/AggregatorInterface.sol deleted file mode 100644 index ac9998e1..00000000 --- a/src/common/AggregatorInterface.sol +++ /dev/null @@ -1,18 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity >=0.6.0; - -interface AggregatorInterface { - function latestAnswer() external view returns (int256); - - function latestTimestamp() external view returns (uint256); - - function latestRound() external view returns (uint256); - - function getAnswer(uint256 roundId) external view returns (int256); - - function getTimestamp(uint256 roundId) external view returns (uint256); - - event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 updatedAt); - - event NewRound(uint256 indexed roundId, address indexed startedBy, uint256 startedAt); -} diff --git a/src/test/AaveV2Ethereum.t.sol b/src/test/AaveV2Ethereum.t.sol index edcf191c..92cd5829 100644 --- a/src/test/AaveV2Ethereum.t.sol +++ b/src/test/AaveV2Ethereum.t.sol @@ -6,8 +6,8 @@ import {AaveV2Ethereum} from '../AaveAddressBook.sol'; // imports are unused but required so forge inspect can find the source code import {IERC20Detailed} from 'aave-v3-origin/core/contracts/dependencies/openzeppelin/contracts/IERC20Detailed.sol'; import {IWithGuardian} from 'solidity-utils/contracts/access-control/interfaces/IWithGuardian.sol'; -import {IStaticATokenFactory} from 'aave-v3-origin/periphery/contracts/static-a-token/interfaces/IStaticATokenFactory.sol'; -import {IStaticATokenLM} from 'aave-v3-origin/periphery/contracts/static-a-token/interfaces/IStaticATokenLM.sol'; +import {IStataTokenFactory} from 'aave-v3-origin/periphery/contracts/static-a-token/interfaces/IStataTokenFactory.sol'; +import {IStataTokenV2} from 'aave-v3-origin/periphery/contracts/static-a-token/interfaces/IStataTokenV2.sol'; contract AaveAddressBookTest is Test { function setUp() public {} diff --git a/src/ts/AaveAddressBook.ts b/src/ts/AaveAddressBook.ts index 2d6ee77a..3526640c 100644 --- a/src/ts/AaveAddressBook.ts +++ b/src/ts/AaveAddressBook.ts @@ -90,8 +90,8 @@ export {IPool_ABI} from './abis/IPool'; export {IPoolAddressesProvider_ABI} from './abis/IPoolAddressesProvider'; export {IPoolConfigurator_ABI} from './abis/IPoolConfigurator'; export {IStakeToken_ABI} from './abis/IStakeToken'; -export {IStaticATokenFactory_ABI} from './abis/IStaticATokenFactory'; -export {IStaticATokenLM_ABI} from './abis/IStaticATokenLM'; +export {IStataTokenFactory_ABI} from './abis/IStataTokenFactory'; +export {IStataTokenV2_ABI} from './abis/IStataTokenV2'; export {IPayloadsControllerDataHelper_ABI} from './abis/IPayloadsControllerDataHelper'; export {IGovernanceDataHelper_ABI} from './abis/IGovernanceDataHelper'; export {IMetaDelegateHelper_ABI} from './abis/IMetaDelegateHelper'; diff --git a/src/ts/abis/ICrossChainController.ts b/src/ts/abis/ICrossChainController.ts index be9f3bbf..cdef52a0 100644 --- a/src/ts/abis/ICrossChainController.ts +++ b/src/ts/abis/ICrossChainController.ts @@ -694,6 +694,25 @@ export const ICrossChainController_ABI = [ ], stateMutability: 'view', }, + { + type: 'function', + name: 'maxRescue', + inputs: [ + { + name: 'erc20Token', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, { type: 'function', name: 'receiveCrossChainMessage', diff --git a/src/ts/abis/IERC20.ts b/src/ts/abis/IERC20.ts index b3d0c449..73358b27 100644 --- a/src/ts/abis/IERC20.ts +++ b/src/ts/abis/IERC20.ts @@ -85,7 +85,7 @@ export const IERC20_ABI = [ name: 'transfer', inputs: [ { - name: 'to', + name: 'recipient', type: 'address', internalType: 'address', }, @@ -109,12 +109,12 @@ export const IERC20_ABI = [ name: 'transferFrom', inputs: [ { - name: 'from', + name: 'sender', type: 'address', internalType: 'address', }, { - name: 'to', + name: 'recipient', type: 'address', internalType: 'address', }, diff --git a/src/ts/abis/IPoolConfigurator.ts b/src/ts/abis/IPoolConfigurator.ts index 9c9f0405..8b27d187 100644 --- a/src/ts/abis/IPoolConfigurator.ts +++ b/src/ts/abis/IPoolConfigurator.ts @@ -11,7 +11,7 @@ export const IPoolConfigurator_ABI = [ internalType: 'uint40', }, ], - stateMutability: 'nonpayable', + stateMutability: 'view', }, { type: 'function', @@ -78,7 +78,7 @@ export const IPoolConfigurator_ABI = [ internalType: 'address', }, ], - stateMutability: 'nonpayable', + stateMutability: 'view', }, { type: 'function', @@ -97,7 +97,7 @@ export const IPoolConfigurator_ABI = [ internalType: 'uint256', }, ], - stateMutability: 'nonpayable', + stateMutability: 'view', }, { type: 'function', diff --git a/src/ts/abis/IRescuable.ts b/src/ts/abis/IRescuable.ts index fd64f3fe..73eaf807 100644 --- a/src/ts/abis/IRescuable.ts +++ b/src/ts/abis/IRescuable.ts @@ -41,6 +41,25 @@ export const IRescuable_ABI = [ outputs: [], stateMutability: 'nonpayable', }, + { + type: 'function', + name: 'maxRescue', + inputs: [ + { + name: 'erc20Token', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, { type: 'function', name: 'whoCanRescue', diff --git a/src/ts/abis/IStataTokenFactory.ts b/src/ts/abis/IStataTokenFactory.ts new file mode 100644 index 00000000..41991966 --- /dev/null +++ b/src/ts/abis/IStataTokenFactory.ts @@ -0,0 +1,65 @@ +// AUTOGENERATED - MANUALLY CHANGES WILL BE REVERTED BY THE GENERATOR +export const IStataTokenFactory_ABI = [ + { + type: 'function', + name: 'createStataTokens', + inputs: [ + { + name: 'underlyings', + type: 'address[]', + internalType: 'address[]', + }, + ], + outputs: [ + { + name: '', + type: 'address[]', + internalType: 'address[]', + }, + ], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'getStataToken', + inputs: [ + { + name: 'underlying', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'address', + internalType: 'address', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getStataTokens', + inputs: [], + outputs: [ + { + name: '', + type: 'address[]', + internalType: 'address[]', + }, + ], + stateMutability: 'view', + }, + { + type: 'error', + name: 'NotListedUnderlying', + inputs: [ + { + name: 'underlying', + type: 'address', + internalType: 'address', + }, + ], + }, +] as const; diff --git a/src/ts/abis/IStataTokenV2.ts b/src/ts/abis/IStataTokenV2.ts new file mode 100644 index 00000000..a5bc85ae --- /dev/null +++ b/src/ts/abis/IStataTokenV2.ts @@ -0,0 +1,1136 @@ +// AUTOGENERATED - MANUALLY CHANGES WILL BE REVERTED BY THE GENERATOR +export const IStataTokenV2_ABI = [ + { + type: 'function', + name: 'DOMAIN_SEPARATOR', + inputs: [], + outputs: [ + { + name: '', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'aToken', + inputs: [], + outputs: [ + { + name: '', + type: 'address', + internalType: 'contract IERC20', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'allowance', + inputs: [ + { + name: 'owner', + type: 'address', + internalType: 'address', + }, + { + name: 'spender', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'approve', + inputs: [ + { + name: 'spender', + type: 'address', + internalType: 'address', + }, + { + name: 'value', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [ + { + name: '', + type: 'bool', + internalType: 'bool', + }, + ], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'asset', + inputs: [], + outputs: [ + { + name: 'assetTokenAddress', + type: 'address', + internalType: 'address', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'balanceOf', + inputs: [ + { + name: 'account', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'canPause', + inputs: [ + { + name: 'actor', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'bool', + internalType: 'bool', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'claimRewards', + inputs: [ + { + name: 'receiver', + type: 'address', + internalType: 'address', + }, + { + name: 'rewards', + type: 'address[]', + internalType: 'address[]', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'claimRewardsOnBehalf', + inputs: [ + { + name: 'onBehalfOf', + type: 'address', + internalType: 'address', + }, + { + name: 'receiver', + type: 'address', + internalType: 'address', + }, + { + name: 'rewards', + type: 'address[]', + internalType: 'address[]', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'claimRewardsToSelf', + inputs: [ + { + name: 'rewards', + type: 'address[]', + internalType: 'address[]', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'collectAndUpdateRewards', + inputs: [ + { + name: 'reward', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'convertToAssets', + inputs: [ + { + name: 'shares', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [ + { + name: 'assets', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'convertToShares', + inputs: [ + { + name: 'assets', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [ + { + name: 'shares', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'decimals', + inputs: [], + outputs: [ + { + name: '', + type: 'uint8', + internalType: 'uint8', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'deposit', + inputs: [ + { + name: 'assets', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'receiver', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: 'shares', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'depositATokens', + inputs: [ + { + name: 'assets', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'receiver', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'depositWithPermit', + inputs: [ + { + name: 'assets', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'receiver', + type: 'address', + internalType: 'address', + }, + { + name: 'deadline', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'sig', + type: 'tuple', + internalType: 'struct IERC4626StataToken.SignatureParams', + components: [ + { + name: 'v', + type: 'uint8', + internalType: 'uint8', + }, + { + name: 'r', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 's', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + }, + { + name: 'depositToAave', + type: 'bool', + internalType: 'bool', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'getClaimableRewards', + inputs: [ + { + name: 'user', + type: 'address', + internalType: 'address', + }, + { + name: 'reward', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getCurrentRewardsIndex', + inputs: [ + { + name: 'reward', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getReferenceAsset', + inputs: [], + outputs: [ + { + name: '', + type: 'address', + internalType: 'address', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getTotalClaimableRewards', + inputs: [ + { + name: 'reward', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'getUnclaimedRewards', + inputs: [ + { + name: 'user', + type: 'address', + internalType: 'address', + }, + { + name: 'reward', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'isRegisteredRewardToken', + inputs: [ + { + name: 'reward', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'bool', + internalType: 'bool', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'latestAnswer', + inputs: [], + outputs: [ + { + name: '', + type: 'int256', + internalType: 'int256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'maxDeposit', + inputs: [ + { + name: 'receiver', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: 'maxAssets', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'maxMint', + inputs: [ + { + name: 'receiver', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: 'maxShares', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'maxRedeem', + inputs: [ + { + name: 'owner', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: 'maxShares', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'maxWithdraw', + inputs: [ + { + name: 'owner', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: 'maxAssets', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'mint', + inputs: [ + { + name: 'shares', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'receiver', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: 'assets', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'name', + inputs: [], + outputs: [ + { + name: '', + type: 'string', + internalType: 'string', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'nonces', + inputs: [ + { + name: 'owner', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'permit', + inputs: [ + { + name: 'owner', + type: 'address', + internalType: 'address', + }, + { + name: 'spender', + type: 'address', + internalType: 'address', + }, + { + name: 'value', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'deadline', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'v', + type: 'uint8', + internalType: 'uint8', + }, + { + name: 'r', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 's', + type: 'bytes32', + internalType: 'bytes32', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'previewDeposit', + inputs: [ + { + name: 'assets', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [ + { + name: 'shares', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'previewMint', + inputs: [ + { + name: 'shares', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [ + { + name: 'assets', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'previewRedeem', + inputs: [ + { + name: 'shares', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [ + { + name: 'assets', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'previewWithdraw', + inputs: [ + { + name: 'assets', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [ + { + name: 'shares', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'redeem', + inputs: [ + { + name: 'shares', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'receiver', + type: 'address', + internalType: 'address', + }, + { + name: 'owner', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: 'assets', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'redeemATokens', + inputs: [ + { + name: 'shares', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'receiver', + type: 'address', + internalType: 'address', + }, + { + name: 'owner', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'refreshRewardTokens', + inputs: [], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'rewardTokens', + inputs: [], + outputs: [ + { + name: '', + type: 'address[]', + internalType: 'address[]', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'setPaused', + inputs: [ + { + name: 'paused', + type: 'bool', + internalType: 'bool', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'symbol', + inputs: [], + outputs: [ + { + name: '', + type: 'string', + internalType: 'string', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'totalAssets', + inputs: [], + outputs: [ + { + name: 'totalManagedAssets', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'totalSupply', + inputs: [], + outputs: [ + { + name: '', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'transfer', + inputs: [ + { + name: 'to', + type: 'address', + internalType: 'address', + }, + { + name: 'value', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [ + { + name: '', + type: 'bool', + internalType: 'bool', + }, + ], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'transferFrom', + inputs: [ + { + name: 'from', + type: 'address', + internalType: 'address', + }, + { + name: 'to', + type: 'address', + internalType: 'address', + }, + { + name: 'value', + type: 'uint256', + internalType: 'uint256', + }, + ], + outputs: [ + { + name: '', + type: 'bool', + internalType: 'bool', + }, + ], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'withdraw', + inputs: [ + { + name: 'assets', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'receiver', + type: 'address', + internalType: 'address', + }, + { + name: 'owner', + type: 'address', + internalType: 'address', + }, + ], + outputs: [ + { + name: 'shares', + type: 'uint256', + internalType: 'uint256', + }, + ], + stateMutability: 'nonpayable', + }, + { + type: 'event', + name: 'Approval', + inputs: [ + { + name: 'owner', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'spender', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'value', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'Deposit', + inputs: [ + { + name: 'sender', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'owner', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'assets', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + { + name: 'shares', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'RewardTokenRegistered', + inputs: [ + { + name: 'reward', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'startIndex', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'Transfer', + inputs: [ + { + name: 'from', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'to', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'value', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'Withdraw', + inputs: [ + { + name: 'sender', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'receiver', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'owner', + type: 'address', + indexed: true, + internalType: 'address', + }, + { + name: 'assets', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + { + name: 'shares', + type: 'uint256', + indexed: false, + internalType: 'uint256', + }, + ], + anonymous: false, + }, + { + type: 'error', + name: 'InvalidClaimer', + inputs: [ + { + name: 'claimer', + type: 'address', + internalType: 'address', + }, + ], + }, + { + type: 'error', + name: 'OnlyPauseGuardian', + inputs: [ + { + name: 'caller', + type: 'address', + internalType: 'address', + }, + ], + }, + { + type: 'error', + name: 'PoolAddressMismatch', + inputs: [ + { + name: 'pool', + type: 'address', + internalType: 'address', + }, + ], + }, + { + type: 'error', + name: 'RewardNotInitialized', + inputs: [ + { + name: 'reward', + type: 'address', + internalType: 'address', + }, + ], + }, + { + type: 'error', + name: 'StaticATokenInvalidZeroShares', + inputs: [], + }, +] as const;