diff --git a/src/apps/aave-safety-module/aave-safety-module.module.ts b/src/apps/aave-safety-module/aave-safety-module.module.ts index faebec118..6290dfa27 100644 --- a/src/apps/aave-safety-module/aave-safety-module.module.ts +++ b/src/apps/aave-safety-module/aave-safety-module.module.ts @@ -5,17 +5,13 @@ import { AbstractApp } from '~app/app.dynamic-module'; import { AaveSafetyModuleViemContractFactory } from './contracts'; import { EthereumAaveSafetyModuleAbptTokenFetcher } from './ethereum/aave-safety-module.abpt.token-fetcher'; import { EthereumAaveSafetyModuleStkAaveClaimableContractPositionFetcher } from './ethereum/aave-safety-module.stk-aave-claimable.contract-position-fetcher'; -import { EthereumAaveSafetyModuleStkAaveTokenFetcher } from './ethereum/aave-safety-module.stk-aave.token-fetcher'; import { EthereumAaveSafetyModuleStkAbptClaimableContractPositionFetcher } from './ethereum/aave-safety-module.stk-abpt-claimable.contract-position-fetcher'; -import { EthereumAaveSafetyModuleStkAbptTokenFetcher } from './ethereum/aave-safety-module.stk-abpt.token-fetcher'; @Module({ providers: [ AaveSafetyModuleViemContractFactory, EthereumAaveSafetyModuleAbptTokenFetcher, - EthereumAaveSafetyModuleStkAaveTokenFetcher, EthereumAaveSafetyModuleStkAaveClaimableContractPositionFetcher, - EthereumAaveSafetyModuleStkAbptTokenFetcher, EthereumAaveSafetyModuleStkAbptClaimableContractPositionFetcher, ], }) diff --git a/src/apps/aave-safety-module/ethereum/aave-safety-module.stk-aave.token-fetcher.ts b/src/apps/aave-safety-module/ethereum/aave-safety-module.stk-aave.token-fetcher.ts deleted file mode 100644 index 2ac4ee7ac..000000000 --- a/src/apps/aave-safety-module/ethereum/aave-safety-module.stk-aave.token-fetcher.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { ZERO_ADDRESS } from '~app-toolkit/constants/address'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetDataPropsParams, GetUnderlyingTokensParams } from '~position/template/app-token.template.types'; - -import { AaveSafetyModuleViemContractFactory } from '../contracts'; -import { AaveStkAave } from '../contracts/viem'; - -@PositionTemplate() -export class EthereumAaveSafetyModuleStkAaveTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'stkAAVE'; - - stkApyHelperAddress = '0xa82247b44750ae23076d6746a9b5b8dc0ecbb646'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(AaveSafetyModuleViemContractFactory) - protected readonly contractFactory: AaveSafetyModuleViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.aaveStkAave({ address, network: this.network }); - } - - async getAddresses() { - return ['0x4da27a545c0c5b758a6ba100e3a049001de870f5']; - } - - async getUnderlyingTokenDefinitions(_params: GetUnderlyingTokensParams) { - return [{ address: '0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9', network: this.network }]; - } - - async getPricePerShare() { - return [1]; - } - - async getApy({ multicall }: GetDataPropsParams) { - const stkApyHelperContract = this.contractFactory.aaveStkApyHelper({ - address: this.stkApyHelperAddress, - network: this.network, - }); - - const stkAaveData = await multicall.wrap(stkApyHelperContract).read.getStkAaveData([ZERO_ADDRESS]); - const apy = (+stkAaveData[5] / 1e4) * 100; - return apy; - } -} diff --git a/src/apps/aave-safety-module/ethereum/aave-safety-module.stk-abpt.token-fetcher.ts b/src/apps/aave-safety-module/ethereum/aave-safety-module.stk-abpt.token-fetcher.ts deleted file mode 100644 index 425669d58..000000000 --- a/src/apps/aave-safety-module/ethereum/aave-safety-module.stk-abpt.token-fetcher.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { ZERO_ADDRESS } from '~app-toolkit/constants/address'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetDataPropsParams } from '~position/template/app-token.template.types'; - -import { AaveSafetyModuleViemContractFactory } from '../contracts'; -import { AaveStkAbpt } from '../contracts/viem'; - -@PositionTemplate() -export class EthereumAaveSafetyModuleStkAbptTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'stkABPT'; - - stkApyHelperAddress = '0xa82247b44750ae23076d6746a9b5b8dc0ecbb646'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(AaveSafetyModuleViemContractFactory) - protected readonly contractFactory: AaveSafetyModuleViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.aaveStkAbpt({ address, network: this.network }); - } - - async getAddresses() { - return ['0xa1116930326d21fb917d5a27f1e9943a9595fb47']; - } - - async getUnderlyingTokenDefinitions() { - return [{ address: '0x41a08648c3766f9f9d85598ff102a08f4ef84f84', network: this.network }]; - } - - async getPricePerShare() { - return [1]; - } - - async getApy({ multicall }: GetDataPropsParams) { - const stkApyHelperContract = this.contractFactory.aaveStkApyHelper({ - network: this.network, - address: this.stkApyHelperAddress, - }); - - const stkAaveData = await multicall.wrap(stkApyHelperContract).read.getStkBptData([ZERO_ADDRESS]); - - const apy = (+stkAaveData[5] / 1e4) * 100; - return apy; - } -} diff --git a/src/apps/airswap/airswap.module.ts b/src/apps/airswap/airswap.module.ts deleted file mode 100644 index a1778b07f..000000000 --- a/src/apps/airswap/airswap.module.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Module } from '@nestjs/common'; - -import { AbstractApp } from '~app/app.dynamic-module'; - -import { AirswapViemContractFactory } from './contracts'; -import { EthereumAirswapSAstV2TokenFetcher } from './ethereum/airswap.s-ast-v2.token-fetcher'; -import { EthereumAirswapSAstV3TokenFetcher } from './ethereum/airswap.s-ast-v3.token-fetcher'; - -@Module({ - providers: [AirswapViemContractFactory, EthereumAirswapSAstV2TokenFetcher, EthereumAirswapSAstV3TokenFetcher], -}) -export class AirswapAppModule extends AbstractApp() {} diff --git a/src/apps/airswap/assets/logo.png b/src/apps/airswap/assets/logo.png deleted file mode 100644 index 9bab5b526..000000000 Binary files a/src/apps/airswap/assets/logo.png and /dev/null differ diff --git a/src/apps/airswap/contracts/abis/staking-v-2.json b/src/apps/airswap/contracts/abis/staking-v-2.json deleted file mode 100644 index 80e3d1402..000000000 --- a/src/apps/airswap/contracts/abis/staking-v-2.json +++ /dev/null @@ -1,243 +0,0 @@ -[ - { - "inputs": [ - { "internalType": "contract ERC20", "name": "_token", "type": "address" }, - { "internalType": "string", "name": "_name", "type": "string" }, - { "internalType": "string", "name": "_symbol", "type": "string" }, - { "internalType": "uint256", "name": "_duration", "type": "uint256" }, - { "internalType": "uint256", "name": "_minDelay", "type": "uint256" } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { "anonymous": false, "inputs": [], "name": "CancelDurationChange", "type": "event" }, - { - "anonymous": false, - "inputs": [{ "indexed": true, "internalType": "uint256", "name": "newDuration", "type": "uint256" }], - "name": "CompleteDurationChange", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "delegate", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "account", "type": "address" } - ], - "name": "ProposeDelegate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": true, "internalType": "uint256", "name": "unlockTimestamp", "type": "uint256" }], - "name": "ScheduleDurationChange", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "delegate", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "account", "type": "address" } - ], - "name": "SetDelegate", - "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": "tokens", "type": "uint256" } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "accountDelegates", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "available", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "total", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { "inputs": [], "name": "cancelDurationChange", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "delegateAccounts", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "duration", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "getStakes", - "outputs": [ - { - "components": [ - { "internalType": "uint256", "name": "duration", "type": "uint256" }, - { "internalType": "uint256", "name": "balance", "type": "uint256" }, - { "internalType": "uint256", "name": "timestamp", "type": "uint256" } - ], - "internalType": "struct IStaking.Stake", - "name": "accountStake", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "delegate", "type": "address" }], - "name": "proposeDelegate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "proposedDelegates", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [{ "internalType": "uint256", "name": "delay", "type": "uint256" }], - "name": "scheduleDurationChange", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "setDelegate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_duration", "type": "uint256" }], - "name": "setDuration", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "string", "name": "_name", "type": "string" }, - { "internalType": "string", "name": "_symbol", "type": "string" } - ], - "name": "setMetaData", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], - "name": "stake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "account", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "stakeFor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "token", - "outputs": [{ "internalType": "contract ERC20", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "delegate", "type": "address" }], - "name": "unsetDelegate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], - "name": "unstake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/airswap/contracts/abis/staking-v-3.json b/src/apps/airswap/contracts/abis/staking-v-3.json deleted file mode 100644 index e72ce31ee..000000000 --- a/src/apps/airswap/contracts/abis/staking-v-3.json +++ /dev/null @@ -1,523 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "contract ERC20", - "name": "_token", - "type": "address" - }, - { - "internalType": "string", - "name": "_name", - "type": "string" - }, - { - "internalType": "string", - "name": "_symbol", - "type": "string" - }, - { - "internalType": "uint256", - "name": "_duration", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_minDelay", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [], - "name": "CancelDurationChange", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "newDuration", - "type": "uint256" - } - ], - "name": "CompleteDurationChange", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegate", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "ProposeDelegate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "unlockTimestamp", - "type": "uint256" - } - ], - "name": "ScheduleDurationChange", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "delegate", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "SetDelegate", - "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": "tokens", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "accountDelegates", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "available", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "total", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "cancelDurationChange", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "delegateAccounts", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "duration", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getStakes", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "duration", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - } - ], - "internalType": "struct IStaking.Stake", - "name": "accountStake", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegate", - "type": "address" - } - ], - "name": "proposeDelegate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "proposedDelegates", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "delay", - "type": "uint256" - } - ], - "name": "scheduleDurationChange", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "setDelegate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_duration", - "type": "uint256" - } - ], - "name": "setDuration", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "_name", - "type": "string" - }, - { - "internalType": "string", - "name": "_symbol", - "type": "string" - } - ], - "name": "setMetaData", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "stake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "stakeFor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "token", - "outputs": [ - { - "internalType": "contract ERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "delegate", - "type": "address" - } - ], - "name": "unsetDelegate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "unstake", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/airswap/contracts/index.ts b/src/apps/airswap/contracts/index.ts deleted file mode 100644 index 5dcfebdf6..000000000 --- a/src/apps/airswap/contracts/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * from './viem.contract-factory'; diff --git a/src/apps/airswap/contracts/viem.contract-factory.ts b/src/apps/airswap/contracts/viem.contract-factory.ts deleted file mode 100644 index a4f9e004e..000000000 --- a/src/apps/airswap/contracts/viem.contract-factory.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Injectable, Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { Network } from '~types/network.interface'; - -import { StakingV2__factory, StakingV3__factory } from './viem'; - -type ContractOpts = { address: string; network: Network }; - -@Injectable() -export class AirswapViemContractFactory { - constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) {} - - stakingV2({ address, network }: ContractOpts) { - return StakingV2__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } - stakingV3({ address, network }: ContractOpts) { - return StakingV3__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } -} diff --git a/src/apps/airswap/contracts/viem/StakingV2.ts b/src/apps/airswap/contracts/viem/StakingV2.ts deleted file mode 100644 index dfa372a2f..000000000 --- a/src/apps/airswap/contracts/viem/StakingV2.ts +++ /dev/null @@ -1,537 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const stakingV2Abi = [ - { - inputs: [ - { - internalType: 'contract ERC20', - name: '_token', - type: 'address', - }, - { - internalType: 'string', - name: '_name', - type: 'string', - }, - { - internalType: 'string', - name: '_symbol', - type: 'string', - }, - { - internalType: 'uint256', - name: '_duration', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_minDelay', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [], - name: 'CancelDurationChange', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'uint256', - name: 'newDuration', - type: 'uint256', - }, - ], - name: 'CompleteDurationChange', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'previousOwner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnershipTransferred', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'delegate', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'ProposeDelegate', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'uint256', - name: 'unlockTimestamp', - type: 'uint256', - }, - ], - name: 'ScheduleDurationChange', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'delegate', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'SetDelegate', - 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: 'tokens', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'accountDelegates', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'available', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: 'total', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'cancelDurationChange', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'delegateAccounts', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'duration', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'getStakes', - outputs: [ - { - components: [ - { - internalType: 'uint256', - name: 'duration', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'balance', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'timestamp', - type: 'uint256', - }, - ], - internalType: 'struct IStaking.Stake', - name: 'accountStake', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'owner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'delegate', - type: 'address', - }, - ], - name: 'proposeDelegate', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'proposedDelegates', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'renounceOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'delay', - type: 'uint256', - }, - ], - name: 'scheduleDurationChange', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'setDelegate', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_duration', - type: 'uint256', - }, - ], - name: 'setDuration', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'string', - name: '_name', - type: 'string', - }, - { - internalType: 'string', - name: '_symbol', - type: 'string', - }, - ], - name: 'setMetaData', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'stake', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'stakeFor', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'token', - outputs: [ - { - internalType: 'contract ERC20', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'transferOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'delegate', - type: 'address', - }, - ], - name: 'unsetDelegate', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'unstake', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type StakingV2 = typeof stakingV2Abi; -export type StakingV2Contract = GetContractReturnType; - -export class StakingV2__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: stakingV2Abi, publicClient: client }); - } -} diff --git a/src/apps/airswap/contracts/viem/StakingV3.ts b/src/apps/airswap/contracts/viem/StakingV3.ts deleted file mode 100644 index c3f23ff3d..000000000 --- a/src/apps/airswap/contracts/viem/StakingV3.ts +++ /dev/null @@ -1,537 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const stakingV3Abi = [ - { - inputs: [ - { - internalType: 'contract ERC20', - name: '_token', - type: 'address', - }, - { - internalType: 'string', - name: '_name', - type: 'string', - }, - { - internalType: 'string', - name: '_symbol', - type: 'string', - }, - { - internalType: 'uint256', - name: '_duration', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_minDelay', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [], - name: 'CancelDurationChange', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'uint256', - name: 'newDuration', - type: 'uint256', - }, - ], - name: 'CompleteDurationChange', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'previousOwner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnershipTransferred', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'delegate', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'ProposeDelegate', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'uint256', - name: 'unlockTimestamp', - type: 'uint256', - }, - ], - name: 'ScheduleDurationChange', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'delegate', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'SetDelegate', - 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: 'tokens', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'accountDelegates', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'available', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: 'total', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'cancelDurationChange', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'delegateAccounts', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'duration', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'getStakes', - outputs: [ - { - components: [ - { - internalType: 'uint256', - name: 'duration', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'balance', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'timestamp', - type: 'uint256', - }, - ], - internalType: 'struct IStaking.Stake', - name: 'accountStake', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'owner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'delegate', - type: 'address', - }, - ], - name: 'proposeDelegate', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'proposedDelegates', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'renounceOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'delay', - type: 'uint256', - }, - ], - name: 'scheduleDurationChange', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'setDelegate', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_duration', - type: 'uint256', - }, - ], - name: 'setDuration', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'string', - name: '_name', - type: 'string', - }, - { - internalType: 'string', - name: '_symbol', - type: 'string', - }, - ], - name: 'setMetaData', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'stake', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'stakeFor', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'token', - outputs: [ - { - internalType: 'contract ERC20', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'transferOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'delegate', - type: 'address', - }, - ], - name: 'unsetDelegate', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'unstake', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type StakingV3 = typeof stakingV3Abi; -export type StakingV3Contract = GetContractReturnType; - -export class StakingV3__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: stakingV3Abi, publicClient: client }); - } -} diff --git a/src/apps/airswap/contracts/viem/index.ts b/src/apps/airswap/contracts/viem/index.ts deleted file mode 100644 index 39d022daf..000000000 --- a/src/apps/airswap/contracts/viem/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -export type { StakingV2 } from './StakingV2'; -export type { StakingV3 } from './StakingV3'; - -export { StakingV2__factory } from './StakingV2'; -export { StakingV3__factory } from './StakingV3'; diff --git a/src/apps/airswap/ethereum/airswap.s-ast-v2.token-fetcher.ts b/src/apps/airswap/ethereum/airswap.s-ast-v2.token-fetcher.ts deleted file mode 100644 index aa2a8253d..000000000 --- a/src/apps/airswap/ethereum/airswap.s-ast-v2.token-fetcher.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetUnderlyingTokensParams } from '~position/template/app-token.template.types'; - -import { AirswapViemContractFactory } from '../contracts'; -import { StakingV2 } from '../contracts/viem'; - -@PositionTemplate() -export class EthereumAirswapSAstV2TokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Staking'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(AirswapViemContractFactory) private readonly contractFactory: AirswapViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.stakingV2({ network: this.network, address }); - } - - async getAddresses(): Promise { - return ['0x579120871266ccd8de6c85ef59e2ff6743e7cd15']; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.token(), network: this.network }]; - } - - async getPricePerShare() { - return [1]; - } - - async getLabel(): Promise { - return 'sAST v2'; - } -} diff --git a/src/apps/airswap/ethereum/airswap.s-ast-v3.token-fetcher.ts b/src/apps/airswap/ethereum/airswap.s-ast-v3.token-fetcher.ts deleted file mode 100644 index 86d8d71b5..000000000 --- a/src/apps/airswap/ethereum/airswap.s-ast-v3.token-fetcher.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetUnderlyingTokensParams } from '~position/template/app-token.template.types'; - -import { AirswapViemContractFactory } from '../contracts'; -import { StakingV2 } from '../contracts/viem'; - -@PositionTemplate() -export class EthereumAirswapSAstV3TokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Staking'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(AirswapViemContractFactory) private readonly contractFactory: AirswapViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.stakingV2({ network: this.network, address }); - } - - async getAddresses(): Promise { - return ['0x6d88b09805b90dad911e5c5a512eedd984d6860b']; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.token(), network: this.network }]; - } - - async getPricePerShare() { - return [1]; - } - - async getLabel(): Promise { - return 'sAST v3'; - } -} diff --git a/src/apps/camelot/arbitrum/camelot.x-grail.token-fetcher.ts b/src/apps/camelot/arbitrum/camelot.x-grail.token-fetcher.ts deleted file mode 100644 index df670e56c..000000000 --- a/src/apps/camelot/arbitrum/camelot.x-grail.token-fetcher.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetUnderlyingTokensParams } from '~position/template/app-token.template.types'; - -import { CamelotViemContractFactory } from '../contracts'; -import { CamelotXGrail } from '../contracts/viem'; - -@PositionTemplate() -export class ArbitrumXGrailTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'xGRAIL'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(CamelotViemContractFactory) private readonly contractFactory: CamelotViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.camelotXGrail({ address, network: this.network }); - } - - async getAddresses(): Promise { - return ['0x3caae25ee616f2c8e13c74da0813402eae3f496b']; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.grailToken(), network: this.network }]; - } - - async getPricePerShare() { - return [1]; - } -} diff --git a/src/apps/camelot/camelot.module.ts b/src/apps/camelot/camelot.module.ts index d00a34262..cd4371e88 100644 --- a/src/apps/camelot/camelot.module.ts +++ b/src/apps/camelot/camelot.module.ts @@ -7,7 +7,6 @@ import { ArbitrumCamelotDividendContractPositionFetcher } from './arbitrum/camel import { ArbitrumCamelotFarmContractPositionFetcher } from './arbitrum/camelot.farm.contract-position-fetcher'; import { ArbitrumCamelotNitroContractPositionFetcher } from './arbitrum/camelot.nitro.contract-position-fetcher'; import { ArbitrumCamelotPoolV2TokenFetcher } from './arbitrum/camelot.pool-v2.token-fetcher'; -import { ArbitrumXGrailTokenFetcher } from './arbitrum/camelot.x-grail.token-fetcher'; import { CamelotViemContractFactory } from './contracts'; @Module({ @@ -16,7 +15,6 @@ import { CamelotViemContractFactory } from './contracts'; UniswapV2ViemContractFactory, // Arbitrum ArbitrumCamelotPoolV2TokenFetcher, - ArbitrumXGrailTokenFetcher, ArbitrumCamelotDividendContractPositionFetcher, ArbitrumCamelotFarmContractPositionFetcher, ArbitrumCamelotNitroContractPositionFetcher, diff --git a/src/apps/camelot/contracts/abis/camelot-x-grail.json b/src/apps/camelot/contracts/abis/camelot-x-grail.json deleted file mode 100644 index 46994f0b9..000000000 --- a/src/apps/camelot/contracts/abis/camelot-x-grail.json +++ /dev/null @@ -1,608 +0,0 @@ -[ - { - "inputs": [{ "internalType": "contract IGrailTokenV2", "name": "grailToken_", "type": "address" }], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "userAddress", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "usageAddress", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "Allocate", - "type": "event" - }, - { - "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": "userAddress", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "usageAddress", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "ApproveUsage", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "userAddress", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "xGrailAmount", "type": "uint256" } - ], - "name": "CancelRedeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "to", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "Convert", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "userAddress", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "usageAddress", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "fee", "type": "uint256" } - ], - "name": "Deallocate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "userAddress", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "xGrailAmount", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "grailAmount", "type": "uint256" } - ], - "name": "FinalizeRedeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "userAddress", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "xGrailAmount", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "grailAmount", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "duration", "type": "uint256" } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "account", "type": "address" }, - { "indexed": false, "internalType": "bool", "name": "add", "type": "bool" } - ], - "name": "SetTransferWhitelist", - "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": "usageAddress", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "fee", "type": "uint256" } - ], - "name": "UpdateDeallocationFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "previousDividendsAddress", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "newDividendsAddress", "type": "address" } - ], - "name": "UpdateDividendsAddress", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "userAddress", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "redeemIndex", "type": "uint256" }, - { "indexed": false, "internalType": "address", "name": "previousDividendsAddress", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "newDividendsAddress", "type": "address" } - ], - "name": "UpdateRedeemDividendsAddress", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "uint256", "name": "minRedeemRatio", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "maxRedeemRatio", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "minRedeemDuration", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "maxRedeemDuration", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "redeemDividendsAdjustment", "type": "uint256" } - ], - "name": "UpdateRedeemSettings", - "type": "event" - }, - { - "inputs": [], - "name": "MAX_DEALLOCATION_FEE", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_FIXED_RATIO", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "usageAddress", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { "internalType": "bytes", "name": "usageData", "type": "bytes" } - ], - "name": "allocate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "userAddress", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "allocateFromUsage", - "outputs": [], - "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": [ - { "internalType": "contract IXGrailTokenUsage", "name": "usage", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "approveUsage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "redeemIndex", "type": "uint256" }], - "name": "cancelRedeem", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], - "name": "convert", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { "internalType": "address", "name": "to", "type": "address" } - ], - "name": "convertTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "usageAddress", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { "internalType": "bytes", "name": "usageData", "type": "bytes" } - ], - "name": "deallocate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "userAddress", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "deallocateFromUsage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } - ], - "name": "decreaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "dividendsAddress", - "outputs": [{ "internalType": "contract IXGrailTokenUsage", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "redeemIndex", "type": "uint256" }], - "name": "finalizeRedeem", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { "internalType": "uint256", "name": "duration", "type": "uint256" } - ], - "name": "getGrailByVestingDuration", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "userAddress", "type": "address" }, - { "internalType": "address", "name": "usageAddress", "type": "address" } - ], - "name": "getUsageAllocation", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "userAddress", "type": "address" }, - { "internalType": "address", "name": "usageAddress", "type": "address" } - ], - "name": "getUsageApproval", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "userAddress", "type": "address" }, - { "internalType": "uint256", "name": "redeemIndex", "type": "uint256" } - ], - "name": "getUserRedeem", - "outputs": [ - { "internalType": "uint256", "name": "grailAmount", "type": "uint256" }, - { "internalType": "uint256", "name": "xGrailAmount", "type": "uint256" }, - { "internalType": "uint256", "name": "endTime", "type": "uint256" }, - { "internalType": "address", "name": "dividendsContract", "type": "address" }, - { "internalType": "uint256", "name": "dividendsAllocation", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "userAddress", "type": "address" }], - "name": "getUserRedeemsLength", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "userAddress", "type": "address" }], - "name": "getXGrailBalance", - "outputs": [ - { "internalType": "uint256", "name": "allocatedAmount", "type": "uint256" }, - { "internalType": "uint256", "name": "redeemingAmount", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "grailToken", - "outputs": [{ "internalType": "contract IGrailTokenV2", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "addedValue", "type": "uint256" } - ], - "name": "increaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "isTransferWhitelisted", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maxRedeemDuration", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maxRedeemRatio", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "minRedeemDuration", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "minRedeemRatio", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "xGrailAmount", "type": "uint256" }, - { "internalType": "uint256", "name": "duration", "type": "uint256" } - ], - "name": "redeem", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "redeemDividendsAdjustment", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "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": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "sender", "type": "address" }, - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "index", "type": "uint256" }], - "name": "transferWhitelist", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "transferWhitelistLength", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "usageAddress", "type": "address" }, - { "internalType": "uint256", "name": "fee", "type": "uint256" } - ], - "name": "updateDeallocationFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "contract IXGrailTokenUsage", "name": "dividendsAddress_", "type": "address" }], - "name": "updateDividendsAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "redeemIndex", "type": "uint256" }], - "name": "updateRedeemDividendsAddress", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "minRedeemRatio_", "type": "uint256" }, - { "internalType": "uint256", "name": "maxRedeemRatio_", "type": "uint256" }, - { "internalType": "uint256", "name": "minRedeemDuration_", "type": "uint256" }, - { "internalType": "uint256", "name": "maxRedeemDuration_", "type": "uint256" }, - { "internalType": "uint256", "name": "redeemDividendsAdjustment_", "type": "uint256" } - ], - "name": "updateRedeemSettings", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "account", "type": "address" }, - { "internalType": "bool", "name": "add", "type": "bool" } - ], - "name": "updateTransferWhitelist", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "address", "name": "", "type": "address" } - ], - "name": "usageAllocations", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "address", "name": "", "type": "address" } - ], - "name": "usageApprovals", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "usagesDeallocationFee", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "name": "userRedeems", - "outputs": [ - { "internalType": "uint256", "name": "grailAmount", "type": "uint256" }, - { "internalType": "uint256", "name": "xGrailAmount", "type": "uint256" }, - { "internalType": "uint256", "name": "endTime", "type": "uint256" }, - { "internalType": "contract IXGrailTokenUsage", "name": "dividendsAddress", "type": "address" }, - { "internalType": "uint256", "name": "dividendsAllocation", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "xGrailBalances", - "outputs": [ - { "internalType": "uint256", "name": "allocatedAmount", "type": "uint256" }, - { "internalType": "uint256", "name": "redeemingAmount", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/src/apps/camelot/contracts/viem.contract-factory.ts b/src/apps/camelot/contracts/viem.contract-factory.ts index e4bd3ffd9..5d6172f0d 100644 --- a/src/apps/camelot/contracts/viem.contract-factory.ts +++ b/src/apps/camelot/contracts/viem.contract-factory.ts @@ -11,7 +11,6 @@ import { CamelotNitroFactory__factory, CamelotNitroPool__factory, CamelotPair__factory, - CamelotXGrail__factory, } from './viem'; type ContractOpts = { address: string; network: Network }; @@ -41,7 +40,4 @@ export class CamelotViemContractFactory { camelotPair({ address, network }: ContractOpts) { return CamelotPair__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } - camelotXGrail({ address, network }: ContractOpts) { - return CamelotXGrail__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } } diff --git a/src/apps/camelot/contracts/viem/CamelotXGrail.ts b/src/apps/camelot/contracts/viem/CamelotXGrail.ts deleted file mode 100644 index 2b3a9de27..000000000 --- a/src/apps/camelot/contracts/viem/CamelotXGrail.ts +++ /dev/null @@ -1,1387 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const camelotXGrailAbi = [ - { - inputs: [ - { - internalType: 'contract IGrailTokenV2', - name: 'grailToken_', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'userAddress', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'usageAddress', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Allocate', - type: 'event', - }, - { - 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: 'userAddress', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'usageAddress', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'ApproveUsage', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'userAddress', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'xGrailAmount', - type: 'uint256', - }, - ], - name: 'CancelRedeem', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: false, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Convert', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'userAddress', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'usageAddress', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'fee', - type: 'uint256', - }, - ], - name: 'Deallocate', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'userAddress', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'xGrailAmount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'grailAmount', - type: 'uint256', - }, - ], - name: 'FinalizeRedeem', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'previousOwner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnershipTransferred', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'userAddress', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'xGrailAmount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'grailAmount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'duration', - type: 'uint256', - }, - ], - name: 'Redeem', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'account', - type: 'address', - }, - { - indexed: false, - internalType: 'bool', - name: 'add', - type: 'bool', - }, - ], - name: 'SetTransferWhitelist', - 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: 'usageAddress', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'fee', - type: 'uint256', - }, - ], - name: 'UpdateDeallocationFee', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'previousDividendsAddress', - type: 'address', - }, - { - indexed: false, - internalType: 'address', - name: 'newDividendsAddress', - type: 'address', - }, - ], - name: 'UpdateDividendsAddress', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'userAddress', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'redeemIndex', - type: 'uint256', - }, - { - indexed: false, - internalType: 'address', - name: 'previousDividendsAddress', - type: 'address', - }, - { - indexed: false, - internalType: 'address', - name: 'newDividendsAddress', - type: 'address', - }, - ], - name: 'UpdateRedeemDividendsAddress', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'minRedeemRatio', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'maxRedeemRatio', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'minRedeemDuration', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'maxRedeemDuration', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'redeemDividendsAdjustment', - type: 'uint256', - }, - ], - name: 'UpdateRedeemSettings', - type: 'event', - }, - { - inputs: [], - name: 'MAX_DEALLOCATION_FEE', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'MAX_FIXED_RATIO', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'usageAddress', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'bytes', - name: 'usageData', - type: 'bytes', - }, - ], - name: 'allocate', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'userAddress', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'allocateFromUsage', - outputs: [], - 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: [ - { - internalType: 'contract IXGrailTokenUsage', - name: 'usage', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'approveUsage', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'redeemIndex', - type: 'uint256', - }, - ], - name: 'cancelRedeem', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'convert', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - ], - name: 'convertTo', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'usageAddress', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'bytes', - name: 'usageData', - type: 'bytes', - }, - ], - name: 'deallocate', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'userAddress', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'deallocateFromUsage', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'dividendsAddress', - outputs: [ - { - internalType: 'contract IXGrailTokenUsage', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'redeemIndex', - type: 'uint256', - }, - ], - name: 'finalizeRedeem', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'duration', - type: 'uint256', - }, - ], - name: 'getGrailByVestingDuration', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'userAddress', - type: 'address', - }, - { - internalType: 'address', - name: 'usageAddress', - type: 'address', - }, - ], - name: 'getUsageAllocation', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'userAddress', - type: 'address', - }, - { - internalType: 'address', - name: 'usageAddress', - type: 'address', - }, - ], - name: 'getUsageApproval', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'userAddress', - type: 'address', - }, - { - internalType: 'uint256', - name: 'redeemIndex', - type: 'uint256', - }, - ], - name: 'getUserRedeem', - outputs: [ - { - internalType: 'uint256', - name: 'grailAmount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'xGrailAmount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'endTime', - type: 'uint256', - }, - { - internalType: 'address', - name: 'dividendsContract', - type: 'address', - }, - { - internalType: 'uint256', - name: 'dividendsAllocation', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'userAddress', - type: 'address', - }, - ], - name: 'getUserRedeemsLength', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'userAddress', - type: 'address', - }, - ], - name: 'getXGrailBalance', - outputs: [ - { - internalType: 'uint256', - name: 'allocatedAmount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'redeemingAmount', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'grailToken', - outputs: [ - { - internalType: 'contract IGrailTokenV2', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'isTransferWhitelisted', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'maxRedeemDuration', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'maxRedeemRatio', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'minRedeemDuration', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'minRedeemRatio', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'owner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'xGrailAmount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'duration', - type: 'uint256', - }, - ], - name: 'redeem', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'redeemDividendsAdjustment', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'renounceOwnership', - outputs: [], - stateMutability: 'nonpayable', - 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: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'transferOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'index', - type: 'uint256', - }, - ], - name: 'transferWhitelist', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'transferWhitelistLength', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'usageAddress', - type: 'address', - }, - { - internalType: 'uint256', - name: 'fee', - type: 'uint256', - }, - ], - name: 'updateDeallocationFee', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'contract IXGrailTokenUsage', - name: 'dividendsAddress_', - type: 'address', - }, - ], - name: 'updateDividendsAddress', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'redeemIndex', - type: 'uint256', - }, - ], - name: 'updateRedeemDividendsAddress', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'minRedeemRatio_', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'maxRedeemRatio_', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'minRedeemDuration_', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'maxRedeemDuration_', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'redeemDividendsAdjustment_', - type: 'uint256', - }, - ], - name: 'updateRedeemSettings', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - { - internalType: 'bool', - name: 'add', - type: 'bool', - }, - ], - name: 'updateTransferWhitelist', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'usageAllocations', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'usageApprovals', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'usagesDeallocationFee', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - name: 'userRedeems', - outputs: [ - { - internalType: 'uint256', - name: 'grailAmount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'xGrailAmount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'endTime', - type: 'uint256', - }, - { - internalType: 'contract IXGrailTokenUsage', - name: 'dividendsAddress', - type: 'address', - }, - { - internalType: 'uint256', - name: 'dividendsAllocation', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'xGrailBalances', - outputs: [ - { - internalType: 'uint256', - name: 'allocatedAmount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'redeemingAmount', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, -] as const; - -export type CamelotXGrail = typeof camelotXGrailAbi; -export type CamelotXGrailContract = GetContractReturnType; - -export class CamelotXGrail__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: camelotXGrailAbi, publicClient: client }); - } -} diff --git a/src/apps/camelot/contracts/viem/index.ts b/src/apps/camelot/contracts/viem/index.ts index e14f17f75..db18462ab 100644 --- a/src/apps/camelot/contracts/viem/index.ts +++ b/src/apps/camelot/contracts/viem/index.ts @@ -9,7 +9,6 @@ export type { CamelotNftPool } from './CamelotNftPool'; export type { CamelotNitroFactory } from './CamelotNitroFactory'; export type { CamelotNitroPool } from './CamelotNitroPool'; export type { CamelotPair } from './CamelotPair'; -export type { CamelotXGrail } from './CamelotXGrail'; export { CamelotDividend__factory } from './CamelotDividend'; export { CamelotFactory__factory } from './CamelotFactory'; @@ -18,4 +17,3 @@ export { CamelotNftPool__factory } from './CamelotNftPool'; export { CamelotNitroFactory__factory } from './CamelotNitroFactory'; export { CamelotNitroPool__factory } from './CamelotNitroPool'; export { CamelotPair__factory } from './CamelotPair'; -export { CamelotXGrail__factory } from './CamelotXGrail'; diff --git a/src/apps/cask-protocol/arbitrum/cask-protocol.wallet.token-fetcher.ts b/src/apps/cask-protocol/arbitrum/cask-protocol.wallet.token-fetcher.ts deleted file mode 100644 index 1c8922f06..000000000 --- a/src/apps/cask-protocol/arbitrum/cask-protocol.wallet.token-fetcher.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { CaskProtocolWalletTokenFetcher } from '../common/cask-protocol.wallet.token-fetcher'; - -@PositionTemplate() -export class ArbitrumCaskProtocolWalletTokenFetcher extends CaskProtocolWalletTokenFetcher { - groupLabel = 'Vaults'; - caskVaultContractAddress = '0x20151ff7fdd720b85063d02081aa5b7876adff7b'; -} diff --git a/src/apps/cask-protocol/assets/logo.png b/src/apps/cask-protocol/assets/logo.png deleted file mode 100644 index 286e4c62e..000000000 Binary files a/src/apps/cask-protocol/assets/logo.png and /dev/null differ diff --git a/src/apps/cask-protocol/avalanche/cask-protocol.wallet.token-fetcher.ts b/src/apps/cask-protocol/avalanche/cask-protocol.wallet.token-fetcher.ts deleted file mode 100644 index e08f9aadd..000000000 --- a/src/apps/cask-protocol/avalanche/cask-protocol.wallet.token-fetcher.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { CaskProtocolWalletTokenFetcher } from '../common/cask-protocol.wallet.token-fetcher'; - -@PositionTemplate() -export class AvalancheCaskProtocolWalletTokenFetcher extends CaskProtocolWalletTokenFetcher { - groupLabel = 'Vaults'; - caskVaultContractAddress = '0x3b2b4b547daeebf3a703288cb43650f0f287b9ff'; -} diff --git a/src/apps/cask-protocol/binance-smart-chain/cask-protocol.wallet.token-fetcher.ts b/src/apps/cask-protocol/binance-smart-chain/cask-protocol.wallet.token-fetcher.ts deleted file mode 100644 index f312ab147..000000000 --- a/src/apps/cask-protocol/binance-smart-chain/cask-protocol.wallet.token-fetcher.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { CaskProtocolWalletTokenFetcher } from '../common/cask-protocol.wallet.token-fetcher'; - -@PositionTemplate() -export class BinanceSmartChainCaskProtocolWalletTokenFetcher extends CaskProtocolWalletTokenFetcher { - groupLabel = 'Vaults'; - caskVaultContractAddress = '0x3b2b4b547daeebf3a703288cb43650f0f287b9ff'; -} diff --git a/src/apps/cask-protocol/cask-protocol.module.ts b/src/apps/cask-protocol/cask-protocol.module.ts deleted file mode 100644 index 26f5f831e..000000000 --- a/src/apps/cask-protocol/cask-protocol.module.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Module } from '@nestjs/common'; - -import { AbstractApp } from '~app/app.dynamic-module'; - -import { ArbitrumCaskProtocolWalletTokenFetcher } from './arbitrum/cask-protocol.wallet.token-fetcher'; -import { AvalancheCaskProtocolWalletTokenFetcher } from './avalanche/cask-protocol.wallet.token-fetcher'; -import { BinanceSmartChainCaskProtocolWalletTokenFetcher } from './binance-smart-chain/cask-protocol.wallet.token-fetcher'; -import { CeloCaskProtocolWalletTokenFetcher } from './celo/cask-protocol.wallet.token-fetcher'; -import { CaskProtocolViemContractFactory } from './contracts'; -import { FantomCaskProtocolWalletTokenFetcher } from './fantom/cask-protocol.wallet.token-fetcher'; -import { GnosisCaskProtocolWalletTokenFetcher } from './gnosis/cask-protocol.wallet.token-fetcher'; -import { OptimismCaskProtocolWalletTokenFetcher } from './optimism/cask-protocol.wallet.token-fetcher'; -import { PolygonCaskProtocolWalletTokenFetcher } from './polygon/cask-protocol.wallet.token-fetcher'; - -@Module({ - providers: [ - CaskProtocolViemContractFactory, - ArbitrumCaskProtocolWalletTokenFetcher, - AvalancheCaskProtocolWalletTokenFetcher, - BinanceSmartChainCaskProtocolWalletTokenFetcher, - CeloCaskProtocolWalletTokenFetcher, - FantomCaskProtocolWalletTokenFetcher, - GnosisCaskProtocolWalletTokenFetcher, - OptimismCaskProtocolWalletTokenFetcher, - PolygonCaskProtocolWalletTokenFetcher, - ], -}) -export class CaskProtocolAppModule extends AbstractApp() {} diff --git a/src/apps/cask-protocol/celo/cask-protocol.wallet.token-fetcher.ts b/src/apps/cask-protocol/celo/cask-protocol.wallet.token-fetcher.ts deleted file mode 100644 index 7abc37b18..000000000 --- a/src/apps/cask-protocol/celo/cask-protocol.wallet.token-fetcher.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { CaskProtocolWalletTokenFetcher } from '../common/cask-protocol.wallet.token-fetcher'; - -@PositionTemplate() -export class CeloCaskProtocolWalletTokenFetcher extends CaskProtocolWalletTokenFetcher { - groupLabel = 'Vaults'; - caskVaultContractAddress = '0xbccdbb0806acc914f6746de592f924b374190710'; -} diff --git a/src/apps/cask-protocol/common/cask-protocol.wallet.token-fetcher.ts b/src/apps/cask-protocol/common/cask-protocol.wallet.token-fetcher.ts deleted file mode 100644 index 4ce06770c..000000000 --- a/src/apps/cask-protocol/common/cask-protocol.wallet.token-fetcher.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { getLabelFromToken } from '~app-toolkit/helpers/presentation/image.present'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { - GetDisplayPropsParams, - GetPricePerShareParams, - GetUnderlyingTokensParams, -} from '~position/template/app-token.template.types'; - -import { CaskProtocolViemContractFactory } from '../contracts'; -import { CaskVaultToken } from '../contracts/viem'; - -export abstract class CaskProtocolWalletTokenFetcher extends AppTokenTemplatePositionFetcher { - abstract caskVaultContractAddress: string; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(CaskProtocolViemContractFactory) protected readonly contractFactory: CaskProtocolViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.caskVaultToken({ address, network: this.network }); - } - - async getAddresses() { - return [this.caskVaultContractAddress]; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.getBaseAsset(), network: this.network }]; - } - - async getPricePerShare({ appToken, contract }: GetPricePerShareParams) { - const pricePerShareRaw = await contract.read.pricePerShare(); - const pricePerShare = Number(pricePerShareRaw) / 10 ** appToken.tokens[0].decimals; - return [pricePerShare]; - } - - async getLabel({ appToken }: GetDisplayPropsParams) { - return getLabelFromToken(appToken.tokens[0]); - } -} diff --git a/src/apps/cask-protocol/contracts/abis/cask-vault-token.json b/src/apps/cask-protocol/contracts/abis/cask-vault-token.json deleted file mode 100644 index a8b2266e8..000000000 --- a/src/apps/cask-protocol/contracts/abis/cask-vault-token.json +++ /dev/null @@ -1,1568 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "changeAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "protocol", - "type": "address" - } - ], - "name": "AddProtocol", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "asset", - "type": "address" - } - ], - "name": "AllowedAsset", - "type": "event" - }, - { - "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": "participant", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "assetAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "baseAssetAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "name": "AssetDeposited", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "participant", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "asset", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "assetAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "baseAssetAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "name": "AssetWithdrawn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "asset", - "type": "address" - } - ], - "name": "DisallowedAsset", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "baseAssetAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shares", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "protocolFee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "protocolFeeShares", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "network", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "networkFee", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "networkFeeShares", - "type": "uint256" - } - ], - "name": "Payment", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "protocol", - "type": "address" - } - ], - "name": "RemoveProtocol", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "feeDistributor", - "type": "address" - } - ], - "name": "SetFeeDistributor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "participant", - "type": "address" - }, - { - "indexed": false, - "internalType": "enum ICaskVault.FundingSource", - "name": "fundingSource", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "address", - "name": "fundingAsset", - "type": "address" - } - ], - "name": "SetFundingSource", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "maxPriceFeedAge", - "type": "uint256" - } - ], - "name": "SetMaxPriceFeedAge", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "minDeposit", - "type": "uint256" - } - ], - "name": "SetMinDeposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "feeDistributor", - "type": "address" - } - ], - "name": "SetTrustedForwarder", - "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": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "baseAssetAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "name": "TransferValue", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_protocol", - "type": "address" - } - ], - "name": "addProtocol", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_asset", - "type": "address" - }, - { - "internalType": "address", - "name": "_priceFeed", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_depositLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_slippageBps", - "type": "uint256" - } - ], - "name": "allowAsset", - "outputs": [], - "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": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "baseAsset", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_fromAsset", - "type": "address" - }, - { - "internalType": "address", - "name": "_toAsset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_fromAmount", - "type": "uint256" - } - ], - "name": "convertPrice", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "currentValueOf", - "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": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_assetAmount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "internalType": "address", - "name": "_asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_assetAmount", - "type": "uint256" - } - ], - "name": "depositTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_asset", - "type": "address" - } - ], - "name": "disallowAsset", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "feeDistributor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "fundingSource", - "outputs": [ - { - "components": [ - { - "internalType": "enum ICaskVault.FundingSource", - "name": "fundingSource", - "type": "uint8" - }, - { - "internalType": "address", - "name": "fundingAsset", - "type": "address" - } - ], - "internalType": "struct ICaskVault.FundingProfile", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getAllAssets", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_asset", - "type": "address" - } - ], - "name": "getAsset", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "priceFeed", - "type": "address" - }, - { - "internalType": "uint256", - "name": "slippageBps", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "depositLimit", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "assetDecimals", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "priceFeedDecimals", - "type": "uint8" - }, - { - "internalType": "bool", - "name": "allowed", - "type": "bool" - } - ], - "internalType": "struct ICaskVault.Asset", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getBaseAsset", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_baseAsset", - "type": "address" - }, - { - "internalType": "address", - "name": "_baseAssetPriceFeed", - "type": "address" - }, - { - "internalType": "address", - "name": "_feeDistributor", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "forwarder", - "type": "address" - } - ], - "name": "isTrustedForwarder", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maxPriceFeedAge", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "minDeposit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pricePerShare", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "protocolCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_from", - "type": "address" - }, - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_protocolFee", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_network", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_networkFee", - "type": "uint256" - } - ], - "name": "protocolPayment", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_from", - "type": "address" - }, - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_value", - "type": "uint256" - } - ], - "name": "protocolPayment", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_from", - "type": "address" - }, - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_protocolFee", - "type": "uint256" - } - ], - "name": "protocolPayment", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "protocols", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_protocol", - "type": "address" - } - ], - "name": "removeProtocol", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "reserved1", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_feeDistributor", - "type": "address" - } - ], - "name": "setFeeDistributor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "enum ICaskVault.FundingSource", - "name": "_fundingSource", - "type": "uint8" - }, - { - "internalType": "address", - "name": "_fundingAsset", - "type": "address" - } - ], - "name": "setFundingSource", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_maxPriceFeedAge", - "type": "uint256" - } - ], - "name": "setMaxPriceFeedAge", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_minDeposit", - "type": "uint256" - } - ], - "name": "setMinDeposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_forwarder", - "type": "address" - } - ], - "name": "setTrustedForwarder", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_value", - "type": "uint256" - } - ], - "name": "sharesForValue", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_asset", - "type": "address" - } - ], - "name": "supportsAsset", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_asset", - "type": "address" - } - ], - "name": "totalAssetBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalValue", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_value", - "type": "uint256" - } - ], - "name": "transferValue", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_sender", - "type": "address" - }, - { - "internalType": "address", - "name": "_recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_value", - "type": "uint256" - } - ], - "name": "transferValueFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "trustedForwarder", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "versionRecipient", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_shares", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_recipient", - "type": "address" - }, - { - "internalType": "address", - "name": "_asset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_shares", - "type": "uint256" - } - ], - "name": "withdrawTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "initialLogic", - "type": "address" - }, - { - "internalType": "address", - "name": "initialAdmin", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - } -] diff --git a/src/apps/cask-protocol/contracts/index.ts b/src/apps/cask-protocol/contracts/index.ts deleted file mode 100644 index 5dcfebdf6..000000000 --- a/src/apps/cask-protocol/contracts/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * from './viem.contract-factory'; diff --git a/src/apps/cask-protocol/contracts/viem.contract-factory.ts b/src/apps/cask-protocol/contracts/viem.contract-factory.ts deleted file mode 100644 index 48fe10543..000000000 --- a/src/apps/cask-protocol/contracts/viem.contract-factory.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Injectable, Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { Network } from '~types/network.interface'; - -import { CaskVaultToken__factory } from './viem'; - -type ContractOpts = { address: string; network: Network }; - -@Injectable() -export class CaskProtocolViemContractFactory { - constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) {} - - caskVaultToken({ address, network }: ContractOpts) { - return CaskVaultToken__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } -} diff --git a/src/apps/cask-protocol/contracts/viem/CaskVaultToken.ts b/src/apps/cask-protocol/contracts/viem/CaskVaultToken.ts deleted file mode 100644 index 28e39bbe1..000000000 --- a/src/apps/cask-protocol/contracts/viem/CaskVaultToken.ts +++ /dev/null @@ -1,1582 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const caskVaultTokenAbi = [ - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'previousAdmin', - type: 'address', - }, - { - indexed: false, - internalType: 'address', - name: 'newAdmin', - type: 'address', - }, - ], - name: 'AdminChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'implementation', - type: 'address', - }, - ], - name: 'Upgraded', - type: 'event', - }, - { - stateMutability: 'payable', - type: 'fallback', - }, - { - inputs: [], - name: 'admin', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newAdmin', - type: 'address', - }, - ], - name: 'changeAdmin', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'implementation', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newImplementation', - type: 'address', - }, - ], - name: 'upgradeTo', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newImplementation', - type: 'address', - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - ], - name: 'upgradeToAndCall', - outputs: [], - stateMutability: 'payable', - type: 'function', - }, - { - stateMutability: 'payable', - type: 'receive', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'protocol', - type: 'address', - }, - ], - name: 'AddProtocol', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'asset', - type: 'address', - }, - ], - name: 'AllowedAsset', - type: 'event', - }, - { - 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: 'participant', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'asset', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'assetAmount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'baseAssetAmount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'AssetDeposited', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'participant', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'asset', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'assetAmount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'baseAssetAmount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'AssetWithdrawn', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'asset', - type: 'address', - }, - ], - name: 'DisallowedAsset', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'previousOwner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnershipTransferred', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'Paused', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'baseAssetAmount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'protocolFee', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'protocolFeeShares', - type: 'uint256', - }, - { - indexed: true, - internalType: 'address', - name: 'network', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'networkFee', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'networkFeeShares', - type: 'uint256', - }, - ], - name: 'Payment', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'protocol', - type: 'address', - }, - ], - name: 'RemoveProtocol', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'feeDistributor', - type: 'address', - }, - ], - name: 'SetFeeDistributor', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'participant', - type: 'address', - }, - { - indexed: false, - internalType: 'enum ICaskVault.FundingSource', - name: 'fundingSource', - type: 'uint8', - }, - { - indexed: false, - internalType: 'address', - name: 'fundingAsset', - type: 'address', - }, - ], - name: 'SetFundingSource', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'maxPriceFeedAge', - type: 'uint256', - }, - ], - name: 'SetMaxPriceFeedAge', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'minDeposit', - type: 'uint256', - }, - ], - name: 'SetMinDeposit', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'feeDistributor', - type: 'address', - }, - ], - name: 'SetTrustedForwarder', - 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: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'baseAssetAmount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'TransferValue', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'Unpaused', - type: 'event', - }, - { - inputs: [ - { - internalType: 'address', - name: '_protocol', - type: 'address', - }, - ], - name: 'addProtocol', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_asset', - type: 'address', - }, - { - internalType: 'address', - name: '_priceFeed', - type: 'address', - }, - { - internalType: 'uint256', - name: '_depositLimit', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_slippageBps', - type: 'uint256', - }, - ], - name: 'allowAsset', - outputs: [], - 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: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'baseAsset', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_fromAsset', - type: 'address', - }, - { - internalType: 'address', - name: '_toAsset', - type: 'address', - }, - { - internalType: 'uint256', - name: '_fromAmount', - type: 'uint256', - }, - ], - name: 'convertPrice', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_address', - type: 'address', - }, - ], - name: 'currentValueOf', - 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: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_asset', - type: 'address', - }, - { - internalType: 'uint256', - name: '_assetAmount', - type: 'uint256', - }, - ], - name: 'deposit', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_to', - type: 'address', - }, - { - internalType: 'address', - name: '_asset', - type: 'address', - }, - { - internalType: 'uint256', - name: '_assetAmount', - type: 'uint256', - }, - ], - name: 'depositTo', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_asset', - type: 'address', - }, - ], - name: 'disallowAsset', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'feeDistributor', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_address', - type: 'address', - }, - ], - name: 'fundingSource', - outputs: [ - { - components: [ - { - internalType: 'enum ICaskVault.FundingSource', - name: 'fundingSource', - type: 'uint8', - }, - { - internalType: 'address', - name: 'fundingAsset', - type: 'address', - }, - ], - internalType: 'struct ICaskVault.FundingProfile', - name: '', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getAllAssets', - outputs: [ - { - internalType: 'address[]', - name: '', - type: 'address[]', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_asset', - type: 'address', - }, - ], - name: 'getAsset', - outputs: [ - { - components: [ - { - internalType: 'address', - name: 'priceFeed', - type: 'address', - }, - { - internalType: 'uint256', - name: 'slippageBps', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'depositLimit', - type: 'uint256', - }, - { - internalType: 'uint8', - name: 'assetDecimals', - type: 'uint8', - }, - { - internalType: 'uint8', - name: 'priceFeedDecimals', - type: 'uint8', - }, - { - internalType: 'bool', - name: 'allowed', - type: 'bool', - }, - ], - internalType: 'struct ICaskVault.Asset', - name: '', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getBaseAsset', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_baseAsset', - type: 'address', - }, - { - internalType: 'address', - name: '_baseAssetPriceFeed', - type: 'address', - }, - { - internalType: 'address', - name: '_feeDistributor', - type: 'address', - }, - ], - name: 'initialize', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'forwarder', - type: 'address', - }, - ], - name: 'isTrustedForwarder', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'maxPriceFeedAge', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'minDeposit', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'owner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'pause', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'paused', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'pricePerShare', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'protocolCount', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_from', - type: 'address', - }, - { - internalType: 'address', - name: '_to', - type: 'address', - }, - { - internalType: 'uint256', - name: '_value', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_protocolFee', - type: 'uint256', - }, - { - internalType: 'address', - name: '_network', - type: 'address', - }, - { - internalType: 'uint256', - name: '_networkFee', - type: 'uint256', - }, - ], - name: 'protocolPayment', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_from', - type: 'address', - }, - { - internalType: 'address', - name: '_to', - type: 'address', - }, - { - internalType: 'uint256', - name: '_value', - type: 'uint256', - }, - ], - name: 'protocolPayment', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_from', - type: 'address', - }, - { - internalType: 'address', - name: '_to', - type: 'address', - }, - { - internalType: 'uint256', - name: '_value', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_protocolFee', - type: 'uint256', - }, - ], - name: 'protocolPayment', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - name: 'protocols', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_protocol', - type: 'address', - }, - ], - name: 'removeProtocol', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'renounceOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'reserved1', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_feeDistributor', - type: 'address', - }, - ], - name: 'setFeeDistributor', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'enum ICaskVault.FundingSource', - name: '_fundingSource', - type: 'uint8', - }, - { - internalType: 'address', - name: '_fundingAsset', - type: 'address', - }, - ], - name: 'setFundingSource', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_maxPriceFeedAge', - type: 'uint256', - }, - ], - name: 'setMaxPriceFeedAge', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_minDeposit', - type: 'uint256', - }, - ], - name: 'setMinDeposit', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_forwarder', - type: 'address', - }, - ], - name: 'setTrustedForwarder', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_value', - type: 'uint256', - }, - ], - name: 'sharesForValue', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_asset', - type: 'address', - }, - ], - name: 'supportsAsset', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_asset', - type: 'address', - }, - ], - name: 'totalAssetBalance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalValue', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'transferOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: '_value', - type: 'uint256', - }, - ], - name: 'transferValue', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_sender', - type: 'address', - }, - { - internalType: 'address', - name: '_recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: '_value', - type: 'uint256', - }, - ], - name: 'transferValueFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'trustedForwarder', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'unpause', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'versionRecipient', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'pure', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_asset', - type: 'address', - }, - { - internalType: 'uint256', - name: '_shares', - type: 'uint256', - }, - ], - name: 'withdraw', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_recipient', - type: 'address', - }, - { - internalType: 'address', - name: '_asset', - type: 'address', - }, - { - internalType: 'uint256', - name: '_shares', - type: 'uint256', - }, - ], - name: 'withdrawTo', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'initialLogic', - type: 'address', - }, - { - internalType: 'address', - name: 'initialAdmin', - type: 'address', - }, - { - internalType: 'bytes', - name: '_data', - type: 'bytes', - }, - ], - stateMutability: 'payable', - type: 'constructor', - }, -] as const; - -export type CaskVaultToken = typeof caskVaultTokenAbi; -export type CaskVaultTokenContract = GetContractReturnType; - -export class CaskVaultToken__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: caskVaultTokenAbi, publicClient: client }); - } -} diff --git a/src/apps/cask-protocol/contracts/viem/index.ts b/src/apps/cask-protocol/contracts/viem/index.ts deleted file mode 100644 index aca4c4351..000000000 --- a/src/apps/cask-protocol/contracts/viem/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -export type { CaskVaultToken } from './CaskVaultToken'; - -export { CaskVaultToken__factory } from './CaskVaultToken'; diff --git a/src/apps/cask-protocol/fantom/cask-protocol.wallet.token-fetcher.ts b/src/apps/cask-protocol/fantom/cask-protocol.wallet.token-fetcher.ts deleted file mode 100644 index 55d8a7b57..000000000 --- a/src/apps/cask-protocol/fantom/cask-protocol.wallet.token-fetcher.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { CaskProtocolWalletTokenFetcher } from '../common/cask-protocol.wallet.token-fetcher'; - -@PositionTemplate() -export class FantomCaskProtocolWalletTokenFetcher extends CaskProtocolWalletTokenFetcher { - groupLabel = 'Vaults'; - caskVaultContractAddress = '0xbccdbb0806acc914f6746de592f924b374190710'; -} diff --git a/src/apps/cask-protocol/gnosis/cask-protocol.wallet.token-fetcher.ts b/src/apps/cask-protocol/gnosis/cask-protocol.wallet.token-fetcher.ts deleted file mode 100644 index 0d8b78b1d..000000000 --- a/src/apps/cask-protocol/gnosis/cask-protocol.wallet.token-fetcher.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { CaskProtocolWalletTokenFetcher } from '../common/cask-protocol.wallet.token-fetcher'; - -@PositionTemplate() -export class GnosisCaskProtocolWalletTokenFetcher extends CaskProtocolWalletTokenFetcher { - caskVaultContractAddress = '0x3b2b4b547daeebf3a703288cb43650f0f287b9ff'; - groupLabel = 'Vaults'; -} diff --git a/src/apps/cask-protocol/optimism/cask-protocol.wallet.token-fetcher.ts b/src/apps/cask-protocol/optimism/cask-protocol.wallet.token-fetcher.ts deleted file mode 100644 index 25e84fcb3..000000000 --- a/src/apps/cask-protocol/optimism/cask-protocol.wallet.token-fetcher.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { CaskProtocolWalletTokenFetcher } from '../common/cask-protocol.wallet.token-fetcher'; - -@PositionTemplate() -export class OptimismCaskProtocolWalletTokenFetcher extends CaskProtocolWalletTokenFetcher { - groupLabel = 'Vaults'; - caskVaultContractAddress = '0x3b2b4b547daeebf3a703288cb43650f0f287b9ff'; -} diff --git a/src/apps/cask-protocol/polygon/cask-protocol.wallet.token-fetcher.ts b/src/apps/cask-protocol/polygon/cask-protocol.wallet.token-fetcher.ts deleted file mode 100644 index f6a9c1bae..000000000 --- a/src/apps/cask-protocol/polygon/cask-protocol.wallet.token-fetcher.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { CaskProtocolWalletTokenFetcher } from '../common/cask-protocol.wallet.token-fetcher'; - -@PositionTemplate() -export class PolygonCaskProtocolWalletTokenFetcher extends CaskProtocolWalletTokenFetcher { - groupLabel = 'Vaults'; - caskVaultContractAddress = '0x3b2b4b547daeebf3a703288cb43650f0f287b9ff'; -} diff --git a/src/apps/convex/ethereum/convex.stash-token-wrapped.token-fetcher.ts b/src/apps/convex/ethereum/convex.stash-token-wrapped.token-fetcher.ts deleted file mode 100644 index d0539210e..000000000 --- a/src/apps/convex/ethereum/convex.stash-token-wrapped.token-fetcher.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetUnderlyingTokensParams } from '~position/template/app-token.template.types'; - -import { ConvexViemContractFactory } from '../contracts'; -import { ConvexStashTokenWrapped } from '../contracts/viem'; - -@PositionTemplate() -export class EthereumConvexStashTokenWrappedTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Stash Token Wrapped'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(ConvexViemContractFactory) protected readonly contractFactory: ConvexViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.convexStashTokenWrapped({ address, network: this.network }); - } - - async getAddresses(): Promise { - return [ - '0xf132a783d8567c11d3df3e4ef890786affc16402', - '0xe657aa15ec2eec10facbdc68d388895dd700a0d5', - '0x49b559563ab764381554feee9951e9ec899c5952', - '0xad2074172e212dcf82ec94558209c88156764a93', - '0xbb554e5e8ec27a2b8f6d5cd269fec43e9637018b', - '0xb82cfa4325568748506dc7cf267857ff1e3b8d39', - ]; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.token(), network: this.network }]; - } - - async getPricePerShare() { - return [1]; - } -} diff --git a/src/apps/convex/ethereum/index.ts b/src/apps/convex/ethereum/index.ts index c5986786e..f15892b12 100644 --- a/src/apps/convex/ethereum/index.ts +++ b/src/apps/convex/ethereum/index.ts @@ -6,7 +6,6 @@ import { EthereumConvexCvxStakingContractPositionFetcher } from './convex.cvx-st import { EthereumConvexDepositTokenFetcher } from './convex.deposit.token-fetcher'; import { EthereumConvexDepositorContractPositionFetcher } from './convex.depositor.contract-position-fetcher'; import { EthereumConvexLpFarmContractPositionFetcher } from './convex.lp-farm.contract-position-fetcher'; -import { EthereumConvexStashTokenWrappedTokenFetcher } from './convex.stash-token-wrapped.token-fetcher'; import { EthereumConvexVotingEscrowContractPositionFetcher } from './convex.voting-escrow.contract-position-fetcher'; export const CONVEX_ETHEREUM_PROVIDERS = [ @@ -19,5 +18,4 @@ export const CONVEX_ETHEREUM_PROVIDERS = [ EthereumConvexLpFarmContractPositionFetcher, EthereumConvexVotingEscrowContractPositionFetcher, EthereumConvexCvxCrvStakingWrappedContractPositionFetcher, - EthereumConvexStashTokenWrappedTokenFetcher, ]; diff --git a/src/apps/gains-network/arbitrum/gains-network.g-token.token-fetcher.ts b/src/apps/gains-network/arbitrum/gains-network.g-token.token-fetcher.ts deleted file mode 100644 index 1312fab08..000000000 --- a/src/apps/gains-network/arbitrum/gains-network.g-token.token-fetcher.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { GainsNetworkGTokenTokenFetcher } from '../common/gains-network.g-token.token-fetcher'; - -@PositionTemplate() -export class ArbitrumGainsNetworkGTokenTokenFetcher extends GainsNetworkGTokenTokenFetcher { - async getAddresses() { - return ['0xd85e038593d7a098614721eae955ec2022b9b91b']; - } -} diff --git a/src/apps/gains-network/gains-network.module.ts b/src/apps/gains-network/gains-network.module.ts index 1515f1aa1..3f5e37a27 100644 --- a/src/apps/gains-network/gains-network.module.ts +++ b/src/apps/gains-network/gains-network.module.ts @@ -2,7 +2,6 @@ import { Module } from '@nestjs/common'; import { AbstractApp } from '~app/app.dynamic-module'; -import { ArbitrumGainsNetworkGTokenTokenFetcher } from './arbitrum/gains-network.g-token.token-fetcher'; import { ArbitrumGainsNetworkLockedContractPositionFetcher } from './arbitrum/gains-network.locked.contract-position-fetcher'; import { ArbitrumGainsNetworkStakingV2ContractPositionFetcher } from './arbitrum/gains-network.staking-v2.contract-position-fetcher'; import { ArbitrumGainsNetworkStakingContractPositionFetcher } from './arbitrum/gains-network.staking.contract-position-fetcher'; @@ -16,7 +15,6 @@ import { PolygonGainsNetworkStakingContractPositionFetcher } from './polygon/gai providers: [ GainsNetworkViemContractFactory, // Arbitrum - ArbitrumGainsNetworkGTokenTokenFetcher, ArbitrumGainsNetworkStakingContractPositionFetcher, ArbitrumGainsNetworkLockedContractPositionFetcher, ArbitrumGainsNetworkStakingV2ContractPositionFetcher, diff --git a/src/apps/gearbox/contracts/abis/phantom-token.json b/src/apps/gearbox/contracts/abis/phantom-token.json deleted file mode 100644 index 41a315bd1..000000000 --- a/src/apps/gearbox/contracts/abis/phantom-token.json +++ /dev/null @@ -1,237 +0,0 @@ -[ - { - "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": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "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": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "pure", - "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": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "underlying", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/src/apps/gearbox/contracts/viem.contract-factory.ts b/src/apps/gearbox/contracts/viem.contract-factory.ts index 1057115ed..7f072eef6 100644 --- a/src/apps/gearbox/contracts/viem.contract-factory.ts +++ b/src/apps/gearbox/contracts/viem.contract-factory.ts @@ -10,7 +10,6 @@ import { CreditManagerV2__factory, DieselToken__factory, GearboxLendingTokenV3__factory, - PhantomToken__factory, PoolService__factory, } from './viem'; @@ -38,9 +37,6 @@ export class GearboxViemContractFactory { gearboxLendingTokenV3({ address, network }: ContractOpts) { return GearboxLendingTokenV3__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } - phantomToken({ address, network }: ContractOpts) { - return PhantomToken__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } poolService({ address, network }: ContractOpts) { return PoolService__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } diff --git a/src/apps/gearbox/contracts/viem/PhantomToken.ts b/src/apps/gearbox/contracts/viem/PhantomToken.ts deleted file mode 100644 index 322d07a8d..000000000 --- a/src/apps/gearbox/contracts/viem/PhantomToken.ts +++ /dev/null @@ -1,251 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const phantomTokenAbi = [ - { - 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: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'pure', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'pure', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - 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: '', - type: 'address', - }, - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'pure', - 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: 'pure', - type: 'function', - }, - { - inputs: [], - name: 'underlying', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, -] as const; - -export type PhantomToken = typeof phantomTokenAbi; -export type PhantomTokenContract = GetContractReturnType; - -export class PhantomToken__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: phantomTokenAbi, publicClient: client }); - } -} diff --git a/src/apps/gearbox/contracts/viem/index.ts b/src/apps/gearbox/contracts/viem/index.ts index a5884f3c4..da25ff6af 100644 --- a/src/apps/gearbox/contracts/viem/index.ts +++ b/src/apps/gearbox/contracts/viem/index.ts @@ -8,7 +8,6 @@ export type { ContractsRegister } from './ContractsRegister'; export type { CreditManagerV2 } from './CreditManagerV2'; export type { DieselToken } from './DieselToken'; export type { GearboxLendingTokenV3 } from './GearboxLendingTokenV3'; -export type { PhantomToken } from './PhantomToken'; export type { PoolService } from './PoolService'; export { AccountFactory__factory } from './AccountFactory'; @@ -17,5 +16,4 @@ export { ContractsRegister__factory } from './ContractsRegister'; export { CreditManagerV2__factory } from './CreditManagerV2'; export { DieselToken__factory } from './DieselToken'; export { GearboxLendingTokenV3__factory } from './GearboxLendingTokenV3'; -export { PhantomToken__factory } from './PhantomToken'; export { PoolService__factory } from './PoolService'; diff --git a/src/apps/gearbox/ethereum/gearbox.phantom.token-fetcher.ts b/src/apps/gearbox/ethereum/gearbox.phantom.token-fetcher.ts deleted file mode 100644 index 39158ee7e..000000000 --- a/src/apps/gearbox/ethereum/gearbox.phantom.token-fetcher.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetUnderlyingTokensParams, UnderlyingTokenDefinition } from '~position/template/app-token.template.types'; - -import { GearboxViemContractFactory } from '../contracts'; -import { PhantomToken } from '../contracts/viem'; - -@PositionTemplate() -export class EthereumGearboxPhantomTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Phantom Tokens'; - isExcludedFromExplore = true; - isExcludedFromBalances = true; - isExcludedFromTvl = true; - - constructor( - @Inject(APP_TOOLKIT) readonly appToolkit: IAppToolkit, - @Inject(GearboxViemContractFactory) private readonly contractFactory: GearboxViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.phantomToken({ address, network: this.network }); - } - - // Gearbox requires tokens used as collateral to be ERC20 - async getAddresses(): Promise { - return [ - '0xbac7a431146aeaf3f57a16b9954f332fd292f270', // stkcvx3Crv - '0xaf314b088b53835d5cf4e4cb81beaba5934a61fe', // stkcvxFRAX3CRV - '0x34fb99abbafb4e87e256960d572664c6adc301b8', // stkcvxgusd3CRV - '0xe15b7d80a51e1fe54ac355cabe848efce5289bdb', // stkcvxsteCRV - '0x7e1992a7f28daa5f6a2d34e2cd40f962f37b172c', // stkcvxcrvPlain3andSUSD - '0x0a1d4a25d0390899b90bcd22e1ef155003ea76d7', // stkcvxLUSD3CRV - '0x276187f24d41745513cbe2bd5dfc33a4d8cdc9ed', // stkcvxcrvFRAX - ]; - } - - async getUnderlyingTokenDefinitions({ - contract, - }: GetUnderlyingTokensParams): Promise { - return [{ address: await contract.read.underlying(), network: this.network }]; - } - - async getPricePerShare() { - return [1]; - } -} diff --git a/src/apps/gearbox/gearbox.module.ts b/src/apps/gearbox/gearbox.module.ts index 331126264..4768068a3 100644 --- a/src/apps/gearbox/gearbox.module.ts +++ b/src/apps/gearbox/gearbox.module.ts @@ -6,7 +6,6 @@ import { GearboxViemContractFactory } from './contracts'; import { EthereumGearboxCreditAccountsContractPositionFetcher } from './ethereum/gearbox.credit-accounts.contract-position-fetcher'; import { EthereumGearboxLendingV2TokenFetcher } from './ethereum/gearbox.lending-v2.token-fetcher'; import { EthereumGearboxLendingV3TokenFetcher } from './ethereum/gearbox.lending-v3.token-fetcher'; -import { EthereumGearboxPhantomTokenFetcher } from './ethereum/gearbox.phantom.token-fetcher'; import { EthereumGearboxRewardsPositionFetcher } from './ethereum/gearbox.rewards.contract-position-fetcher'; import { EthereumGearboxRewardsMerkleCache } from './ethereum/gearbox.rewards.merkle-cache'; @@ -17,7 +16,6 @@ import { EthereumGearboxRewardsMerkleCache } from './ethereum/gearbox.rewards.me EthereumGearboxCreditAccountsContractPositionFetcher, EthereumGearboxLendingV2TokenFetcher, EthereumGearboxLendingV3TokenFetcher, - EthereumGearboxPhantomTokenFetcher, EthereumGearboxRewardsPositionFetcher, ], }) diff --git a/src/apps/gmx/arbitrum/gmx.es-gmx.token-fetcher.ts b/src/apps/gmx/arbitrum/gmx.es-gmx.token-fetcher.ts deleted file mode 100644 index f49c6cecb..000000000 --- a/src/apps/gmx/arbitrum/gmx.es-gmx.token-fetcher.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { GmxEsGmxTokenFetcher } from '../common/gmx.es-gmx.token-fetcher'; - -@PositionTemplate() -export class ArbitrumGmxEsGmxTokenFetcher extends GmxEsGmxTokenFetcher { - groupLabel = 'esGMX'; - isExcludedFromTvl = true; - - esGmxAddress = '0xf42ae1d54fd613c9bb14810b0588faaa09a426ca'; - gmxAddress = '0xfc5a1a6eb076a2c7ad06ed22c90d7e710e35ad0a'; -} diff --git a/src/apps/gmx/avalanche/gmx.es-gmx.token-fetcher.ts b/src/apps/gmx/avalanche/gmx.es-gmx.token-fetcher.ts deleted file mode 100644 index b725767ba..000000000 --- a/src/apps/gmx/avalanche/gmx.es-gmx.token-fetcher.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { GmxEsGmxTokenFetcher } from '../common/gmx.es-gmx.token-fetcher'; - -@PositionTemplate() -export class AvalancheGmxEsGmxTokenFetcher extends GmxEsGmxTokenFetcher { - groupLabel = 'esGMX'; - isExcludedFromTvl = true; - - esGmxAddress = '0xff1489227bbaac61a9209a08929e4c2a526ddd17'; - gmxAddress = '0x62edc0692bd897d2295872a9ffcac5425011c661'; -} diff --git a/src/apps/gmx/common/gmx.es-gmx.token-fetcher.ts b/src/apps/gmx/common/gmx.es-gmx.token-fetcher.ts deleted file mode 100644 index 125427831..000000000 --- a/src/apps/gmx/common/gmx.es-gmx.token-fetcher.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { Erc20 } from '~contract/contracts/viem'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; - -import { GmxViemContractFactory } from '../contracts'; - -export abstract class GmxEsGmxTokenFetcher extends AppTokenTemplatePositionFetcher { - abstract esGmxAddress: string; - abstract gmxAddress: string; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(GmxViemContractFactory) protected readonly contractFactory: GmxViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.appToolkit.globalViemContracts.erc20({ address, network: this.network }); - } - - async getAddresses() { - return [this.esGmxAddress]; - } - - async getUnderlyingTokenDefinitions() { - return [{ address: this.gmxAddress, network: this.network }]; - } - - async getPricePerShare() { - return [1]; - } -} diff --git a/src/apps/gmx/gmx.module.ts b/src/apps/gmx/gmx.module.ts index 771b46352..1646cbf51 100644 --- a/src/apps/gmx/gmx.module.ts +++ b/src/apps/gmx/gmx.module.ts @@ -2,11 +2,9 @@ import { Module } from '@nestjs/common'; import { AbstractApp } from '~app/app.dynamic-module'; -import { ArbitrumGmxEsGmxTokenFetcher } from './arbitrum/gmx.es-gmx.token-fetcher'; import { ArbitrumGmxFarmContractPositionFetcher } from './arbitrum/gmx.farm.contract-position-fetcher'; import { ArbitrumGmxGlpTokenFetcher } from './arbitrum/gmx.glp.token-fetcher'; import { ArbitrumGmxPerpContractPositionFetcher } from './arbitrum/gmx.perp.contract-position-fetcher'; -import { AvalancheGmxEsGmxTokenFetcher } from './avalanche/gmx.es-gmx.token-fetcher'; import { AvalancheGmxFarmContractPositionFetcher } from './avalanche/gmx.farm.contract-position-fetcher'; import { AvalancheGmxGlpTokenFetcher } from './avalanche/gmx.glp.token-fetcher'; import { AvalancheGmxPerpContractPositionFetcher } from './avalanche/gmx.perp.contract-position-fetcher'; @@ -16,12 +14,10 @@ import { GmxViemContractFactory } from './contracts'; providers: [ GmxViemContractFactory, // Arbitrum - ArbitrumGmxEsGmxTokenFetcher, ArbitrumGmxFarmContractPositionFetcher, ArbitrumGmxGlpTokenFetcher, ArbitrumGmxPerpContractPositionFetcher, // Avalanche - AvalancheGmxEsGmxTokenFetcher, AvalancheGmxFarmContractPositionFetcher, AvalancheGmxGlpTokenFetcher, AvalancheGmxPerpContractPositionFetcher, diff --git a/src/apps/goldfinch/ethereum/goldfinch.fidu.token-fetcher.ts b/src/apps/goldfinch/ethereum/goldfinch.fidu.token-fetcher.ts deleted file mode 100644 index 14cca55f6..000000000 --- a/src/apps/goldfinch/ethereum/goldfinch.fidu.token-fetcher.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { Erc20 } from '~contract/contracts/viem'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetPricePerShareParams } from '~position/template/app-token.template.types'; - -import { GoldfinchViemContractFactory } from '../contracts'; - -@PositionTemplate() -export class EthereumGoldfinchFiduTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'FIDU'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(GoldfinchViemContractFactory) protected readonly contractFactory: GoldfinchViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.appToolkit.globalViemContracts.erc20({ address, network: this.network }); - } - - async getAddresses() { - const FIDU = '0x6a445e9f40e0b97c92d0b8a3366cef1d67f700bf'; - return [FIDU]; - } - - async getUnderlyingTokenDefinitions() { - const USDC = '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'; - return [{ address: USDC, network: this.network }]; - } - - async getPricePerShare({ multicall }: GetPricePerShareParams) { - const seniorPoolAddress = '0x8481a6ebaf5c7dabc3f7e09e44a89531fd31f822'; - const seniorPool = this.contractFactory.goldfinchSeniorPool({ address: seniorPoolAddress, network: this.network }); - const sharePriceRaw = await multicall.wrap(seniorPool).read.sharePrice(); - return [Number(sharePriceRaw) / 10 ** 18]; - } -} diff --git a/src/apps/goldfinch/goldfinch.module.ts b/src/apps/goldfinch/goldfinch.module.ts index 7a48e3470..7c0582b98 100644 --- a/src/apps/goldfinch/goldfinch.module.ts +++ b/src/apps/goldfinch/goldfinch.module.ts @@ -3,7 +3,6 @@ import { Module } from '@nestjs/common'; import { AbstractApp } from '~app/app.dynamic-module'; import { GoldfinchViemContractFactory } from './contracts'; -import { EthereumGoldfinchFiduTokenFetcher } from './ethereum/goldfinch.fidu.token-fetcher'; import { EthereumGoldfinchSeniorPoolContractPositionFetcher } from './ethereum/goldfinch.seniorpool.contract-position-fetcher'; import { EthereumGoldfinchStakingRewardsContractPositionFetcher } from './ethereum/goldfinch.staking-rewards.contract-position-fetcher'; import { EthereumGoldfinchVaultContractPositionFetcher } from './ethereum/goldfinch.vault.contract-position-fetcher'; @@ -11,7 +10,6 @@ import { EthereumGoldfinchVaultContractPositionFetcher } from './ethereum/goldfi @Module({ providers: [ GoldfinchViemContractFactory, - EthereumGoldfinchFiduTokenFetcher, EthereumGoldfinchStakingRewardsContractPositionFetcher, EthereumGoldfinchSeniorPoolContractPositionFetcher, EthereumGoldfinchVaultContractPositionFetcher, diff --git a/src/apps/gro/avalanche/gro.labs.token-fetcher.ts b/src/apps/gro/avalanche/gro.labs.token-fetcher.ts deleted file mode 100644 index 945abaeed..000000000 --- a/src/apps/gro/avalanche/gro.labs.token-fetcher.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetPricePerShareParams, GetUnderlyingTokensParams } from '~position/template/app-token.template.types'; - -import { GroViemContractFactory } from '../contracts'; -import { GroLabsVault } from '../contracts/viem'; - -@PositionTemplate() -export class AvalancheGroLabsTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Labs'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(GroViemContractFactory) private readonly contractFactory: GroViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.groLabsVault({ network: this.network, address }); - } - - async getAddresses() { - return [ - '0x6063597b9356b246e706fd6a48c780f897e3ef55', - '0x2eb05cffa24309b9aaf300392a4d8db745d4e592', - '0x6ef44077a1f5e10cdfccc30efb7dcdb1d5475581', - ]; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.token(), network: this.network }]; - } - - async getPricePerShare({ contract }: GetPricePerShareParams) { - const pricePerShareRaw = await contract.read.getPricePerShare(); - return [Number(pricePerShareRaw) / 10 ** 18]; - } -} diff --git a/src/apps/gro/contracts/abis/gro-labs-vault.json b/src/apps/gro/contracts/abis/gro-labs-vault.json deleted file mode 100644 index 83237960c..000000000 --- a/src/apps/gro/contracts/abis/gro-labs-vault.json +++ /dev/null @@ -1,767 +0,0 @@ -[ - { - "inputs": [ - { "internalType": "address", "name": "_token", "type": "address" }, - { "internalType": "uint256", "name": "_baseAllowance", "type": "uint256" }, - { "internalType": "address", "name": "_bouncer", "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": "user", "type": "address" }], - "name": "LogAddToWhitelist", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "bool", "name": "status", "type": "bool" }], - "name": "LogAllowanceStatus", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256[]", "name": "strategyRetios", "type": "uint256[]" }], - "name": "LogDebtRatios", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "_amount", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "shares", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "allowance", "type": "uint256" } - ], - "name": "LogDeposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256", "name": "newLimit", "type": "uint256" }], - "name": "LogDepositLimit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "parent", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "child", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "LogMigrate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "user", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "LogNewAllowance", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "address", "name": "bouncer", "type": "address" }], - "name": "LogNewBouncer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "strategy", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "debtRatio", "type": "uint256" } - ], - "name": "LogNewDebtRatio", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256", "name": "factor", "type": "uint256" }], - "name": "LogNewReleaseFactor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "address", "name": "rewards", "type": "address" }], - "name": "LogNewRewards", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "bool", "name": "loss", "type": "bool" }, - { "indexed": false, "internalType": "uint256", "name": "change", "type": "uint256" } - ], - "name": "LogNewStrategyHarvest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256", "name": "vaultFee", "type": "uint256" }], - "name": "LogNewVaultFee", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": true, "internalType": "address", "name": "user", "type": "address" }], - "name": "LogRemoveFromWhitelist", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "strategy", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "debtRatio", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "minDebtPerHarvest", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "maxDebtPerHarvest", "type": "uint256" } - ], - "name": "LogStrategyAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": true, "internalType": "address", "name": "strategy", "type": "address" }], - "name": "LogStrategyAddedToQueue", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "newStrategy", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "oldStrategy", "type": "address" } - ], - "name": "LogStrategyMigrated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": true, "internalType": "address", "name": "strategy", "type": "address" }], - "name": "LogStrategyRemovedFromQueue", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "strategy", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "gain", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "loss", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "debtPaid", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "totalGain", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "totalLoss", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "totalDebt", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "debtAdded", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "debtRatio", "type": "uint256" } - ], - "name": "LogStrategyReported", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": true, "internalType": "address", "name": "strategy", "type": "address" }], - "name": "LogStrategyRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "strategy", "type": "address" }, - { "indexed": false, "internalType": "bool", "name": "status", "type": "bool" } - ], - "name": "LogStrategyStatusUpdate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "strategy", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "maxDebtPerHarvest", "type": "uint256" } - ], - "name": "LogStrategyUpdateMaxDebtPerHarvest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "strategy", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "minDebtPerHarvest", "type": "uint256" } - ], - "name": "LogStrategyUpdateMinDebtPerHarvest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "address[]", "name": "queue", "type": "address[]" }], - "name": "LogUpdateWithdrawalQueue", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "shares", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "totalLoss", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "allowance", "type": "uint256" } - ], - "name": "LogWithdrawal", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": 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" - }, - { - "inputs": [], - "name": "BASE_ALLOWANCE", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAXIMUM_STRATEGIES", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "bool", "name": "_status", "type": "bool" }], - "name": "activateAllowance", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "activation", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_strategy", "type": "address" }, - { "internalType": "uint256", "name": "_debtRatio", "type": "uint256" }, - { "internalType": "uint256", "name": "_minDebtPerHarvest", "type": "uint256" }, - { "internalType": "uint256", "name": "_maxDebtPerHarvest", "type": "uint256" } - ], - "name": "addStrategy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_strategy", "type": "address" }], - "name": "addStrategyToQueue", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "user", "type": "address" }], - "name": "addToWhitelist", - "outputs": [], - "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": [], - "name": "allowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "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": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "bouncer", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "claimed", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "creditAvailable", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_strategy", "type": "address" }], - "name": "creditAvailable", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_strategy", "type": "address" }], - "name": "debtOutstanding", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "debtOutstanding", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "debtRatio", - "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": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } - ], - "name": "decreaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_amount", "type": "uint256" }], - "name": "deposit", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "depositLimit", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getPricePerShare", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getStrategiesLength", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_index", "type": "uint256" }], - "name": "getStrategyAssets", - "outputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "addedValue", "type": "uint256" } - ], - "name": "increaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "lastReport", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lockedProfit", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_oldVersion", "type": "address" }, - { "internalType": "address", "name": "_newVersion", "type": "address" } - ], - "name": "migrateStrategy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "releaseFactor", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "user", "type": "address" }], - "name": "removeFromWhitelist", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_strategy", "type": "address" }], - "name": "removeStrategyFromQueue", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { "internalType": "uint256", "name": "_gain", "type": "uint256" }, - { "internalType": "uint256", "name": "_loss", "type": "uint256" }, - { "internalType": "uint256", "name": "_debtPayment", "type": "uint256" } - ], - "name": "report", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { "inputs": [], "name": "revokeStrategy", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "rewards", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_bouncer", "type": "address" }], - "name": "setBouncer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_strategy", "type": "address" }, - { "internalType": "uint256", "name": "_debtRatio", "type": "uint256" } - ], - "name": "setDebtRatio", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256[]", "name": "_strategyDebtRatios", "type": "uint256[]" }], - "name": "setDebtRatios", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_newLimit", "type": "uint256" }], - "name": "setDepositLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_factor", "type": "uint256" }], - "name": "setProfitRelease", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_rewards", "type": "address" }], - "name": "setRewards", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_user", "type": "address" }, - { "internalType": "uint256", "name": "_amount", "type": "uint256" } - ], - "name": "setUserAllowance", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_fee", "type": "uint256" }], - "name": "setVaultFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address[]", "name": "_queue", "type": "address[]" }], - "name": "setWithdrawalQueue", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "strategies", - "outputs": [ - { "internalType": "uint256", "name": "activation", "type": "uint256" }, - { "internalType": "bool", "name": "active", "type": "bool" }, - { "internalType": "uint256", "name": "debtRatio", "type": "uint256" }, - { "internalType": "uint256", "name": "minDebtPerHarvest", "type": "uint256" }, - { "internalType": "uint256", "name": "maxDebtPerHarvest", "type": "uint256" }, - { "internalType": "uint256", "name": "lastReport", "type": "uint256" }, - { "internalType": "uint256", "name": "totalDebt", "type": "uint256" }, - { "internalType": "uint256", "name": "totalGain", "type": "uint256" }, - { "internalType": "uint256", "name": "totalLoss", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "strategyDebt", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_index", "type": "uint256" }], - "name": "strategyHarvest", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "_index", "type": "uint256" }, - { "internalType": "uint256", "name": "_callCost", "type": "uint256" } - ], - "name": "strategyHarvestTrigger", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_token", "type": "address" }, - { "internalType": "address", "name": "_recipient", "type": "address" } - ], - "name": "sweep", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "token", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalAssets", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalDebt", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalEstimatedAssets", - "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": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "sender", "type": "address" }, - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_strategy", "type": "address" }, - { "internalType": "uint256", "name": "_maxDebtPerHarvest", "type": "uint256" } - ], - "name": "updateStrategyMaxDebtPerHarvest", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_strategy", "type": "address" }, - { "internalType": "uint256", "name": "_minDebtPerHarvest", "type": "uint256" } - ], - "name": "updateStrategyMinDebtPerHarvest", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "userAllowance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "vaultFee", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "whitelist", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "_shares", "type": "uint256" }, - { "internalType": "uint256", "name": "_maxLoss", "type": "uint256" } - ], - "name": "withdraw", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "name": "withdrawalQueue", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - } -] diff --git a/src/apps/gro/contracts/viem.contract-factory.ts b/src/apps/gro/contracts/viem.contract-factory.ts index 497738543..7a26c48b6 100644 --- a/src/apps/gro/contracts/viem.contract-factory.ts +++ b/src/apps/gro/contracts/viem.contract-factory.ts @@ -3,7 +3,7 @@ import { Injectable, Inject } from '@nestjs/common'; import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; import { Network } from '~types/network.interface'; -import { GroLabsVault__factory, GroLpTokenStaker__factory, GroVesting__factory } from './viem'; +import { GroLpTokenStaker__factory, GroVesting__factory } from './viem'; type ContractOpts = { address: string; network: Network }; @@ -11,9 +11,6 @@ type ContractOpts = { address: string; network: Network }; export class GroViemContractFactory { constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) {} - groLabsVault({ address, network }: ContractOpts) { - return GroLabsVault__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } groLpTokenStaker({ address, network }: ContractOpts) { return GroLpTokenStaker__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } diff --git a/src/apps/gro/contracts/viem/GroLabsVault.ts b/src/apps/gro/contracts/viem/GroLabsVault.ts deleted file mode 100644 index b3596b8cc..000000000 --- a/src/apps/gro/contracts/viem/GroLabsVault.ts +++ /dev/null @@ -1,1719 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const groLabsVaultAbi = [ - { - inputs: [ - { - internalType: 'address', - name: '_token', - type: 'address', - }, - { - internalType: 'uint256', - name: '_baseAllowance', - type: 'uint256', - }, - { - internalType: 'address', - name: '_bouncer', - 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: 'user', - type: 'address', - }, - ], - name: 'LogAddToWhitelist', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'bool', - name: 'status', - type: 'bool', - }, - ], - name: 'LogAllowanceStatus', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256[]', - name: 'strategyRetios', - type: 'uint256[]', - }, - ], - name: 'LogDebtRatios', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'allowance', - type: 'uint256', - }, - ], - name: 'LogDeposit', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'newLimit', - type: 'uint256', - }, - ], - name: 'LogDepositLimit', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'parent', - type: 'address', - }, - { - indexed: false, - internalType: 'address', - name: 'child', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'LogMigrate', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'user', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'LogNewAllowance', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'bouncer', - type: 'address', - }, - ], - name: 'LogNewBouncer', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'strategy', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'debtRatio', - type: 'uint256', - }, - ], - name: 'LogNewDebtRatio', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'factor', - type: 'uint256', - }, - ], - name: 'LogNewReleaseFactor', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'rewards', - type: 'address', - }, - ], - name: 'LogNewRewards', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'bool', - name: 'loss', - type: 'bool', - }, - { - indexed: false, - internalType: 'uint256', - name: 'change', - type: 'uint256', - }, - ], - name: 'LogNewStrategyHarvest', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'vaultFee', - type: 'uint256', - }, - ], - name: 'LogNewVaultFee', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'user', - type: 'address', - }, - ], - name: 'LogRemoveFromWhitelist', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'strategy', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'debtRatio', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'minDebtPerHarvest', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'maxDebtPerHarvest', - type: 'uint256', - }, - ], - name: 'LogStrategyAdded', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'strategy', - type: 'address', - }, - ], - name: 'LogStrategyAddedToQueue', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'newStrategy', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'oldStrategy', - type: 'address', - }, - ], - name: 'LogStrategyMigrated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'strategy', - type: 'address', - }, - ], - name: 'LogStrategyRemovedFromQueue', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'strategy', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'gain', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'loss', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'debtPaid', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'totalGain', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'totalLoss', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'totalDebt', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'debtAdded', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'debtRatio', - type: 'uint256', - }, - ], - name: 'LogStrategyReported', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'strategy', - type: 'address', - }, - ], - name: 'LogStrategyRevoked', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'strategy', - type: 'address', - }, - { - indexed: false, - internalType: 'bool', - name: 'status', - type: 'bool', - }, - ], - name: 'LogStrategyStatusUpdate', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'strategy', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'maxDebtPerHarvest', - type: 'uint256', - }, - ], - name: 'LogStrategyUpdateMaxDebtPerHarvest', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'strategy', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'minDebtPerHarvest', - type: 'uint256', - }, - ], - name: 'LogStrategyUpdateMinDebtPerHarvest', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address[]', - name: 'queue', - type: 'address[]', - }, - ], - name: 'LogUpdateWithdrawalQueue', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'totalLoss', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'allowance', - type: 'uint256', - }, - ], - name: 'LogWithdrawal', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'previousOwner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnershipTransferred', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: 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', - }, - { - inputs: [], - name: 'BASE_ALLOWANCE', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'MAXIMUM_STRATEGIES', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bool', - name: '_status', - type: 'bool', - }, - ], - name: 'activateAllowance', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'activation', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_strategy', - type: 'address', - }, - { - internalType: 'uint256', - name: '_debtRatio', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_minDebtPerHarvest', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_maxDebtPerHarvest', - type: 'uint256', - }, - ], - name: 'addStrategy', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_strategy', - type: 'address', - }, - ], - name: 'addStrategyToQueue', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'user', - type: 'address', - }, - ], - name: 'addToWhitelist', - outputs: [], - 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: [], - name: 'allowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - 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: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'bouncer', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'claimed', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'creditAvailable', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_strategy', - type: 'address', - }, - ], - name: 'creditAvailable', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_strategy', - type: 'address', - }, - ], - name: 'debtOutstanding', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'debtOutstanding', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'debtRatio', - 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: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'deposit', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'depositLimit', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getPricePerShare', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getStrategiesLength', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_index', - type: 'uint256', - }, - ], - name: 'getStrategyAssets', - outputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'lastReport', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'lockedProfit', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_oldVersion', - type: 'address', - }, - { - internalType: 'address', - name: '_newVersion', - type: 'address', - }, - ], - name: 'migrateStrategy', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'owner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'releaseFactor', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'user', - type: 'address', - }, - ], - name: 'removeFromWhitelist', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_strategy', - type: 'address', - }, - ], - name: 'removeStrategyFromQueue', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'renounceOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_gain', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_loss', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_debtPayment', - type: 'uint256', - }, - ], - name: 'report', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'revokeStrategy', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'rewards', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_bouncer', - type: 'address', - }, - ], - name: 'setBouncer', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_strategy', - type: 'address', - }, - { - internalType: 'uint256', - name: '_debtRatio', - type: 'uint256', - }, - ], - name: 'setDebtRatio', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256[]', - name: '_strategyDebtRatios', - type: 'uint256[]', - }, - ], - name: 'setDebtRatios', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_newLimit', - type: 'uint256', - }, - ], - name: 'setDepositLimit', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_factor', - type: 'uint256', - }, - ], - name: 'setProfitRelease', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_rewards', - type: 'address', - }, - ], - name: 'setRewards', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_user', - type: 'address', - }, - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'setUserAllowance', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_fee', - type: 'uint256', - }, - ], - name: 'setVaultFee', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address[]', - name: '_queue', - type: 'address[]', - }, - ], - name: 'setWithdrawalQueue', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'strategies', - outputs: [ - { - internalType: 'uint256', - name: 'activation', - type: 'uint256', - }, - { - internalType: 'bool', - name: 'active', - type: 'bool', - }, - { - internalType: 'uint256', - name: 'debtRatio', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'minDebtPerHarvest', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'maxDebtPerHarvest', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'lastReport', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'totalDebt', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'totalGain', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'totalLoss', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'strategyDebt', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_index', - type: 'uint256', - }, - ], - name: 'strategyHarvest', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_index', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_callCost', - type: 'uint256', - }, - ], - name: 'strategyHarvestTrigger', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_token', - type: 'address', - }, - { - internalType: 'address', - name: '_recipient', - type: 'address', - }, - ], - name: 'sweep', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'token', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalAssets', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalDebt', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalEstimatedAssets', - 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: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'transferOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_strategy', - type: 'address', - }, - { - internalType: 'uint256', - name: '_maxDebtPerHarvest', - type: 'uint256', - }, - ], - name: 'updateStrategyMaxDebtPerHarvest', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_strategy', - type: 'address', - }, - { - internalType: 'uint256', - name: '_minDebtPerHarvest', - type: 'uint256', - }, - ], - name: 'updateStrategyMinDebtPerHarvest', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'userAllowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'vaultFee', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'whitelist', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_shares', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_maxLoss', - type: 'uint256', - }, - ], - name: 'withdraw', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - name: 'withdrawalQueue', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, -] as const; - -export type GroLabsVault = typeof groLabsVaultAbi; -export type GroLabsVaultContract = GetContractReturnType; - -export class GroLabsVault__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: groLabsVaultAbi, publicClient: client }); - } -} diff --git a/src/apps/gro/contracts/viem/index.ts b/src/apps/gro/contracts/viem/index.ts index 1b361fcaf..316e5cb63 100644 --- a/src/apps/gro/contracts/viem/index.ts +++ b/src/apps/gro/contracts/viem/index.ts @@ -2,10 +2,8 @@ /* tslint:disable */ /* eslint-disable */ -export type { GroLabsVault } from './GroLabsVault'; export type { GroLpTokenStaker } from './GroLpTokenStaker'; export type { GroVesting } from './GroVesting'; -export { GroLabsVault__factory } from './GroLabsVault'; export { GroLpTokenStaker__factory } from './GroLpTokenStaker'; export { GroVesting__factory } from './GroVesting'; diff --git a/src/apps/gro/gro.module.ts b/src/apps/gro/gro.module.ts index 53e1a4823..0fe3fbd82 100644 --- a/src/apps/gro/gro.module.ts +++ b/src/apps/gro/gro.module.ts @@ -2,7 +2,6 @@ import { Module } from '@nestjs/common'; import { AbstractApp } from '~app/app.dynamic-module'; -import { AvalancheGroLabsTokenFetcher } from './avalanche/gro.labs.token-fetcher'; import { GroViemContractFactory } from './contracts'; import { EthereumGroFarmContractPositionFetcher } from './ethereum/gro.farm.contract-position-fetcher'; import { EthereumGroVestingContractPositionFetcher } from './ethereum/gro.vesting.contract-position-fetcher'; @@ -13,8 +12,6 @@ import { EthereumGroVestingContractPositionFetcher } from './ethereum/gro.vestin // Ethereum EthereumGroFarmContractPositionFetcher, EthereumGroVestingContractPositionFetcher, - // Avalanche - AvalancheGroLabsTokenFetcher, ], }) export class GroAppModule extends AbstractApp() {} diff --git a/src/apps/hakuswap/avalanche/hakuswap.x-haku.token-fetcher.ts b/src/apps/hakuswap/avalanche/hakuswap.x-haku.token-fetcher.ts deleted file mode 100644 index cfcdde5c9..000000000 --- a/src/apps/hakuswap/avalanche/hakuswap.x-haku.token-fetcher.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Inject } from '@nestjs/common'; -import { BigNumber } from 'ethers'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetPricePerShareParams, GetUnderlyingTokensParams } from '~position/template/app-token.template.types'; - -import { HakuswapViemContractFactory } from '../contracts'; -import { HakuswapXHaku } from '../contracts/viem'; - -@PositionTemplate() -export class AvalancheHakuswapXHakuTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'xHaku'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(HakuswapViemContractFactory) protected readonly contractFactory: HakuswapViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.hakuswapXHaku({ network: this.network, address }); - } - - async getAddresses() { - return ['0xa95c238b5a72f481f6abd50f951f01891130b441']; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.haku(), network: this.network }]; - } - - async getPricePerShare({ contract, appToken, multicall }: GetPricePerShareParams) { - const oneUnit = BigNumber.from(10).pow(18).toString(); - const pricePerShareRaw = await multicall.wrap(contract).read.xHAKUForHAKU([BigInt(oneUnit)]); - const decimals = appToken.tokens[0].decimals; - - return [Number(pricePerShareRaw) / 10 ** decimals]; - } -} diff --git a/src/apps/hakuswap/contracts/abis/hakuswap-x-haku.json b/src/apps/hakuswap/contracts/abis/hakuswap-x-haku.json deleted file mode 100644 index b2cc9f377..000000000 --- a/src/apps/hakuswap/contracts/abis/hakuswap-x-haku.json +++ /dev/null @@ -1,320 +0,0 @@ -[ - { - "inputs": [{ "internalType": "contract IERC20", "name": "_haku", "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": "delegator", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "fromDelegate", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "toDelegate", "type": "address" } - ], - "name": "DelegateChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "delegate", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "previousBalance", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "newBalance", "type": "uint256" } - ], - "name": "DelegateVotesChanged", - "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" - }, - { - "inputs": [], - "name": "DELEGATION_TYPEHASH", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DOMAIN_TYPEHASH", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_account", "type": "address" }], - "name": "HAKUBalance", - "outputs": [{ "internalType": "uint256", "name": "hakuAmount_", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_hakuAmount", "type": "uint256" }], - "name": "HAKUForxHAKU", - "outputs": [{ "internalType": "uint256", "name": "xHAKUAmount_", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "_stakedTime", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "admin", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "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": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "canWithdraw", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "uint32", "name": "", "type": "uint32" } - ], - "name": "checkpoints", - "outputs": [ - { "internalType": "uint32", "name": "fromBlock", "type": "uint32" }, - { "internalType": "uint256", "name": "votes", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } - ], - "name": "decreaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "delayToWithdraw", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "delegatee", "type": "address" }], - "name": "delegate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "delegatee", "type": "address" }, - { "internalType": "uint256", "name": "nonce", "type": "uint256" }, - { "internalType": "uint256", "name": "expiry", "type": "uint256" }, - { "internalType": "uint8", "name": "v", "type": "uint8" }, - { "internalType": "bytes32", "name": "r", "type": "bytes32" }, - { "internalType": "bytes32", "name": "s", "type": "bytes32" } - ], - "name": "delegateBySig", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "delegator", "type": "address" }], - "name": "delegates", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_amount", "type": "uint256" }], - "name": "enter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "getCurrentVotes", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "account", "type": "address" }, - { "internalType": "uint256", "name": "blockNumber", "type": "uint256" } - ], - "name": "getPriorVotes", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "haku", - "outputs": [{ "internalType": "contract IERC20", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "addedValue", "type": "uint256" } - ], - "name": "increaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_share", "type": "uint256" }], - "name": "leave", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "nonces", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "numCheckpoints", - "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_admin", "type": "address" }], - "name": "setAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "second", "type": "uint256" }], - "name": "setDelayToWithdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "stakedTime", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "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": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "sender", "type": "address" }, - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_xHAKUAmount", "type": "uint256" }], - "name": "xHAKUForHAKU", - "outputs": [{ "internalType": "uint256", "name": "hakuAmount_", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - } -] diff --git a/src/apps/hakuswap/contracts/viem.contract-factory.ts b/src/apps/hakuswap/contracts/viem.contract-factory.ts index 2dab1f12b..7f0603f8a 100644 --- a/src/apps/hakuswap/contracts/viem.contract-factory.ts +++ b/src/apps/hakuswap/contracts/viem.contract-factory.ts @@ -3,12 +3,7 @@ import { Injectable, Inject } from '@nestjs/common'; import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; import { Network } from '~types/network.interface'; -import { - HakuswapFactory__factory, - HakuswapMasterchef__factory, - HakuswapPool__factory, - HakuswapXHaku__factory, -} from './viem'; +import { HakuswapFactory__factory, HakuswapMasterchef__factory, HakuswapPool__factory } from './viem'; type ContractOpts = { address: string; network: Network }; @@ -25,7 +20,4 @@ export class HakuswapViemContractFactory { hakuswapPool({ address, network }: ContractOpts) { return HakuswapPool__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } - hakuswapXHaku({ address, network }: ContractOpts) { - return HakuswapXHaku__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } } diff --git a/src/apps/hakuswap/contracts/viem/HakuswapXHaku.ts b/src/apps/hakuswap/contracts/viem/HakuswapXHaku.ts deleted file mode 100644 index f7bf2c31f..000000000 --- a/src/apps/hakuswap/contracts/viem/HakuswapXHaku.ts +++ /dev/null @@ -1,758 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const hakuswapXHakuAbi = [ - { - inputs: [ - { - internalType: 'contract IERC20', - name: '_haku', - 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: 'delegator', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'fromDelegate', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'toDelegate', - type: 'address', - }, - ], - name: 'DelegateChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'delegate', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'previousBalance', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'newBalance', - type: 'uint256', - }, - ], - name: 'DelegateVotesChanged', - 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', - }, - { - inputs: [], - name: 'DELEGATION_TYPEHASH', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'DOMAIN_TYPEHASH', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_account', - type: 'address', - }, - ], - name: 'HAKUBalance', - outputs: [ - { - internalType: 'uint256', - name: 'hakuAmount_', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_hakuAmount', - type: 'uint256', - }, - ], - name: 'HAKUForxHAKU', - outputs: [ - { - internalType: 'uint256', - name: 'xHAKUAmount_', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: '_stakedTime', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'admin', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - 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: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'canWithdraw', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'uint32', - name: '', - type: 'uint32', - }, - ], - name: 'checkpoints', - outputs: [ - { - internalType: 'uint32', - name: 'fromBlock', - type: 'uint32', - }, - { - internalType: 'uint256', - name: 'votes', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'delayToWithdraw', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'delegatee', - type: 'address', - }, - ], - name: 'delegate', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'delegatee', - type: 'address', - }, - { - internalType: 'uint256', - name: 'nonce', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'expiry', - type: 'uint256', - }, - { - internalType: 'uint8', - name: 'v', - type: 'uint8', - }, - { - internalType: 'bytes32', - name: 'r', - type: 'bytes32', - }, - { - internalType: 'bytes32', - name: 's', - type: 'bytes32', - }, - ], - name: 'delegateBySig', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'delegator', - type: 'address', - }, - ], - name: 'delegates', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'enter', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'getCurrentVotes', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - { - internalType: 'uint256', - name: 'blockNumber', - type: 'uint256', - }, - ], - name: 'getPriorVotes', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'haku', - outputs: [ - { - internalType: 'contract IERC20', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_share', - type: 'uint256', - }, - ], - name: 'leave', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'nonces', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'numCheckpoints', - outputs: [ - { - internalType: 'uint32', - name: '', - type: 'uint32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_admin', - type: 'address', - }, - ], - name: 'setAdmin', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'second', - type: 'uint256', - }, - ], - name: 'setDelayToWithdraw', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'stakedTime', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - 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: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_xHAKUAmount', - type: 'uint256', - }, - ], - name: 'xHAKUForHAKU', - outputs: [ - { - internalType: 'uint256', - name: 'hakuAmount_', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, -] as const; - -export type HakuswapXHaku = typeof hakuswapXHakuAbi; -export type HakuswapXHakuContract = GetContractReturnType; - -export class HakuswapXHaku__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: hakuswapXHakuAbi, publicClient: client }); - } -} diff --git a/src/apps/hakuswap/contracts/viem/index.ts b/src/apps/hakuswap/contracts/viem/index.ts index 84a45fd77..86fd0028f 100644 --- a/src/apps/hakuswap/contracts/viem/index.ts +++ b/src/apps/hakuswap/contracts/viem/index.ts @@ -5,9 +5,7 @@ export type { HakuswapFactory } from './HakuswapFactory'; export type { HakuswapMasterchef } from './HakuswapMasterchef'; export type { HakuswapPool } from './HakuswapPool'; -export type { HakuswapXHaku } from './HakuswapXHaku'; export { HakuswapFactory__factory } from './HakuswapFactory'; export { HakuswapMasterchef__factory } from './HakuswapMasterchef'; export { HakuswapPool__factory } from './HakuswapPool'; -export { HakuswapXHaku__factory } from './HakuswapXHaku'; diff --git a/src/apps/hakuswap/hakuswap.module.ts b/src/apps/hakuswap/hakuswap.module.ts index 783da1db7..2899d1a2a 100644 --- a/src/apps/hakuswap/hakuswap.module.ts +++ b/src/apps/hakuswap/hakuswap.module.ts @@ -4,7 +4,6 @@ import { AbstractApp } from '~app/app.dynamic-module'; import { AvalancheHakuswapFarmContractPositionFetcher } from './avalanche/hakuswap.farm.contract-position-fetcher'; import { AvalancheHakuswapPoolTokenFetcher } from './avalanche/hakuswap.pool.token-fetcher'; -import { AvalancheHakuswapXHakuTokenFetcher } from './avalanche/hakuswap.x-haku.token-fetcher'; import { HakuswapViemContractFactory } from './contracts'; @Module({ @@ -12,7 +11,6 @@ import { HakuswapViemContractFactory } from './contracts'; HakuswapViemContractFactory, AvalancheHakuswapFarmContractPositionFetcher, AvalancheHakuswapPoolTokenFetcher, - AvalancheHakuswapXHakuTokenFetcher, ], }) export class HakuswapAppModule extends AbstractApp() {} diff --git a/src/apps/hedgefarm/assets/logo.png b/src/apps/hedgefarm/assets/logo.png deleted file mode 100644 index 11cbf324d..000000000 Binary files a/src/apps/hedgefarm/assets/logo.png and /dev/null differ diff --git a/src/apps/hedgefarm/avalanche/hedgefarm.alpha-one.token-fetcher.ts b/src/apps/hedgefarm/avalanche/hedgefarm.alpha-one.token-fetcher.ts deleted file mode 100644 index 65c021bef..000000000 --- a/src/apps/hedgefarm/avalanche/hedgefarm.alpha-one.token-fetcher.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { Inject } from '@nestjs/common'; -import Axios from 'axios'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { Performance } from '~apps/hedgefarm/avalanche/hedgefarm.types'; -import { CacheOnInterval } from '~cache/cache-on-interval.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetDataPropsParams, GetPricePerShareParams } from '~position/template/app-token.template.types'; - -import { HedgefarmViemContractFactory } from '../contracts'; -import { AlphaOne } from '../contracts/viem'; - -@PositionTemplate() -export class AvalancheHedgefarmAlphaOneTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Alpha One'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(HedgefarmViemContractFactory) protected readonly contractFactory: HedgefarmViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.alphaOne({ address, network: this.network }); - } - - async getAddresses() { - return ['0xde4133f0cfa1a61ba94ec64b6fede4acc1fe929e']; - } - - async getUnderlyingTokenDefinitions() { - return [{ address: '0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e', network: this.network }]; - } - - async getPricePerShare({ contract }: GetPricePerShareParams) { - return [Number(await contract.read.pricePerShare()) / 10 ** 6]; - } - - async getApy(_params: GetDataPropsParams) { - const performance = await this.getPerformance(); - return performance.averageApy; - } - - @CacheOnInterval({ - key: `studio:hedgefarm:alpha-one:performance`, - timeout: 15 * 60 * 1000, - failOnMissingData: false, - }) - async getPerformance(): Promise { - const url = 'https://api.hedgefarm.workers.dev/alpha1/performance'; - return await Axios.get(url).then(v => v.data); - } -} diff --git a/src/apps/hedgefarm/avalanche/hedgefarm.alpha-two.token-fetcher.ts b/src/apps/hedgefarm/avalanche/hedgefarm.alpha-two.token-fetcher.ts deleted file mode 100644 index efc30f82a..000000000 --- a/src/apps/hedgefarm/avalanche/hedgefarm.alpha-two.token-fetcher.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetPricePerShareParams } from '~position/template/app-token.template.types'; - -import { HedgefarmViemContractFactory } from '../contracts'; -import { AlphaTwo } from '../contracts/viem'; - -@PositionTemplate() -export class AvalancheHedgefarmAlphaTwoTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Alpha Two'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(HedgefarmViemContractFactory) protected readonly contractFactory: HedgefarmViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.alphaTwo({ address, network: this.network }); - } - - async getAddresses() { - return ['0x3c390b91fc2f248e75cd271e2dabf7dcc955b1a3']; - } - - async getUnderlyingTokenDefinitions() { - return [{ address: '0x152b9d0fdc40c096757f570a51e494bd4b943e50', network: this.network }]; - } - - async getPricePerShare({ contract }: GetPricePerShareParams) { - return [Number(await contract.read.lastUpdatedPricePerShare()) / 10 ** 8]; - } -} diff --git a/src/apps/hedgefarm/avalanche/hedgefarm.types.ts b/src/apps/hedgefarm/avalanche/hedgefarm.types.ts deleted file mode 100644 index 8cd049fb3..000000000 --- a/src/apps/hedgefarm/avalanche/hedgefarm.types.ts +++ /dev/null @@ -1,4 +0,0 @@ -export type Performance = { - poolName: string; - averageApy: number; -}; diff --git a/src/apps/hedgefarm/contracts/abis/alpha-one.json b/src/apps/hedgefarm/contracts/abis/alpha-one.json deleted file mode 100644 index 77f9288f3..000000000 --- a/src/apps/hedgefarm/contracts/abis/alpha-one.json +++ /dev/null @@ -1,503 +0,0 @@ -[ - { - "inputs": [ - { "internalType": "string", "name": "_name", "type": "string" }, - { "internalType": "string", "name": "_symbol", "type": "string" }, - { "internalType": "address", "name": "_token", "type": "address" }, - { "internalType": "address", "name": "_signer", "type": "address" }, - { "internalType": "address", "name": "_manager", "type": "address" }, - { "internalType": "address", "name": "_feeRecipient", "type": "address" }, - { "internalType": "uint256", "name": "_cap", "type": "uint256" }, - { "internalType": "address", "name": "_stargateLpStaking", "type": "address" }, - { "internalType": "address", "name": "_stargateLpToken", "type": "address" }, - { "internalType": "uint8", "name": "_stargateRouterPoolId", "type": "uint8" }, - { "internalType": "uint8", "name": "_stargateLpStakingPoolId", "type": "uint8" } - ], - "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": "from", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "Deposit", - "type": "event" - }, - { "anonymous": false, "inputs": [], "name": "Harvest", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256", "name": "totalAmount", "type": "uint256" }], - "name": "Start", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256", "name": "totalAmount", "type": "uint256" }], - "name": "Stop", - "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": "to", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "Withdraw", - "type": "event" - }, - { - "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": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "cap", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "indexToken", "type": "address" }, - { "internalType": "bool", "name": "isLong", "type": "bool" } - ], - "name": "closePosition", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "confirmStargateAsyncRedeem", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { "inputs": [], "name": "confirmTradesClosed", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "currentOpenPositions", - "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": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } - ], - "name": "decreaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "_amount", "type": "uint256" }, - { "internalType": "bytes", "name": "_signature", "type": "bytes" } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "feeRecipient", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "gmxPositionManager", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "bool", "name": "autocompound", "type": "bool" }], - "name": "harvest", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "addedValue", "type": "uint256" } - ], - "name": "increaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "isEpochRunning", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "isSyncWithdrawalPossible", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "isTrading", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lastEpochStart", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lastPricePerShare", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lastTotalBalance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "managementFee", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "manager", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maxDeposit", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "minDeposit", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "indexToken", "type": "address" }, - { "internalType": "uint256", "name": "tokenAmount", "type": "uint256" }, - { "internalType": "bool", "name": "isLong", "type": "bool" } - ], - "name": "openPosition", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "performanceFee", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pricePerShare", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [{ "internalType": "uint256", "name": "_cap", "type": "uint256" }], - "name": "setCap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "_minDeposit", "type": "uint256" }, - { "internalType": "uint256", "name": "_maxDeposit", "type": "uint256" } - ], - "name": "setDepositLimits", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_feeRecipient", "type": "address" }], - "name": "setFeeRecipient", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint8", "name": "_managementFee", "type": "uint8" }, - { "internalType": "uint8", "name": "_performanceFee", "type": "uint8" } - ], - "name": "setFees", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_gmxPositionManager", "type": "address" }], - "name": "setGMXPositionManager", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_manager", "type": "address" }], - "name": "setManager", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_signer", "type": "address" }], - "name": "setSigner", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_swapRouter", "type": "address" }], - "name": "setSwapRouter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "signer", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "stargateLpStaking", - "outputs": [{ "internalType": "contract IStargateLpStaking", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "stargateLpStakingPoolId", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "stargateLpToken", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "stargateRouter", - "outputs": [{ "internalType": "contract IStargateRouter", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "stargateRouterPoolId", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { "inputs": [], "name": "start", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "stgToken", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint16", "name": "fromChainId", "type": "uint16" }], - "name": "stop", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "swapRouter", - "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": "token", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "tokenDecimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalBalance", - "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": "to", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "from", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_shares", "type": "uint256" }], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { "inputs": [], "name": "withdrawAll", "outputs": [], "stateMutability": "nonpayable", "type": "function" } -] diff --git a/src/apps/hedgefarm/contracts/abis/alpha-two.json b/src/apps/hedgefarm/contracts/abis/alpha-two.json deleted file mode 100644 index 0e841c58e..000000000 --- a/src/apps/hedgefarm/contracts/abis/alpha-two.json +++ /dev/null @@ -1,590 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "previousAdmin", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "newAdmin", "type": "address" } - ], - "name": "AdminChanged", - "type": "event" - }, - { "anonymous": false, "inputs": [], "name": "AllocationChange", "type": "event" }, - { - "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": "beacon", "type": "address" }], - "name": "BeaconUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256", "name": "netProfit", "type": "uint256" }], - "name": "Harvest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint8", "name": "version", "type": "uint8" }], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "address", "name": "account", "type": "address" }], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "indexed": true, "internalType": "bytes32", "name": "previousAdminRole", "type": "bytes32" }, - { "indexed": true, "internalType": "bytes32", "name": "newAdminRole", "type": "bytes32" } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" } - ], - "name": "RoleRevoked", - "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": false, "internalType": "address", "name": "account", "type": "address" }], - "name": "Unpaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": true, "internalType": "address", "name": "implementation", "type": "address" }], - "name": "Upgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "shares", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "Withdraw", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "HARVEST_PROFIT", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MANAGER_ROLE", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_BPS", - "outputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PANICOOOR_ROLE", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "UINT_MAX", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "contract IYieldModule", "name": "_module", "type": "address" }], - "name": "addModule", - "outputs": [], - "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": "automationRules", - "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": "balanceSnapshot", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "baseToken", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "cap", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes", "name": "checkData", "type": "bytes" }], - "name": "checkUpkeep", - "outputs": [ - { "internalType": "bool", "name": "upkeepNeeded", "type": "bool" }, - { "internalType": "bytes", "name": "performData", "type": "bytes" } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } - ], - "name": "decreaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_amount", "type": "uint256" }], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "feeManager", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { "inputs": [], "name": "finishPanic", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [{ "internalType": "uint256", "name": "_shares", "type": "uint256" }], - "name": "getExecutionFee", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getImplementation", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getLastUpdatedModulesBalance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getModulesBalance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }], - "name": "getRoleAdmin", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "harvest", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "hasRole", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "addedValue", "type": "uint256" } - ], - "name": "increaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "string", "name": "_name", "type": "string" }, - { "internalType": "string", "name": "_symbol", "type": "string" }, - { "internalType": "address", "name": "_feeManager", "type": "address" }, - { "internalType": "address", "name": "_baseToken", "type": "address" }, - { "internalType": "uint256", "name": "_minHarvestThreshold", "type": "uint256" }, - { "internalType": "uint16", "name": "_performanceFee", "type": "uint16" }, - { "internalType": "uint256", "name": "_cap", "type": "uint256" }, - { "internalType": "address", "name": "_manager", "type": "address" }, - { "internalType": "address", "name": "_admin", "type": "address" }, - { "internalType": "uint256", "name": "_minAmount", "type": "uint256" } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "lastUpdatedPricePerShare", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "minAmount", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "minHarvestThreshold", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "numberOfModules", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { "inputs": [], "name": "panic", "outputs": [], "stateMutability": "payable", "type": "function" }, - { "inputs": [], "name": "pause", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "paused", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes", "name": "performData", "type": "bytes" }], - "name": "performUpkeep", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "performanceFee", - "outputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pricePerShare", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_moduleId", "type": "uint256" }], - "name": "removeModule", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { "inputs": [], "name": "rescueNative", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [{ "internalType": "address", "name": "token", "type": "address" }], - "name": "rescueToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "newAutomationRules", "type": "address" }], - "name": "setAutomationRules", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "newCap", "type": "uint256" }], - "name": "setCap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "newFeeManager", "type": "address" }], - "name": "setFeeManager", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "newMinAmount", "type": "uint256" }], - "name": "setMinAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "newMinHarvestThreshold", "type": "uint256" }], - "name": "setMinHarvestThreshold", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256[]", "name": "_allocation", "type": "uint256[]" }], - "name": "setModuleAllocation", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint16", "name": "newPerformanceFee", "type": "uint16" }], - "name": "setPerformanceFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" }], - "name": "supportsInterface", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "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" - }, - { - "inputs": [ - { "internalType": "address", "name": "from", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { "inputs": [], "name": "unpause", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [{ "internalType": "address", "name": "newImplementation", "type": "address" }], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "newImplementation", "type": "address" }, - { "internalType": "bytes", "name": "data", "type": "bytes" } - ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_shares", "type": "uint256" }], - "name": "withdraw", - "outputs": [ - { "internalType": "uint256", "name": "", "type": "uint256" }, - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "name": "yieldOptions", - "outputs": [ - { "internalType": "contract IYieldModule", "name": "module", "type": "address" }, - { "internalType": "uint256", "name": "allocation", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { "stateMutability": "payable", "type": "receive" } -] diff --git a/src/apps/hedgefarm/contracts/index.ts b/src/apps/hedgefarm/contracts/index.ts deleted file mode 100644 index 5dcfebdf6..000000000 --- a/src/apps/hedgefarm/contracts/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * from './viem.contract-factory'; diff --git a/src/apps/hedgefarm/contracts/viem.contract-factory.ts b/src/apps/hedgefarm/contracts/viem.contract-factory.ts deleted file mode 100644 index 533aa0891..000000000 --- a/src/apps/hedgefarm/contracts/viem.contract-factory.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Injectable, Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { Network } from '~types/network.interface'; - -import { AlphaOne__factory, AlphaTwo__factory } from './viem'; - -type ContractOpts = { address: string; network: Network }; - -@Injectable() -export class HedgefarmViemContractFactory { - constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) {} - - alphaOne({ address, network }: ContractOpts) { - return AlphaOne__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } - alphaTwo({ address, network }: ContractOpts) { - return AlphaTwo__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } -} diff --git a/src/apps/hedgefarm/contracts/viem/AlphaOne.ts b/src/apps/hedgefarm/contracts/viem/AlphaOne.ts deleted file mode 100644 index 47e510012..000000000 --- a/src/apps/hedgefarm/contracts/viem/AlphaOne.ts +++ /dev/null @@ -1,1060 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const alphaOneAbi = [ - { - inputs: [ - { - internalType: 'string', - name: '_name', - type: 'string', - }, - { - internalType: 'string', - name: '_symbol', - type: 'string', - }, - { - internalType: 'address', - name: '_token', - type: 'address', - }, - { - internalType: 'address', - name: '_signer', - type: 'address', - }, - { - internalType: 'address', - name: '_manager', - type: 'address', - }, - { - internalType: 'address', - name: '_feeRecipient', - type: 'address', - }, - { - internalType: 'uint256', - name: '_cap', - type: 'uint256', - }, - { - internalType: 'address', - name: '_stargateLpStaking', - type: 'address', - }, - { - internalType: 'address', - name: '_stargateLpToken', - type: 'address', - }, - { - internalType: 'uint8', - name: '_stargateRouterPoolId', - type: 'uint8', - }, - { - internalType: 'uint8', - name: '_stargateLpStakingPoolId', - type: 'uint8', - }, - ], - 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: 'from', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Deposit', - type: 'event', - }, - { - anonymous: false, - inputs: [], - name: 'Harvest', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'previousOwner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnershipTransferred', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'totalAmount', - type: 'uint256', - }, - ], - name: 'Start', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'totalAmount', - type: 'uint256', - }, - ], - name: 'Stop', - 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: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Withdraw', - type: 'event', - }, - { - 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: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'cap', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'indexToken', - type: 'address', - }, - { - internalType: 'bool', - name: 'isLong', - type: 'bool', - }, - ], - name: 'closePosition', - outputs: [], - stateMutability: 'payable', - type: 'function', - }, - { - inputs: [], - name: 'confirmStargateAsyncRedeem', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'confirmTradesClosed', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'currentOpenPositions', - 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: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - { - internalType: 'bytes', - name: '_signature', - type: 'bytes', - }, - ], - name: 'deposit', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'feeRecipient', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'gmxPositionManager', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bool', - name: 'autocompound', - type: 'bool', - }, - ], - name: 'harvest', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'isEpochRunning', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'isSyncWithdrawalPossible', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'isTrading', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'lastEpochStart', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'lastPricePerShare', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'lastTotalBalance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'managementFee', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'manager', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'maxDeposit', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'minDeposit', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'indexToken', - type: 'address', - }, - { - internalType: 'uint256', - name: 'tokenAmount', - type: 'uint256', - }, - { - internalType: 'bool', - name: 'isLong', - type: 'bool', - }, - ], - name: 'openPosition', - outputs: [], - stateMutability: 'payable', - type: 'function', - }, - { - inputs: [], - name: 'owner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'performanceFee', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'pricePerShare', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'renounceOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_cap', - type: 'uint256', - }, - ], - name: 'setCap', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_minDeposit', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_maxDeposit', - type: 'uint256', - }, - ], - name: 'setDepositLimits', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_feeRecipient', - type: 'address', - }, - ], - name: 'setFeeRecipient', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint8', - name: '_managementFee', - type: 'uint8', - }, - { - internalType: 'uint8', - name: '_performanceFee', - type: 'uint8', - }, - ], - name: 'setFees', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_gmxPositionManager', - type: 'address', - }, - ], - name: 'setGMXPositionManager', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_manager', - type: 'address', - }, - ], - name: 'setManager', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_signer', - type: 'address', - }, - ], - name: 'setSigner', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_swapRouter', - type: 'address', - }, - ], - name: 'setSwapRouter', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'signer', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'stargateLpStaking', - outputs: [ - { - internalType: 'contract IStargateLpStaking', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'stargateLpStakingPoolId', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'stargateLpToken', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'stargateRouter', - outputs: [ - { - internalType: 'contract IStargateRouter', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'stargateRouterPoolId', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'start', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'stgToken', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint16', - name: 'fromChainId', - type: 'uint16', - }, - ], - name: 'stop', - outputs: [], - stateMutability: 'payable', - type: 'function', - }, - { - inputs: [], - name: 'swapRouter', - 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: 'token', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'tokenDecimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalBalance', - 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: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'from', - type: 'address', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'transferOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_shares', - type: 'uint256', - }, - ], - name: 'withdraw', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'withdrawAll', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type AlphaOne = typeof alphaOneAbi; -export type AlphaOneContract = GetContractReturnType; - -export class AlphaOne__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: alphaOneAbi, publicClient: client }); - } -} diff --git a/src/apps/hedgefarm/contracts/viem/AlphaTwo.ts b/src/apps/hedgefarm/contracts/viem/AlphaTwo.ts deleted file mode 100644 index 284f1f408..000000000 --- a/src/apps/hedgefarm/contracts/viem/AlphaTwo.ts +++ /dev/null @@ -1,1298 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const alphaTwoAbi = [ - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'previousAdmin', - type: 'address', - }, - { - indexed: false, - internalType: 'address', - name: 'newAdmin', - type: 'address', - }, - ], - name: 'AdminChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [], - name: 'AllocationChange', - type: 'event', - }, - { - 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: 'beacon', - type: 'address', - }, - ], - name: 'BeaconUpgraded', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'user', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Deposit', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'netProfit', - type: 'uint256', - }, - ], - name: 'Harvest', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint8', - name: 'version', - type: 'uint8', - }, - ], - name: 'Initialized', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'Paused', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'bytes32', - name: 'previousAdminRole', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'bytes32', - name: 'newAdminRole', - type: 'bytes32', - }, - ], - name: 'RoleAdminChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'address', - name: 'account', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'sender', - type: 'address', - }, - ], - name: 'RoleGranted', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'address', - name: 'account', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'sender', - type: 'address', - }, - ], - name: 'RoleRevoked', - 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: false, - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'Unpaused', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'implementation', - type: 'address', - }, - ], - name: 'Upgraded', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'user', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Withdraw', - type: 'event', - }, - { - inputs: [], - name: 'DEFAULT_ADMIN_ROLE', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'HARVEST_PROFIT', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'MANAGER_ROLE', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'MAX_BPS', - outputs: [ - { - internalType: 'uint16', - name: '', - type: 'uint16', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'PANICOOOR_ROLE', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'UINT_MAX', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'contract IYieldModule', - name: '_module', - type: 'address', - }, - ], - name: 'addModule', - outputs: [], - 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: 'automationRules', - 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: 'balanceSnapshot', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'baseToken', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'cap', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes', - name: 'checkData', - type: 'bytes', - }, - ], - name: 'checkUpkeep', - outputs: [ - { - internalType: 'bool', - name: 'upkeepNeeded', - type: 'bool', - }, - { - internalType: 'bytes', - name: 'performData', - type: 'bytes', - }, - ], - stateMutability: 'pure', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'deposit', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'feeManager', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'finishPanic', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_shares', - type: 'uint256', - }, - ], - name: 'getExecutionFee', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getImplementation', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getLastUpdatedModulesBalance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getModulesBalance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - ], - name: 'getRoleAdmin', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'grantRole', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'harvest', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'hasRole', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'string', - name: '_name', - type: 'string', - }, - { - internalType: 'string', - name: '_symbol', - type: 'string', - }, - { - internalType: 'address', - name: '_feeManager', - type: 'address', - }, - { - internalType: 'address', - name: '_baseToken', - type: 'address', - }, - { - internalType: 'uint256', - name: '_minHarvestThreshold', - type: 'uint256', - }, - { - internalType: 'uint16', - name: '_performanceFee', - type: 'uint16', - }, - { - internalType: 'uint256', - name: '_cap', - type: 'uint256', - }, - { - internalType: 'address', - name: '_manager', - type: 'address', - }, - { - internalType: 'address', - name: '_admin', - type: 'address', - }, - { - internalType: 'uint256', - name: '_minAmount', - type: 'uint256', - }, - ], - name: 'initialize', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'lastUpdatedPricePerShare', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'minAmount', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'minHarvestThreshold', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'numberOfModules', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'panic', - outputs: [], - stateMutability: 'payable', - type: 'function', - }, - { - inputs: [], - name: 'pause', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'paused', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes', - name: 'performData', - type: 'bytes', - }, - ], - name: 'performUpkeep', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'performanceFee', - outputs: [ - { - internalType: 'uint16', - name: '', - type: 'uint16', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'pricePerShare', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'proxiableUUID', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_moduleId', - type: 'uint256', - }, - ], - name: 'removeModule', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'renounceRole', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'rescueNative', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'token', - type: 'address', - }, - ], - name: 'rescueToken', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'revokeRole', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newAutomationRules', - type: 'address', - }, - ], - name: 'setAutomationRules', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'newCap', - type: 'uint256', - }, - ], - name: 'setCap', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newFeeManager', - type: 'address', - }, - ], - name: 'setFeeManager', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'newMinAmount', - type: 'uint256', - }, - ], - name: 'setMinAmount', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'newMinHarvestThreshold', - type: 'uint256', - }, - ], - name: 'setMinHarvestThreshold', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256[]', - name: '_allocation', - type: 'uint256[]', - }, - ], - name: 'setModuleAllocation', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint16', - name: 'newPerformanceFee', - type: 'uint16', - }, - ], - name: 'setPerformanceFee', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes4', - name: 'interfaceId', - type: 'bytes4', - }, - ], - name: 'supportsInterface', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - 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', - }, - { - inputs: [ - { - internalType: 'address', - name: 'from', - type: 'address', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'unpause', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newImplementation', - type: 'address', - }, - ], - name: 'upgradeTo', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newImplementation', - type: 'address', - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - ], - name: 'upgradeToAndCall', - outputs: [], - stateMutability: 'payable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_shares', - type: 'uint256', - }, - ], - name: 'withdraw', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'payable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - name: 'yieldOptions', - outputs: [ - { - internalType: 'contract IYieldModule', - name: 'module', - type: 'address', - }, - { - internalType: 'uint256', - name: 'allocation', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - stateMutability: 'payable', - type: 'receive', - }, -] as const; - -export type AlphaTwo = typeof alphaTwoAbi; -export type AlphaTwoContract = GetContractReturnType; - -export class AlphaTwo__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: alphaTwoAbi, publicClient: client }); - } -} diff --git a/src/apps/hedgefarm/contracts/viem/index.ts b/src/apps/hedgefarm/contracts/viem/index.ts deleted file mode 100644 index 8344cc4e9..000000000 --- a/src/apps/hedgefarm/contracts/viem/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -export type { AlphaOne } from './AlphaOne'; -export type { AlphaTwo } from './AlphaTwo'; - -export { AlphaOne__factory } from './AlphaOne'; -export { AlphaTwo__factory } from './AlphaTwo'; diff --git a/src/apps/hedgefarm/hedgefarm.module.ts b/src/apps/hedgefarm/hedgefarm.module.ts deleted file mode 100644 index aac95a759..000000000 --- a/src/apps/hedgefarm/hedgefarm.module.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Module } from '@nestjs/common'; - -import { AbstractApp } from '~app/app.dynamic-module'; - -import { AvalancheHedgefarmAlphaOneTokenFetcher } from './avalanche/hedgefarm.alpha-one.token-fetcher'; -import { AvalancheHedgefarmAlphaTwoTokenFetcher } from './avalanche/hedgefarm.alpha-two.token-fetcher'; -import { HedgefarmViemContractFactory } from './contracts'; - -@Module({ - providers: [ - AvalancheHedgefarmAlphaOneTokenFetcher, - AvalancheHedgefarmAlphaTwoTokenFetcher, - HedgefarmViemContractFactory, - ], -}) -export class HedgefarmAppModule extends AbstractApp() {} diff --git a/src/apps/illuvium/ethereum/illuvium.s-ilv2.token-fetcher.ts b/src/apps/illuvium/ethereum/illuvium.s-ilv2.token-fetcher.ts deleted file mode 100644 index fbc4c9e8c..000000000 --- a/src/apps/illuvium/ethereum/illuvium.s-ilv2.token-fetcher.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; - -import { IlluviumViemContractFactory } from '../contracts'; -import { IlluviumSIlv2 } from '../contracts/viem'; - -@PositionTemplate() -export class EthereumIlluviumSIlv2TokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'sILV2'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(IlluviumViemContractFactory) protected readonly contractFactory: IlluviumViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.illuviumSIlv2({ network: this.network, address }); - } - - async getAddresses() { - return ['0x7e77dcb127f99ece88230a64db8d595f31f1b068']; - } - - async getUnderlyingTokenDefinitions() { - return [{ address: '0x767fe9edc9e0df98e07454847909b5e959d7ca0e', network: this.network }]; - } - - async getPricePerShare() { - return [1]; - } -} diff --git a/src/apps/illuvium/illuvium.module.ts b/src/apps/illuvium/illuvium.module.ts index 4b3c41f0c..5c7de4c30 100644 --- a/src/apps/illuvium/illuvium.module.ts +++ b/src/apps/illuvium/illuvium.module.ts @@ -5,14 +5,12 @@ import { AbstractApp } from '~app/app.dynamic-module'; import { IlluviumViemContractFactory } from './contracts'; import { EthereumIlluviumFarmV2ContractPositionFetcher } from './ethereum/illuvium.farm-v2.contract-position-fetcher'; import { EthereumIlluviumFarmContractPositionFetcher } from './ethereum/illuvium.farm.contract-position-fetcher'; -import { EthereumIlluviumSIlv2TokenFetcher } from './ethereum/illuvium.s-ilv2.token-fetcher'; @Module({ providers: [ IlluviumViemContractFactory, EthereumIlluviumFarmContractPositionFetcher, EthereumIlluviumFarmV2ContractPositionFetcher, - EthereumIlluviumSIlv2TokenFetcher, ], }) export class IlluviumAppModule extends AbstractApp() {} diff --git a/src/apps/inverse/ethereum/inverse.dca-vault.token-fetcher.ts b/src/apps/inverse/ethereum/inverse.dca-vault.token-fetcher.ts deleted file mode 100644 index b4cd5c968..000000000 --- a/src/apps/inverse/ethereum/inverse.dca-vault.token-fetcher.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetUnderlyingTokensParams } from '~position/template/app-token.template.types'; - -import { InverseViemContractFactory } from '../contracts'; -import { InverseDcaVaultToken } from '../contracts/viem'; - -export type InverseDcaVaultTokenDataProps = { - targetAddress: string; -}; - -@PositionTemplate() -export class EthereumInverseDcaVaultTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'DCA Vaults'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(InverseViemContractFactory) protected readonly contractFactory: InverseViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.inverseDcaVaultToken({ address, network: this.network }); - } - - async getAddresses() { - return [ - '0x89ec5df87a5186a0f0fa8cb84edd815de6047357', // USDC to ETH vault - '0xc8f2e91dc9d198eded1b2778f6f2a7fd5bbeac34', // DAI to WBTC vault - '0x41d079ce7282d49bf4888c71b5d9e4a02c371f9b', // DAI to YFI vault - '0x2dcdca085af2e258654e47204e483127e0d8b277', // DAI to ETH vault - ]; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.underlying(), network: this.network }]; - } - - async getPricePerShare() { - return [1]; - } -} diff --git a/src/apps/inverse/inverse.module.ts b/src/apps/inverse/inverse.module.ts index fab7dd824..a0be668c3 100644 --- a/src/apps/inverse/inverse.module.ts +++ b/src/apps/inverse/inverse.module.ts @@ -6,7 +6,6 @@ import { InverseViemContractFactory } from './contracts'; import { EthereumInverseBorrowContractPositionFetcher } from './ethereum/inverse.borrow.contract-position-fetcher'; import { EthereumInverseClaimableContractPositionFetcher } from './ethereum/inverse.claimable.contract-position-fetcher'; import { EthereumInverseDcaVaultDividendContractPositionFetcher } from './ethereum/inverse.dca-vault-dividend.contract-position-fetcher'; -import { EthereumInverseDcaVaultTokenFetcher } from './ethereum/inverse.dca-vault.token-fetcher'; import { EthereumInverseFarmContractPositionFetcher } from './ethereum/inverse.farm.contract-position-fetcher'; import { EthereumInverseSupplyTokenFetcher } from './ethereum/inverse.supply.token-fetcher'; @@ -15,7 +14,6 @@ import { EthereumInverseSupplyTokenFetcher } from './ethereum/inverse.supply.tok InverseViemContractFactory, EthereumInverseBorrowContractPositionFetcher, EthereumInverseClaimableContractPositionFetcher, - EthereumInverseDcaVaultTokenFetcher, EthereumInverseDcaVaultDividendContractPositionFetcher, EthereumInverseFarmContractPositionFetcher, EthereumInverseSupplyTokenFetcher, diff --git a/src/apps/keeper/ethereum/keeper.redeemable.token-fetcher.ts b/src/apps/keeper/ethereum/keeper.redeemable.token-fetcher.ts deleted file mode 100644 index 1c025b9fb..000000000 --- a/src/apps/keeper/ethereum/keeper.redeemable.token-fetcher.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; - -import { KeeperViemContractFactory } from '../contracts'; -import { KeeperRedeemableToken } from '../contracts/viem/KeeperRedeemableToken'; - -@PositionTemplate() -export class EthereumKeeperRedeemableTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'rKP3R'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(KeeperViemContractFactory) protected readonly contractFactory: KeeperViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.keeperRedeemableToken({ address, network: this.network }); - } - - async getAddresses() { - return ['0xedb67ee1b171c4ec66e6c10ec43edbba20fae8e9']; - } - - async getUnderlyingTokenDefinitions() { - return [{ address: '0x1ceb5cb57c4d4e2b2433641b95dd330a33185a44', network: this.network }]; - } - - async getPricePerShare() { - return [1]; - } -} diff --git a/src/apps/keeper/keeper.module.ts b/src/apps/keeper/keeper.module.ts index 1c372f33c..381998a98 100644 --- a/src/apps/keeper/keeper.module.ts +++ b/src/apps/keeper/keeper.module.ts @@ -7,7 +7,6 @@ import { KeeperViemContractFactory } from './contracts'; import { EthereumKeeperBondContractPositionFetcher } from './ethereum/keeper.bond.contract-position-fetcher'; import { EthereumKeeperJobContractPositionFetcher } from './ethereum/keeper.job.contract-position-fetcher'; import { EthereumKeeperKlpTokenFetcher } from './ethereum/keeper.klp.token-fetcher'; -import { EthereumKeeperRedeemableTokenFetcher } from './ethereum/keeper.redeemable.token-fetcher'; import { EthereumKeeperUnbondContractPositionFetcher } from './ethereum/keeper.unbond.contract-position-fetcher'; import { EthereumKeeperVestContractPositionFetcher } from './ethereum/keeper.vest.contract-position-fetcher'; @@ -19,7 +18,6 @@ import { EthereumKeeperVestContractPositionFetcher } from './ethereum/keeper.ves EthereumKeeperBondContractPositionFetcher, EthereumKeeperJobContractPositionFetcher, EthereumKeeperKlpTokenFetcher, - EthereumKeeperRedeemableTokenFetcher, EthereumKeeperVestContractPositionFetcher, ], }) diff --git a/src/apps/lido/assets/logo.png b/src/apps/lido/assets/logo.png deleted file mode 100644 index 67fe66a57..000000000 Binary files a/src/apps/lido/assets/logo.png and /dev/null differ diff --git a/src/apps/lido/contracts/abis/lido-steth-eth-oracle.json b/src/apps/lido/contracts/abis/lido-steth-eth-oracle.json deleted file mode 100644 index 719b78c6c..000000000 --- a/src/apps/lido/contracts/abis/lido-steth-eth-oracle.json +++ /dev/null @@ -1,227 +0,0 @@ -[ - { - "inputs": [ - { "internalType": "address", "name": "_aggregator", "type": "address" }, - { "internalType": "address", "name": "_accessController", "type": "address" } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "int256", "name": "current", "type": "int256" }, - { "indexed": true, "internalType": "uint256", "name": "roundId", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "updatedAt", "type": "uint256" } - ], - "name": "AnswerUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "uint256", "name": "roundId", "type": "uint256" }, - { "indexed": true, "internalType": "address", "name": "startedBy", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "startedAt", "type": "uint256" } - ], - "name": "NewRound", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "to", "type": "address" } - ], - "name": "OwnershipTransferRequested", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "to", "type": "address" } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { "inputs": [], "name": "acceptOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "accessController", - "outputs": [{ "internalType": "contract AccessControllerInterface", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "aggregator", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_aggregator", "type": "address" }], - "name": "confirmAggregator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "description", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_roundId", "type": "uint256" }], - "name": "getAnswer", - "outputs": [{ "internalType": "int256", "name": "", "type": "int256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint80", "name": "_roundId", "type": "uint80" }], - "name": "getRoundData", - "outputs": [ - { "internalType": "uint80", "name": "roundId", "type": "uint80" }, - { "internalType": "int256", "name": "answer", "type": "int256" }, - { "internalType": "uint256", "name": "startedAt", "type": "uint256" }, - { "internalType": "uint256", "name": "updatedAt", "type": "uint256" }, - { "internalType": "uint80", "name": "answeredInRound", "type": "uint80" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_roundId", "type": "uint256" }], - "name": "getTimestamp", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "latestAnswer", - "outputs": [{ "internalType": "int256", "name": "", "type": "int256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "latestRound", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "latestRoundData", - "outputs": [ - { "internalType": "uint80", "name": "roundId", "type": "uint80" }, - { "internalType": "int256", "name": "answer", "type": "int256" }, - { "internalType": "uint256", "name": "startedAt", "type": "uint256" }, - { "internalType": "uint256", "name": "updatedAt", "type": "uint256" }, - { "internalType": "uint80", "name": "answeredInRound", "type": "uint80" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "latestTimestamp", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }], - "name": "phaseAggregators", - "outputs": [{ "internalType": "contract AggregatorV2V3Interface", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "phaseId", - "outputs": [{ "internalType": "uint16", "name": "", "type": "uint16" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_aggregator", "type": "address" }], - "name": "proposeAggregator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "proposedAggregator", - "outputs": [{ "internalType": "contract AggregatorV2V3Interface", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint80", "name": "_roundId", "type": "uint80" }], - "name": "proposedGetRoundData", - "outputs": [ - { "internalType": "uint80", "name": "roundId", "type": "uint80" }, - { "internalType": "int256", "name": "answer", "type": "int256" }, - { "internalType": "uint256", "name": "startedAt", "type": "uint256" }, - { "internalType": "uint256", "name": "updatedAt", "type": "uint256" }, - { "internalType": "uint80", "name": "answeredInRound", "type": "uint80" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proposedLatestRoundData", - "outputs": [ - { "internalType": "uint80", "name": "roundId", "type": "uint80" }, - { "internalType": "int256", "name": "answer", "type": "int256" }, - { "internalType": "uint256", "name": "startedAt", "type": "uint256" }, - { "internalType": "uint256", "name": "updatedAt", "type": "uint256" }, - { "internalType": "uint80", "name": "answeredInRound", "type": "uint80" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_accessController", "type": "address" }], - "name": "setController", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_to", "type": "address" }], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - } -] diff --git a/src/apps/lido/contracts/abis/lido-steth.json b/src/apps/lido/contracts/abis/lido-steth.json deleted file mode 100644 index 0db94406c..000000000 --- a/src/apps/lido/contracts/abis/lido-steth.json +++ /dev/null @@ -1,731 +0,0 @@ -[ - { - "constant": false, - "inputs": [], - "name": "resume", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [{ "name": "", "type": "string" }], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "stop", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "hasInitialized", - "outputs": [{ "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "name": "_spender", "type": "address" }, - { "name": "_amount", "type": "uint256" } - ], - "name": "approve", - "outputs": [{ "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "name": "depositContract", "type": "address" }, - { "name": "_oracle", "type": "address" }, - { "name": "_operators", "type": "address" }, - { "name": "_treasury", "type": "address" }, - { "name": "_insuranceFund", "type": "address" } - ], - "name": "initialize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getInsuranceFund", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "name": "_ethAmount", "type": "uint256" }], - "name": "getSharesByPooledEth", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "name": "_sender", "type": "address" }, - { "name": "_recipient", "type": "address" }, - { "name": "_amount", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getOperators", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "name": "_script", "type": "bytes" }], - "name": "getEVMScriptExecutor", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [{ "name": "", "type": "uint8" }], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getRecoveryVault", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "DEPOSIT_ROLE", - "outputs": [{ "name": "", "type": "bytes32" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "DEPOSIT_SIZE", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getTotalPooledEther", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "PAUSE_ROLE", - "outputs": [{ "name": "", "type": "bytes32" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "name": "_spender", "type": "address" }, - { "name": "_addedValue", "type": "uint256" } - ], - "name": "increaseAllowance", - "outputs": [{ "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getTreasury", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "SET_ORACLE", - "outputs": [{ "name": "", "type": "bytes32" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isStopped", - "outputs": [{ "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "MANAGE_WITHDRAWAL_KEY", - "outputs": [{ "name": "", "type": "bytes32" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getBufferedEther", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "SIGNATURE_LENGTH", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getWithdrawalCredentials", - "outputs": [{ "name": "", "type": "bytes32" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "name": "_account", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getFeeDistribution", - "outputs": [ - { "name": "treasuryFeeBasisPoints", "type": "uint16" }, - { "name": "insuranceFeeBasisPoints", "type": "uint16" }, - { "name": "operatorsFeeBasisPoints", "type": "uint16" } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "name": "_sharesAmount", "type": "uint256" }], - "name": "getPooledEthByShares", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "name": "_oracle", "type": "address" }], - "name": "setOracle", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "name": "token", "type": "address" }], - "name": "allowRecoverability", - "outputs": [{ "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "appId", - "outputs": [{ "name": "", "type": "bytes32" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getOracle", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getInitializationBlock", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "name": "_treasuryFeeBasisPoints", "type": "uint16" }, - { "name": "_insuranceFeeBasisPoints", "type": "uint16" }, - { "name": "_operatorsFeeBasisPoints", "type": "uint16" } - ], - "name": "setFeeDistribution", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "name": "_feeBasisPoints", "type": "uint16" }], - "name": "setFee", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "name": "_maxDeposits", "type": "uint256" }], - "name": "depositBufferedEther", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [{ "name": "", "type": "string" }], - "payable": false, - "stateMutability": "pure", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "MANAGE_FEE", - "outputs": [{ "name": "", "type": "bytes32" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "name": "_token", "type": "address" }], - "name": "transferToVault", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "SET_TREASURY", - "outputs": [{ "name": "", "type": "bytes32" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { "name": "_sender", "type": "address" }, - { "name": "_role", "type": "bytes32" }, - { "name": "_params", "type": "uint256[]" } - ], - "name": "canPerform", - "outputs": [{ "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "name": "_referral", "type": "address" }], - "name": "submit", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": true, - "stateMutability": "payable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "WITHDRAWAL_CREDENTIALS_LENGTH", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "name": "_spender", "type": "address" }, - { "name": "_subtractedValue", "type": "uint256" } - ], - "name": "decreaseAllowance", - "outputs": [{ "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getEVMScriptRegistry", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "PUBKEY_LENGTH", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "name": "_amount", "type": "uint256" }, - { "name": "_pubkeyHash", "type": "bytes32" } - ], - "name": "withdraw", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "name": "_recipient", "type": "address" }, - { "name": "_amount", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getDepositContract", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getBeaconStat", - "outputs": [ - { "name": "depositedValidators", "type": "uint256" }, - { "name": "beaconValidators", "type": "uint256" }, - { "name": "beaconBalance", "type": "uint256" } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "BURN_ROLE", - "outputs": [{ "name": "", "type": "bytes32" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "name": "_insuranceFund", "type": "address" }], - "name": "setInsuranceFund", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getFee", - "outputs": [{ "name": "feeBasisPoints", "type": "uint16" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "SET_INSURANCE_FUND", - "outputs": [{ "name": "", "type": "bytes32" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "kernel", - "outputs": [{ "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getTotalShares", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { "name": "_owner", "type": "address" }, - { "name": "_spender", "type": "address" } - ], - "name": "allowance", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isPetrified", - "outputs": [{ "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "name": "_withdrawalCredentials", "type": "bytes32" }], - "name": "setWithdrawalCredentials", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "depositBufferedEther", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "name": "_account", "type": "address" }, - { "name": "_sharesAmount", "type": "uint256" } - ], - "name": "burnShares", - "outputs": [{ "name": "newTotalShares", "type": "uint256" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "name": "_treasury", "type": "address" }], - "name": "setTreasury", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "name": "_beaconValidators", "type": "uint256" }, - { "name": "_beaconBalance", "type": "uint256" } - ], - "name": "pushBeacon", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "name": "_account", "type": "address" }], - "name": "sharesOf", - "outputs": [{ "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { "payable": true, "stateMutability": "payable", "type": "fallback" }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "name": "executor", "type": "address" }, - { "indexed": false, "name": "script", "type": "bytes" }, - { "indexed": false, "name": "input", "type": "bytes" }, - { "indexed": false, "name": "returnData", "type": "bytes" } - ], - "name": "ScriptResult", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "name": "vault", "type": "address" }, - { "indexed": true, "name": "token", "type": "address" }, - { "indexed": false, "name": "amount", "type": "uint256" } - ], - "name": "RecoverToVault", - "type": "event" - }, - { "anonymous": false, "inputs": [], "name": "Stopped", "type": "event" }, - { "anonymous": false, "inputs": [], "name": "Resumed", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "name": "from", "type": "address" }, - { "indexed": true, "name": "to", "type": "address" }, - { "indexed": false, "name": "value", "type": "uint256" } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "name": "owner", "type": "address" }, - { "indexed": true, "name": "spender", "type": "address" }, - { "indexed": false, "name": "value", "type": "uint256" } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "name": "feeBasisPoints", "type": "uint16" }], - "name": "FeeSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "name": "treasuryFeeBasisPoints", "type": "uint16" }, - { "indexed": false, "name": "insuranceFeeBasisPoints", "type": "uint16" }, - { "indexed": false, "name": "operatorsFeeBasisPoints", "type": "uint16" } - ], - "name": "FeeDistributionSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "name": "withdrawalCredentials", "type": "bytes32" }], - "name": "WithdrawalCredentialsSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "name": "sender", "type": "address" }, - { "indexed": false, "name": "amount", "type": "uint256" }, - { "indexed": false, "name": "referral", "type": "address" } - ], - "name": "Submitted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "name": "amount", "type": "uint256" }], - "name": "Unbuffered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "name": "sender", "type": "address" }, - { "indexed": false, "name": "tokenAmount", "type": "uint256" }, - { "indexed": false, "name": "sentFromBuffer", "type": "uint256" }, - { "indexed": true, "name": "pubkeyHash", "type": "bytes32" }, - { "indexed": false, "name": "etherAmount", "type": "uint256" } - ], - "name": "Withdrawal", - "type": "event" - } -] diff --git a/src/apps/lido/contracts/abis/lido-stksm.json b/src/apps/lido/contracts/abis/lido-stksm.json deleted file mode 100644 index eb06032a6..000000000 --- a/src/apps/lido/contracts/abis/lido-stksm.json +++ /dev/null @@ -1,579 +0,0 @@ -[ - { - "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": "receiver", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "Claimed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "Deposited", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "uint16", "name": "fee", "type": "uint16" }, - { "indexed": false, "internalType": "uint16", "name": "feeOperatorsBP", "type": "uint16" }, - { "indexed": false, "internalType": "uint16", "name": "feeTreasuryBP", "type": "uint16" }, - { "indexed": false, "internalType": "uint16", "name": "feeDevelopersBP", "type": "uint16" } - ], - "name": "FeeSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "addr", "type": "address" }, - { "indexed": false, "internalType": "bytes32", "name": "stashAccount", "type": "bytes32" }, - { "indexed": false, "internalType": "bytes32", "name": "controllerAccount", "type": "bytes32" } - ], - "name": "LedgerAdd", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "address", "name": "addr", "type": "address" }], - "name": "LedgerDisable", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "address", "name": "addr", "type": "address" }], - "name": "LedgerPaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "address", "name": "addr", "type": "address" }], - "name": "LedgerRemove", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "address", "name": "addr", "type": "address" }], - "name": "LedgerResumed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "ledger", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "losses", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "balance", "type": "uint256" } - ], - "name": "Losses", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "address", "name": "account", "type": "address" }], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "receiver", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "Redeemed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "userAddr", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "referralAddr", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "shares", "type": "uint256" } - ], - "name": "Referral", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "ledger", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "rewards", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "balance", "type": "uint256" } - ], - "name": "Rewards", - "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": false, "internalType": "address", "name": "account", "type": "address" }], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "AUTH_MANAGER", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LEDGER_BEACON", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_ALLOWABLE_DIFFERENCE", - "outputs": [{ "internalType": "uint128", "name": "", "type": "uint128" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ORACLE_MASTER", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "_stashAccount", "type": "bytes32" }, - { "internalType": "bytes32", "name": "_controllerAccount", "type": "bytes32" }, - { "internalType": "uint16", "name": "_index", "type": "uint16" } - ], - "name": "addLedger", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "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": [{ "internalType": "address", "name": "_account", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "bufferedDeposits", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "bufferedRedeems", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { "inputs": [], "name": "claimUnbonded", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_spender", "type": "address" }, - { "internalType": "uint256", "name": "_subtractedValue", "type": "uint256" } - ], - "name": "decreaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "_amount", "type": "uint256" }, - { "internalType": "address", "name": "_referral", "type": "address" } - ], - "name": "deposit", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_amount", "type": "uint256" }], - "name": "deposit", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "depositCap", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_ledgerAddress", "type": "address" }], - "name": "disableLedger", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "_totalLosses", "type": "uint256" }, - { "internalType": "uint256", "name": "_ledgerBalance", "type": "uint256" } - ], - "name": "distributeLosses", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "_totalRewards", "type": "uint256" }, - { "internalType": "uint256", "name": "_ledgerBalance", "type": "uint256" } - ], - "name": "distributeRewards", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_ledgerAddress", "type": "address" }], - "name": "emergencyPauseLedger", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "_stashAccount", "type": "bytes32" }], - "name": "findLedger", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { "inputs": [], "name": "flushStakes", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "fundRaisedBalance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getLedgerAddresses", - "outputs": [{ "internalType": "address[]", "name": "", "type": "address[]" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_sharesAmount", "type": "uint256" }], - "name": "getPooledKSMByShares", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_amount", "type": "uint256" }], - "name": "getSharesByPooledKSM", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getStashAccounts", - "outputs": [{ "internalType": "bytes32[]", "name": "", "type": "bytes32[]" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalPooledKSM", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalShares", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_holder", "type": "address" }], - "name": "getUnbonded", - "outputs": [ - { "internalType": "uint256", "name": "waiting", "type": "uint256" }, - { "internalType": "uint256", "name": "unbonded", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_spender", "type": "address" }, - { "internalType": "uint256", "name": "_addedValue", "type": "uint256" } - ], - "name": "increaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_authManager", "type": "address" }, - { "internalType": "address", "name": "_vKSM", "type": "address" }, - { "internalType": "address", "name": "_controller", "type": "address" }, - { "internalType": "address", "name": "_developers", "type": "address" }, - { "internalType": "address", "name": "_treasury", "type": "address" }, - { "internalType": "address", "name": "_oracleMaster", "type": "address" }, - { "internalType": "address", "name": "_withdrawal", "type": "address" }, - { "internalType": "uint256", "name": "_depositCap", "type": "uint256" }, - { "internalType": "uint128", "name": "_maxAllowableDifference", "type": "uint128" } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "ledgerBorrow", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "ledgerStake", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32[]", "name": "_stashAccounts", "type": "bytes32[]" }, - { "internalType": "bytes32[][]", "name": "_validators", "type": "bytes32[][]" } - ], - "name": "nominateBatch", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { "inputs": [], "name": "pause", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "paused", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_amount", "type": "uint256" }], - "name": "redeem", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_ledgerAddress", "type": "address" }], - "name": "removeLedger", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { "inputs": [], "name": "resume", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [{ "internalType": "address", "name": "_ledgerAddress", "type": "address" }], - "name": "resumeLedger", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_depositCap", "type": "uint256" }], - "name": "setDepositCap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_developers", "type": "address" }], - "name": "setDevelopers", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint16", "name": "_feeOperators", "type": "uint16" }, - { "internalType": "uint16", "name": "_feeTreasury", "type": "uint16" }, - { "internalType": "uint16", "name": "_feeDevelopers", "type": "uint16" } - ], - "name": "setFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_ledgerBeacon", "type": "address" }], - "name": "setLedgerBeacon", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_ledgerFactory", "type": "address" }], - "name": "setLedgerFactory", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint128", "name": "_maxAllowableDifference", "type": "uint128" }], - "name": "setMaxAllowableDifference", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { "internalType": "uint16", "name": "maxValidatorsPerLedger", "type": "uint16" }, - { "internalType": "uint128", "name": "minNominatorBalance", "type": "uint128" }, - { "internalType": "uint128", "name": "ledgerMinimumActiveBalance", "type": "uint128" }, - { "internalType": "uint256", "name": "maxUnlockingChunks", "type": "uint256" } - ], - "internalType": "struct Types.RelaySpec", - "name": "_relaySpec", - "type": "tuple" - } - ], - "name": "setRelaySpec", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_treasury", "type": "address" }], - "name": "setTreasury", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_account", "type": "address" }], - "name": "sharesOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "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": "_recipient", "type": "address" }, - { "internalType": "uint256", "name": "_amount", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_sender", "type": "address" }, - { "internalType": "address", "name": "_recipient", "type": "address" }, - { "internalType": "uint256", "name": "_amount", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "_amount", "type": "uint256" }, - { "internalType": "uint256", "name": "_excess", "type": "uint256" } - ], - "name": "transferFromLedger", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_amount", "type": "uint256" }], - "name": "transferToLedger", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/lido/contracts/abis/lido-wsteth.json b/src/apps/lido/contracts/abis/lido-wsteth.json deleted file mode 100644 index 9e6b994ff..000000000 --- a/src/apps/lido/contracts/abis/lido-wsteth.json +++ /dev/null @@ -1,202 +0,0 @@ -[ - { - "inputs": [{ "internalType": "contract IStETH", "name": "_stETH", "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": "from", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "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": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "balanceOf", - "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": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } - ], - "name": "decreaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_wstETHAmount", "type": "uint256" }], - "name": "getStETHByWstETH", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_stETHAmount", "type": "uint256" }], - "name": "getWstETHByStETH", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "addedValue", "type": "uint256" } - ], - "name": "increaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }], - "name": "nonces", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "value", "type": "uint256" }, - { "internalType": "uint256", "name": "deadline", "type": "uint256" }, - { "internalType": "uint8", "name": "v", "type": "uint8" }, - { "internalType": "bytes32", "name": "r", "type": "bytes32" }, - { "internalType": "bytes32", "name": "s", "type": "bytes32" } - ], - "name": "permit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "stETH", - "outputs": [{ "internalType": "contract IStETH", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "stEthPerToken", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "tokensPerStEth", - "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": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "sender", "type": "address" }, - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_wstETHAmount", "type": "uint256" }], - "name": "unwrap", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_stETHAmount", "type": "uint256" }], - "name": "wrap", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { "stateMutability": "payable", "type": "receive" } -] diff --git a/src/apps/lido/contracts/index.ts b/src/apps/lido/contracts/index.ts deleted file mode 100644 index 5dcfebdf6..000000000 --- a/src/apps/lido/contracts/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * from './viem.contract-factory'; diff --git a/src/apps/lido/contracts/viem.contract-factory.ts b/src/apps/lido/contracts/viem.contract-factory.ts deleted file mode 100644 index 88cef9cdc..000000000 --- a/src/apps/lido/contracts/viem.contract-factory.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Injectable, Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { Network } from '~types/network.interface'; - -import { LidoSteth__factory, LidoStethEthOracle__factory, LidoStksm__factory, LidoWsteth__factory } from './viem'; - -type ContractOpts = { address: string; network: Network }; - -@Injectable() -export class LidoViemContractFactory { - constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) {} - - lidoSteth({ address, network }: ContractOpts) { - return LidoSteth__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } - lidoStethEthOracle({ address, network }: ContractOpts) { - return LidoStethEthOracle__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } - lidoStksm({ address, network }: ContractOpts) { - return LidoStksm__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } - lidoWsteth({ address, network }: ContractOpts) { - return LidoWsteth__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } -} diff --git a/src/apps/lido/contracts/viem/LidoSteth.ts b/src/apps/lido/contracts/viem/LidoSteth.ts deleted file mode 100644 index f793f0b8e..000000000 --- a/src/apps/lido/contracts/viem/LidoSteth.ts +++ /dev/null @@ -1,1296 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const lidoStethAbi = [ - { - constant: false, - inputs: [], - name: 'resume', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'name', - outputs: [ - { - name: '', - type: 'string', - }, - ], - payable: false, - stateMutability: 'pure', - type: 'function', - }, - { - constant: false, - inputs: [], - name: 'stop', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'hasInitialized', - outputs: [ - { - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: '_spender', - type: 'address', - }, - { - name: '_amount', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: 'depositContract', - type: 'address', - }, - { - name: '_oracle', - type: 'address', - }, - { - name: '_operators', - type: 'address', - }, - { - name: '_treasury', - type: 'address', - }, - { - name: '_insuranceFund', - type: 'address', - }, - ], - name: 'initialize', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'getInsuranceFund', - outputs: [ - { - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'totalSupply', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [ - { - name: '_ethAmount', - type: 'uint256', - }, - ], - name: 'getSharesByPooledEth', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: '_sender', - type: 'address', - }, - { - name: '_recipient', - type: 'address', - }, - { - name: '_amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'getOperators', - outputs: [ - { - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [ - { - name: '_script', - type: 'bytes', - }, - ], - name: 'getEVMScriptExecutor', - outputs: [ - { - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'decimals', - outputs: [ - { - name: '', - type: 'uint8', - }, - ], - payable: false, - stateMutability: 'pure', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'getRecoveryVault', - outputs: [ - { - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'DEPOSIT_ROLE', - outputs: [ - { - name: '', - type: 'bytes32', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'DEPOSIT_SIZE', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'getTotalPooledEther', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'PAUSE_ROLE', - outputs: [ - { - name: '', - type: 'bytes32', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: '_spender', - type: 'address', - }, - { - name: '_addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'getTreasury', - outputs: [ - { - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'SET_ORACLE', - outputs: [ - { - name: '', - type: 'bytes32', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'isStopped', - outputs: [ - { - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'MANAGE_WITHDRAWAL_KEY', - outputs: [ - { - name: '', - type: 'bytes32', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'getBufferedEther', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'SIGNATURE_LENGTH', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'getWithdrawalCredentials', - outputs: [ - { - name: '', - type: 'bytes32', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [ - { - name: '_account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'getFeeDistribution', - outputs: [ - { - name: 'treasuryFeeBasisPoints', - type: 'uint16', - }, - { - name: 'insuranceFeeBasisPoints', - type: 'uint16', - }, - { - name: 'operatorsFeeBasisPoints', - type: 'uint16', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [ - { - name: '_sharesAmount', - type: 'uint256', - }, - ], - name: 'getPooledEthByShares', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: '_oracle', - type: 'address', - }, - ], - name: 'setOracle', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [ - { - name: 'token', - type: 'address', - }, - ], - name: 'allowRecoverability', - outputs: [ - { - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'appId', - outputs: [ - { - name: '', - type: 'bytes32', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'getOracle', - outputs: [ - { - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'getInitializationBlock', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: '_treasuryFeeBasisPoints', - type: 'uint16', - }, - { - name: '_insuranceFeeBasisPoints', - type: 'uint16', - }, - { - name: '_operatorsFeeBasisPoints', - type: 'uint16', - }, - ], - name: 'setFeeDistribution', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: '_feeBasisPoints', - type: 'uint16', - }, - ], - name: 'setFee', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: '_maxDeposits', - type: 'uint256', - }, - ], - name: 'depositBufferedEther', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'symbol', - outputs: [ - { - name: '', - type: 'string', - }, - ], - payable: false, - stateMutability: 'pure', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'MANAGE_FEE', - outputs: [ - { - name: '', - type: 'bytes32', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: '_token', - type: 'address', - }, - ], - name: 'transferToVault', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'SET_TREASURY', - outputs: [ - { - name: '', - type: 'bytes32', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [ - { - name: '_sender', - type: 'address', - }, - { - name: '_role', - type: 'bytes32', - }, - { - name: '_params', - type: 'uint256[]', - }, - ], - name: 'canPerform', - outputs: [ - { - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: '_referral', - type: 'address', - }, - ], - name: 'submit', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: true, - stateMutability: 'payable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'WITHDRAWAL_CREDENTIALS_LENGTH', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: '_spender', - type: 'address', - }, - { - name: '_subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'getEVMScriptRegistry', - outputs: [ - { - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'PUBKEY_LENGTH', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: '_amount', - type: 'uint256', - }, - { - name: '_pubkeyHash', - type: 'bytes32', - }, - ], - name: 'withdraw', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: '_recipient', - type: 'address', - }, - { - name: '_amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'getDepositContract', - outputs: [ - { - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'getBeaconStat', - outputs: [ - { - name: 'depositedValidators', - type: 'uint256', - }, - { - name: 'beaconValidators', - type: 'uint256', - }, - { - name: 'beaconBalance', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'BURN_ROLE', - outputs: [ - { - name: '', - type: 'bytes32', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: '_insuranceFund', - type: 'address', - }, - ], - name: 'setInsuranceFund', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'getFee', - outputs: [ - { - name: 'feeBasisPoints', - type: 'uint16', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'SET_INSURANCE_FUND', - outputs: [ - { - name: '', - type: 'bytes32', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'kernel', - outputs: [ - { - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'getTotalShares', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [ - { - name: '_owner', - type: 'address', - }, - { - name: '_spender', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'isPetrified', - outputs: [ - { - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: '_withdrawalCredentials', - type: 'bytes32', - }, - ], - name: 'setWithdrawalCredentials', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [], - name: 'depositBufferedEther', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: '_account', - type: 'address', - }, - { - name: '_sharesAmount', - type: 'uint256', - }, - ], - name: 'burnShares', - outputs: [ - { - name: 'newTotalShares', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: '_treasury', - type: 'address', - }, - ], - name: 'setTreasury', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - name: '_beaconValidators', - type: 'uint256', - }, - { - name: '_beaconBalance', - type: 'uint256', - }, - ], - name: 'pushBeacon', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [ - { - name: '_account', - type: 'address', - }, - ], - name: 'sharesOf', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - payable: true, - stateMutability: 'payable', - type: 'fallback', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - name: 'executor', - type: 'address', - }, - { - indexed: false, - name: 'script', - type: 'bytes', - }, - { - indexed: false, - name: 'input', - type: 'bytes', - }, - { - indexed: false, - name: 'returnData', - type: 'bytes', - }, - ], - name: 'ScriptResult', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - name: 'vault', - type: 'address', - }, - { - indexed: true, - name: 'token', - type: 'address', - }, - { - indexed: false, - name: 'amount', - type: 'uint256', - }, - ], - name: 'RecoverToVault', - type: 'event', - }, - { - anonymous: false, - inputs: [], - name: 'Stopped', - type: 'event', - }, - { - anonymous: false, - inputs: [], - name: 'Resumed', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - name: 'from', - type: 'address', - }, - { - indexed: true, - name: 'to', - type: 'address', - }, - { - indexed: false, - name: 'value', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - name: 'owner', - type: 'address', - }, - { - indexed: true, - name: 'spender', - type: 'address', - }, - { - indexed: false, - name: 'value', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - name: 'feeBasisPoints', - type: 'uint16', - }, - ], - name: 'FeeSet', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - name: 'treasuryFeeBasisPoints', - type: 'uint16', - }, - { - indexed: false, - name: 'insuranceFeeBasisPoints', - type: 'uint16', - }, - { - indexed: false, - name: 'operatorsFeeBasisPoints', - type: 'uint16', - }, - ], - name: 'FeeDistributionSet', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - name: 'withdrawalCredentials', - type: 'bytes32', - }, - ], - name: 'WithdrawalCredentialsSet', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - name: 'sender', - type: 'address', - }, - { - indexed: false, - name: 'amount', - type: 'uint256', - }, - { - indexed: false, - name: 'referral', - type: 'address', - }, - ], - name: 'Submitted', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - name: 'amount', - type: 'uint256', - }, - ], - name: 'Unbuffered', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - name: 'sender', - type: 'address', - }, - { - indexed: false, - name: 'tokenAmount', - type: 'uint256', - }, - { - indexed: false, - name: 'sentFromBuffer', - type: 'uint256', - }, - { - indexed: true, - name: 'pubkeyHash', - type: 'bytes32', - }, - { - indexed: false, - name: 'etherAmount', - type: 'uint256', - }, - ], - name: 'Withdrawal', - type: 'event', - }, -] as const; - -export type LidoSteth = typeof lidoStethAbi; -export type LidoStethContract = GetContractReturnType; - -export class LidoSteth__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: lidoStethAbi, publicClient: client }); - } -} diff --git a/src/apps/lido/contracts/viem/LidoStethEthOracle.ts b/src/apps/lido/contracts/viem/LidoStethEthOracle.ts deleted file mode 100644 index ae3e09e04..000000000 --- a/src/apps/lido/contracts/viem/LidoStethEthOracle.ts +++ /dev/null @@ -1,523 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const lidoStethEthOracleAbi = [ - { - inputs: [ - { - internalType: 'address', - name: '_aggregator', - type: 'address', - }, - { - internalType: 'address', - name: '_accessController', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'int256', - name: 'current', - type: 'int256', - }, - { - indexed: true, - internalType: 'uint256', - name: 'roundId', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'updatedAt', - type: 'uint256', - }, - ], - name: 'AnswerUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'uint256', - name: 'roundId', - type: 'uint256', - }, - { - indexed: true, - internalType: 'address', - name: 'startedBy', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'startedAt', - type: 'uint256', - }, - ], - name: 'NewRound', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - ], - name: 'OwnershipTransferRequested', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - ], - name: 'OwnershipTransferred', - type: 'event', - }, - { - inputs: [], - name: 'acceptOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'accessController', - outputs: [ - { - internalType: 'contract AccessControllerInterface', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'aggregator', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_aggregator', - type: 'address', - }, - ], - name: 'confirmAggregator', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'description', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_roundId', - type: 'uint256', - }, - ], - name: 'getAnswer', - outputs: [ - { - internalType: 'int256', - name: '', - type: 'int256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint80', - name: '_roundId', - type: 'uint80', - }, - ], - name: 'getRoundData', - outputs: [ - { - internalType: 'uint80', - name: 'roundId', - type: 'uint80', - }, - { - internalType: 'int256', - name: 'answer', - type: 'int256', - }, - { - internalType: 'uint256', - name: 'startedAt', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'updatedAt', - type: 'uint256', - }, - { - internalType: 'uint80', - name: 'answeredInRound', - type: 'uint80', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_roundId', - type: 'uint256', - }, - ], - name: 'getTimestamp', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'latestAnswer', - outputs: [ - { - internalType: 'int256', - name: '', - type: 'int256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'latestRound', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'latestRoundData', - outputs: [ - { - internalType: 'uint80', - name: 'roundId', - type: 'uint80', - }, - { - internalType: 'int256', - name: 'answer', - type: 'int256', - }, - { - internalType: 'uint256', - name: 'startedAt', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'updatedAt', - type: 'uint256', - }, - { - internalType: 'uint80', - name: 'answeredInRound', - type: 'uint80', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'latestTimestamp', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'owner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint16', - name: '', - type: 'uint16', - }, - ], - name: 'phaseAggregators', - outputs: [ - { - internalType: 'contract AggregatorV2V3Interface', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'phaseId', - outputs: [ - { - internalType: 'uint16', - name: '', - type: 'uint16', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_aggregator', - type: 'address', - }, - ], - name: 'proposeAggregator', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'proposedAggregator', - outputs: [ - { - internalType: 'contract AggregatorV2V3Interface', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint80', - name: '_roundId', - type: 'uint80', - }, - ], - name: 'proposedGetRoundData', - outputs: [ - { - internalType: 'uint80', - name: 'roundId', - type: 'uint80', - }, - { - internalType: 'int256', - name: 'answer', - type: 'int256', - }, - { - internalType: 'uint256', - name: 'startedAt', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'updatedAt', - type: 'uint256', - }, - { - internalType: 'uint80', - name: 'answeredInRound', - type: 'uint80', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'proposedLatestRoundData', - outputs: [ - { - internalType: 'uint80', - name: 'roundId', - type: 'uint80', - }, - { - internalType: 'int256', - name: 'answer', - type: 'int256', - }, - { - internalType: 'uint256', - name: 'startedAt', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'updatedAt', - type: 'uint256', - }, - { - internalType: 'uint80', - name: 'answeredInRound', - type: 'uint80', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_accessController', - type: 'address', - }, - ], - name: 'setController', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_to', - type: 'address', - }, - ], - name: 'transferOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'version', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, -] as const; - -export type LidoStethEthOracle = typeof lidoStethEthOracleAbi; -export type LidoStethEthOracleContract = GetContractReturnType; - -export class LidoStethEthOracle__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: lidoStethEthOracleAbi, publicClient: client }); - } -} diff --git a/src/apps/lido/contracts/viem/LidoStksm.ts b/src/apps/lido/contracts/viem/LidoStksm.ts deleted file mode 100644 index 690c231c5..000000000 --- a/src/apps/lido/contracts/viem/LidoStksm.ts +++ /dev/null @@ -1,1304 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const lidoStksmAbi = [ - { - 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: 'receiver', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Claimed', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'sender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Deposited', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint16', - name: 'fee', - type: 'uint16', - }, - { - indexed: false, - internalType: 'uint16', - name: 'feeOperatorsBP', - type: 'uint16', - }, - { - indexed: false, - internalType: 'uint16', - name: 'feeTreasuryBP', - type: 'uint16', - }, - { - indexed: false, - internalType: 'uint16', - name: 'feeDevelopersBP', - type: 'uint16', - }, - ], - name: 'FeeSet', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'addr', - type: 'address', - }, - { - indexed: false, - internalType: 'bytes32', - name: 'stashAccount', - type: 'bytes32', - }, - { - indexed: false, - internalType: 'bytes32', - name: 'controllerAccount', - type: 'bytes32', - }, - ], - name: 'LedgerAdd', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'addr', - type: 'address', - }, - ], - name: 'LedgerDisable', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'addr', - type: 'address', - }, - ], - name: 'LedgerPaused', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'addr', - type: 'address', - }, - ], - name: 'LedgerRemove', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'addr', - type: 'address', - }, - ], - name: 'LedgerResumed', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'ledger', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'losses', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'balance', - type: 'uint256', - }, - ], - name: 'Losses', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'Paused', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'receiver', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Redeemed', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'userAddr', - type: 'address', - }, - { - indexed: false, - internalType: 'address', - name: 'referralAddr', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'Referral', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'ledger', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'rewards', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'balance', - type: 'uint256', - }, - ], - name: 'Rewards', - 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: false, - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'Unpaused', - type: 'event', - }, - { - inputs: [], - name: 'AUTH_MANAGER', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'LEDGER_BEACON', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'MAX_ALLOWABLE_DIFFERENCE', - outputs: [ - { - internalType: 'uint128', - name: '', - type: 'uint128', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'ORACLE_MASTER', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_stashAccount', - type: 'bytes32', - }, - { - internalType: 'bytes32', - name: '_controllerAccount', - type: 'bytes32', - }, - { - internalType: 'uint16', - name: '_index', - type: 'uint16', - }, - ], - name: 'addLedger', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - 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: [ - { - internalType: 'address', - name: '_account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'bufferedDeposits', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'bufferedRedeems', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'claimUnbonded', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_spender', - type: 'address', - }, - { - internalType: 'uint256', - name: '_subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - { - internalType: 'address', - name: '_referral', - type: 'address', - }, - ], - name: 'deposit', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'deposit', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'depositCap', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_ledgerAddress', - type: 'address', - }, - ], - name: 'disableLedger', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_totalLosses', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_ledgerBalance', - type: 'uint256', - }, - ], - name: 'distributeLosses', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_totalRewards', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_ledgerBalance', - type: 'uint256', - }, - ], - name: 'distributeRewards', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_ledgerAddress', - type: 'address', - }, - ], - name: 'emergencyPauseLedger', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '_stashAccount', - type: 'bytes32', - }, - ], - name: 'findLedger', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'flushStakes', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'fundRaisedBalance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getLedgerAddresses', - outputs: [ - { - internalType: 'address[]', - name: '', - type: 'address[]', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_sharesAmount', - type: 'uint256', - }, - ], - name: 'getPooledKSMByShares', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'getSharesByPooledKSM', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getStashAccounts', - outputs: [ - { - internalType: 'bytes32[]', - name: '', - type: 'bytes32[]', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getTotalPooledKSM', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getTotalShares', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_holder', - type: 'address', - }, - ], - name: 'getUnbonded', - outputs: [ - { - internalType: 'uint256', - name: 'waiting', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'unbonded', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_spender', - type: 'address', - }, - { - internalType: 'uint256', - name: '_addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_authManager', - type: 'address', - }, - { - internalType: 'address', - name: '_vKSM', - type: 'address', - }, - { - internalType: 'address', - name: '_controller', - type: 'address', - }, - { - internalType: 'address', - name: '_developers', - type: 'address', - }, - { - internalType: 'address', - name: '_treasury', - type: 'address', - }, - { - internalType: 'address', - name: '_oracleMaster', - type: 'address', - }, - { - internalType: 'address', - name: '_withdrawal', - type: 'address', - }, - { - internalType: 'uint256', - name: '_depositCap', - type: 'uint256', - }, - { - internalType: 'uint128', - name: '_maxAllowableDifference', - type: 'uint128', - }, - ], - name: 'initialize', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'ledgerBorrow', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'ledgerStake', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32[]', - name: '_stashAccounts', - type: 'bytes32[]', - }, - { - internalType: 'bytes32[][]', - name: '_validators', - type: 'bytes32[][]', - }, - ], - name: 'nominateBatch', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'pause', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'paused', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'redeem', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_ledgerAddress', - type: 'address', - }, - ], - name: 'removeLedger', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'resume', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_ledgerAddress', - type: 'address', - }, - ], - name: 'resumeLedger', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_depositCap', - type: 'uint256', - }, - ], - name: 'setDepositCap', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_developers', - type: 'address', - }, - ], - name: 'setDevelopers', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint16', - name: '_feeOperators', - type: 'uint16', - }, - { - internalType: 'uint16', - name: '_feeTreasury', - type: 'uint16', - }, - { - internalType: 'uint16', - name: '_feeDevelopers', - type: 'uint16', - }, - ], - name: 'setFee', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_ledgerBeacon', - type: 'address', - }, - ], - name: 'setLedgerBeacon', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_ledgerFactory', - type: 'address', - }, - ], - name: 'setLedgerFactory', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint128', - name: '_maxAllowableDifference', - type: 'uint128', - }, - ], - name: 'setMaxAllowableDifference', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - components: [ - { - internalType: 'uint16', - name: 'maxValidatorsPerLedger', - type: 'uint16', - }, - { - internalType: 'uint128', - name: 'minNominatorBalance', - type: 'uint128', - }, - { - internalType: 'uint128', - name: 'ledgerMinimumActiveBalance', - type: 'uint128', - }, - { - internalType: 'uint256', - name: 'maxUnlockingChunks', - type: 'uint256', - }, - ], - internalType: 'struct Types.RelaySpec', - name: '_relaySpec', - type: 'tuple', - }, - ], - name: 'setRelaySpec', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_treasury', - type: 'address', - }, - ], - name: 'setTreasury', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_account', - type: 'address', - }, - ], - name: 'sharesOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - 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: '_recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_sender', - type: 'address', - }, - { - internalType: 'address', - name: '_recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_excess', - type: 'uint256', - }, - ], - name: 'transferFromLedger', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'transferToLedger', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type LidoStksm = typeof lidoStksmAbi; -export type LidoStksmContract = GetContractReturnType; - -export class LidoStksm__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: lidoStksmAbi, publicClient: client }); - } -} diff --git a/src/apps/lido/contracts/viem/LidoWsteth.ts b/src/apps/lido/contracts/viem/LidoWsteth.ts deleted file mode 100644 index 8ee3f21df..000000000 --- a/src/apps/lido/contracts/viem/LidoWsteth.ts +++ /dev/null @@ -1,491 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const lidoWstethAbi = [ - { - inputs: [ - { - internalType: 'contract IStETH', - name: '_stETH', - 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: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - inputs: [], - name: 'DOMAIN_SEPARATOR', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - 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: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - 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: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_wstETHAmount', - type: 'uint256', - }, - ], - name: 'getStETHByWstETH', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_stETHAmount', - type: 'uint256', - }, - ], - name: 'getWstETHByStETH', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - ], - name: 'nonces', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'deadline', - type: 'uint256', - }, - { - internalType: 'uint8', - name: 'v', - type: 'uint8', - }, - { - internalType: 'bytes32', - name: 'r', - type: 'bytes32', - }, - { - internalType: 'bytes32', - name: 's', - type: 'bytes32', - }, - ], - name: 'permit', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'stETH', - outputs: [ - { - internalType: 'contract IStETH', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'stEthPerToken', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'tokensPerStEth', - 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: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_wstETHAmount', - type: 'uint256', - }, - ], - name: 'unwrap', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_stETHAmount', - type: 'uint256', - }, - ], - name: 'wrap', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - stateMutability: 'payable', - type: 'receive', - }, -] as const; - -export type LidoWsteth = typeof lidoWstethAbi; -export type LidoWstethContract = GetContractReturnType; - -export class LidoWsteth__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: lidoWstethAbi, publicClient: client }); - } -} diff --git a/src/apps/lido/contracts/viem/index.ts b/src/apps/lido/contracts/viem/index.ts deleted file mode 100644 index 7089ebc20..000000000 --- a/src/apps/lido/contracts/viem/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -export type { LidoStethEthOracle } from './LidoStethEthOracle'; -export type { LidoSteth } from './LidoSteth'; -export type { LidoStksm } from './LidoStksm'; -export type { LidoWsteth } from './LidoWsteth'; - -export { LidoStethEthOracle__factory } from './LidoStethEthOracle'; -export { LidoSteth__factory } from './LidoSteth'; -export { LidoStksm__factory } from './LidoStksm'; -export { LidoWsteth__factory } from './LidoWsteth'; diff --git a/src/apps/lido/ethereum/lido.steth.token-fetcher.ts b/src/apps/lido/ethereum/lido.steth.token-fetcher.ts deleted file mode 100644 index 4f83e0cf8..000000000 --- a/src/apps/lido/ethereum/lido.steth.token-fetcher.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; - -import { LidoViemContractFactory } from '../contracts'; -import { LidoSteth } from '../contracts/viem/LidoSteth'; - -@PositionTemplate() -export class EthereumLidoStethTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'stETH'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(LidoViemContractFactory) protected readonly contractFactory: LidoViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.lidoSteth({ network: this.network, address }); - } - - async getAddresses() { - return ['0xae7ab96520de3a18e5e111b5eaab095312d7fe84']; - } - - async getUnderlyingTokenDefinitions() { - return [{ address: '0x0000000000000000000000000000000000000000', network: this.network }]; - } - - async getPricePerShare() { - return [1]; - } -} diff --git a/src/apps/lido/ethereum/lido.wsteth.token-fetcher.ts b/src/apps/lido/ethereum/lido.wsteth.token-fetcher.ts deleted file mode 100644 index 653ab3d8d..000000000 --- a/src/apps/lido/ethereum/lido.wsteth.token-fetcher.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetPricePerShareParams, GetUnderlyingTokensParams } from '~position/template/app-token.template.types'; - -import { LidoViemContractFactory } from '../contracts'; -import { LidoWsteth } from '../contracts/viem'; - -@PositionTemplate() -export class EthereumLidoWstethTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'wstETH'; - - isExcludedFromTvl = true; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(LidoViemContractFactory) protected readonly contractFactory: LidoViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.lidoWsteth({ network: this.network, address }); - } - - async getAddresses() { - return ['0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0']; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.stETH(), network: this.network }]; - } - - async getPricePerShare({ appToken, contract }: GetPricePerShareParams) { - const pricePerShareRaw = await contract.read.stEthPerToken(); - return [Number(pricePerShareRaw) / 10 ** appToken.decimals]; - } -} diff --git a/src/apps/lido/lido.module.ts b/src/apps/lido/lido.module.ts deleted file mode 100644 index 3e9aaf097..000000000 --- a/src/apps/lido/lido.module.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Module } from '@nestjs/common'; - -import { AbstractApp } from '~app/app.dynamic-module'; - -import { LidoViemContractFactory } from './contracts'; -import { EthereumLidoStethTokenFetcher } from './ethereum/lido.steth.token-fetcher'; -import { EthereumLidoWstethTokenFetcher } from './ethereum/lido.wsteth.token-fetcher'; - -@Module({ - providers: [LidoViemContractFactory, EthereumLidoStethTokenFetcher, EthereumLidoWstethTokenFetcher], -}) -export class LidoAppModule extends AbstractApp() {} diff --git a/src/apps/metavault-trade/metavault-trade.module.ts b/src/apps/metavault-trade/metavault-trade.module.ts index 8affc29c8..4943544b9 100644 --- a/src/apps/metavault-trade/metavault-trade.module.ts +++ b/src/apps/metavault-trade/metavault-trade.module.ts @@ -3,7 +3,6 @@ import { Module } from '@nestjs/common'; import { AbstractApp } from '~app/app.dynamic-module'; import { MetavaultTradeViemContractFactory } from './contracts'; -import { PolygonMetavaultTradeEsMvxTokenFetcher } from './polygon/metavault-trade.es-mvx.token-fetcher'; import { PolygonMetavaultTradeFarmContractPositionFetcher } from './polygon/metavault-trade.farm.contract-position-fetcher'; import { PolygonMetavaultTradeMvlpTokenFetcher } from './polygon/metavault-trade.mvlp.token-fetcher'; import { PolygonPerpContractPositionFetcher } from './polygon/metavault-trade.perp.contract-position-fetcher'; @@ -12,7 +11,6 @@ import { PolygonPerpContractPositionFetcher } from './polygon/metavault-trade.pe providers: [ MetavaultTradeViemContractFactory, //Polygon - PolygonMetavaultTradeEsMvxTokenFetcher, PolygonMetavaultTradeFarmContractPositionFetcher, PolygonMetavaultTradeMvlpTokenFetcher, PolygonPerpContractPositionFetcher, diff --git a/src/apps/metavault-trade/polygon/metavault-trade.es-mvx.token-fetcher.ts b/src/apps/metavault-trade/polygon/metavault-trade.es-mvx.token-fetcher.ts deleted file mode 100644 index c57cdac43..000000000 --- a/src/apps/metavault-trade/polygon/metavault-trade.es-mvx.token-fetcher.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { Erc20 } from '~contract/contracts/viem'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; - -import { MetavaultTradeViemContractFactory } from '../contracts'; - -@PositionTemplate() -export class PolygonMetavaultTradeEsMvxTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'esMVX'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(MetavaultTradeViemContractFactory) protected readonly contractFactory: MetavaultTradeViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.appToolkit.globalViemContracts.erc20({ network: this.network, address }); - } - - async getAddresses() { - return ['0xd1b2f8dff8437be57430ee98767d512f252ead61']; - } - - async getUnderlyingTokenDefinitions() { - return [{ address: '0x2760e46d9bb43dafcbecaad1f64b93207f9f0ed7', network: this.network }]; - } - - async getPricePerShare() { - return [1]; - } -} diff --git a/src/apps/mstable/contracts/abis/mstable-asset.json b/src/apps/mstable/contracts/abis/mstable-asset.json deleted file mode 100644 index 8d500f34a..000000000 --- a/src/apps/mstable/contracts/abis/mstable-asset.json +++ /dev/null @@ -1,596 +0,0 @@ -[ - { - "inputs": [ - { "internalType": "address", "name": "_nexus", "type": "address" }, - { "internalType": "address", "name": "_underlying", "type": "address" }, - { "internalType": "address", "name": "_unwrapper", "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": false, "internalType": "bool", "name": "automationEnabled", "type": "bool" }], - "name": "AutomaticInterestCollectionSwitched", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "address", "name": "connector", "type": "address" }], - "name": "ConnectorUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "redeemer", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "creditsRedeemed", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "savingsCredited", "type": "uint256" } - ], - "name": "CreditsRedeemed", - "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": [], "name": "EmergencyUpdate", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "uint256", "name": "newExchangeRate", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "interestCollected", "type": "uint256" } - ], - "name": "ExchangeRateUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256", "name": "fraction", "type": "uint256" }], - "name": "FractionUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "uint256", "name": "oldBalance", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "newBalance", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "interestDetected", "type": "uint256" } - ], - "name": "Poked", - "type": "event" - }, - { "anonymous": false, "inputs": [], "name": "PokedRaw", "type": "event" }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "address", "name": "poker", "type": "address" }], - "name": "PokerUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "referrer", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "beneficiary", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "Referral", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "saver", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "savingsDeposited", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "creditsIssued", "type": "uint256" } - ], - "name": "SavingsDeposited", - "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" - }, - { - "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": "assetTokenAddress", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "bool", "name": "_enabled", "type": "bool" }], - "name": "automateInterestCollectionFlag", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_user", "type": "address" }], - "name": "balanceOfUnderlying", - "outputs": [{ "internalType": "uint256", "name": "balance", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "connector", - "outputs": [{ "internalType": "contract IConnector", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], - "name": "convertToAssets", - "outputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], - "name": "convertToShares", - "outputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_user", "type": "address" }], - "name": "creditBalances", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_credits", "type": "uint256" }], - "name": "creditsToUnderlying", - "outputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } - ], - "name": "decreaseAllowance", - "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": "referrer", "type": "address" } - ], - "name": "deposit", - "outputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "assets", "type": "uint256" }, - { "internalType": "address", "name": "receiver", "type": "address" } - ], - "name": "deposit", - "outputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_amount", "type": "uint256" }], - "name": "depositInterest", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "_underlying", "type": "uint256" }, - { "internalType": "address", "name": "_beneficiary", "type": "address" }, - { "internalType": "address", "name": "_referrer", "type": "address" } - ], - "name": "depositSavings", - "outputs": [{ "internalType": "uint256", "name": "creditsIssued", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "_underlying", "type": "uint256" }, - { "internalType": "address", "name": "_beneficiary", "type": "address" } - ], - "name": "depositSavings", - "outputs": [{ "internalType": "uint256", "name": "creditsIssued", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_underlying", "type": "uint256" }], - "name": "depositSavings", - "outputs": [{ "internalType": "uint256", "name": "creditsIssued", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_withdrawAmount", "type": "uint256" }], - "name": "emergencyWithdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "exchangeRate", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "fraction", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "addedValue", "type": "uint256" } - ], - "name": "increaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_poker", "type": "address" }, - { "internalType": "string", "name": "_nameArg", "type": "string" }, - { "internalType": "string", "name": "_symbolArg", "type": "string" } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "lastBalance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lastPoke", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "maxDeposit", - "outputs": [{ "internalType": "uint256", "name": "maxAssets", "type": "uint256" }], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "maxMint", - "outputs": [{ "internalType": "uint256", "name": "maxShares", "type": "uint256" }], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }], - "name": "maxRedeem", - "outputs": [{ "internalType": "uint256", "name": "maxShares", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }], - "name": "maxWithdraw", - "outputs": [{ "internalType": "uint256", "name": "maxAssets", "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": "assets", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "shares", "type": "uint256" }, - { "internalType": "address", "name": "receiver", "type": "address" }, - { "internalType": "address", "name": "referrer", "type": "address" } - ], - "name": "mint", - "outputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "nexus", - "outputs": [{ "internalType": "contract INexus", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { "inputs": [], "name": "poke", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "poker", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "_underlying", "type": "uint256" }, - { "internalType": "address", "name": "_beneficiary", "type": "address" } - ], - "name": "preDeposit", - "outputs": [{ "internalType": "uint256", "name": "creditsIssued", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], - "name": "previewDeposit", - "outputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], - "name": "previewMint", - "outputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], - "name": "previewRedeem", - "outputs": [{ "internalType": "uint256", "name": "assets", "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": [ - { "internalType": "uint256", "name": "shares", "type": "uint256" }, - { "internalType": "address", "name": "receiver", "type": "address" }, - { "internalType": "address", "name": "owner", "type": "address" } - ], - "name": "redeem", - "outputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_credits", "type": "uint256" }], - "name": "redeem", - "outputs": [{ "internalType": "uint256", "name": "massetReturned", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "_amount", "type": "uint256" }, - { "internalType": "bool", "name": "_isCreditAmt", "type": "bool" }, - { "internalType": "uint256", "name": "_minAmountOut", "type": "uint256" }, - { "internalType": "address", "name": "_output", "type": "address" }, - { "internalType": "address", "name": "_beneficiary", "type": "address" }, - { "internalType": "address", "name": "_router", "type": "address" }, - { "internalType": "bool", "name": "_isBassetOut", "type": "bool" } - ], - "name": "redeemAndUnwrap", - "outputs": [ - { "internalType": "uint256", "name": "creditsBurned", "type": "uint256" }, - { "internalType": "uint256", "name": "massetReturned", "type": "uint256" }, - { "internalType": "uint256", "name": "outputQuantity", "type": "uint256" } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_credits", "type": "uint256" }], - "name": "redeemCredits", - "outputs": [{ "internalType": "uint256", "name": "massetReturned", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_underlying", "type": "uint256" }], - "name": "redeemUnderlying", - "outputs": [{ "internalType": "uint256", "name": "creditsBurned", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_newConnector", "type": "address" }], - "name": "setConnector", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_fraction", "type": "uint256" }], - "name": "setFraction", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_newPoker", "type": "address" }], - "name": "setPoker", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalAssets", - "outputs": [{ "internalType": "uint256", "name": "totalManagedAssets", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "sender", "type": "address" }, - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "underlying", - "outputs": [{ "internalType": "contract IERC20", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_underlying", "type": "uint256" }], - "name": "underlyingToCredits", - "outputs": [{ "internalType": "uint256", "name": "credits", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unwrapper", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "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": "shares", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/mstable/contracts/abis/mstable-metavault-4626.json b/src/apps/mstable/contracts/abis/mstable-metavault-4626.json deleted file mode 100644 index 2d2010702..000000000 --- a/src/apps/mstable/contracts/abis/mstable-metavault-4626.json +++ /dev/null @@ -1,524 +0,0 @@ -[ - { - "inputs": [ - { "internalType": "address", "name": "_nexus", "type": "address" }, - { "internalType": "address", "name": "_asset", "type": "address" }, - { "internalType": "address", "name": "_metaVault", "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": "sender", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "receiver", "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": true, "internalType": "address", "name": "sender", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "slippage", "type": "uint256" } - ], - "name": "DepositSlippageChange", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint8", "name": "version", "type": "uint8" }], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "slippage", "type": "uint256" } - ], - "name": "MintSlippageChange", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "address", "name": "account", "type": "address" }], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "slippage", "type": "uint256" } - ], - "name": "RedeemSlippageChange", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "address", "name": "_vaultManager", "type": "address" }], - "name": "SetVaultManager", - "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": false, "internalType": "address", "name": "account", "type": "address" }], - "name": "Unpaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "sender", "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": "sender", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "slippage", "type": "uint256" } - ], - "name": "WithdrawSlippageChange", - "type": "event" - }, - { - "inputs": [], - "name": "BASIS_SCALE", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "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": "assetTokenAddress", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "assetFromUsdScale", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "assetPoolIndex", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "assetScale", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], - "name": "convertToAssets", - "outputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], - "name": "convertToShares", - "outputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "decimals_", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } - ], - "name": "decreaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "assets", "type": "uint256" }, - { "internalType": "address", "name": "receiver", "type": "address" } - ], - "name": "deposit", - "outputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "assets", "type": "uint256" }, - { "internalType": "address", "name": "receiver", "type": "address" }, - { "internalType": "uint256", "name": "slippage", "type": "uint256" } - ], - "name": "deposit", - "outputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "depositSlippage", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "addedValue", "type": "uint256" } - ], - "name": "increaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "string", "name": "_name", "type": "string" }, - { "internalType": "string", "name": "_symbol", "type": "string" }, - { "internalType": "address", "name": "_vaultManager", "type": "address" }, - { - "components": [ - { "internalType": "uint256", "name": "redeem", "type": "uint256" }, - { "internalType": "uint256", "name": "deposit", "type": "uint256" }, - { "internalType": "uint256", "name": "withdraw", "type": "uint256" }, - { "internalType": "uint256", "name": "mint", "type": "uint256" } - ], - "internalType": "struct AbstractSlippage.SlippageData", - "name": "_slippageData", - "type": "tuple" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "isVaultManager", - "outputs": [{ "internalType": "bool", "name": "result", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "minAssets", "type": "uint256" }], - "name": "liquidateVault", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "caller", "type": "address" }], - "name": "maxDeposit", - "outputs": [{ "internalType": "uint256", "name": "maxAssets", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "caller", "type": "address" }], - "name": "maxMint", - "outputs": [{ "internalType": "uint256", "name": "maxShares", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }], - "name": "maxRedeem", - "outputs": [{ "internalType": "uint256", "name": "maxShares", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }], - "name": "maxWithdraw", - "outputs": [{ "internalType": "uint256", "name": "maxAssets", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "metaVault", - "outputs": [{ "internalType": "contract IERC4626Vault", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "shares", "type": "uint256" }, - { "internalType": "address", "name": "receiver", "type": "address" } - ], - "name": "mint", - "outputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "mintSlippage", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "name_", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "nexus", - "outputs": [{ "internalType": "contract INexus", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { "inputs": [], "name": "pause", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "paused", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], - "name": "previewDeposit", - "outputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], - "name": "previewMint", - "outputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], - "name": "previewRedeem", - "outputs": [{ "internalType": "uint256", "name": "assets", "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": [ - { "internalType": "uint256", "name": "shares", "type": "uint256" }, - { "internalType": "address", "name": "receiver", "type": "address" }, - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "uint256", "name": "customRedeemSlippage", "type": "uint256" } - ], - "name": "redeem", - "outputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], - "stateMutability": "nonpayable", - "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": "assets", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "redeemSlippage", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { "inputs": [], "name": "resetAllowances", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [{ "internalType": "uint256", "name": "_slippage", "type": "uint256" }], - "name": "setDepositSlippage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_slippage", "type": "uint256" }], - "name": "setMintSlippage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_slippage", "type": "uint256" }], - "name": "setRedeemSlippage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_vaultManager", "type": "address" }], - "name": "setVaultManager", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_slippage", "type": "uint256" }], - "name": "setWithdrawSlippage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [{ "internalType": "string", "name": "symbol_", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "threeCrvTokenScale", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalAssets", - "outputs": [{ "internalType": "uint256", "name": "totalManagedAssets", "type": "uint256" }], - "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" - }, - { - "inputs": [ - { "internalType": "address", "name": "from", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { "inputs": [], "name": "unpause", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "vaultManager", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "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": "shares", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "withdrawSlippage", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - } -] diff --git a/src/apps/mstable/contracts/viem.contract-factory.ts b/src/apps/mstable/contracts/viem.contract-factory.ts index 355d0f359..08d10f8e8 100644 --- a/src/apps/mstable/contracts/viem.contract-factory.ts +++ b/src/apps/mstable/contracts/viem.contract-factory.ts @@ -3,13 +3,7 @@ import { Injectable, Inject } from '@nestjs/common'; import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; import { Network } from '~types/network.interface'; -import { - MstableAsset__factory, - MstableMetavault4626__factory, - MstableStaking__factory, - MstableStakingV2__factory, - MstableVmta__factory, -} from './viem'; +import { MstableStaking__factory, MstableStakingV2__factory, MstableVmta__factory } from './viem'; type ContractOpts = { address: string; network: Network }; @@ -17,12 +11,6 @@ type ContractOpts = { address: string; network: Network }; export class MstableViemContractFactory { constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) {} - mstableAsset({ address, network }: ContractOpts) { - return MstableAsset__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } - mstableMetavault4626({ address, network }: ContractOpts) { - return MstableMetavault4626__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } mstableStaking({ address, network }: ContractOpts) { return MstableStaking__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } diff --git a/src/apps/mstable/contracts/viem/MstableAsset.ts b/src/apps/mstable/contracts/viem/MstableAsset.ts deleted file mode 100644 index c137113c7..000000000 --- a/src/apps/mstable/contracts/viem/MstableAsset.ts +++ /dev/null @@ -1,1451 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const mstableAssetAbi = [ - { - inputs: [ - { - internalType: 'address', - name: '_nexus', - type: 'address', - }, - { - internalType: 'address', - name: '_underlying', - type: 'address', - }, - { - internalType: 'address', - name: '_unwrapper', - 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: false, - internalType: 'bool', - name: 'automationEnabled', - type: 'bool', - }, - ], - name: 'AutomaticInterestCollectionSwitched', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'connector', - type: 'address', - }, - ], - name: 'ConnectorUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'redeemer', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'creditsRedeemed', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'savingsCredited', - type: 'uint256', - }, - ], - name: 'CreditsRedeemed', - 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: [], - name: 'EmergencyUpdate', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'newExchangeRate', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'interestCollected', - type: 'uint256', - }, - ], - name: 'ExchangeRateUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'fraction', - type: 'uint256', - }, - ], - name: 'FractionUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'oldBalance', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'newBalance', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'interestDetected', - type: 'uint256', - }, - ], - name: 'Poked', - type: 'event', - }, - { - anonymous: false, - inputs: [], - name: 'PokedRaw', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'poker', - type: 'address', - }, - ], - name: 'PokerUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'referrer', - type: 'address', - }, - { - indexed: false, - internalType: 'address', - name: 'beneficiary', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Referral', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'saver', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'savingsDeposited', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'creditsIssued', - type: 'uint256', - }, - ], - name: 'SavingsDeposited', - 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', - }, - { - 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: 'assetTokenAddress', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bool', - name: '_enabled', - type: 'bool', - }, - ], - name: 'automateInterestCollectionFlag', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_user', - type: 'address', - }, - ], - name: 'balanceOfUnderlying', - outputs: [ - { - internalType: 'uint256', - name: 'balance', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'connector', - outputs: [ - { - internalType: 'contract IConnector', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'convertToAssets', - outputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - name: 'convertToShares', - outputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_user', - type: 'address', - }, - ], - name: 'creditBalances', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_credits', - type: 'uint256', - }, - ], - name: 'creditsToUnderlying', - outputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - 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: 'referrer', - type: 'address', - }, - ], - name: 'deposit', - outputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - ], - name: 'deposit', - outputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'depositInterest', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_underlying', - type: 'uint256', - }, - { - internalType: 'address', - name: '_beneficiary', - type: 'address', - }, - { - internalType: 'address', - name: '_referrer', - type: 'address', - }, - ], - name: 'depositSavings', - outputs: [ - { - internalType: 'uint256', - name: 'creditsIssued', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_underlying', - type: 'uint256', - }, - { - internalType: 'address', - name: '_beneficiary', - type: 'address', - }, - ], - name: 'depositSavings', - outputs: [ - { - internalType: 'uint256', - name: 'creditsIssued', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_underlying', - type: 'uint256', - }, - ], - name: 'depositSavings', - outputs: [ - { - internalType: 'uint256', - name: 'creditsIssued', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_withdrawAmount', - type: 'uint256', - }, - ], - name: 'emergencyWithdraw', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'exchangeRate', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'fraction', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_poker', - type: 'address', - }, - { - internalType: 'string', - name: '_nameArg', - type: 'string', - }, - { - internalType: 'string', - name: '_symbolArg', - type: 'string', - }, - ], - name: 'initialize', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'lastBalance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'lastPoke', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'maxDeposit', - outputs: [ - { - internalType: 'uint256', - name: 'maxAssets', - type: 'uint256', - }, - ], - stateMutability: 'pure', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'maxMint', - outputs: [ - { - internalType: 'uint256', - name: 'maxShares', - type: 'uint256', - }, - ], - stateMutability: 'pure', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - ], - name: 'maxRedeem', - outputs: [ - { - internalType: 'uint256', - name: 'maxShares', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - ], - name: 'maxWithdraw', - outputs: [ - { - internalType: 'uint256', - name: 'maxAssets', - 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: 'assets', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - { - internalType: 'address', - name: 'referrer', - type: 'address', - }, - ], - name: 'mint', - outputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'nexus', - outputs: [ - { - internalType: 'contract INexus', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'poke', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'poker', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_underlying', - type: 'uint256', - }, - { - internalType: 'address', - name: '_beneficiary', - type: 'address', - }, - ], - name: 'preDeposit', - outputs: [ - { - internalType: 'uint256', - name: 'creditsIssued', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - name: 'previewDeposit', - outputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'previewMint', - outputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'previewRedeem', - outputs: [ - { - internalType: 'uint256', - name: 'assets', - 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: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - ], - name: 'redeem', - outputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_credits', - type: 'uint256', - }, - ], - name: 'redeem', - outputs: [ - { - internalType: 'uint256', - name: 'massetReturned', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - { - internalType: 'bool', - name: '_isCreditAmt', - type: 'bool', - }, - { - internalType: 'uint256', - name: '_minAmountOut', - type: 'uint256', - }, - { - internalType: 'address', - name: '_output', - type: 'address', - }, - { - internalType: 'address', - name: '_beneficiary', - type: 'address', - }, - { - internalType: 'address', - name: '_router', - type: 'address', - }, - { - internalType: 'bool', - name: '_isBassetOut', - type: 'bool', - }, - ], - name: 'redeemAndUnwrap', - outputs: [ - { - internalType: 'uint256', - name: 'creditsBurned', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'massetReturned', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'outputQuantity', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_credits', - type: 'uint256', - }, - ], - name: 'redeemCredits', - outputs: [ - { - internalType: 'uint256', - name: 'massetReturned', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_underlying', - type: 'uint256', - }, - ], - name: 'redeemUnderlying', - outputs: [ - { - internalType: 'uint256', - name: 'creditsBurned', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_newConnector', - type: 'address', - }, - ], - name: 'setConnector', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_fraction', - type: 'uint256', - }, - ], - name: 'setFraction', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_newPoker', - type: 'address', - }, - ], - name: 'setPoker', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalAssets', - outputs: [ - { - internalType: 'uint256', - name: 'totalManagedAssets', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'underlying', - outputs: [ - { - internalType: 'contract IERC20', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_underlying', - type: 'uint256', - }, - ], - name: 'underlyingToCredits', - outputs: [ - { - internalType: 'uint256', - name: 'credits', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'unwrapper', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - 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: 'shares', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type MstableAsset = typeof mstableAssetAbi; -export type MstableAssetContract = GetContractReturnType; - -export class MstableAsset__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: mstableAssetAbi, publicClient: client }); - } -} diff --git a/src/apps/mstable/contracts/viem/MstableMetavault4626.ts b/src/apps/mstable/contracts/viem/MstableMetavault4626.ts deleted file mode 100644 index 6a1f7bebe..000000000 --- a/src/apps/mstable/contracts/viem/MstableMetavault4626.ts +++ /dev/null @@ -1,1225 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const mstableMetavault4626Abi = [ - { - inputs: [ - { - internalType: 'address', - name: '_nexus', - type: 'address', - }, - { - internalType: 'address', - name: '_asset', - type: 'address', - }, - { - internalType: 'address', - name: '_metaVault', - 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: 'sender', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'receiver', - 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: true, - internalType: 'address', - name: 'sender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'slippage', - type: 'uint256', - }, - ], - name: 'DepositSlippageChange', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint8', - name: 'version', - type: 'uint8', - }, - ], - name: 'Initialized', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'sender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'slippage', - type: 'uint256', - }, - ], - name: 'MintSlippageChange', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'Paused', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'sender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'slippage', - type: 'uint256', - }, - ], - name: 'RedeemSlippageChange', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: '_vaultManager', - type: 'address', - }, - ], - name: 'SetVaultManager', - 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: false, - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'Unpaused', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'sender', - 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: 'sender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'slippage', - type: 'uint256', - }, - ], - name: 'WithdrawSlippageChange', - type: 'event', - }, - { - inputs: [], - name: 'BASIS_SCALE', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - 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: 'assetTokenAddress', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'assetFromUsdScale', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'assetPoolIndex', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'assetScale', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'convertToAssets', - outputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - name: 'convertToShares', - outputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: 'decimals_', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - ], - name: 'deposit', - outputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - { - internalType: 'uint256', - name: 'slippage', - type: 'uint256', - }, - ], - name: 'deposit', - outputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'depositSlippage', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'string', - name: '_name', - type: 'string', - }, - { - internalType: 'string', - name: '_symbol', - type: 'string', - }, - { - internalType: 'address', - name: '_vaultManager', - type: 'address', - }, - { - components: [ - { - internalType: 'uint256', - name: 'redeem', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'deposit', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'withdraw', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'mint', - type: 'uint256', - }, - ], - internalType: 'struct AbstractSlippage.SlippageData', - name: '_slippageData', - type: 'tuple', - }, - ], - name: 'initialize', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'isVaultManager', - outputs: [ - { - internalType: 'bool', - name: 'result', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'minAssets', - type: 'uint256', - }, - ], - name: 'liquidateVault', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'caller', - type: 'address', - }, - ], - name: 'maxDeposit', - outputs: [ - { - internalType: 'uint256', - name: 'maxAssets', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'caller', - type: 'address', - }, - ], - name: 'maxMint', - outputs: [ - { - internalType: 'uint256', - name: 'maxShares', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - ], - name: 'maxRedeem', - outputs: [ - { - internalType: 'uint256', - name: 'maxShares', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - ], - name: 'maxWithdraw', - outputs: [ - { - internalType: 'uint256', - name: 'maxAssets', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'metaVault', - outputs: [ - { - internalType: 'contract IERC4626Vault', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - ], - name: 'mint', - outputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'mintSlippage', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: 'name_', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'nexus', - outputs: [ - { - internalType: 'contract INexus', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'pause', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'paused', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - name: 'previewDeposit', - outputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'previewMint', - outputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'previewRedeem', - outputs: [ - { - internalType: 'uint256', - name: 'assets', - 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: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'uint256', - name: 'customRedeemSlippage', - type: 'uint256', - }, - ], - name: 'redeem', - outputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - 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: 'assets', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'redeemSlippage', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'resetAllowances', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_slippage', - type: 'uint256', - }, - ], - name: 'setDepositSlippage', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_slippage', - type: 'uint256', - }, - ], - name: 'setMintSlippage', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_slippage', - type: 'uint256', - }, - ], - name: 'setRedeemSlippage', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_vaultManager', - type: 'address', - }, - ], - name: 'setVaultManager', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_slippage', - type: 'uint256', - }, - ], - name: 'setWithdrawSlippage', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: 'symbol_', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'threeCrvTokenScale', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalAssets', - outputs: [ - { - internalType: 'uint256', - name: 'totalManagedAssets', - type: 'uint256', - }, - ], - 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', - }, - { - inputs: [ - { - internalType: 'address', - name: 'from', - type: 'address', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'unpause', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'vaultManager', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - 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: 'shares', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'withdrawSlippage', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, -] as const; - -export type MstableMetavault4626 = typeof mstableMetavault4626Abi; -export type MstableMetavault4626Contract = GetContractReturnType; - -export class MstableMetavault4626__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: mstableMetavault4626Abi, publicClient: client }); - } -} diff --git a/src/apps/mstable/contracts/viem/index.ts b/src/apps/mstable/contracts/viem/index.ts index cccd89a4b..dcba3a1da 100644 --- a/src/apps/mstable/contracts/viem/index.ts +++ b/src/apps/mstable/contracts/viem/index.ts @@ -2,14 +2,10 @@ /* tslint:disable */ /* eslint-disable */ -export type { MstableAsset } from './MstableAsset'; -export type { MstableMetavault4626 } from './MstableMetavault4626'; export type { MstableStakingV2 } from './MstableStakingV2'; export type { MstableStaking } from './MstableStaking'; export type { MstableVmta } from './MstableVmta'; -export { MstableAsset__factory } from './MstableAsset'; -export { MstableMetavault4626__factory } from './MstableMetavault4626'; export { MstableStakingV2__factory } from './MstableStakingV2'; export { MstableStaking__factory } from './MstableStaking'; export { MstableVmta__factory } from './MstableVmta'; diff --git a/src/apps/mstable/ethereum/mstable.imusd.token-fetcher.ts b/src/apps/mstable/ethereum/mstable.imusd.token-fetcher.ts deleted file mode 100644 index 557a8d4bf..000000000 --- a/src/apps/mstable/ethereum/mstable.imusd.token-fetcher.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetPricePerShareParams, GetUnderlyingTokensParams } from '~position/template/app-token.template.types'; - -import { MstableViemContractFactory } from '../contracts'; -import { MstableAsset } from '../contracts/viem'; - -@PositionTemplate() -export class EthereumMstableImusdTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'imUSD'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(MstableViemContractFactory) protected readonly contractFactory: MstableViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.mstableAsset({ address, network: this.network }); - } - - async getAddresses() { - return ['0x30647a72dc82d7fbb1123ea74716ab8a317eac19']; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.asset(), network: this.network }]; - } - - async getPricePerShare({ appToken, contract }: GetPricePerShareParams) { - return [await contract.read.exchangeRate().then(v => Number(v) / 10 ** appToken.tokens[0].decimals)]; - } -} diff --git a/src/apps/mstable/ethereum/mstable.meta-vault.token-fetcher.ts b/src/apps/mstable/ethereum/mstable.meta-vault.token-fetcher.ts deleted file mode 100644 index 3951ed25d..000000000 --- a/src/apps/mstable/ethereum/mstable.meta-vault.token-fetcher.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetPricePerShareParams, GetUnderlyingTokensParams } from '~position/template/app-token.template.types'; - -import { MstableViemContractFactory } from '../contracts'; -import { MstableMetavault4626 } from '../contracts/viem'; - -@PositionTemplate() -export class EthereumMstableMetaVaultTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Meta Vaults'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(MstableViemContractFactory) protected readonly contractFactory: MstableViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.mstableMetavault4626({ address, network: this.network }); - } - - async getAddresses() { - return [ - '0x455fb969dc06c4aa77e7db3f0686cc05164436d2', // Convex 3Pool Meta Vault - ]; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.asset(), network: this.network }]; - } - - async getPricePerShare({ contract, appToken }: GetPricePerShareParams) { - const reserveRaw = await contract.read.totalAssets(); - const reserve = Number(reserveRaw) / 10 ** appToken.tokens[0].decimals; - const pricePerShare = reserve / appToken.supply; - return [pricePerShare]; - } -} diff --git a/src/apps/mstable/mstable.module.ts b/src/apps/mstable/mstable.module.ts index 9ae791d96..75c8b35ae 100644 --- a/src/apps/mstable/mstable.module.ts +++ b/src/apps/mstable/mstable.module.ts @@ -4,24 +4,18 @@ import { AbstractApp } from '~app/app.dynamic-module'; import { MstableViemContractFactory } from './contracts'; import { EthereumMstableEarnContractPositionFetcher } from './ethereum/mstable.earn.contract-position-fetcher'; -import { EthereumMstableImusdTokenFetcher } from './ethereum/mstable.imusd.token-fetcher'; -import { EthereumMstableMetaVaultTokenFetcher } from './ethereum/mstable.meta-vault.token-fetcher'; import { EthereumMstableMtaV1FarmContractPositionFetcher } from './ethereum/mstable.mta-v1-farm.contract-position-fetcher'; import { EthereumMstableMtaV2FarmContractPositionFetcher } from './ethereum/mstable.mta-v2-farm.contract-position-fetcher'; import { EthereumMstableSavingsVaultContractPositionFetcher } from './ethereum/mstable.savings-vault.contract-position-fetcher'; -import { PolygonMstableImusdTokenFetcher } from './polygon/mstable.imusd.token-fetcher'; import { PolygonMstableSavingsVaultContractPositionFetcher } from './polygon/mstable.savings-vault-farm.contract-position-fetcher'; @Module({ providers: [ MstableViemContractFactory, EthereumMstableEarnContractPositionFetcher, - EthereumMstableImusdTokenFetcher, EthereumMstableMtaV1FarmContractPositionFetcher, EthereumMstableMtaV2FarmContractPositionFetcher, - EthereumMstableMetaVaultTokenFetcher, EthereumMstableSavingsVaultContractPositionFetcher, - PolygonMstableImusdTokenFetcher, PolygonMstableSavingsVaultContractPositionFetcher, ], }) diff --git a/src/apps/mstable/polygon/mstable.imusd.token-fetcher.ts b/src/apps/mstable/polygon/mstable.imusd.token-fetcher.ts deleted file mode 100644 index df38d850d..000000000 --- a/src/apps/mstable/polygon/mstable.imusd.token-fetcher.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetPricePerShareParams, GetUnderlyingTokensParams } from '~position/template/app-token.template.types'; - -import { MstableViemContractFactory } from '../contracts'; -import { MstableAsset } from '../contracts/viem'; - -@PositionTemplate() -export class PolygonMstableImusdTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'imUSD'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(MstableViemContractFactory) protected readonly contractFactory: MstableViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.mstableAsset({ address, network: this.network }); - } - - async getAddresses() { - return ['0x5290ad3d83476ca6a2b178cd9727ee1ef72432af']; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.asset(), network: this.network }]; - } - - async getPricePerShare({ appToken, contract }: GetPricePerShareParams) { - return [await contract.read.exchangeRate().then(v => Number(v) / 10 ** appToken.tokens[0].decimals)]; - } -} diff --git a/src/apps/mycelium/arbitrum/mycelium.es-myc.token-fetcher.ts b/src/apps/mycelium/arbitrum/mycelium.es-myc.token-fetcher.ts deleted file mode 100644 index 2bf51e2aa..000000000 --- a/src/apps/mycelium/arbitrum/mycelium.es-myc.token-fetcher.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { Erc20 } from '~contract/contracts/viem'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; - -import { MyceliumViemContractFactory } from '../contracts'; - -@PositionTemplate() -export class ArbitrumMyceliumEsMycTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'esMYC'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(MyceliumViemContractFactory) protected readonly contractFactory: MyceliumViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.appToolkit.globalViemContracts.erc20({ network: this.network, address }); - } - - async getAddresses() { - return ['0x7cec785fba5ee648b48fbffc378d74c8671bb3cb']; - } - - async getUnderlyingTokenDefinitions() { - return [{ address: '0xc74fe4c715510ec2f8c61d70d397b32043f55abe', network: this.network }]; - } - - async getPricePerShare() { - return [1]; - } -} diff --git a/src/apps/mycelium/mycelium.module.ts b/src/apps/mycelium/mycelium.module.ts index 9a434d34c..a98b89bbe 100644 --- a/src/apps/mycelium/mycelium.module.ts +++ b/src/apps/mycelium/mycelium.module.ts @@ -2,7 +2,6 @@ import { Module } from '@nestjs/common'; import { AbstractApp } from '~app/app.dynamic-module'; -import { ArbitrumMyceliumEsMycTokenFetcher } from './arbitrum/mycelium.es-myc.token-fetcher'; import { ArbitrumMyceliumMlpTokenFetcher } from './arbitrum/mycelium.mlp.token-fetcher'; import { ArbitrumMycellilumPerpContractPositionFetcher } from './arbitrum/mycelium.perp.contract-position-fetcher'; import { MyceliumViemContractFactory } from './contracts'; @@ -11,7 +10,6 @@ import { MyceliumViemContractFactory } from './contracts'; providers: [ MyceliumViemContractFactory, // Arbitrum - ArbitrumMyceliumEsMycTokenFetcher, ArbitrumMyceliumMlpTokenFetcher, ArbitrumMycellilumPerpContractPositionFetcher, ], diff --git a/src/apps/origin-story/contracts/abis/origin-story-woeth.json b/src/apps/origin-story/contracts/abis/origin-story-woeth.json deleted file mode 100644 index 592e927dd..000000000 --- a/src/apps/origin-story/contracts/abis/origin-story-woeth.json +++ /dev/null @@ -1,327 +0,0 @@ -[ - { - "inputs": [ - { "internalType": "contract ERC20", "name": "underlying_", "type": "address" }, - { "internalType": "string", "name": "name_", "type": "string" }, - { "internalType": "string", "name": "symbol_", "type": "string" } - ], - "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": true, "internalType": "address", "name": "previousGovernor", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "newGovernor", "type": "address" } - ], - "name": "GovernorshipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "previousGovernor", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "newGovernor", "type": "address" } - ], - "name": "PendingGovernorshipTransfer", - "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" - }, - { - "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": "claimGovernance", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], - "name": "convertToAssets", - "outputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], - "name": "convertToShares", - "outputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } - ], - "name": "decreaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "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": "governor", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "addedValue", "type": "uint256" } - ], - "name": "increaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { "inputs": [], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "isGovernor", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "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": "", "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": [{ "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": "", "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": "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": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "sender", "type": "address" }, - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_newGovernor", "type": "address" }], - "name": "transferGovernance", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "asset_", "type": "address" }, - { "internalType": "uint256", "name": "amount_", "type": "uint256" } - ], - "name": "transferToken", - "outputs": [], - "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" - } -] diff --git a/src/apps/origin-story/contracts/viem.contract-factory.ts b/src/apps/origin-story/contracts/viem.contract-factory.ts index bc32f43b0..772931b00 100644 --- a/src/apps/origin-story/contracts/viem.contract-factory.ts +++ b/src/apps/origin-story/contracts/viem.contract-factory.ts @@ -3,7 +3,7 @@ import { Injectable, Inject } from '@nestjs/common'; import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; import { Network } from '~types/network.interface'; -import { OriginStoryWoeth__factory, Series__factory } from './viem'; +import { Series__factory } from './viem'; type ContractOpts = { address: string; network: Network }; @@ -11,9 +11,6 @@ type ContractOpts = { address: string; network: Network }; export class OriginStoryViemContractFactory { constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) {} - originStoryWoeth({ address, network }: ContractOpts) { - return OriginStoryWoeth__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } series({ address, network }: ContractOpts) { return Series__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } diff --git a/src/apps/origin-story/contracts/viem/OriginStoryWoeth.ts b/src/apps/origin-story/contracts/viem/OriginStoryWoeth.ts deleted file mode 100644 index 3f29e4af9..000000000 --- a/src/apps/origin-story/contracts/viem/OriginStoryWoeth.ts +++ /dev/null @@ -1,806 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const originStoryWoethAbi = [ - { - inputs: [ - { - internalType: 'contract ERC20', - name: 'underlying_', - type: 'address', - }, - { - internalType: 'string', - name: 'name_', - type: 'string', - }, - { - internalType: 'string', - name: 'symbol_', - type: 'string', - }, - ], - 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: true, - internalType: 'address', - name: 'previousGovernor', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newGovernor', - type: 'address', - }, - ], - name: 'GovernorshipTransferred', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'previousGovernor', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newGovernor', - type: 'address', - }, - ], - name: 'PendingGovernorshipTransfer', - 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', - }, - { - 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: 'claimGovernance', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'convertToAssets', - outputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - name: 'convertToShares', - outputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - 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: 'governor', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'initialize', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'isGovernor', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - 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: '', - 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: [ - { - 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: '', - 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: '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: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_newGovernor', - type: 'address', - }, - ], - name: 'transferGovernance', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'asset_', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount_', - type: 'uint256', - }, - ], - name: 'transferToken', - outputs: [], - 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', - }, -] as const; - -export type OriginStoryWoeth = typeof originStoryWoethAbi; -export type OriginStoryWoethContract = GetContractReturnType; - -export class OriginStoryWoeth__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: originStoryWoethAbi, publicClient: client }); - } -} diff --git a/src/apps/origin-story/contracts/viem/index.ts b/src/apps/origin-story/contracts/viem/index.ts index fd0261cc9..5bc0644e0 100644 --- a/src/apps/origin-story/contracts/viem/index.ts +++ b/src/apps/origin-story/contracts/viem/index.ts @@ -2,8 +2,6 @@ /* tslint:disable */ /* eslint-disable */ -export type { OriginStoryWoeth } from './OriginStoryWoeth'; export type { Series } from './Series'; -export { OriginStoryWoeth__factory } from './OriginStoryWoeth'; export { Series__factory } from './Series'; diff --git a/src/apps/origin-story/ethereum/origin-story.woeth.token-fetcher.ts b/src/apps/origin-story/ethereum/origin-story.woeth.token-fetcher.ts deleted file mode 100644 index b00436f3c..000000000 --- a/src/apps/origin-story/ethereum/origin-story.woeth.token-fetcher.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Inject } from '@nestjs/common'; -import { BigNumber } from 'ethers'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetPricePerShareParams, GetUnderlyingTokensParams } from '~position/template/app-token.template.types'; - -import { OriginStoryViemContractFactory } from '../contracts'; -import { OriginStoryWoeth } from '../contracts/viem'; - -@PositionTemplate() -export class EthereumOriginStoryWoethTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'wOETH'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(OriginStoryViemContractFactory) protected readonly contractFactory: OriginStoryViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.originStoryWoeth({ network: this.network, address }); - } - - async getAddresses() { - return ['0xdcee70654261af21c44c093c300ed3bb97b78192']; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.asset(), network: this.network }]; - } - - async getPricePerShare({ contract }: GetPricePerShareParams) { - const oneUnit = BigNumber.from(10).pow(18).toString(); - const pricePerShareRaw = await contract.read.convertToAssets([BigInt(oneUnit)]); - const pricePerShare = Number(pricePerShareRaw) / 10 ** 18; - return [pricePerShare]; - } -} diff --git a/src/apps/origin-story/origin-story.module.ts b/src/apps/origin-story/origin-story.module.ts index 55f49d8df..dcf9db4fe 100644 --- a/src/apps/origin-story/origin-story.module.ts +++ b/src/apps/origin-story/origin-story.module.ts @@ -4,13 +4,8 @@ import { AbstractApp } from '~app/app.dynamic-module'; import { OriginStoryViemContractFactory } from './contracts'; import { EthereumOriginStorySeriesContractPositionFetcher } from './ethereum/origin-story.series.contract-position-fetcher'; -import { EthereumOriginStoryWoethTokenFetcher } from './ethereum/origin-story.woeth.token-fetcher'; @Module({ - providers: [ - OriginStoryViemContractFactory, - EthereumOriginStorySeriesContractPositionFetcher, - EthereumOriginStoryWoethTokenFetcher, - ], + providers: [OriginStoryViemContractFactory, EthereumOriginStorySeriesContractPositionFetcher], }) export class OriginStoryAppModule extends AbstractApp() {} diff --git a/src/apps/p-stake/assets/logo.png b/src/apps/p-stake/assets/logo.png deleted file mode 100644 index 9ce17a9c0..000000000 Binary files a/src/apps/p-stake/assets/logo.png and /dev/null differ diff --git a/src/apps/p-stake/binance-smart-chain/p-stake.stake.token-fetcher.ts b/src/apps/p-stake/binance-smart-chain/p-stake.stake.token-fetcher.ts deleted file mode 100644 index 089be30c4..000000000 --- a/src/apps/p-stake/binance-smart-chain/p-stake.stake.token-fetcher.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { ZERO_ADDRESS } from '~app-toolkit/constants/address'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetPricePerShareParams } from '~position/template/app-token.template.types'; - -import { PStakeViemContractFactory } from '../contracts'; -import { PStakeStkToken } from '../contracts/viem/PStakeStkToken'; - -@PositionTemplate() -export class BinanceSmartChainPStakeStakeTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Stake'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(PStakeViemContractFactory) protected readonly contractFactory: PStakeViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.pStakeStkToken({ address, network: this.network }); - } - - async getAddresses() { - return ['0xc2e9d07f66a89c44062459a47a0d2dc038e4fb16']; - } - - async getUnderlyingTokenDefinitions() { - return [{ address: ZERO_ADDRESS, network: this.network }]; - } - - async getPricePerShare({ multicall }: GetPricePerShareParams) { - const stakePoolAddress = '0xc228cefdf841defdbd5b3a18dfd414cc0dbfa0d8'; - const stakePool = this.contractFactory.pStakePool({ address: stakePoolAddress, network: this.network }); - const exchangeRateRaw = await multicall.wrap(stakePool).read.exchangeRate(); - const exchangeRate = Number(exchangeRateRaw[0]) / Number(exchangeRateRaw[1]); - return [exchangeRate]; - } -} diff --git a/src/apps/p-stake/contracts/abis/p-stake-pool.json b/src/apps/p-stake/contracts/abis/p-stake-pool.json deleted file mode 100644 index 930681225..000000000 --- a/src/apps/p-stake/contracts/abis/p-stake-pool.json +++ /dev/null @@ -1,475 +0,0 @@ -[ - { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, - { "inputs": [], "name": "BNBTransferToUserFailed", "type": "error" }, - { "inputs": [], "name": "CantBeMoreThan1e18", "type": "error" }, - { "inputs": [], "name": "CantClaimBeforeDeadline", "type": "error" }, - { "inputs": [], "name": "CantSetMoreThan30PercentFee", "type": "error" }, - { "inputs": [], "name": "CooldownPeriodCantBeMoreThan30Days", "type": "error" }, - { - "inputs": [{ "internalType": "uint256", "name": "dust", "type": "uint256" }], - "name": "DustNotAllowed", - "type": "error" - }, - { - "inputs": [{ "internalType": "uint256", "name": "index", "type": "uint256" }], - "name": "IndexOutOfBounds", - "type": "error" - }, - { "inputs": [], "name": "InsufficientClaimReserve", "type": "error" }, - { "inputs": [], "name": "InsufficientFundsToSatisfyClaim", "type": "error" }, - { - "inputs": [ - { "internalType": "string", "name": "tag", "type": "string" }, - { "internalType": "uint256", "name": "expected", "type": "uint256" }, - { "internalType": "uint256", "name": "got", "type": "uint256" } - ], - "name": "LessThanMinimum", - "type": "error" - }, - { "inputs": [], "name": "MustBeGreaterThanZero", "type": "error" }, - { "inputs": [], "name": "NumeratorMoreThanBasis", "type": "error" }, - { "inputs": [], "name": "PausableNotPaused", "type": "error" }, - { "inputs": [], "name": "PausablePaused", "type": "error" }, - { "inputs": [], "name": "ReentrancyGuardReentrantCall", "type": "error" }, - { - "inputs": [ - { "internalType": "uint256", "name": "from", "type": "uint256" }, - { "internalType": "uint256", "name": "to", "type": "uint256" } - ], - "name": "ToIndexMustBeGreaterThanFromIndex", - "type": "error" - }, - { "inputs": [], "name": "TokenMintingToSelfNotAllowed", "type": "error" }, - { "inputs": [], "name": "TokenTransferToSelfNotAllowed", "type": "error" }, - { "inputs": [], "name": "TransferOutFailed", "type": "error" }, - { - "inputs": [{ "internalType": "address", "name": "to", "type": "address" }], - "name": "UnexpectedlyReceivedTokensForSomeoneElse", - "type": "error" - }, - { "inputs": [], "name": "UnknownSender", "type": "error" }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, - { - "components": [ - { "internalType": "uint256", "name": "weiToReturn", "type": "uint256" }, - { "internalType": "uint256", "name": "createdAt", "type": "uint256" } - ], - "indexed": false, - "internalType": "struct StakePool.ClaimRequest", - "name": "req", - "type": "tuple" - }, - { "indexed": false, "internalType": "uint256", "name": "timestamp", "type": "uint256" } - ], - "name": "Claim", - "type": "event" - }, - { "anonymous": false, "inputs": [], "name": "ConfigUpdated", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "bnbAmount", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "poolTokenAmount", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "timestamp", "type": "uint256" } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "uint256", "name": "bnbRewards", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "feeTokens", "type": "uint256" } - ], - "name": "EpochUpdate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint8", "name": "version", "type": "uint8" }], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256", "name": "shortCircuitAmount", "type": "uint256" }], - "name": "InitiateDelegation_ShortCircuit", - "type": "event" - }, - { "anonymous": false, "inputs": [], "name": "InitiateDelegation_Success", "type": "event" }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256", "name": "transferOutAmount", "type": "uint256" }], - "name": "InitiateDelegation_TransferOut", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "address", "name": "account", "type": "address" }], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "indexed": true, "internalType": "bytes32", "name": "previousAdminRole", "type": "bytes32" }, - { "indexed": true, "internalType": "bytes32", "name": "newAdminRole", "type": "bytes32" } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256", "name": "unbondedAmount", "type": "uint256" }], - "name": "UnbondingFinished", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256", "name": "bnbUnbonding", "type": "uint256" }], - "name": "UnbondingInitiated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "address", "name": "account", "type": "address" }], - "name": "Unpaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "poolTokenAmount", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "bnbAmount", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "timestamp", "type": "uint256" } - ], - "name": "Withdraw", - "type": "event" - }, - { - "inputs": [], - "name": "BOT_ROLE", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "addressStore", - "outputs": [{ "internalType": "contract IAddressStore", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "bnbToUnbond", - "outputs": [{ "internalType": "int256", "name": "", "type": "int256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "bnbUnbonding", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "index", "type": "uint256" }], - "name": "claim", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { "inputs": [], "name": "claimAll", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "uint256", "name": "", "type": "uint256" } - ], - "name": "claimReqs", - "outputs": [ - { "internalType": "uint256", "name": "weiToReturn", "type": "uint256" }, - { "internalType": "uint256", "name": "createdAt", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "claimReserve", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "config", - "outputs": [ - { "internalType": "address", "name": "bcStakingWallet", "type": "address" }, - { "internalType": "uint256", "name": "minCrossChainTransfer", "type": "uint256" }, - { "internalType": "uint256", "name": "transferOutTimeout", "type": "uint256" }, - { "internalType": "uint256", "name": "minBNBDeposit", "type": "uint256" }, - { "internalType": "uint256", "name": "minTokenWithdrawal", "type": "uint256" }, - { "internalType": "uint256", "name": "cooldownPeriod", "type": "uint256" }, - { - "components": [ - { "internalType": "uint256", "name": "reward", "type": "uint256" }, - { "internalType": "uint256", "name": "deposit", "type": "uint256" }, - { "internalType": "uint256", "name": "withdraw", "type": "uint256" } - ], - "internalType": "struct FeeDistribution.Data", - "name": "fee", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { "inputs": [], "name": "deposit", "outputs": [], "stateMutability": "payable", "type": "function" }, - { - "inputs": [{ "internalType": "uint256", "name": "bnbRewards", "type": "uint256" }], - "name": "epochUpdate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "exchangeRate", - "outputs": [ - { "internalType": "uint256", "name": "totalWei", "type": "uint256" }, - { "internalType": "uint256", "name": "poolTokenSupply", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "user", "type": "address" }], - "name": "getClaimRequestCount", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "user", "type": "address" }, - { "internalType": "uint256", "name": "from", "type": "uint256" }, - { "internalType": "uint256", "name": "to", "type": "uint256" } - ], - "name": "getPaginatedClaimRequests", - "outputs": [ - { - "components": [ - { "internalType": "uint256", "name": "weiToReturn", "type": "uint256" }, - { "internalType": "uint256", "name": "createdAt", "type": "uint256" } - ], - "internalType": "struct StakePool.ClaimRequest[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }], - "name": "getRoleAdmin", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "uint256", "name": "index", "type": "uint256" } - ], - "name": "getRoleMember", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }], - "name": "getRoleMemberCount", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "hasRole", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "contract IAddressStore", "name": "addressStore_", "type": "address" }, - { - "components": [ - { "internalType": "address", "name": "bcStakingWallet", "type": "address" }, - { "internalType": "uint256", "name": "minCrossChainTransfer", "type": "uint256" }, - { "internalType": "uint256", "name": "transferOutTimeout", "type": "uint256" }, - { "internalType": "uint256", "name": "minBNBDeposit", "type": "uint256" }, - { "internalType": "uint256", "name": "minTokenWithdrawal", "type": "uint256" }, - { "internalType": "uint256", "name": "cooldownPeriod", "type": "uint256" }, - { - "components": [ - { "internalType": "uint256", "name": "reward", "type": "uint256" }, - { "internalType": "uint256", "name": "deposit", "type": "uint256" }, - { "internalType": "uint256", "name": "withdraw", "type": "uint256" } - ], - "internalType": "struct FeeDistribution.Data", - "name": "fee", - "type": "tuple" - } - ], - "internalType": "struct Config.Data", - "name": "config_", - "type": "tuple" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { "inputs": [], "name": "initiateDelegation", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { "inputs": [], "name": "pause", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "paused", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" }], - "name": "supportsInterface", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "address", "name": "from", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { "internalType": "bytes", "name": "", "type": "bytes" }, - { "internalType": "bytes", "name": "", "type": "bytes" } - ], - "name": "tokensReceived", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { "inputs": [], "name": "unbondingFinished", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [{ "internalType": "uint256", "name": "bnbUnbonding_", "type": "uint256" }], - "name": "unbondingInitiated", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { "inputs": [], "name": "unpause", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { - "components": [ - { "internalType": "address", "name": "bcStakingWallet", "type": "address" }, - { "internalType": "uint256", "name": "minCrossChainTransfer", "type": "uint256" }, - { "internalType": "uint256", "name": "transferOutTimeout", "type": "uint256" }, - { "internalType": "uint256", "name": "minBNBDeposit", "type": "uint256" }, - { "internalType": "uint256", "name": "minTokenWithdrawal", "type": "uint256" }, - { "internalType": "uint256", "name": "cooldownPeriod", "type": "uint256" }, - { - "components": [ - { "internalType": "uint256", "name": "reward", "type": "uint256" }, - { "internalType": "uint256", "name": "deposit", "type": "uint256" }, - { "internalType": "uint256", "name": "withdraw", "type": "uint256" } - ], - "internalType": "struct FeeDistribution.Data", - "name": "fee", - "type": "tuple" - } - ], - "internalType": "struct Config.Data", - "name": "config_", - "type": "tuple" - } - ], - "name": "updateConfig", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { "stateMutability": "payable", "type": "receive" } -] diff --git a/src/apps/p-stake/contracts/abis/p-stake-stk-token.json b/src/apps/p-stake/contracts/abis/p-stake-stk-token.json deleted file mode 100644 index 8d47c0710..000000000 --- a/src/apps/p-stake/contracts/abis/p-stake-stk-token.json +++ /dev/null @@ -1,729 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "contract IAddressStore", - "name": "addressStore_", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "CallerIsNotTheOwner", - "type": "error" - }, - { - "inputs": [], - "name": "NewOwnerIsTheZeroAddress", - "type": "error" - }, - { - "inputs": [], - "name": "UnauthorizedSender", - "type": "error" - }, - { - "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": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "tokenHolder", - "type": "address" - } - ], - "name": "AuthorizedOperator", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "Burned", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "Minted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "tokenHolder", - "type": "address" - } - ], - "name": "RevokedOperator", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "Sent", - "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": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "addressStore", - "outputs": [ - { - "internalType": "contract IAddressStore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "holder", - "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": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "authorizeOperator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenHolder", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "defaultOperators", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getOwner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "granularity", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenHolder", - "type": "address" - } - ], - "name": "isOperatorFor", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "userData", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "operatorBurn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "operatorData", - "type": "bytes" - } - ], - "name": "operatorSend", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "revokeOperator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "selfDestruct", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "send", - "outputs": [], - "stateMutability": "nonpayable", - "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": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "holder", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/p-stake/contracts/index.ts b/src/apps/p-stake/contracts/index.ts deleted file mode 100644 index 5dcfebdf6..000000000 --- a/src/apps/p-stake/contracts/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * from './viem.contract-factory'; diff --git a/src/apps/p-stake/contracts/viem.contract-factory.ts b/src/apps/p-stake/contracts/viem.contract-factory.ts deleted file mode 100644 index c5eebef87..000000000 --- a/src/apps/p-stake/contracts/viem.contract-factory.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Injectable, Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { Network } from '~types/network.interface'; - -import { PStakePool__factory, PStakeStkToken__factory } from './viem'; - -type ContractOpts = { address: string; network: Network }; - -@Injectable() -export class PStakeViemContractFactory { - constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) {} - - pStakePool({ address, network }: ContractOpts) { - return PStakePool__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } - pStakeStkToken({ address, network }: ContractOpts) { - return PStakeStkToken__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } -} diff --git a/src/apps/p-stake/contracts/viem/PStakePool.ts b/src/apps/p-stake/contracts/viem/PStakePool.ts deleted file mode 100644 index 02821e0e8..000000000 --- a/src/apps/p-stake/contracts/viem/PStakePool.ts +++ /dev/null @@ -1,1146 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const pStakePoolAbi = [ - { - inputs: [], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - inputs: [], - name: 'BNBTransferToUserFailed', - type: 'error', - }, - { - inputs: [], - name: 'CantBeMoreThan1e18', - type: 'error', - }, - { - inputs: [], - name: 'CantClaimBeforeDeadline', - type: 'error', - }, - { - inputs: [], - name: 'CantSetMoreThan30PercentFee', - type: 'error', - }, - { - inputs: [], - name: 'CooldownPeriodCantBeMoreThan30Days', - type: 'error', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'dust', - type: 'uint256', - }, - ], - name: 'DustNotAllowed', - type: 'error', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'index', - type: 'uint256', - }, - ], - name: 'IndexOutOfBounds', - type: 'error', - }, - { - inputs: [], - name: 'InsufficientClaimReserve', - type: 'error', - }, - { - inputs: [], - name: 'InsufficientFundsToSatisfyClaim', - type: 'error', - }, - { - inputs: [ - { - internalType: 'string', - name: 'tag', - type: 'string', - }, - { - internalType: 'uint256', - name: 'expected', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'got', - type: 'uint256', - }, - ], - name: 'LessThanMinimum', - type: 'error', - }, - { - inputs: [], - name: 'MustBeGreaterThanZero', - type: 'error', - }, - { - inputs: [], - name: 'NumeratorMoreThanBasis', - type: 'error', - }, - { - inputs: [], - name: 'PausableNotPaused', - type: 'error', - }, - { - inputs: [], - name: 'PausablePaused', - type: 'error', - }, - { - inputs: [], - name: 'ReentrancyGuardReentrantCall', - type: 'error', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'from', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'to', - type: 'uint256', - }, - ], - name: 'ToIndexMustBeGreaterThanFromIndex', - type: 'error', - }, - { - inputs: [], - name: 'TokenMintingToSelfNotAllowed', - type: 'error', - }, - { - inputs: [], - name: 'TokenTransferToSelfNotAllowed', - type: 'error', - }, - { - inputs: [], - name: 'TransferOutFailed', - type: 'error', - }, - { - inputs: [ - { - internalType: 'address', - name: 'to', - type: 'address', - }, - ], - name: 'UnexpectedlyReceivedTokensForSomeoneElse', - type: 'error', - }, - { - inputs: [], - name: 'UnknownSender', - type: 'error', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'user', - type: 'address', - }, - { - components: [ - { - internalType: 'uint256', - name: 'weiToReturn', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'createdAt', - type: 'uint256', - }, - ], - indexed: false, - internalType: 'struct StakePool.ClaimRequest', - name: 'req', - type: 'tuple', - }, - { - indexed: false, - internalType: 'uint256', - name: 'timestamp', - type: 'uint256', - }, - ], - name: 'Claim', - type: 'event', - }, - { - anonymous: false, - inputs: [], - name: 'ConfigUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'user', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'bnbAmount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'poolTokenAmount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'timestamp', - type: 'uint256', - }, - ], - name: 'Deposit', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'bnbRewards', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'feeTokens', - type: 'uint256', - }, - ], - name: 'EpochUpdate', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint8', - name: 'version', - type: 'uint8', - }, - ], - name: 'Initialized', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'shortCircuitAmount', - type: 'uint256', - }, - ], - name: 'InitiateDelegation_ShortCircuit', - type: 'event', - }, - { - anonymous: false, - inputs: [], - name: 'InitiateDelegation_Success', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'transferOutAmount', - type: 'uint256', - }, - ], - name: 'InitiateDelegation_TransferOut', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'Paused', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'bytes32', - name: 'previousAdminRole', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'bytes32', - name: 'newAdminRole', - type: 'bytes32', - }, - ], - name: 'RoleAdminChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'address', - name: 'account', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'sender', - type: 'address', - }, - ], - name: 'RoleGranted', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'address', - name: 'account', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'sender', - type: 'address', - }, - ], - name: 'RoleRevoked', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'unbondedAmount', - type: 'uint256', - }, - ], - name: 'UnbondingFinished', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'bnbUnbonding', - type: 'uint256', - }, - ], - name: 'UnbondingInitiated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'Unpaused', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'user', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'poolTokenAmount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'bnbAmount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'timestamp', - type: 'uint256', - }, - ], - name: 'Withdraw', - type: 'event', - }, - { - inputs: [], - name: 'BOT_ROLE', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'DEFAULT_ADMIN_ROLE', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'addressStore', - outputs: [ - { - internalType: 'contract IAddressStore', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'bnbToUnbond', - outputs: [ - { - internalType: 'int256', - name: '', - type: 'int256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'bnbUnbonding', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'index', - type: 'uint256', - }, - ], - name: 'claim', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'claimAll', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - name: 'claimReqs', - outputs: [ - { - internalType: 'uint256', - name: 'weiToReturn', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'createdAt', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'claimReserve', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'config', - outputs: [ - { - internalType: 'address', - name: 'bcStakingWallet', - type: 'address', - }, - { - internalType: 'uint256', - name: 'minCrossChainTransfer', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'transferOutTimeout', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'minBNBDeposit', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'minTokenWithdrawal', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'cooldownPeriod', - type: 'uint256', - }, - { - components: [ - { - internalType: 'uint256', - name: 'reward', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'deposit', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'withdraw', - type: 'uint256', - }, - ], - internalType: 'struct FeeDistribution.Data', - name: 'fee', - type: 'tuple', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'deposit', - outputs: [], - stateMutability: 'payable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'bnbRewards', - type: 'uint256', - }, - ], - name: 'epochUpdate', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'exchangeRate', - outputs: [ - { - internalType: 'uint256', - name: 'totalWei', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'poolTokenSupply', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'user', - type: 'address', - }, - ], - name: 'getClaimRequestCount', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'user', - type: 'address', - }, - { - internalType: 'uint256', - name: 'from', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'to', - type: 'uint256', - }, - ], - name: 'getPaginatedClaimRequests', - outputs: [ - { - components: [ - { - internalType: 'uint256', - name: 'weiToReturn', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'createdAt', - type: 'uint256', - }, - ], - internalType: 'struct StakePool.ClaimRequest[]', - name: '', - type: 'tuple[]', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - ], - name: 'getRoleAdmin', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - internalType: 'uint256', - name: 'index', - type: 'uint256', - }, - ], - name: 'getRoleMember', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - ], - name: 'getRoleMemberCount', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'grantRole', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'hasRole', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'contract IAddressStore', - name: 'addressStore_', - type: 'address', - }, - { - components: [ - { - internalType: 'address', - name: 'bcStakingWallet', - type: 'address', - }, - { - internalType: 'uint256', - name: 'minCrossChainTransfer', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'transferOutTimeout', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'minBNBDeposit', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'minTokenWithdrawal', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'cooldownPeriod', - type: 'uint256', - }, - { - components: [ - { - internalType: 'uint256', - name: 'reward', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'deposit', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'withdraw', - type: 'uint256', - }, - ], - internalType: 'struct FeeDistribution.Data', - name: 'fee', - type: 'tuple', - }, - ], - internalType: 'struct Config.Data', - name: 'config_', - type: 'tuple', - }, - ], - name: 'initialize', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'initiateDelegation', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'pause', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'paused', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'renounceRole', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'revokeRole', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes4', - name: 'interfaceId', - type: 'bytes4', - }, - ], - name: 'supportsInterface', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'address', - name: 'from', - type: 'address', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'bytes', - name: '', - type: 'bytes', - }, - { - internalType: 'bytes', - name: '', - type: 'bytes', - }, - ], - name: 'tokensReceived', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'unbondingFinished', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'bnbUnbonding_', - type: 'uint256', - }, - ], - name: 'unbondingInitiated', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'unpause', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - components: [ - { - internalType: 'address', - name: 'bcStakingWallet', - type: 'address', - }, - { - internalType: 'uint256', - name: 'minCrossChainTransfer', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'transferOutTimeout', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'minBNBDeposit', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'minTokenWithdrawal', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'cooldownPeriod', - type: 'uint256', - }, - { - components: [ - { - internalType: 'uint256', - name: 'reward', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'deposit', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'withdraw', - type: 'uint256', - }, - ], - internalType: 'struct FeeDistribution.Data', - name: 'fee', - type: 'tuple', - }, - ], - internalType: 'struct Config.Data', - name: 'config_', - type: 'tuple', - }, - ], - name: 'updateConfig', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - stateMutability: 'payable', - type: 'receive', - }, -] as const; - -export type PStakePool = typeof pStakePoolAbi; -export type PStakePoolContract = GetContractReturnType; - -export class PStakePool__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: pStakePoolAbi, publicClient: client }); - } -} diff --git a/src/apps/p-stake/contracts/viem/PStakeStkToken.ts b/src/apps/p-stake/contracts/viem/PStakeStkToken.ts deleted file mode 100644 index 4542d5ee8..000000000 --- a/src/apps/p-stake/contracts/viem/PStakeStkToken.ts +++ /dev/null @@ -1,743 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const pStakeStkTokenAbi = [ - { - inputs: [ - { - internalType: 'contract IAddressStore', - name: 'addressStore_', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - inputs: [], - name: 'CallerIsNotTheOwner', - type: 'error', - }, - { - inputs: [], - name: 'NewOwnerIsTheZeroAddress', - type: 'error', - }, - { - inputs: [], - name: 'UnauthorizedSender', - type: 'error', - }, - { - 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: 'operator', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'tokenHolder', - type: 'address', - }, - ], - name: 'AuthorizedOperator', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'operator', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - { - indexed: false, - internalType: 'bytes', - name: 'operatorData', - type: 'bytes', - }, - ], - name: 'Burned', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'operator', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - { - indexed: false, - internalType: 'bytes', - name: 'operatorData', - type: 'bytes', - }, - ], - name: 'Minted', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'previousOwner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnershipTransferred', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'Paused', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'operator', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'tokenHolder', - type: 'address', - }, - ], - name: 'RevokedOperator', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'operator', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - { - indexed: false, - internalType: 'bytes', - name: 'operatorData', - type: 'bytes', - }, - ], - name: 'Sent', - 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: false, - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'Unpaused', - type: 'event', - }, - { - inputs: [], - name: 'addressStore', - outputs: [ - { - internalType: 'contract IAddressStore', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'holder', - 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: 'value', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'operator', - type: 'address', - }, - ], - name: 'authorizeOperator', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'tokenHolder', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - ], - name: 'burn', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'pure', - type: 'function', - }, - { - inputs: [], - name: 'defaultOperators', - outputs: [ - { - internalType: 'address[]', - name: '', - type: 'address[]', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getOwner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'granularity', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'operator', - type: 'address', - }, - { - internalType: 'address', - name: 'tokenHolder', - type: 'address', - }, - ], - name: 'isOperatorFor', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'bytes', - name: 'userData', - type: 'bytes', - }, - { - internalType: 'bytes', - name: 'operatorData', - type: 'bytes', - }, - ], - name: 'mint', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - { - internalType: 'bytes', - name: 'operatorData', - type: 'bytes', - }, - ], - name: 'operatorBurn', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - { - internalType: 'bytes', - name: 'operatorData', - type: 'bytes', - }, - ], - name: 'operatorSend', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'pause', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'paused', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'operator', - type: 'address', - }, - ], - name: 'revokeOperator', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'selfDestruct', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - ], - name: 'send', - outputs: [], - stateMutability: 'nonpayable', - 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: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'holder', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'transferOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'unpause', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type PStakeStkToken = typeof pStakeStkTokenAbi; -export type PStakeStkTokenContract = GetContractReturnType; - -export class PStakeStkToken__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: pStakeStkTokenAbi, publicClient: client }); - } -} diff --git a/src/apps/p-stake/contracts/viem/index.ts b/src/apps/p-stake/contracts/viem/index.ts deleted file mode 100644 index 41d522268..000000000 --- a/src/apps/p-stake/contracts/viem/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -export type { PStakePool } from './PStakePool'; -export type { PStakeStkToken } from './PStakeStkToken'; - -export { PStakePool__factory } from './PStakePool'; -export { PStakeStkToken__factory } from './PStakeStkToken'; diff --git a/src/apps/p-stake/p-stake.module.ts b/src/apps/p-stake/p-stake.module.ts deleted file mode 100644 index 7b7b713cd..000000000 --- a/src/apps/p-stake/p-stake.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Module } from '@nestjs/common'; - -import { AbstractApp } from '~app/app.dynamic-module'; - -import { BinanceSmartChainPStakeStakeTokenFetcher } from './binance-smart-chain/p-stake.stake.token-fetcher'; -import { PStakeViemContractFactory } from './contracts'; - -@Module({ - providers: [BinanceSmartChainPStakeStakeTokenFetcher, PStakeViemContractFactory], -}) -export class PStakeAppModule extends AbstractApp() {} diff --git a/src/apps/penguin/avalanche/penguin.vault.token-fetcher.ts b/src/apps/penguin/avalanche/penguin.vault.token-fetcher.ts deleted file mode 100644 index 96de590ae..000000000 --- a/src/apps/penguin/avalanche/penguin.vault.token-fetcher.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetPricePerShareParams, GetUnderlyingTokensParams } from '~position/template/app-token.template.types'; - -import { PenguinViemContractFactory } from '../contracts'; -import { PenguinVault } from '../contracts/viem'; - -@PositionTemplate() -export class AvalanchePenguinVaultTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Compounder Vaults'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(PenguinViemContractFactory) protected readonly contractFactory: PenguinViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.penguinVault({ network: this.network, address }); - } - - async getAddresses() { - return [ - '0xab6eed788beed09d1279b21b6c91f9750242e0f5', - '0xbbd9dd1f15c729745edffd8e46253463d40a7d84', - '0x323c5cc630c0ce1f2823d1a3d48260f770b5669b', - '0xb6cd0569563549033c129769dbc58d1843ed98cb', - '0x9acbca2315a517a3dab8e857f5921a8b3435891a', - '0xdf5fb3fa0161a8508599a6dfc9d6c004cb58652b', - '0x1ad8ff956247f87de904f31b0322843f32f19a5c', - '0xbe42a57f4a08636c26457475e94409516fa39b3b', - '0xfc8deac2f93e5b4739ece2802e5c5e05106fd872', - '0xc90b9a965c800a0318ec4282a86e387beeef0ffe', - '0xb4558486cd8fd2dd5e3b078e7822c1bb66c782d0', - '0x85fc4ec9dee0df5060f321b743838f7068499177', - '0xd6da9d000ffa1ea6d3939fcd80f4d473f2027567', - '0x4ec41d1e25925c57876885c34fe0b323d7cc3846', - '0x7dd48db5372539d01ed4b6cc525403d98bc61bdd', - '0x21d2aaed1d2f5e36ff02b008b091054d065c9824', - ]; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.depositToken(), network: this.network }]; - } - - async getPricePerShare({ contract, appToken }: GetPricePerShareParams) { - const reserveRaw = await contract.read.totalDeposits(); - const reserve = Number(reserveRaw) / 10 ** appToken.tokens[0].decimals; - return [reserve / appToken.supply]; - } -} diff --git a/src/apps/penguin/contracts/abis/penguin-vault.json b/src/apps/penguin/contracts/abis/penguin-vault.json index 437879b69..7da2ee4bb 100644 --- a/src/apps/penguin/contracts/abis/penguin-vault.json +++ b/src/apps/penguin/contracts/abis/penguin-vault.json @@ -3,24 +3,75 @@ "type": "constructor", "stateMutability": "nonpayable", "inputs": [ - { "type": "string", "name": "_name", "internalType": "string" }, - { "type": "address[8]", "name": "_initAddressArray", "internalType": "address[8]" }, - { "type": "uint256", "name": "_pid", "internalType": "uint256" }, - { "type": "uint256", "name": "_minTokensToReinvest", "internalType": "uint256" }, - { "type": "uint256[4]", "name": "_initFeeStructure", "internalType": "uint256[4]" }, - { "type": "address[]", "name": "_pathRewardToToken0", "internalType": "address[]" }, - { "type": "address[]", "name": "_pathRewardToToken1", "internalType": "address[]" }, - { "type": "address", "name": "_pefiGlobalVariables", "internalType": "address" }, - { "type": "bool", "name": "_USE_GLOBAL_PEFI_VARIABLES", "internalType": "bool" } + { + "type": "string", + "name": "_name", + "internalType": "string" + }, + { + "type": "address[8]", + "name": "_initAddressArray", + "internalType": "address[8]" + }, + { + "type": "uint256", + "name": "_pid", + "internalType": "uint256" + }, + { + "type": "uint256", + "name": "_minTokensToReinvest", + "internalType": "uint256" + }, + { + "type": "uint256[4]", + "name": "_initFeeStructure", + "internalType": "uint256[4]" + }, + { + "type": "address[]", + "name": "_pathRewardToToken0", + "internalType": "address[]" + }, + { + "type": "address[]", + "name": "_pathRewardToToken1", + "internalType": "address[]" + }, + { + "type": "address", + "name": "_pefiGlobalVariables", + "internalType": "address" + }, + { + "type": "bool", + "name": "_USE_GLOBAL_PEFI_VARIABLES", + "internalType": "bool" + } ] }, { "type": "event", "name": "Approval", "inputs": [ - { "type": "address", "name": "owner", "internalType": "address", "indexed": true }, - { "type": "address", "name": "spender", "internalType": "address", "indexed": true }, - { "type": "uint256", "name": "value", "internalType": "uint256", "indexed": false } + { + "type": "address", + "name": "owner", + "internalType": "address", + "indexed": true + }, + { + "type": "address", + "name": "spender", + "internalType": "address", + "indexed": true + }, + { + "type": "uint256", + "name": "value", + "internalType": "uint256", + "indexed": false + } ], "anonymous": false }, @@ -28,8 +79,18 @@ "type": "event", "name": "ClaimedxPEFI", "inputs": [ - { "type": "address", "name": "account", "internalType": "address", "indexed": true }, - { "type": "uint256", "name": "amount", "internalType": "uint256", "indexed": false } + { + "type": "address", + "name": "account", + "internalType": "address", + "indexed": true + }, + { + "type": "uint256", + "name": "amount", + "internalType": "uint256", + "indexed": false + } ], "anonymous": false }, @@ -37,25 +98,62 @@ "type": "event", "name": "Deposit", "inputs": [ - { "type": "address", "name": "account", "internalType": "address", "indexed": true }, - { "type": "uint256", "name": "amount", "internalType": "uint256", "indexed": false } + { + "type": "address", + "name": "account", + "internalType": "address", + "indexed": true + }, + { + "type": "uint256", + "name": "amount", + "internalType": "uint256", + "indexed": false + } ], "anonymous": false }, { "type": "event", "name": "DepositsEnabled", - "inputs": [{ "type": "bool", "name": "newValue", "internalType": "bool", "indexed": false }], + "inputs": [ + { + "type": "bool", + "name": "newValue", + "internalType": "bool", + "indexed": false + } + ], "anonymous": false }, { "type": "event", "name": "FeeStructureUpdated", "inputs": [ - { "type": "uint256", "name": "newPOOL_CREATOR_FEE_BIPS", "internalType": "uint256", "indexed": false }, - { "type": "uint256", "name": "newNEST_FEE_BIPS", "internalType": "uint256", "indexed": false }, - { "type": "uint256", "name": "newDEV_FEE_BIPS", "internalType": "uint256", "indexed": false }, - { "type": "uint256", "name": "newALTERNATE_FEE_BIPS", "internalType": "uint256", "indexed": false } + { + "type": "uint256", + "name": "newPOOL_CREATOR_FEE_BIPS", + "internalType": "uint256", + "indexed": false + }, + { + "type": "uint256", + "name": "newNEST_FEE_BIPS", + "internalType": "uint256", + "indexed": false + }, + { + "type": "uint256", + "name": "newDEV_FEE_BIPS", + "internalType": "uint256", + "indexed": false + }, + { + "type": "uint256", + "name": "newALTERNATE_FEE_BIPS", + "internalType": "uint256", + "indexed": false + } ], "anonymous": false }, @@ -63,8 +161,18 @@ "type": "event", "name": "NestStakingBipsChanged", "inputs": [ - { "type": "uint256", "name": "oldNEST_STAKING_BIPS", "internalType": "uint256", "indexed": false }, - { "type": "uint256", "name": "newNEST_STAKING_BIPS", "internalType": "uint256", "indexed": false } + { + "type": "uint256", + "name": "oldNEST_STAKING_BIPS", + "internalType": "uint256", + "indexed": false + }, + { + "type": "uint256", + "name": "newNEST_STAKING_BIPS", + "internalType": "uint256", + "indexed": false + } ], "anonymous": false }, @@ -72,8 +180,18 @@ "type": "event", "name": "OwnershipTransferred", "inputs": [ - { "type": "address", "name": "previousOwner", "internalType": "address", "indexed": true }, - { "type": "address", "name": "newOwner", "internalType": "address", "indexed": true } + { + "type": "address", + "name": "previousOwner", + "internalType": "address", + "indexed": true + }, + { + "type": "address", + "name": "newOwner", + "internalType": "address", + "indexed": true + } ], "anonymous": false }, @@ -81,8 +199,18 @@ "type": "event", "name": "Recovered", "inputs": [ - { "type": "address", "name": "token", "internalType": "address", "indexed": false }, - { "type": "uint256", "name": "amount", "internalType": "uint256", "indexed": false } + { + "type": "address", + "name": "token", + "internalType": "address", + "indexed": false + }, + { + "type": "uint256", + "name": "amount", + "internalType": "uint256", + "indexed": false + } ], "anonymous": false }, @@ -90,24 +218,56 @@ "type": "event", "name": "Reinvest", "inputs": [ - { "type": "uint256", "name": "newTotalDeposits", "internalType": "uint256", "indexed": false }, - { "type": "uint256", "name": "newTotalSupply", "internalType": "uint256", "indexed": false } + { + "type": "uint256", + "name": "newTotalDeposits", + "internalType": "uint256", + "indexed": false + }, + { + "type": "uint256", + "name": "newTotalSupply", + "internalType": "uint256", + "indexed": false + } ], "anonymous": false }, { "type": "event", "name": "StakedPEFI", - "inputs": [{ "type": "uint256", "name": "amountPefiSentToNest", "internalType": "uint256", "indexed": false }], + "inputs": [ + { + "type": "uint256", + "name": "amountPefiSentToNest", + "internalType": "uint256", + "indexed": false + } + ], "anonymous": false }, { "type": "event", "name": "Transfer", "inputs": [ - { "type": "address", "name": "from", "internalType": "address", "indexed": true }, - { "type": "address", "name": "to", "internalType": "address", "indexed": true }, - { "type": "uint256", "name": "value", "internalType": "uint256", "indexed": false } + { + "type": "address", + "name": "from", + "internalType": "address", + "indexed": true + }, + { + "type": "address", + "name": "to", + "internalType": "address", + "indexed": true + }, + { + "type": "uint256", + "name": "value", + "internalType": "uint256", + "indexed": false + } ], "anonymous": false }, @@ -115,8 +275,18 @@ "type": "event", "name": "UpdateAlternateAddress", "inputs": [ - { "type": "address", "name": "oldValue", "internalType": "address", "indexed": false }, - { "type": "address", "name": "newValue", "internalType": "address", "indexed": false } + { + "type": "address", + "name": "oldValue", + "internalType": "address", + "indexed": false + }, + { + "type": "address", + "name": "newValue", + "internalType": "address", + "indexed": false + } ], "anonymous": false }, @@ -124,8 +294,18 @@ "type": "event", "name": "UpdateDevAddress", "inputs": [ - { "type": "address", "name": "oldValue", "internalType": "address", "indexed": false }, - { "type": "address", "name": "newValue", "internalType": "address", "indexed": false } + { + "type": "address", + "name": "oldValue", + "internalType": "address", + "indexed": false + }, + { + "type": "address", + "name": "newValue", + "internalType": "address", + "indexed": false + } ], "anonymous": false }, @@ -133,8 +313,18 @@ "type": "event", "name": "UpdateMaxTokensToDepositWithoutReinvest", "inputs": [ - { "type": "uint256", "name": "oldValue", "internalType": "uint256", "indexed": false }, - { "type": "uint256", "name": "newValue", "internalType": "uint256", "indexed": false } + { + "type": "uint256", + "name": "oldValue", + "internalType": "uint256", + "indexed": false + }, + { + "type": "uint256", + "name": "newValue", + "internalType": "uint256", + "indexed": false + } ], "anonymous": false }, @@ -142,8 +332,18 @@ "type": "event", "name": "UpdateMinTokensToReinvest", "inputs": [ - { "type": "uint256", "name": "oldValue", "internalType": "uint256", "indexed": false }, - { "type": "uint256", "name": "newValue", "internalType": "uint256", "indexed": false } + { + "type": "uint256", + "name": "oldValue", + "internalType": "uint256", + "indexed": false + }, + { + "type": "uint256", + "name": "newValue", + "internalType": "uint256", + "indexed": false + } ], "anonymous": false }, @@ -151,8 +351,18 @@ "type": "event", "name": "UpdateNestAddress", "inputs": [ - { "type": "address", "name": "oldValue", "internalType": "address", "indexed": false }, - { "type": "address", "name": "newValue", "internalType": "address", "indexed": false } + { + "type": "address", + "name": "oldValue", + "internalType": "address", + "indexed": false + }, + { + "type": "address", + "name": "newValue", + "internalType": "address", + "indexed": false + } ], "anonymous": false }, @@ -160,205 +370,410 @@ "type": "event", "name": "UpdatePoolCreatorAddress", "inputs": [ - { "type": "address", "name": "oldValue", "internalType": "address", "indexed": false }, - { "type": "address", "name": "newValue", "internalType": "address", "indexed": false } + { + "type": "address", + "name": "oldValue", + "internalType": "address", + "indexed": false + }, + { + "type": "address", + "name": "newValue", + "internalType": "address", + "indexed": false + } ], "anonymous": false }, { "type": "event", "name": "UseGlobalVariablesUpdated", - "inputs": [{ "type": "bool", "name": "newValue", "internalType": "bool", "indexed": false }], + "inputs": [ + { + "type": "bool", + "name": "newValue", + "internalType": "bool", + "indexed": false + } + ], "anonymous": false }, { "type": "event", "name": "Withdraw", "inputs": [ - { "type": "address", "name": "account", "internalType": "address", "indexed": true }, - { "type": "uint256", "name": "amount", "internalType": "uint256", "indexed": false } + { + "type": "address", + "name": "account", + "internalType": "address", + "indexed": true + }, + { + "type": "uint256", + "name": "amount", + "internalType": "uint256", + "indexed": false + } ], "anonymous": false }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "uint256", "name": "", "internalType": "uint256" }], + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], "name": "ALTERNATE_FEE_BIPS", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "uint256", "name": "", "internalType": "uint256" }], + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], "name": "ALTERNATE_FEE_BIPS_LOCAL", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "bool", "name": "", "internalType": "bool" }], + "outputs": [ + { + "type": "bool", + "name": "", + "internalType": "bool" + } + ], "name": "DEPOSITS_ENABLED", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "uint256", "name": "", "internalType": "uint256" }], + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], "name": "DEV_FEE_BIPS", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "uint256", "name": "", "internalType": "uint256" }], + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], "name": "DEV_FEE_BIPS_LOCAL", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "bytes32", "name": "", "internalType": "bytes32" }], + "outputs": [ + { + "type": "bytes32", + "name": "", + "internalType": "bytes32" + } + ], "name": "DOMAIN_TYPEHASH", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "uint256", "name": "", "internalType": "uint256" }], + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], "name": "MAX_TOKENS_TO_DEPOSIT_WITHOUT_REINVEST", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "uint256", "name": "", "internalType": "uint256" }], + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], "name": "MAX_TOTAL_FEE", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "uint256", "name": "", "internalType": "uint256" }], + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], "name": "MIN_TOKENS_TO_REINVEST", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "uint256", "name": "", "internalType": "uint256" }], + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], "name": "NEST_FEE_BIPS", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "uint256", "name": "", "internalType": "uint256" }], + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], "name": "NEST_FEE_BIPS_LOCAL", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "uint256", "name": "", "internalType": "uint256" }], + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], "name": "NEST_STAKING_BIPS", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "bytes32", "name": "", "internalType": "bytes32" }], + "outputs": [ + { + "type": "bytes32", + "name": "", + "internalType": "bytes32" + } + ], "name": "PERMIT_TYPEHASH", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "uint256", "name": "", "internalType": "uint256" }], + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], "name": "PID", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "uint256", "name": "", "internalType": "uint256" }], + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], "name": "POOL_CREATOR_FEE_BIPS", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "uint256", "name": "", "internalType": "uint256" }], + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], "name": "POOL_CREATOR_FEE_BIPS_LOCAL", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "bool", "name": "", "internalType": "bool" }], + "outputs": [ + { + "type": "bool", + "name": "", + "internalType": "bool" + } + ], "name": "USE_GLOBAL_PEFI_VARIABLES", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "bytes32", "name": "", "internalType": "bytes32" }], + "outputs": [ + { + "type": "bytes32", + "name": "", + "internalType": "bytes32" + } + ], "name": "VERSION_HASH", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "uint256", "name": "", "internalType": "uint256" }], + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], "name": "allowance", "inputs": [ - { "type": "address", "name": "account", "internalType": "address" }, - { "type": "address", "name": "spender", "internalType": "address" } + { + "type": "address", + "name": "account", + "internalType": "address" + }, + { + "type": "address", + "name": "spender", + "internalType": "address" + } ] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "address", "name": "", "internalType": "address" }], + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "address" + } + ], "name": "alternateAddress", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "address", "name": "", "internalType": "address" }], + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "address" + } + ], "name": "alternateAddressLocal", "inputs": [] }, { "type": "function", "stateMutability": "nonpayable", - "outputs": [{ "type": "bool", "name": "", "internalType": "bool" }], + "outputs": [ + { + "type": "bool", + "name": "", + "internalType": "bool" + } + ], "name": "approve", "inputs": [ - { "type": "address", "name": "spender", "internalType": "address" }, - { "type": "uint256", "name": "amount", "internalType": "uint256" } + { + "type": "address", + "name": "spender", + "internalType": "address" + }, + { + "type": "uint256", + "name": "amount", + "internalType": "uint256" + } ] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "uint256", "name": "", "internalType": "uint256" }], + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], "name": "balanceOf", - "inputs": [{ "type": "address", "name": "account", "internalType": "address" }] + "inputs": [ + { + "type": "address", + "name": "account", + "internalType": "address" + } + ] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "uint256", "name": "", "internalType": "uint256" }], + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], "name": "checkReward", "inputs": [] }, - { "type": "function", "stateMutability": "nonpayable", "outputs": [], "name": "claimXPEFI", "inputs": [] }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "claimXPEFI", + "inputs": [] + }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "uint8", "name": "", "internalType": "uint8" }], + "outputs": [ + { + "type": "uint8", + "name": "", + "internalType": "uint8" + } + ], "name": "decimals", "inputs": [] }, @@ -367,7 +782,13 @@ "stateMutability": "nonpayable", "outputs": [], "name": "deposit", - "inputs": [{ "type": "uint256", "name": "amount", "internalType": "uint256" }] + "inputs": [ + { + "type": "uint256", + "name": "amount", + "internalType": "uint256" + } + ] }, { "type": "function", @@ -375,14 +796,28 @@ "outputs": [], "name": "depositFor", "inputs": [ - { "type": "address", "name": "account", "internalType": "address" }, - { "type": "uint256", "name": "amount", "internalType": "uint256" } + { + "type": "address", + "name": "account", + "internalType": "address" + }, + { + "type": "uint256", + "name": "amount", + "internalType": "uint256" + } ] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "address", "name": "", "internalType": "contract IERC20" }], + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "contract IERC20" + } + ], "name": "depositToken", "inputs": [] }, @@ -392,61 +827,135 @@ "outputs": [], "name": "depositWithPermit", "inputs": [ - { "type": "uint256", "name": "amount", "internalType": "uint256" }, - { "type": "uint256", "name": "deadline", "internalType": "uint256" }, - { "type": "uint8", "name": "v", "internalType": "uint8" }, - { "type": "bytes32", "name": "r", "internalType": "bytes32" }, - { "type": "bytes32", "name": "s", "internalType": "bytes32" } + { + "type": "uint256", + "name": "amount", + "internalType": "uint256" + }, + { + "type": "uint256", + "name": "deadline", + "internalType": "uint256" + }, + { + "type": "uint8", + "name": "v", + "internalType": "uint8" + }, + { + "type": "bytes32", + "name": "r", + "internalType": "bytes32" + }, + { + "type": "bytes32", + "name": "s", + "internalType": "bytes32" + } ] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "address", "name": "", "internalType": "address" }], + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "address" + } + ], "name": "devAddress", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "address", "name": "", "internalType": "address" }], + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "address" + } + ], "name": "devAddressLocal", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "uint256", "name": "", "internalType": "uint256" }], + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], "name": "estimateDeployedBalance", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "uint256", "name": "", "internalType": "uint256" }], + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], "name": "estimateReinvestReward", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "uint256", "name": "", "internalType": "uint256" }], + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], "name": "getDepositTokensForShares", - "inputs": [{ "type": "uint256", "name": "amount", "internalType": "uint256" }] + "inputs": [ + { + "type": "uint256", + "name": "amount", + "internalType": "uint256" + } + ] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "bytes32", "name": "", "internalType": "bytes32" }], + "outputs": [ + { + "type": "bytes32", + "name": "", + "internalType": "bytes32" + } + ], "name": "getDomainSeparator", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "uint256", "name": "", "internalType": "uint256" }], + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], "name": "getSharesForDepositTokens", - "inputs": [{ "type": "uint256", "name": "amount", "internalType": "uint256" }] + "inputs": [ + { + "type": "uint256", + "name": "amount", + "internalType": "uint256" + } + ] }, { "type": "function", @@ -454,58 +963,120 @@ "outputs": [], "name": "impromptuTokenAggregation", "inputs": [ - { "type": "uint256", "name": "minReturnAmountAccepted", "internalType": "uint256" }, - { "type": "bool", "name": "disableDeposits", "internalType": "bool" } + { + "type": "uint256", + "name": "minReturnAmountAccepted", + "internalType": "uint256" + }, + { + "type": "bool", + "name": "disableDeposits", + "internalType": "bool" + } ] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "string", "name": "", "internalType": "string" }], + "outputs": [ + { + "type": "string", + "name": "", + "internalType": "string" + } + ], "name": "name", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "address", "name": "", "internalType": "address" }], + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "address" + } + ], "name": "nestAddress", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "address", "name": "", "internalType": "address" }], + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "address" + } + ], "name": "nestAddressLocal", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "uint256", "name": "", "internalType": "uint256" }], + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], "name": "nonces", - "inputs": [{ "type": "address", "name": "", "internalType": "address" }] + "inputs": [ + { + "type": "address", + "name": "", + "internalType": "address" + } + ] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "address", "name": "", "internalType": "address" }], + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "address" + } + ], "name": "owner", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "address", "name": "", "internalType": "contract PenguinStrategyGlobalVariables" }], + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "contract PenguinStrategyGlobalVariables" + } + ], "name": "pefiGlobalVariableContract", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "uint256", "name": "", "internalType": "uint256" }], + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], "name": "pendingXPefi", - "inputs": [{ "type": "address", "name": "user", "internalType": "address" }] + "inputs": [ + { + "type": "address", + "name": "user", + "internalType": "address" + } + ] }, { "type": "function", @@ -513,19 +1084,53 @@ "outputs": [], "name": "permit", "inputs": [ - { "type": "address", "name": "owner", "internalType": "address" }, - { "type": "address", "name": "spender", "internalType": "address" }, - { "type": "uint256", "name": "value", "internalType": "uint256" }, - { "type": "uint256", "name": "deadline", "internalType": "uint256" }, - { "type": "uint8", "name": "v", "internalType": "uint8" }, - { "type": "bytes32", "name": "r", "internalType": "bytes32" }, - { "type": "bytes32", "name": "s", "internalType": "bytes32" } + { + "type": "address", + "name": "owner", + "internalType": "address" + }, + { + "type": "address", + "name": "spender", + "internalType": "address" + }, + { + "type": "uint256", + "name": "value", + "internalType": "uint256" + }, + { + "type": "uint256", + "name": "deadline", + "internalType": "uint256" + }, + { + "type": "uint8", + "name": "v", + "internalType": "uint8" + }, + { + "type": "bytes32", + "name": "r", + "internalType": "bytes32" + }, + { + "type": "bytes32", + "name": "s", + "internalType": "bytes32" + } ] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "address", "name": "", "internalType": "address" }], + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "address" + } + ], "name": "poolCreatorAddress", "inputs": [] }, @@ -534,7 +1139,13 @@ "stateMutability": "nonpayable", "outputs": [], "name": "recoverAVAX", - "inputs": [{ "type": "uint256", "name": "amount", "internalType": "uint256" }] + "inputs": [ + { + "type": "uint256", + "name": "amount", + "internalType": "uint256" + } + ] }, { "type": "function", @@ -542,98 +1153,212 @@ "outputs": [], "name": "recoverERC20", "inputs": [ - { "type": "address", "name": "tokenAddress", "internalType": "address" }, - { "type": "uint256", "name": "tokenAmount", "internalType": "uint256" } + { + "type": "address", + "name": "tokenAddress", + "internalType": "address" + }, + { + "type": "uint256", + "name": "tokenAmount", + "internalType": "uint256" + } ] }, - { "type": "function", "stateMutability": "nonpayable", "outputs": [], "name": "reinvest", "inputs": [] }, - { "type": "function", "stateMutability": "nonpayable", "outputs": [], "name": "renounceOwnership", "inputs": [] }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "reinvest", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "renounceOwnership", + "inputs": [] + }, { "type": "function", "stateMutability": "nonpayable", "outputs": [], "name": "revokeAllowance", "inputs": [ - { "type": "address", "name": "token", "internalType": "address" }, - { "type": "address", "name": "spender", "internalType": "address" } + { + "type": "address", + "name": "token", + "internalType": "address" + }, + { + "type": "address", + "name": "spender", + "internalType": "address" + } ] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "address", "name": "", "internalType": "contract IERC20" }], + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "contract IERC20" + } + ], "name": "rewardToken", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "address", "name": "", "internalType": "contract IRouter" }], + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "contract IRouter" + } + ], "name": "router", "inputs": [] }, - { "type": "function", "stateMutability": "nonpayable", "outputs": [], "name": "setAllowances", "inputs": [] }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "setAllowances", + "inputs": [] + }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "address", "name": "", "internalType": "address" }], + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "address" + } + ], "name": "stakingContract", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "string", "name": "", "internalType": "string" }], + "outputs": [ + { + "type": "string", + "name": "", + "internalType": "string" + } + ], "name": "symbol", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "address", "name": "", "internalType": "address" }], + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "address" + } + ], "name": "token0", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "address", "name": "", "internalType": "address" }], + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "address" + } + ], "name": "token1", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "uint256", "name": "", "internalType": "uint256" }], + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], "name": "totalDeposits", "inputs": [] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "uint256", "name": "", "internalType": "uint256" }], + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], "name": "totalSupply", "inputs": [] }, { "type": "function", "stateMutability": "nonpayable", - "outputs": [{ "type": "bool", "name": "", "internalType": "bool" }], + "outputs": [ + { + "type": "bool", + "name": "", + "internalType": "bool" + } + ], "name": "transfer", "inputs": [ - { "type": "address", "name": "dst", "internalType": "address" }, - { "type": "uint256", "name": "amount", "internalType": "uint256" } + { + "type": "address", + "name": "dst", + "internalType": "address" + }, + { + "type": "uint256", + "name": "amount", + "internalType": "uint256" + } ] }, { "type": "function", "stateMutability": "nonpayable", - "outputs": [{ "type": "bool", "name": "", "internalType": "bool" }], + "outputs": [ + { + "type": "bool", + "name": "", + "internalType": "bool" + } + ], "name": "transferFrom", "inputs": [ - { "type": "address", "name": "src", "internalType": "address" }, - { "type": "address", "name": "dst", "internalType": "address" }, - { "type": "uint256", "name": "amount", "internalType": "uint256" } + { + "type": "address", + "name": "src", + "internalType": "address" + }, + { + "type": "address", + "name": "dst", + "internalType": "address" + }, + { + "type": "uint256", + "name": "amount", + "internalType": "uint256" + } ] }, { @@ -641,28 +1366,52 @@ "stateMutability": "nonpayable", "outputs": [], "name": "transferOwnership", - "inputs": [{ "type": "address", "name": "newOwner", "internalType": "address" }] + "inputs": [ + { + "type": "address", + "name": "newOwner", + "internalType": "address" + } + ] }, { "type": "function", "stateMutability": "nonpayable", "outputs": [], "name": "updateAlternateAddress", - "inputs": [{ "type": "address", "name": "newValue", "internalType": "address" }] + "inputs": [ + { + "type": "address", + "name": "newValue", + "internalType": "address" + } + ] }, { "type": "function", "stateMutability": "nonpayable", "outputs": [], "name": "updateDepositsEnabled", - "inputs": [{ "type": "bool", "name": "newValue", "internalType": "bool" }] + "inputs": [ + { + "type": "bool", + "name": "newValue", + "internalType": "bool" + } + ] }, { "type": "function", "stateMutability": "nonpayable", "outputs": [], "name": "updateDevAddress", - "inputs": [{ "type": "address", "name": "newValue", "internalType": "address" }] + "inputs": [ + { + "type": "address", + "name": "newValue", + "internalType": "address" + } + ] }, { "type": "function", @@ -670,10 +1419,26 @@ "outputs": [], "name": "updateFeeStructure", "inputs": [ - { "type": "uint256", "name": "newPOOL_CREATOR_FEE_BIPS", "internalType": "uint256" }, - { "type": "uint256", "name": "newNEST_FEE_BIPS", "internalType": "uint256" }, - { "type": "uint256", "name": "newDEV_FEE_BIPS", "internalType": "uint256" }, - { "type": "uint256", "name": "newALTERNATE_FEE_BIPS", "internalType": "uint256" } + { + "type": "uint256", + "name": "newPOOL_CREATOR_FEE_BIPS", + "internalType": "uint256" + }, + { + "type": "uint256", + "name": "newNEST_FEE_BIPS", + "internalType": "uint256" + }, + { + "type": "uint256", + "name": "newDEV_FEE_BIPS", + "internalType": "uint256" + }, + { + "type": "uint256", + "name": "newALTERNATE_FEE_BIPS", + "internalType": "uint256" + } ] }, { @@ -681,61 +1446,121 @@ "stateMutability": "nonpayable", "outputs": [], "name": "updateMaxTokensToDepositWithoutReinvest", - "inputs": [{ "type": "uint256", "name": "newValue", "internalType": "uint256" }] + "inputs": [ + { + "type": "uint256", + "name": "newValue", + "internalType": "uint256" + } + ] }, { "type": "function", "stateMutability": "nonpayable", "outputs": [], "name": "updateMinTokensToReinvest", - "inputs": [{ "type": "uint256", "name": "newValue", "internalType": "uint256" }] + "inputs": [ + { + "type": "uint256", + "name": "newValue", + "internalType": "uint256" + } + ] }, { "type": "function", "stateMutability": "nonpayable", "outputs": [], "name": "updateNestAddress", - "inputs": [{ "type": "address", "name": "newValue", "internalType": "address" }] + "inputs": [ + { + "type": "address", + "name": "newValue", + "internalType": "address" + } + ] }, { "type": "function", "stateMutability": "nonpayable", "outputs": [], "name": "updateNestStakingBips", - "inputs": [{ "type": "uint256", "name": "newNEST_STAKING_BIPS", "internalType": "uint256" }] + "inputs": [ + { + "type": "uint256", + "name": "newNEST_STAKING_BIPS", + "internalType": "uint256" + } + ] }, { "type": "function", "stateMutability": "nonpayable", "outputs": [], "name": "updatePoolCreatorAddress", - "inputs": [{ "type": "address", "name": "newValue", "internalType": "address" }] + "inputs": [ + { + "type": "address", + "name": "newValue", + "internalType": "address" + } + ] }, { "type": "function", "stateMutability": "nonpayable", "outputs": [], "name": "updateUseGlobalVariables", - "inputs": [{ "type": "bool", "name": "newValue", "internalType": "bool" }] + "inputs": [ + { + "type": "bool", + "name": "newValue", + "internalType": "bool" + } + ] }, { "type": "function", "stateMutability": "nonpayable", "outputs": [], "name": "withdraw", - "inputs": [{ "type": "uint256", "name": "amount", "internalType": "uint256" }] + "inputs": [ + { + "type": "uint256", + "name": "amount", + "internalType": "uint256" + } + ] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "uint256", "name": "", "internalType": "uint256" }], + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], "name": "xPefiDebt", - "inputs": [{ "type": "address", "name": "", "internalType": "address" }] + "inputs": [ + { + "type": "address", + "name": "", + "internalType": "address" + } + ] }, { "type": "function", "stateMutability": "view", - "outputs": [{ "type": "uint256", "name": "", "internalType": "uint256" }], + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], "name": "xPefiPerShare", "inputs": [] } diff --git a/src/apps/penguin/penguin.module.ts b/src/apps/penguin/penguin.module.ts index 45da17e46..13dcab096 100644 --- a/src/apps/penguin/penguin.module.ts +++ b/src/apps/penguin/penguin.module.ts @@ -6,7 +6,6 @@ import { AvalanchePenguinChefV1FarmContractPositionFetcher } from './avalanche/p import { AvalanchePenguinChefV2FarmContractPositionFetcher } from './avalanche/penguin.chef-v2-farm.contract-position-fetcher'; import { AvalanchePenguinIPefiTokenFetcher } from './avalanche/penguin.i-pefi.token-fetcher'; import { AvalanchePenguinVaultClaimableContractPositionFetcher } from './avalanche/penguin.vault-claimable.contract-position-fetcher'; -import { AvalanchePenguinVaultTokenFetcher } from './avalanche/penguin.vault.token-fetcher'; import { AvalanchePenguinXPefiTokenFetcher } from './avalanche/penguin.x-pefi.token-fetcher'; import { PenguinViemContractFactory } from './contracts'; @@ -17,7 +16,6 @@ import { PenguinViemContractFactory } from './contracts'; AvalanchePenguinChefV2FarmContractPositionFetcher, AvalanchePenguinIPefiTokenFetcher, AvalanchePenguinXPefiTokenFetcher, - AvalanchePenguinVaultTokenFetcher, AvalanchePenguinVaultClaimableContractPositionFetcher, ], }) diff --git a/src/apps/pie-dao/ethereum/pie-dao.e-dough.token-fetcher.ts b/src/apps/pie-dao/ethereum/pie-dao.e-dough.token-fetcher.ts deleted file mode 100644 index 0425d2cd0..000000000 --- a/src/apps/pie-dao/ethereum/pie-dao.e-dough.token-fetcher.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { Erc20 } from '~contract/contracts/viem'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; - -import { PieDaoViemContractFactory } from '../contracts'; - -@PositionTemplate() -export class EthereumPieDaoEDoughTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'eDOUGH'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(PieDaoViemContractFactory) protected readonly contractFactory: PieDaoViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.appToolkit.globalViemContracts.erc20({ address, network: this.network }); - } - - getAddresses() { - return ['0x63cbd1858bd79de1a06c3c26462db360b834912d']; - } - - async getUnderlyingTokenDefinitions() { - return [{ address: '0xad32a8e6220741182940c5abf610bde99e737b2d', network: this.network }]; // DOUGH - } - - async getPricePerShare() { - return [1]; - } -} diff --git a/src/apps/pie-dao/pie-dao.module.ts b/src/apps/pie-dao/pie-dao.module.ts index cab959ce9..53e2a8b3e 100644 --- a/src/apps/pie-dao/pie-dao.module.ts +++ b/src/apps/pie-dao/pie-dao.module.ts @@ -3,7 +3,6 @@ import { Module } from '@nestjs/common'; import { AbstractApp } from '~app/app.dynamic-module'; import { PieDaoViemContractFactory } from './contracts'; -import { EthereumPieDaoEDoughTokenFetcher } from './ethereum/pie-dao.e-dough.token-fetcher'; import { EthereumPieDaoFarmMasterChefContractPositionFetcher } from './ethereum/pie-dao.farm-master-chef.contract-position-fetcher'; import { EthereumPieDaoFarmSingleStakingContractPositionFetcher } from './ethereum/pie-dao.farm-single-staking.contract-position-fetcher'; import { EthereumPieDaoVotingEscrowContractPositionFether } from './ethereum/pie-dao.voting-escrow.contract-position-fetcher'; @@ -12,7 +11,6 @@ import { EthereumPieDaoVotingEscrowContractPositionFether } from './ethereum/pie providers: [ PieDaoViemContractFactory, // Ethereum - EthereumPieDaoEDoughTokenFetcher, EthereumPieDaoFarmSingleStakingContractPositionFetcher, EthereumPieDaoFarmMasterChefContractPositionFetcher, EthereumPieDaoVotingEscrowContractPositionFether, diff --git a/src/apps/pika-protocol/contracts/abis/pika-protocol-es-pika.json b/src/apps/pika-protocol/contracts/abis/pika-protocol-es-pika.json deleted file mode 100644 index 498d6b5c4..000000000 --- a/src/apps/pika-protocol/contracts/abis/pika-protocol-es-pika.json +++ /dev/null @@ -1,278 +0,0 @@ -[ - { - "inputs": [ - { "internalType": "string", "name": "name", "type": "string" }, - { "internalType": "string", "name": "symbol", "type": "string" }, - { "internalType": "uint256", "name": "totalSupply", "type": "uint256" }, - { "internalType": "address", "name": "beneficiary", "type": "address" }, - { "internalType": "address", "name": "gov", "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": "bytes32", "name": "role", "type": "bytes32" }, - { "indexed": true, "internalType": "bytes32", "name": "previousAdminRole", "type": "bytes32" }, - { "indexed": true, "internalType": "bytes32", "name": "newAdminRole", "type": "bytes32" } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" } - ], - "name": "RoleRevoked", - "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": false, "internalType": "bool", "name": "transfersAllowed", "type": "bool" }], - "name": "TransfersAllowed", - "type": "event" - }, - { - "inputs": [], - "name": "ADMIN_ROLE", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MINTER_ROLE", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "TRANSFER_ROLE", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "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": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } - ], - "name": "decreaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }], - "name": "getRoleAdmin", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "hasRole", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "addedValue", "type": "uint256" } - ], - "name": "increaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_recipient", "type": "address" }, - { "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": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bool", "name": "_transfersAllowed", "type": "bool" }], - "name": "setTransfersAllowed", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" }], - "name": "supportsInterface", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "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" - }, - { - "inputs": [ - { "internalType": "address", "name": "from", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "transfersAllowed", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - } -] diff --git a/src/apps/pika-protocol/contracts/viem.contract-factory.ts b/src/apps/pika-protocol/contracts/viem.contract-factory.ts index 27396b31f..f7ee6cd87 100644 --- a/src/apps/pika-protocol/contracts/viem.contract-factory.ts +++ b/src/apps/pika-protocol/contracts/viem.contract-factory.ts @@ -3,12 +3,7 @@ import { Injectable, Inject } from '@nestjs/common'; import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; import { Network } from '~types/network.interface'; -import { - PikaProtocolEsPika__factory, - PikaProtocolVault__factory, - PikaProtocolVaultReward__factory, - PikaProtocolVester__factory, -} from './viem'; +import { PikaProtocolVault__factory, PikaProtocolVaultReward__factory, PikaProtocolVester__factory } from './viem'; type ContractOpts = { address: string; network: Network }; @@ -16,9 +11,6 @@ type ContractOpts = { address: string; network: Network }; export class PikaProtocolViemContractFactory { constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) {} - pikaProtocolEsPika({ address, network }: ContractOpts) { - return PikaProtocolEsPika__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } pikaProtocolVault({ address, network }: ContractOpts) { return PikaProtocolVault__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } diff --git a/src/apps/pika-protocol/contracts/viem/PikaProtocolEsPika.ts b/src/apps/pika-protocol/contracts/viem/PikaProtocolEsPika.ts deleted file mode 100644 index 77ffb7c1f..000000000 --- a/src/apps/pika-protocol/contracts/viem/PikaProtocolEsPika.ts +++ /dev/null @@ -1,630 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const pikaProtocolEsPikaAbi = [ - { - inputs: [ - { - internalType: 'string', - name: 'name', - type: 'string', - }, - { - internalType: 'string', - name: 'symbol', - type: 'string', - }, - { - internalType: 'uint256', - name: 'totalSupply', - type: 'uint256', - }, - { - internalType: 'address', - name: 'beneficiary', - type: 'address', - }, - { - internalType: 'address', - name: 'gov', - 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: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'bytes32', - name: 'previousAdminRole', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'bytes32', - name: 'newAdminRole', - type: 'bytes32', - }, - ], - name: 'RoleAdminChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'address', - name: 'account', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'sender', - type: 'address', - }, - ], - name: 'RoleGranted', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'address', - name: 'account', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'sender', - type: 'address', - }, - ], - name: 'RoleRevoked', - 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: false, - internalType: 'bool', - name: 'transfersAllowed', - type: 'bool', - }, - ], - name: 'TransfersAllowed', - type: 'event', - }, - { - inputs: [], - name: 'ADMIN_ROLE', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'DEFAULT_ADMIN_ROLE', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'MINTER_ROLE', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'TRANSFER_ROLE', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - 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: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'burn', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - ], - name: 'getRoleAdmin', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'grantRole', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'hasRole', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_recipient', - type: 'address', - }, - { - 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: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'renounceRole', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'revokeRole', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bool', - name: '_transfersAllowed', - type: 'bool', - }, - ], - name: 'setTransfersAllowed', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes4', - name: 'interfaceId', - type: 'bytes4', - }, - ], - name: 'supportsInterface', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - 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', - }, - { - inputs: [ - { - internalType: 'address', - name: 'from', - type: 'address', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'transfersAllowed', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, -] as const; - -export type PikaProtocolEsPika = typeof pikaProtocolEsPikaAbi; -export type PikaProtocolEsPikaContract = GetContractReturnType; - -export class PikaProtocolEsPika__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: pikaProtocolEsPikaAbi, publicClient: client }); - } -} diff --git a/src/apps/pika-protocol/contracts/viem/index.ts b/src/apps/pika-protocol/contracts/viem/index.ts index cda32e591..632a1caa1 100644 --- a/src/apps/pika-protocol/contracts/viem/index.ts +++ b/src/apps/pika-protocol/contracts/viem/index.ts @@ -2,12 +2,10 @@ /* tslint:disable */ /* eslint-disable */ -export type { PikaProtocolEsPika } from './PikaProtocolEsPika'; export type { PikaProtocolVaultReward } from './PikaProtocolVaultReward'; export type { PikaProtocolVault } from './PikaProtocolVault'; export type { PikaProtocolVester } from './PikaProtocolVester'; -export { PikaProtocolEsPika__factory } from './PikaProtocolEsPika'; export { PikaProtocolVaultReward__factory } from './PikaProtocolVaultReward'; export { PikaProtocolVault__factory } from './PikaProtocolVault'; export { PikaProtocolVester__factory } from './PikaProtocolVester'; diff --git a/src/apps/pika-protocol/optimism/pika-protocol.es-pika.token-fetcher.ts b/src/apps/pika-protocol/optimism/pika-protocol.es-pika.token-fetcher.ts deleted file mode 100644 index 8f1316075..000000000 --- a/src/apps/pika-protocol/optimism/pika-protocol.es-pika.token-fetcher.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetUnderlyingTokensParams } from '~position/template/app-token.template.types'; - -import { PikaProtocolViemContractFactory } from '../contracts'; -import { PikaProtocolEsPika } from '../contracts/viem'; - -@PositionTemplate() -export class OptimismPikaProtocolEsPikaTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'EsPika'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(PikaProtocolViemContractFactory) protected readonly contractFactory: PikaProtocolViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.pikaProtocolEsPika({ address, network: this.network }); - } - - async getAddresses() { - return ['0x1508fbb7928aedc86bee68c91bc4afcf493b0e78']; - } - - async getUnderlyingTokenDefinitions(_params: GetUnderlyingTokensParams) { - return [{ address: '0x9a601c5bb360811d96a23689066af316a30c3027', network: this.network }]; - } - - async getPricePerShare() { - return [1]; - } -} diff --git a/src/apps/pika-protocol/pika-protocol.module.ts b/src/apps/pika-protocol/pika-protocol.module.ts index fd912e5dc..474c95b53 100644 --- a/src/apps/pika-protocol/pika-protocol.module.ts +++ b/src/apps/pika-protocol/pika-protocol.module.ts @@ -3,7 +3,6 @@ import { Module } from '@nestjs/common'; import { AbstractApp } from '~app/app.dynamic-module'; import { PikaProtocolViemContractFactory } from './contracts'; -import { OptimismPikaProtocolEsPikaTokenFetcher } from './optimism/pika-protocol.es-pika.token-fetcher'; import { OptimismPikaProtocolEscrowContractPositionFetcher } from './optimism/pika-protocol.escrowed.contract-position-fetcher'; import { OptimismPikaProtocolVaultContractPositionFetcher } from './optimism/pika-protocol.vault.contract-position-fetcher'; @@ -11,7 +10,6 @@ import { OptimismPikaProtocolVaultContractPositionFetcher } from './optimism/pik providers: [ PikaProtocolViemContractFactory, OptimismPikaProtocolVaultContractPositionFetcher, - OptimismPikaProtocolEsPikaTokenFetcher, OptimismPikaProtocolEscrowContractPositionFetcher, ], }) diff --git a/src/apps/pirex/arbitrum/pirex.apxglp.token-fetcher.ts b/src/apps/pirex/arbitrum/pirex.apxglp.token-fetcher.ts deleted file mode 100644 index e33c974ce..000000000 --- a/src/apps/pirex/arbitrum/pirex.apxglp.token-fetcher.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { - GetAddressesParams, - DefaultAppTokenDefinition, - GetUnderlyingTokensParams, - UnderlyingTokenDefinition, - GetPricePerShareParams, -} from '~position/template/app-token.template.types'; - -import { PirexViemContractFactory } from '../contracts'; -import { ApxGlp } from '../contracts/viem'; - -@PositionTemplate() -export class ArbitrumPirexApxglpTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Pirex GMX'; - - constructor( - @Inject(APP_TOOLKIT) readonly appToolkit: IAppToolkit, - @Inject(PirexViemContractFactory) private readonly pirexContractFactory: PirexViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.pirexContractFactory.apxGlp({ address, network: this.network }); - } - - async getAddresses(_params: GetAddressesParams): Promise { - return ['0x6cec1903eae091bdc532cfde68fff0723fd3ee14']; - } - - async getUnderlyingTokenDefinitions( - _params: GetUnderlyingTokensParams, - ): Promise { - return [{ address: '0x4277f8f2c384827b5273592ff7cebd9f2c1ac258', network: this.network }]; - } - - async getPricePerShare({ contract, appToken }: GetPricePerShareParams) { - const reserveRaw = await contract.read.totalAssets(); - const reserve = Number(reserveRaw) / 10 ** appToken.tokens[0].decimals; - const pricePerShare = reserve / appToken.supply; - return [pricePerShare]; - } -} diff --git a/src/apps/pirex/arbitrum/pirex.apxgmx.token-fetcher.ts b/src/apps/pirex/arbitrum/pirex.apxgmx.token-fetcher.ts deleted file mode 100644 index e70516837..000000000 --- a/src/apps/pirex/arbitrum/pirex.apxgmx.token-fetcher.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { - GetAddressesParams, - DefaultAppTokenDefinition, - GetUnderlyingTokensParams, - UnderlyingTokenDefinition, - GetPricePerShareParams, -} from '~position/template/app-token.template.types'; - -import { PirexViemContractFactory } from '../contracts'; -import { ApxGmx } from '../contracts/viem'; - -@PositionTemplate() -export class ArbitrumPirexApxgmxTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Pirex GMX'; - - constructor( - @Inject(APP_TOOLKIT) readonly appToolkit: IAppToolkit, - @Inject(PirexViemContractFactory) private readonly pirexContractFactory: PirexViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.pirexContractFactory.apxGmx({ address, network: this.network }); - } - - async getAddresses(_params: GetAddressesParams): Promise { - return ['0x61dbc0d6d7a6bde37f93d2014044a7c6b6de34d2']; - } - - async getUnderlyingTokenDefinitions( - _params: GetUnderlyingTokensParams, - ): Promise { - return [{ address: '0xfc5a1a6eb076a2c7ad06ed22c90d7e710e35ad0a', network: this.network }]; - } - - async getPricePerShare({ contract, appToken }: GetPricePerShareParams) { - const reserveRaw = await contract.read.totalAssets(); - const reserve = Number(reserveRaw) / 10 ** appToken.tokens[0].decimals; - const pricePerShare = reserve / appToken.supply; - return [pricePerShare]; - } -} diff --git a/src/apps/pirex/contracts/abis/apx-btrfly.json b/src/apps/pirex/contracts/abis/apx-btrfly.json deleted file mode 100644 index 1aa6fbeea..000000000 --- a/src/apps/pirex/contracts/abis/apx-btrfly.json +++ /dev/null @@ -1,988 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "pxBtrfly", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadySet", - "type": "error" - }, - { - "inputs": [], - "name": "ExceedsMax", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroAddress", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "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": true, - "internalType": "address", - "name": "caller", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Harvest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "fee", - "type": "uint256" - } - ], - "name": "PlatformFeeUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "_platform", - "type": "address" - } - ], - "name": "PlatformUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "_strategy", - "type": "address" - } - ], - "name": "StrategySet", - "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": "amount", - "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": false, - "internalType": "uint256", - "name": "penalty", - "type": "uint256" - } - ], - "name": "WithdrawalPenaltyUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "FEE_DENOMINATOR", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_PLATFORM_FEE", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_WITHDRAWAL_PENALTY", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "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": "contract ERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "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": "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": "shares", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "harvest", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "maxDeposit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "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": "assets", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "permit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "platform", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "platformFee", - "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": "", - "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": "assets", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_platform", - "type": "address" - } - ], - "name": "setPlatform", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "fee", - "type": "uint256" - } - ], - "name": "setPlatformFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_strategy", - "type": "address" - } - ], - "name": "setStrategy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "penalty", - "type": "uint256" - } - ], - "name": "setWithdrawalPenalty", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "strategy", - "outputs": [ - { - "internalType": "contract UnionPirexStaking", - "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": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "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": "shares", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "withdrawalPenalty", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/src/apps/pirex/contracts/abis/apx-glp.json b/src/apps/pirex/contracts/abis/apx-glp.json deleted file mode 100644 index 9f0eb182f..000000000 --- a/src/apps/pirex/contracts/abis/apx-glp.json +++ /dev/null @@ -1,592 +0,0 @@ -[ - { - "inputs": [ - { "internalType": "address", "name": "_gmxBaseReward", "type": "address" }, - { "internalType": "address", "name": "_asset", "type": "address" }, - { "internalType": "address", "name": "_pxGmx", "type": "address" }, - { "internalType": "string", "name": "_name", "type": "string" }, - { "internalType": "string", "name": "_symbol", "type": "string" }, - { "internalType": "address", "name": "_platform", "type": "address" }, - { "internalType": "address", "name": "_rewardsModule", "type": "address" }, - { "internalType": "address", "name": "_pirexFees", "type": "address" } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { "inputs": [], "name": "ExceedsMax", "type": "error" }, - { "inputs": [], "name": "InvalidAssetParam", "type": "error" }, - { "inputs": [], "name": "InvalidParam", "type": "error" }, - { "inputs": [], "name": "ZeroAddress", "type": "error" }, - { "inputs": [], "name": "ZeroAmount", "type": "error" }, - { "inputs": [], "name": "ZeroShares", "type": "error" }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "rewardsDelta", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "rewardsIndex", "type": "uint256" } - ], - "name": "AccrueRewards", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256", "name": "accruedRewards", "type": "uint256" }], - "name": "AccrueStrategy", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256", "name": "incentive", "type": "uint256" }], - "name": "CompoundIncentiveUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "caller", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "minGlp", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "gmxBaseRewardAmount", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "pxGmxAmountOut", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "pxGlpAmountOut", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "totalPxGlpFee", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "totalPxGmxFee", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "pxGlpIncentive", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "pxGmxIncentive", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "strategyIndex", "type": "uint256" } - ], - "name": "Compounded", - "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": true, "internalType": "address", "name": "user", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256", "name": "fee", "type": "uint256" }], - "name": "PlatformFeeUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "address", "name": "_platform", "type": "address" }], - "name": "PlatformUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "PxGmxClaimed", - "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": "amount", "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": false, "internalType": "uint256", "name": "penalty", "type": "uint256" }], - "name": "WithdrawalPenaltyUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "FEE_DENOMINATOR", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_COMPOUND_INCENTIVE", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_PLATFORM_FEE", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_WITHDRAWAL_PENALTY", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ONE", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "address", "name": "", "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": "contract ERC20", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "minUsdg", "type": "uint256" }, - { "internalType": "uint256", "name": "minGlp", "type": "uint256" }, - { "internalType": "bool", "name": "optOutIncentive", "type": "bool" } - ], - "name": "compound", - "outputs": [ - { "internalType": "uint256", "name": "gmxBaseRewardAmountIn", "type": "uint256" }, - { "internalType": "uint256", "name": "pxGmxAmountOut", "type": "uint256" }, - { "internalType": "uint256", "name": "pxGlpAmountOut", "type": "uint256" }, - { "internalType": "uint256", "name": "totalPxGlpFee", "type": "uint256" }, - { "internalType": "uint256", "name": "totalPxGmxFee", "type": "uint256" }, - { "internalType": "uint256", "name": "pxGlpIncentive", "type": "uint256" }, - { "internalType": "uint256", "name": "pxGmxIncentive", "type": "uint256" } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "compoundIncentive", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "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": "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": "shares", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { "internalType": "address", "name": "receiver", "type": "address" } - ], - "name": "depositFsGlp", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "token", "type": "address" }, - { "internalType": "uint256", "name": "tokenAmount", "type": "uint256" }, - { "internalType": "uint256", "name": "minUsdg", "type": "uint256" }, - { "internalType": "uint256", "name": "minGlp", "type": "uint256" }, - { "internalType": "address", "name": "receiver", "type": "address" } - ], - "name": "depositGlp", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "minUsdg", "type": "uint256" }, - { "internalType": "uint256", "name": "minGlp", "type": "uint256" }, - { "internalType": "address", "name": "receiver", "type": "address" } - ], - "name": "depositGlpETH", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "user", "type": "address" }], - "name": "getUserIndex", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "user", "type": "address" }], - "name": "getUserRewardsAccrued", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "gmxBaseReward", - "outputs": [{ "internalType": "contract ERC20", "name": "", "type": "address" }], - "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": "", "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": "account", "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": "assets", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "nonces", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "value", "type": "uint256" }, - { "internalType": "uint256", "name": "deadline", "type": "uint256" }, - { "internalType": "uint8", "name": "v", "type": "uint8" }, - { "internalType": "bytes32", "name": "r", "type": "bytes32" }, - { "internalType": "bytes32", "name": "s", "type": "bytes32" } - ], - "name": "permit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pirexFees", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "platform", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "platformFee", - "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": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pxGmx", - "outputs": [{ "internalType": "contract ERC20", "name": "", "type": "address" }], - "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": "assets", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "rewardsModule", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "incentive", "type": "uint256" }], - "name": "setCompoundIncentive", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_platform", "type": "address" }], - "name": "setPlatform", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "fee", "type": "uint256" }], - "name": "setPlatformFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "penalty", "type": "uint256" }], - "name": "setWithdrawalPenalty", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "strategyIndex", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "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": "to", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "from", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "vaultTotalAssets", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "vaultTotalExtraRewards", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "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": "shares", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "withdrawalPenalty", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - } -] diff --git a/src/apps/pirex/contracts/abis/apx-gmx.json b/src/apps/pirex/contracts/abis/apx-gmx.json deleted file mode 100644 index 400ddc846..000000000 --- a/src/apps/pirex/contracts/abis/apx-gmx.json +++ /dev/null @@ -1,533 +0,0 @@ -[ - { - "inputs": [ - { "internalType": "address", "name": "_gmxBaseReward", "type": "address" }, - { "internalType": "address", "name": "_gmx", "type": "address" }, - { "internalType": "address", "name": "_asset", "type": "address" }, - { "internalType": "string", "name": "_name", "type": "string" }, - { "internalType": "string", "name": "_symbol", "type": "string" }, - { "internalType": "address", "name": "_platform", "type": "address" }, - { "internalType": "address", "name": "_rewardsModule", "type": "address" }, - { "internalType": "address", "name": "_pirexFees", "type": "address" } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { "inputs": [], "name": "AlreadySet", "type": "error" }, - { "inputs": [], "name": "ExceedsMax", "type": "error" }, - { "inputs": [], "name": "InvalidAssetParam", "type": "error" }, - { "inputs": [], "name": "InvalidParam", "type": "error" }, - { "inputs": [], "name": "ZeroAddress", "type": "error" }, - { "inputs": [], "name": "ZeroAmount", "type": "error" }, - { "inputs": [], "name": "ZeroShares", "type": "error" }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256", "name": "incentive", "type": "uint256" }], - "name": "CompoundIncentiveUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "caller", "type": "address" }, - { "indexed": false, "internalType": "uint24", "name": "fee", "type": "uint24" }, - { "indexed": false, "internalType": "uint256", "name": "amountOutMinimum", "type": "uint256" }, - { "indexed": false, "internalType": "uint160", "name": "sqrtPriceLimitX96", "type": "uint160" }, - { "indexed": false, "internalType": "uint256", "name": "gmxBaseRewardAmountIn", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "gmxAmountOut", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "pxGmxMintAmount", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "totalFee", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "incentive", "type": "uint256" } - ], - "name": "Compounded", - "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": true, "internalType": "address", "name": "user", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256", "name": "fee", "type": "uint256" }], - "name": "PlatformFeeUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "address", "name": "_platform", "type": "address" }], - "name": "PlatformUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint24", "name": "_poolFee", "type": "uint24" }], - "name": "PoolFeeUpdated", - "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": "amount", "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": false, "internalType": "uint256", "name": "penalty", "type": "uint256" }], - "name": "WithdrawalPenaltyUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "FEE_DENOMINATOR", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_COMPOUND_INCENTIVE", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_PLATFORM_FEE", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_WITHDRAWAL_PENALTY", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "SWAP_ROUTER", - "outputs": [{ "internalType": "contract IV3SwapRouter", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "address", "name": "", "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": "contract ERC20", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "amountOutMinimum", "type": "uint256" }, - { "internalType": "uint160", "name": "sqrtPriceLimitX96", "type": "uint160" }, - { "internalType": "bool", "name": "optOutIncentive", "type": "bool" } - ], - "name": "compound", - "outputs": [ - { "internalType": "uint256", "name": "gmxBaseRewardAmountIn", "type": "uint256" }, - { "internalType": "uint256", "name": "gmxAmountOut", "type": "uint256" }, - { "internalType": "uint256", "name": "pxGmxMintAmount", "type": "uint256" }, - { "internalType": "uint256", "name": "totalFee", "type": "uint256" }, - { "internalType": "uint256", "name": "incentive", "type": "uint256" } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "compoundIncentive", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "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": "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": "shares", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { "internalType": "address", "name": "receiver", "type": "address" } - ], - "name": "depositGmx", - "outputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "gmx", - "outputs": [{ "internalType": "contract ERC20", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "gmxBaseReward", - "outputs": [{ "internalType": "contract ERC20", "name": "", "type": "address" }], - "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": "", "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": "account", "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": "assets", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "nonces", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "value", "type": "uint256" }, - { "internalType": "uint256", "name": "deadline", "type": "uint256" }, - { "internalType": "uint8", "name": "v", "type": "uint8" }, - { "internalType": "bytes32", "name": "r", "type": "bytes32" }, - { "internalType": "bytes32", "name": "s", "type": "bytes32" } - ], - "name": "permit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pirexFees", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "platform", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "platformFee", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "poolFee", - "outputs": [{ "internalType": "uint24", "name": "", "type": "uint24" }], - "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": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "shares", "type": "uint256" }, - { "internalType": "address", "name": "receiver", "type": "address" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "redeem", - "outputs": [{ "internalType": "uint256", "name": "assets", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "rewardsModule", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "incentive", "type": "uint256" }], - "name": "setCompoundIncentive", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_platform", "type": "address" }], - "name": "setPlatform", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "fee", "type": "uint256" }], - "name": "setPlatformFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint24", "name": "_poolFee", "type": "uint24" }], - "name": "setPoolFee", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "penalty", "type": "uint256" }], - "name": "setWithdrawalPenalty", - "outputs": [], - "stateMutability": "nonpayable", - "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": "to", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "from", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "vaultTotalAssets", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "assets", "type": "uint256" }, - { "internalType": "address", "name": "receiver", "type": "address" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "withdraw", - "outputs": [{ "internalType": "uint256", "name": "shares", "type": "uint256" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "withdrawalPenalty", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - } -] diff --git a/src/apps/pirex/contracts/viem.contract-factory.ts b/src/apps/pirex/contracts/viem.contract-factory.ts index da694747f..a042e1c08 100644 --- a/src/apps/pirex/contracts/viem.contract-factory.ts +++ b/src/apps/pirex/contracts/viem.contract-factory.ts @@ -3,7 +3,7 @@ import { Injectable, Inject } from '@nestjs/common'; import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; import { Network } from '~types/network.interface'; -import { ApxBtrfly__factory, ApxGlp__factory, ApxGmx__factory, PirexPxCvx__factory } from './viem'; +import { PirexPxCvx__factory } from './viem'; type ContractOpts = { address: string; network: Network }; @@ -11,15 +11,6 @@ type ContractOpts = { address: string; network: Network }; export class PirexViemContractFactory { constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) {} - apxBtrfly({ address, network }: ContractOpts) { - return ApxBtrfly__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } - apxGlp({ address, network }: ContractOpts) { - return ApxGlp__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } - apxGmx({ address, network }: ContractOpts) { - return ApxGmx__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } pirexPxCvx({ address, network }: ContractOpts) { return PirexPxCvx__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } diff --git a/src/apps/pirex/contracts/viem/ApxBtrfly.ts b/src/apps/pirex/contracts/viem/ApxBtrfly.ts deleted file mode 100644 index b239e978d..000000000 --- a/src/apps/pirex/contracts/viem/ApxBtrfly.ts +++ /dev/null @@ -1,1002 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const apxBtrflyAbi = [ - { - inputs: [ - { - internalType: 'address', - name: 'pxBtrfly', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - inputs: [], - name: 'AlreadySet', - type: 'error', - }, - { - inputs: [], - name: 'ExceedsMax', - type: 'error', - }, - { - inputs: [], - name: 'ZeroAddress', - type: 'error', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - 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: true, - internalType: 'address', - name: 'caller', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Harvest', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'previousOwner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnershipTransferred', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'fee', - type: 'uint256', - }, - ], - name: 'PlatformFeeUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: '_platform', - type: 'address', - }, - ], - name: 'PlatformUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: '_strategy', - type: 'address', - }, - ], - name: 'StrategySet', - 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: 'amount', - 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: false, - internalType: 'uint256', - name: 'penalty', - type: 'uint256', - }, - ], - name: 'WithdrawalPenaltyUpdated', - type: 'event', - }, - { - inputs: [], - name: 'DOMAIN_SEPARATOR', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'FEE_DENOMINATOR', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'MAX_PLATFORM_FEE', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'MAX_WITHDRAWAL_PENALTY', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'address', - name: '', - 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: 'contract ERC20', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - 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: '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: 'shares', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'harvest', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'maxDeposit', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - 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: 'assets', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'nonces', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'owner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'deadline', - type: 'uint256', - }, - { - internalType: 'uint8', - name: 'v', - type: 'uint8', - }, - { - internalType: 'bytes32', - name: 'r', - type: 'bytes32', - }, - { - internalType: 'bytes32', - name: 's', - type: 'bytes32', - }, - ], - name: 'permit', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'platform', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'platformFee', - 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: '', - 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: 'assets', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'renounceOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_platform', - type: 'address', - }, - ], - name: 'setPlatform', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'fee', - type: 'uint256', - }, - ], - name: 'setPlatformFee', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_strategy', - type: 'address', - }, - ], - name: 'setStrategy', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'penalty', - type: 'uint256', - }, - ], - name: 'setWithdrawalPenalty', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'strategy', - outputs: [ - { - internalType: 'contract UnionPirexStaking', - 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: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'from', - type: 'address', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'transferOwnership', - outputs: [], - 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: 'shares', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'withdrawalPenalty', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, -] as const; - -export type ApxBtrfly = typeof apxBtrflyAbi; -export type ApxBtrflyContract = GetContractReturnType; - -export class ApxBtrfly__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: apxBtrflyAbi, publicClient: client }); - } -} diff --git a/src/apps/pirex/contracts/viem/ApxGlp.ts b/src/apps/pirex/contracts/viem/ApxGlp.ts deleted file mode 100644 index 27c9e14bc..000000000 --- a/src/apps/pirex/contracts/viem/ApxGlp.ts +++ /dev/null @@ -1,1449 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const apxGlpAbi = [ - { - inputs: [ - { - internalType: 'address', - name: '_gmxBaseReward', - type: 'address', - }, - { - internalType: 'address', - name: '_asset', - type: 'address', - }, - { - internalType: 'address', - name: '_pxGmx', - type: 'address', - }, - { - internalType: 'string', - name: '_name', - type: 'string', - }, - { - internalType: 'string', - name: '_symbol', - type: 'string', - }, - { - internalType: 'address', - name: '_platform', - type: 'address', - }, - { - internalType: 'address', - name: '_rewardsModule', - type: 'address', - }, - { - internalType: 'address', - name: '_pirexFees', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - inputs: [], - name: 'ExceedsMax', - type: 'error', - }, - { - inputs: [], - name: 'InvalidAssetParam', - type: 'error', - }, - { - inputs: [], - name: 'InvalidParam', - type: 'error', - }, - { - inputs: [], - name: 'ZeroAddress', - type: 'error', - }, - { - inputs: [], - name: 'ZeroAmount', - type: 'error', - }, - { - inputs: [], - name: 'ZeroShares', - type: 'error', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'user', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'rewardsDelta', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'rewardsIndex', - type: 'uint256', - }, - ], - name: 'AccrueRewards', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'accruedRewards', - type: 'uint256', - }, - ], - name: 'AccrueStrategy', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'incentive', - type: 'uint256', - }, - ], - name: 'CompoundIncentiveUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'caller', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'minGlp', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'gmxBaseRewardAmount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'pxGmxAmountOut', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'pxGlpAmountOut', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'totalPxGlpFee', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'totalPxGmxFee', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'pxGlpIncentive', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'pxGmxIncentive', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'strategyIndex', - type: 'uint256', - }, - ], - name: 'Compounded', - 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: true, - internalType: 'address', - name: 'user', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnershipTransferred', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'fee', - type: 'uint256', - }, - ], - name: 'PlatformFeeUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: '_platform', - type: 'address', - }, - ], - name: 'PlatformUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'account', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'PxGmxClaimed', - 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: 'amount', - 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: false, - internalType: 'uint256', - name: 'penalty', - type: 'uint256', - }, - ], - name: 'WithdrawalPenaltyUpdated', - type: 'event', - }, - { - inputs: [], - name: 'DOMAIN_SEPARATOR', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'FEE_DENOMINATOR', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'MAX_COMPOUND_INCENTIVE', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'MAX_PLATFORM_FEE', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'MAX_WITHDRAWAL_PENALTY', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'ONE', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'address', - name: '', - 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: 'contract ERC20', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'minUsdg', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'minGlp', - type: 'uint256', - }, - { - internalType: 'bool', - name: 'optOutIncentive', - type: 'bool', - }, - ], - name: 'compound', - outputs: [ - { - internalType: 'uint256', - name: 'gmxBaseRewardAmountIn', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'pxGmxAmountOut', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'pxGlpAmountOut', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'totalPxGlpFee', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'totalPxGmxFee', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'pxGlpIncentive', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'pxGmxIncentive', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'compoundIncentive', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - 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: '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: 'shares', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - ], - name: 'depositFsGlp', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'token', - type: 'address', - }, - { - internalType: 'uint256', - name: 'tokenAmount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'minUsdg', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'minGlp', - type: 'uint256', - }, - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - ], - name: 'depositGlp', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'minUsdg', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'minGlp', - type: 'uint256', - }, - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - ], - name: 'depositGlpETH', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'payable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'user', - type: 'address', - }, - ], - name: 'getUserIndex', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'user', - type: 'address', - }, - ], - name: 'getUserRewardsAccrued', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'gmxBaseReward', - outputs: [ - { - internalType: 'contract ERC20', - name: '', - type: 'address', - }, - ], - 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: '', - 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: 'account', - 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: 'assets', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'nonces', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'owner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'deadline', - type: 'uint256', - }, - { - internalType: 'uint8', - name: 'v', - type: 'uint8', - }, - { - internalType: 'bytes32', - name: 'r', - type: 'bytes32', - }, - { - internalType: 'bytes32', - name: 's', - type: 'bytes32', - }, - ], - name: 'permit', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'pirexFees', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'platform', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'platformFee', - 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: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'pxGmx', - outputs: [ - { - internalType: 'contract ERC20', - name: '', - type: 'address', - }, - ], - 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: 'assets', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'rewardsModule', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'incentive', - type: 'uint256', - }, - ], - name: 'setCompoundIncentive', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_platform', - type: 'address', - }, - ], - name: 'setPlatform', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'fee', - type: 'uint256', - }, - ], - name: 'setPlatformFee', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'penalty', - type: 'uint256', - }, - ], - name: 'setWithdrawalPenalty', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'strategyIndex', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - 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: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'from', - type: 'address', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'transferOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'vaultTotalAssets', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'vaultTotalExtraRewards', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - 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: 'shares', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'withdrawalPenalty', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, -] as const; - -export type ApxGlp = typeof apxGlpAbi; -export type ApxGlpContract = GetContractReturnType; - -export class ApxGlp__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: apxGlpAbi, publicClient: client }); - } -} diff --git a/src/apps/pirex/contracts/viem/ApxGmx.ts b/src/apps/pirex/contracts/viem/ApxGmx.ts deleted file mode 100644 index 1aba1d56c..000000000 --- a/src/apps/pirex/contracts/viem/ApxGmx.ts +++ /dev/null @@ -1,1288 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const apxGmxAbi = [ - { - inputs: [ - { - internalType: 'address', - name: '_gmxBaseReward', - type: 'address', - }, - { - internalType: 'address', - name: '_gmx', - type: 'address', - }, - { - internalType: 'address', - name: '_asset', - type: 'address', - }, - { - internalType: 'string', - name: '_name', - type: 'string', - }, - { - internalType: 'string', - name: '_symbol', - type: 'string', - }, - { - internalType: 'address', - name: '_platform', - type: 'address', - }, - { - internalType: 'address', - name: '_rewardsModule', - type: 'address', - }, - { - internalType: 'address', - name: '_pirexFees', - type: 'address', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - inputs: [], - name: 'AlreadySet', - type: 'error', - }, - { - inputs: [], - name: 'ExceedsMax', - type: 'error', - }, - { - inputs: [], - name: 'InvalidAssetParam', - type: 'error', - }, - { - inputs: [], - name: 'InvalidParam', - type: 'error', - }, - { - inputs: [], - name: 'ZeroAddress', - type: 'error', - }, - { - inputs: [], - name: 'ZeroAmount', - type: 'error', - }, - { - inputs: [], - name: 'ZeroShares', - type: 'error', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'incentive', - type: 'uint256', - }, - ], - name: 'CompoundIncentiveUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'caller', - type: 'address', - }, - { - indexed: false, - internalType: 'uint24', - name: 'fee', - type: 'uint24', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amountOutMinimum', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint160', - name: 'sqrtPriceLimitX96', - type: 'uint160', - }, - { - indexed: false, - internalType: 'uint256', - name: 'gmxBaseRewardAmountIn', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'gmxAmountOut', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'pxGmxMintAmount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'totalFee', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'incentive', - type: 'uint256', - }, - ], - name: 'Compounded', - 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: true, - internalType: 'address', - name: 'user', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnershipTransferred', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'fee', - type: 'uint256', - }, - ], - name: 'PlatformFeeUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: '_platform', - type: 'address', - }, - ], - name: 'PlatformUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint24', - name: '_poolFee', - type: 'uint24', - }, - ], - name: 'PoolFeeUpdated', - 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: 'amount', - 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: false, - internalType: 'uint256', - name: 'penalty', - type: 'uint256', - }, - ], - name: 'WithdrawalPenaltyUpdated', - type: 'event', - }, - { - inputs: [], - name: 'DOMAIN_SEPARATOR', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'FEE_DENOMINATOR', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'MAX_COMPOUND_INCENTIVE', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'MAX_PLATFORM_FEE', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'MAX_WITHDRAWAL_PENALTY', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'SWAP_ROUTER', - outputs: [ - { - internalType: 'contract IV3SwapRouter', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'address', - name: '', - 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: 'contract ERC20', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amountOutMinimum', - type: 'uint256', - }, - { - internalType: 'uint160', - name: 'sqrtPriceLimitX96', - type: 'uint160', - }, - { - internalType: 'bool', - name: 'optOutIncentive', - type: 'bool', - }, - ], - name: 'compound', - outputs: [ - { - internalType: 'uint256', - name: 'gmxBaseRewardAmountIn', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'gmxAmountOut', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'pxGmxMintAmount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'totalFee', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'incentive', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'compoundIncentive', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - 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: '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: 'shares', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - ], - name: 'depositGmx', - outputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'gmx', - outputs: [ - { - internalType: 'contract ERC20', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'gmxBaseReward', - outputs: [ - { - internalType: 'contract ERC20', - name: '', - type: 'address', - }, - ], - 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: '', - 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: 'account', - 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: 'assets', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'nonces', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'owner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'deadline', - type: 'uint256', - }, - { - internalType: 'uint8', - name: 'v', - type: 'uint8', - }, - { - internalType: 'bytes32', - name: 'r', - type: 'bytes32', - }, - { - internalType: 'bytes32', - name: 's', - type: 'bytes32', - }, - ], - name: 'permit', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'pirexFees', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'platform', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'platformFee', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'poolFee', - outputs: [ - { - internalType: 'uint24', - name: '', - type: 'uint24', - }, - ], - 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: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'redeem', - outputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'rewardsModule', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'incentive', - type: 'uint256', - }, - ], - name: 'setCompoundIncentive', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_platform', - type: 'address', - }, - ], - name: 'setPlatform', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'fee', - type: 'uint256', - }, - ], - name: 'setPlatformFee', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint24', - name: '_poolFee', - type: 'uint24', - }, - ], - name: 'setPoolFee', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'penalty', - type: 'uint256', - }, - ], - name: 'setWithdrawalPenalty', - outputs: [], - stateMutability: 'nonpayable', - 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: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'from', - type: 'address', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'transferOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'vaultTotalAssets', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - { - internalType: 'address', - name: 'receiver', - type: 'address', - }, - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'withdraw', - outputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'withdrawalPenalty', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, -] as const; - -export type ApxGmx = typeof apxGmxAbi; -export type ApxGmxContract = GetContractReturnType; - -export class ApxGmx__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: apxGmxAbi, publicClient: client }); - } -} diff --git a/src/apps/pirex/contracts/viem/index.ts b/src/apps/pirex/contracts/viem/index.ts index df94f40dd..32368f855 100644 --- a/src/apps/pirex/contracts/viem/index.ts +++ b/src/apps/pirex/contracts/viem/index.ts @@ -2,12 +2,6 @@ /* tslint:disable */ /* eslint-disable */ -export type { ApxBtrfly } from './ApxBtrfly'; -export type { ApxGlp } from './ApxGlp'; -export type { ApxGmx } from './ApxGmx'; export type { PirexPxCvx } from './PirexPxCvx'; -export { ApxBtrfly__factory } from './ApxBtrfly'; -export { ApxGlp__factory } from './ApxGlp'; -export { ApxGmx__factory } from './ApxGmx'; export { PirexPxCvx__factory } from './PirexPxCvx'; diff --git a/src/apps/pirex/ethereum/pirex.apxbtrfly.token-fetcher.ts b/src/apps/pirex/ethereum/pirex.apxbtrfly.token-fetcher.ts deleted file mode 100644 index 4efee3648..000000000 --- a/src/apps/pirex/ethereum/pirex.apxbtrfly.token-fetcher.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { - GetAddressesParams, - DefaultAppTokenDefinition, - GetUnderlyingTokensParams, - UnderlyingTokenDefinition, - GetPricePerShareParams, -} from '~position/template/app-token.template.types'; - -import { PirexViemContractFactory } from '../contracts'; -import { ApxBtrfly } from '../contracts/viem'; - -@PositionTemplate() -export class EthereumPirexApxBtrflyTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Pirex BTRFLY'; - - constructor( - @Inject(APP_TOOLKIT) readonly appToolkit: IAppToolkit, - @Inject(PirexViemContractFactory) private readonly pirexContractFactory: PirexViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.pirexContractFactory.apxBtrfly({ address, network: this.network }); - } - - async getAddresses(_params: GetAddressesParams): Promise { - return ['0xfa35d1f603384e8fcfcbff3e610935d02922544e']; - } - - async getUnderlyingTokenDefinitions( - _params: GetUnderlyingTokensParams, - ): Promise { - return [{ address: '0xc55126051b22ebb829d00368f4b12bde432de5da', network: this.network }]; - } - - async getPricePerShare({ contract, appToken }: GetPricePerShareParams) { - const reserveRaw = await contract.read.totalAssets(); - const reserve = Number(reserveRaw) / 10 ** appToken.tokens[0].decimals; - const pricePerShare = reserve / appToken.supply; - return [pricePerShare]; - } -} diff --git a/src/apps/pirex/pirex.module.ts b/src/apps/pirex/pirex.module.ts index 56e188921..fd9cbf63e 100644 --- a/src/apps/pirex/pirex.module.ts +++ b/src/apps/pirex/pirex.module.ts @@ -2,22 +2,16 @@ import { Module } from '@nestjs/common'; import { AbstractApp } from '~app/app.dynamic-module'; -import { ArbitrumPirexApxglpTokenFetcher } from './arbitrum/pirex.apxglp.token-fetcher'; -import { ArbitrumPirexApxgmxTokenFetcher } from './arbitrum/pirex.apxgmx.token-fetcher'; import { ArbitrumPirexPxGlpTokenFetcher } from './arbitrum/pirex.pxglp.token-fetcher'; import { ArbitrumPirexPxGmxTokenFetcher } from './arbitrum/pirex.pxgmx.token-fetcher'; import { PirexViemContractFactory } from './contracts'; -import { EthereumPirexApxBtrflyTokenFetcher } from './ethereum/pirex.apxbtrfly.token-fetcher'; import { EthereumPirexPxBtrflyTokenFetcher } from './ethereum/pirex.pxbtrfly.token-fetcher'; import { EthereumPirexPxCvxTokenFetcher } from './ethereum/pirex.pxcvx.token-fetcher'; @Module({ providers: [ - ArbitrumPirexApxgmxTokenFetcher, - ArbitrumPirexApxglpTokenFetcher, ArbitrumPirexPxGlpTokenFetcher, ArbitrumPirexPxGmxTokenFetcher, - EthereumPirexApxBtrflyTokenFetcher, EthereumPirexPxCvxTokenFetcher, EthereumPirexPxBtrflyTokenFetcher, PirexViemContractFactory, diff --git a/src/apps/pods-yield/ethereum/pods-yield.strategy.token-fetcher.ts b/src/apps/pods-yield/ethereum/pods-yield.strategy.token-fetcher.ts deleted file mode 100644 index f019d5fb6..000000000 --- a/src/apps/pods-yield/ethereum/pods-yield.strategy.token-fetcher.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { - GetDisplayPropsParams, - GetPricePerShareParams, - GetUnderlyingTokensParams, -} from '~position/template/app-token.template.types'; - -import { PodsYieldViemContractFactory } from '../contracts'; -import { PodsYieldVault } from '../contracts/viem'; - -import { strategyAddresses, strategyDetails } from './config'; - -@PositionTemplate() -export class EthereumPodsYieldStrategyTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Strategies'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(PodsYieldViemContractFactory) protected readonly contractFactory: PodsYieldViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.podsYieldVault({ address, network: this.network }); - } - - async getAddresses() { - return strategyAddresses; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.asset(), network: this.network }]; - } - - async getPricePerShare({ contract, appToken }: GetPricePerShareParams) { - const [assetsRaw, supplyRaw] = await Promise.all([contract.read.totalAssets(), contract.read.totalSupply()]); - const supply = Number(supplyRaw) / 10 ** appToken.decimals; - const assets = Number(assetsRaw) / 10 ** appToken.tokens[0].decimals; - - const pricePerShare = assets / supply; - return [pricePerShare]; - } - - async getLabel({ appToken }: GetDisplayPropsParams) { - const details = strategyDetails[appToken.address] || strategyDetails.standard; - return details.title; - } -} diff --git a/src/apps/pods-yield/pods-yield.module.ts b/src/apps/pods-yield/pods-yield.module.ts index b03828a5c..8977dd396 100644 --- a/src/apps/pods-yield/pods-yield.module.ts +++ b/src/apps/pods-yield/pods-yield.module.ts @@ -4,14 +4,8 @@ import { AbstractApp } from '~app/app.dynamic-module'; import { PodsYieldViemContractFactory } from './contracts'; import { EthereumPodsYieldQueueContractPositionFetcher } from './ethereum/pods-yield.queue.contract-position-fetcher'; -import { EthereumPodsYieldStrategyTokenFetcher } from './ethereum/pods-yield.strategy.token-fetcher'; @Module({ - providers: [ - EthereumPodsYieldQueueContractPositionFetcher, - EthereumPodsYieldStrategyTokenFetcher, - - PodsYieldViemContractFactory, - ], + providers: [PodsYieldViemContractFactory, EthereumPodsYieldQueueContractPositionFetcher], }) export class PodsYieldAppModule extends AbstractApp() {} diff --git a/src/apps/sideshift/assets/logo.png b/src/apps/sideshift/assets/logo.png deleted file mode 100644 index 88b448fde..000000000 Binary files a/src/apps/sideshift/assets/logo.png and /dev/null differ diff --git a/src/apps/sideshift/contracts/abis/svxai-vault.json b/src/apps/sideshift/contracts/abis/svxai-vault.json deleted file mode 100644 index dc926f855..000000000 --- a/src/apps/sideshift/contracts/abis/svxai-vault.json +++ /dev/null @@ -1,975 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "contract ERC20", - "name": "_UNDERLYING", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "_merkleRoot", - "type": "bytes32" - } - ], - "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": "amount", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "ContractInitialization", - "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": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "MerkleClaim", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "user", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "name": "MerkleSharesMinted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "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" - }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "UNDERLYING", - "outputs": [ - { - "internalType": "contract ERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "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": "contract ERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes32[]", - "name": "merkleProof", - "type": "bytes32[]" - } - ], - "name": "checkMerkle", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes32[]", - "name": "merkleProof", - "type": "bytes32[]" - } - ], - "name": "claimShares", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "contractInitialized", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "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": "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": "shares", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "emergencyMerkleTransfer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "maxDeposit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "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": "address", - "name": "", - "type": "address" - } - ], - "name": "merkleClaimed", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "merkleMinted", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "merkleRoot", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "merkleUnclaimed", - "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": "assets", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "nonces", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "permit", - "outputs": [], - "stateMutability": "nonpayable", - "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": "", - "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": "assets", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "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": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_shares", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "vaultInitialize", - "outputs": [], - "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": "shares", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/sideshift/contracts/index.ts b/src/apps/sideshift/contracts/index.ts deleted file mode 100644 index 5dcfebdf6..000000000 --- a/src/apps/sideshift/contracts/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * from './viem.contract-factory'; diff --git a/src/apps/sideshift/contracts/viem.contract-factory.ts b/src/apps/sideshift/contracts/viem.contract-factory.ts deleted file mode 100644 index 13183f95c..000000000 --- a/src/apps/sideshift/contracts/viem.contract-factory.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Injectable, Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { Network } from '~types/network.interface'; - -import { SvxaiVault__factory } from './viem'; - -type ContractOpts = { address: string; network: Network }; - -@Injectable() -export class SideshiftViemContractFactory { - constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) {} - - svxaiVault({ address, network }: ContractOpts) { - return SvxaiVault__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } -} diff --git a/src/apps/sideshift/contracts/viem/SvxaiVault.ts b/src/apps/sideshift/contracts/viem/SvxaiVault.ts deleted file mode 100644 index 7ca1f81cd..000000000 --- a/src/apps/sideshift/contracts/viem/SvxaiVault.ts +++ /dev/null @@ -1,989 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const svxaiVaultAbi = [ - { - inputs: [ - { - internalType: 'contract ERC20', - name: '_UNDERLYING', - type: 'address', - }, - { - internalType: 'bytes32', - name: '_merkleRoot', - type: 'bytes32', - }, - ], - 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: 'amount', - type: 'uint256', - }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'user', - type: 'address', - }, - ], - name: 'ContractInitialization', - 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: true, - internalType: 'address', - name: 'user', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'MerkleClaim', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'user', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'MerkleSharesMinted', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'previousOwner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnershipTransferred', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - 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', - }, - { - inputs: [], - name: 'DOMAIN_SEPARATOR', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'UNDERLYING', - outputs: [ - { - internalType: 'contract ERC20', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'address', - name: '', - 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: 'contract ERC20', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_sender', - type: 'address', - }, - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - { - internalType: 'bytes32[]', - name: 'merkleProof', - type: 'bytes32[]', - }, - ], - name: 'checkMerkle', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_sender', - type: 'address', - }, - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - { - internalType: 'bytes32[]', - name: 'merkleProof', - type: 'bytes32[]', - }, - ], - name: 'claimShares', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'contractInitialized', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - 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: '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: 'shares', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'emergencyMerkleTransfer', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_address', - type: 'address', - }, - ], - name: 'maxDeposit', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_address', - 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: 'address', - name: '', - type: 'address', - }, - ], - name: 'merkleClaimed', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'merkleMinted', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'merkleRoot', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'merkleUnclaimed', - 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: 'assets', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'nonces', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'owner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'deadline', - type: 'uint256', - }, - { - internalType: 'uint8', - name: 'v', - type: 'uint8', - }, - { - internalType: 'bytes32', - name: 'r', - type: 'bytes32', - }, - { - internalType: 'bytes32', - name: 's', - type: 'bytes32', - }, - ], - name: 'permit', - outputs: [], - stateMutability: 'nonpayable', - 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: '', - 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: 'assets', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'renounceOwnership', - outputs: [], - stateMutability: 'nonpayable', - 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: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'from', - type: 'address', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'transferOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_shares', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'vaultInitialize', - outputs: [], - 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: 'shares', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type SvxaiVault = typeof svxaiVaultAbi; -export type SvxaiVaultContract = GetContractReturnType; - -export class SvxaiVault__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: svxaiVaultAbi, publicClient: client }); - } -} diff --git a/src/apps/sideshift/contracts/viem/index.ts b/src/apps/sideshift/contracts/viem/index.ts deleted file mode 100644 index 5cd915574..000000000 --- a/src/apps/sideshift/contracts/viem/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -export type { SvxaiVault } from './SvxaiVault'; - -export { SvxaiVault__factory } from './SvxaiVault'; diff --git a/src/apps/sideshift/ethereum/sideshift.svxai.token-fetcher.ts b/src/apps/sideshift/ethereum/sideshift.svxai.token-fetcher.ts deleted file mode 100644 index 404ec719a..000000000 --- a/src/apps/sideshift/ethereum/sideshift.svxai.token-fetcher.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetPricePerShareParams, GetUnderlyingTokensParams } from '~position/template/app-token.template.types'; -import { Network } from '~types/network.interface'; - -import { SideshiftViemContractFactory } from '../contracts'; -import { SvxaiVault } from '../contracts/viem'; - -const network = Network.ETHEREUM_MAINNET; - -@PositionTemplate() -export class EthereumSideshiftSvxaiTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'xvXAI'; - - constructor( - @Inject(APP_TOOLKIT) readonly appToolkit: IAppToolkit, - @Inject(SideshiftViemContractFactory) private readonly contractFactory: SideshiftViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.svxaiVault({ address, network }); - } - - async getAddresses() { - return ['0x3808708e761b988d23ae011ed0e12674fb66bd62']; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.asset(), network: this.network }]; - } - - async getPricePerShare({ contract, appToken }: GetPricePerShareParams) { - const reserveRaw = await contract.read.totalAssets(); - const reserve = Number(reserveRaw) / 10 ** appToken.tokens[0].decimals; - const pricePerShare = reserve / appToken.supply; - return [pricePerShare]; - } -} diff --git a/src/apps/sideshift/sideshift.module.ts b/src/apps/sideshift/sideshift.module.ts deleted file mode 100644 index adcbeba0c..000000000 --- a/src/apps/sideshift/sideshift.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Module } from '@nestjs/common'; - -import { AbstractApp } from '~app/app.dynamic-module'; - -import { SideshiftViemContractFactory } from './contracts'; -import { EthereumSideshiftSvxaiTokenFetcher } from './ethereum/sideshift.svxai.token-fetcher'; - -@Module({ - providers: [EthereumSideshiftSvxaiTokenFetcher, SideshiftViemContractFactory], -}) -export class SideshiftAppModule extends AbstractApp() {} diff --git a/src/apps/stake-dao/contracts/abis/stake-dao-passive-vault.json b/src/apps/stake-dao/contracts/abis/stake-dao-passive-vault.json deleted file mode 100644 index 7ce4f3c41..000000000 --- a/src/apps/stake-dao/contracts/abis/stake-dao-passive-vault.json +++ /dev/null @@ -1,305 +0,0 @@ -[ - { - "inputs": [ - { "internalType": "address", "name": "_token", "type": "address" }, - { "internalType": "address", "name": "_controller", "type": "address" } - ], - "payable": false, - "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": "from", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": true, - "inputs": [ - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "address", "name": "spender", "type": "address" } - ], - "name": "allowance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "approve", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "available", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "balance", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "controller", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } - ], - "name": "decreaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "internalType": "uint256", "name": "_amount", "type": "uint256" }], - "name": "deposit", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "depositAll", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "earn", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getPricePerFullShare", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "governance", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "reserve", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "harvest", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "addedValue", "type": "uint256" } - ], - "name": "increaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "max", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "min", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "internalType": "address", "name": "_controller", "type": "address" }], - "name": "setController", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "internalType": "address", "name": "_governance", "type": "address" }], - "name": "setGovernance", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "internalType": "uint256", "name": "_min", "type": "uint256" }], - "name": "setMin", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "token", - "outputs": [{ "internalType": "contract IERC20", "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "sender", "type": "address" }, - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "internalType": "uint256", "name": "_shares", "type": "uint256" }], - "name": "withdraw", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "withdrawAll", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/stake-dao/contracts/viem.contract-factory.ts b/src/apps/stake-dao/contracts/viem.contract-factory.ts index 9e047288a..df660f51c 100644 --- a/src/apps/stake-dao/contracts/viem.contract-factory.ts +++ b/src/apps/stake-dao/contracts/viem.contract-factory.ts @@ -8,7 +8,6 @@ import { StakeDaoFarm__factory, StakeDaoGauge__factory, StakeDaoMultiGauge__factory, - StakeDaoPassiveVault__factory, StakeDaoVault__factory, StakeDaoVotingEscrow__factory, } from './viem'; @@ -31,9 +30,6 @@ export class StakeDaoViemContractFactory { stakeDaoMultiGauge({ address, network }: ContractOpts) { return StakeDaoMultiGauge__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } - stakeDaoPassiveVault({ address, network }: ContractOpts) { - return StakeDaoPassiveVault__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } stakeDaoVault({ address, network }: ContractOpts) { return StakeDaoVault__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } diff --git a/src/apps/stake-dao/contracts/viem/StakeDaoPassiveVault.ts b/src/apps/stake-dao/contracts/viem/StakeDaoPassiveVault.ts deleted file mode 100644 index 27cf0bf93..000000000 --- a/src/apps/stake-dao/contracts/viem/StakeDaoPassiveVault.ts +++ /dev/null @@ -1,567 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const stakeDaoPassiveVaultAbi = [ - { - inputs: [ - { - internalType: 'address', - name: '_token', - type: 'address', - }, - { - internalType: 'address', - name: '_controller', - type: 'address', - }, - ], - payable: false, - 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: 'from', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - ], - name: 'Transfer', - type: 'event', - }, - { - constant: true, - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - ], - name: 'allowance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'approve', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'available', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'balance', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'controller', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'deposit', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [], - name: 'depositAll', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [], - name: 'earn', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'getPricePerFullShare', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'governance', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'address', - name: 'reserve', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'harvest', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'max', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'min', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'address', - name: '_controller', - type: 'address', - }, - ], - name: 'setController', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'address', - name: '_governance', - type: 'address', - }, - ], - name: 'setGovernance', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'uint256', - name: '_min', - type: 'uint256', - }, - ], - name: 'setMin', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'token', - outputs: [ - { - internalType: 'contract IERC20', - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'uint256', - name: '_shares', - type: 'uint256', - }, - ], - name: 'withdraw', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [], - name: 'withdrawAll', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type StakeDaoPassiveVault = typeof stakeDaoPassiveVaultAbi; -export type StakeDaoPassiveVaultContract = GetContractReturnType; - -export class StakeDaoPassiveVault__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: stakeDaoPassiveVaultAbi, publicClient: client }); - } -} diff --git a/src/apps/stake-dao/contracts/viem/index.ts b/src/apps/stake-dao/contracts/viem/index.ts index 8d2716eac..968c27be3 100644 --- a/src/apps/stake-dao/contracts/viem/index.ts +++ b/src/apps/stake-dao/contracts/viem/index.ts @@ -6,7 +6,6 @@ export type { StakeDaoCurvePool } from './StakeDaoCurvePool'; export type { StakeDaoFarm } from './StakeDaoFarm'; export type { StakeDaoGauge } from './StakeDaoGauge'; export type { StakeDaoMultiGauge } from './StakeDaoMultiGauge'; -export type { StakeDaoPassiveVault } from './StakeDaoPassiveVault'; export type { StakeDaoVault } from './StakeDaoVault'; export type { StakeDaoVotingEscrow } from './StakeDaoVotingEscrow'; @@ -14,6 +13,5 @@ export { StakeDaoCurvePool__factory } from './StakeDaoCurvePool'; export { StakeDaoFarm__factory } from './StakeDaoFarm'; export { StakeDaoGauge__factory } from './StakeDaoGauge'; export { StakeDaoMultiGauge__factory } from './StakeDaoMultiGauge'; -export { StakeDaoPassiveVault__factory } from './StakeDaoPassiveVault'; export { StakeDaoVault__factory } from './StakeDaoVault'; export { StakeDaoVotingEscrow__factory } from './StakeDaoVotingEscrow'; diff --git a/src/apps/stake-dao/ethereum/stake-dao.passive-vault.token-fetcher.ts b/src/apps/stake-dao/ethereum/stake-dao.passive-vault.token-fetcher.ts deleted file mode 100644 index 90d81ecbb..000000000 --- a/src/apps/stake-dao/ethereum/stake-dao.passive-vault.token-fetcher.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetPricePerShareParams, GetUnderlyingTokensParams } from '~position/template/app-token.template.types'; - -import { StakeDaoViemContractFactory } from '../contracts'; -import { StakeDaoPassiveVault } from '../contracts/viem/StakeDaoPassiveVault'; - -@PositionTemplate() -export class EthereumStakeDaoPassiveVaultTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Vaults'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(StakeDaoViemContractFactory) protected readonly contractFactory: StakeDaoViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.stakeDaoPassiveVault({ address, network: this.network }); - } - - getAddresses() { - return [ - '0x5af15da84a4a6edf2d9fa6720de921e1026e37b7', // Passive FRAX - '0xcd6997334867728ba14d7922f72c893fcee70e84', // Passive sEUR - '0xbc10c4f7b9fe0b305e8639b04c536633a3db7065', // Passive stETH - '0xa2761b0539374eb7af2155f76eb09864af075250', // Passive sETH - '0xb17640796e4c27a39af51887aff3f8dc0daf9567', // Passive 3CRV - ]; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.token(), network: this.network }]; - } - - async getPricePerShare({ appToken, contract }: GetPricePerShareParams) { - const pricePerShareRaw = await contract.read.getPricePerFullShare(); - - return [Number(pricePerShareRaw) / 10 ** appToken.decimals]; - } -} diff --git a/src/apps/stake-dao/stake-dao.module.ts b/src/apps/stake-dao/stake-dao.module.ts index 5ad9b810f..92d677a1c 100644 --- a/src/apps/stake-dao/stake-dao.module.ts +++ b/src/apps/stake-dao/stake-dao.module.ts @@ -7,7 +7,6 @@ import { EthereumStakeDaoFarmContractPositionFetcher } from './ethereum/stake-da import { EthereumStakeDaoGaugeContractPositionFetcher } from './ethereum/stake-dao.gauge.contract-position-fetcher'; import { EthereumStakeDaoLockerTokenFetcher } from './ethereum/stake-dao.locker.token-fetcher'; import { EthereumStakeDaoMultiGaugeContractPositionFetcher } from './ethereum/stake-dao.multi-gauge.contract-position-fetcher'; -import { EthereumStakeDaoPassiveVaultTokenFetcher } from './ethereum/stake-dao.passive-vault.token-fetcher'; import { EthereumStakeDaoVaultTokenFetcher } from './ethereum/stake-dao.vault.token-fetcher'; import { EthereumStakeDaoEscrowedQiContractPositionFetcher } from './ethereum/stake-dao.voting-escrow.contract-position-fetcher'; @@ -19,7 +18,6 @@ import { EthereumStakeDaoEscrowedQiContractPositionFetcher } from './ethereum/st EthereumStakeDaoFarmContractPositionFetcher, EthereumStakeDaoEscrowedQiContractPositionFetcher, EthereumStakeDaoVaultTokenFetcher, - EthereumStakeDaoPassiveVaultTokenFetcher, EthereumStakeDaoMultiGaugeContractPositionFetcher, ], }) diff --git a/src/apps/swell/assets/logo.png b/src/apps/swell/assets/logo.png deleted file mode 100644 index e59661441..000000000 Binary files a/src/apps/swell/assets/logo.png and /dev/null differ diff --git a/src/apps/swell/contracts/abis/sweth.json b/src/apps/swell/contracts/abis/sweth.json deleted file mode 100644 index cba102029..000000000 --- a/src/apps/swell/contracts/abis/sweth.json +++ /dev/null @@ -1,1062 +0,0 @@ -[ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "AddressAlreadyInWhitelist", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "AddressMissingFromWhitelist", - "type": "error" - }, - { - "inputs": [], - "name": "BotMethodsPaused", - "type": "error" - }, - { - "inputs": [], - "name": "CannotBeZeroAddress", - "type": "error" - }, - { - "inputs": [], - "name": "CannotRepriceWithZeroSwETHSupply", - "type": "error" - }, - { - "inputs": [], - "name": "CoreMethodsPaused", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidETHDeposit", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidMethodCall", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidPreRewardETHReserves", - "type": "error" - }, - { - "inputs": [], - "name": "NoActiveValidators", - "type": "error" - }, - { - "inputs": [], - "name": "NoTokensToWithdraw", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "remainingTime", - "type": "uint256" - } - ], - "name": "NotEnoughTimeElapsedForReprice", - "type": "error" - }, - { - "inputs": [], - "name": "NotInWhitelist", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "x", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "y", - "type": "uint256" - } - ], - "name": "PRBMath_MulDiv18_Overflow", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "x", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "y", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "denominator", - "type": "uint256" - } - ], - "name": "PRBMath_MulDiv_Overflow", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "repriceDiff", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maximumRepriceDiff", - "type": "uint256" - } - ], - "name": "RepriceDifferenceTooLarge", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "repriceswETHDiff", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maximumswETHRepriceDiff", - "type": "uint256" - } - ], - "name": "RepriceswETHDifferenceTooLarge", - "type": "error" - }, - { - "inputs": [], - "name": "RewardPercentageTotalOverflow", - "type": "error" - }, - { - "inputs": [], - "name": "WhitelistAlreadyDisabled", - "type": "error" - }, - { - "inputs": [], - "name": "WhitelistAlreadyEnabled", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "AddedToWhitelist", - "type": "event" - }, - { - "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": "from", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swETHMinted", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newTotalETHDeposited", - "type": "uint256" - } - ], - "name": "ETHDepositReceived", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swETHBurned", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "ethReturned", - "type": "uint256" - } - ], - "name": "ETHWithdrawn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "_oldMaximumRepriceDifferencePercentage", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_newMaximumRepriceDifferencePercentage", - "type": "uint256" - } - ], - "name": "MaximumRepriceDifferencePercentageUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "_oldMaximumRepriceswETHDifferencePercentage", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_newMaximumRepriceswETHDifferencePercentage", - "type": "uint256" - } - ], - "name": "MaximumRepriceswETHDifferencePercentageUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "_oldMinimumRepriceTime", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_newMinimumRepriceTime", - "type": "uint256" - } - ], - "name": "MinimumRepriceTimeUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldPercentage", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newPercentage", - "type": "uint256" - } - ], - "name": "NodeOperatorRewardPercentageUpdate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "RemovedFromWhitelist", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "newEthReserves", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newSwETHToETHRate", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "nodeOperatorRewards", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "swellTreasuryRewards", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalETHDeposited", - "type": "uint256" - } - ], - "name": "Reprice", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldPercentage", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newPercentage", - "type": "uint256" - } - ], - "name": "SwellTreasuryRewardPercentageUpdate", - "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": [], - "name": "WhitelistDisabled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "WhitelistEnabled", - "type": "event" - }, - { - "stateMutability": "nonpayable", - "type": "fallback" - }, - { - "inputs": [], - "name": "AccessControlManager", - "outputs": [ - { - "internalType": "contract IAccessControlManager", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "addToWhitelist", - "outputs": [], - "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": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_addresses", - "type": "address[]" - } - ], - "name": "batchAddToWhitelist", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_addresses", - "type": "address[]" - } - ], - "name": "batchRemoveFromWhitelist", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "deposit", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "disableWhitelist", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "enableWhitelist", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "ethToSwETHRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IAccessControlManager", - "name": "_accessControlManager", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "lastRepriceETHReserves", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lastRepriceUNIX", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maximumRepriceDifferencePercentage", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maximumRepriceswETHDifferencePercentage", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "minimumRepriceTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "nodeOperatorRewardPercentage", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "removeFromWhitelist", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_preRewardETHReserves", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_newETHRewards", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_swETHTotalSupply", - "type": "uint256" - } - ], - "name": "reprice", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_maximumRepriceDifferencePercentage", - "type": "uint256" - } - ], - "name": "setMaximumRepriceDifferencePercentage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_maximumRepriceswETHDifferencePercentage", - "type": "uint256" - } - ], - "name": "setMaximumRepriceswETHDifferencePercentage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_minimumRepriceTime", - "type": "uint256" - } - ], - "name": "setMinimumRepriceTime", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_newNodeOperatorRewardPercentage", - "type": "uint256" - } - ], - "name": "setNodeOperatorRewardPercentage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_newSwellTreasuryRewardPercentage", - "type": "uint256" - } - ], - "name": "setSwellTreasuryRewardPercentage", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "swETHToETHRate", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "swellTreasuryRewardPercentage", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalETHDeposited", - "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": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "whitelistEnabled", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "whitelistedAddresses", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract IERC20", - "name": "_token", - "type": "address" - } - ], - "name": "withdrawERC20", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/swell/contracts/index.ts b/src/apps/swell/contracts/index.ts deleted file mode 100644 index 5dcfebdf6..000000000 --- a/src/apps/swell/contracts/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * from './viem.contract-factory'; diff --git a/src/apps/swell/contracts/viem.contract-factory.ts b/src/apps/swell/contracts/viem.contract-factory.ts deleted file mode 100644 index 5b7292f16..000000000 --- a/src/apps/swell/contracts/viem.contract-factory.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Injectable, Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { Network } from '~types/network.interface'; - -import { Sweth__factory } from './viem'; - -type ContractOpts = { address: string; network: Network }; - -@Injectable() -export class SwellViemContractFactory { - constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) {} - - sweth({ address, network }: ContractOpts) { - return Sweth__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } -} diff --git a/src/apps/swell/contracts/viem/Sweth.ts b/src/apps/swell/contracts/viem/Sweth.ts deleted file mode 100644 index 107341fb9..000000000 --- a/src/apps/swell/contracts/viem/Sweth.ts +++ /dev/null @@ -1,1076 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const swethAbi = [ - { - inputs: [], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - inputs: [ - { - internalType: 'address', - name: '_address', - type: 'address', - }, - ], - name: 'AddressAlreadyInWhitelist', - type: 'error', - }, - { - inputs: [ - { - internalType: 'address', - name: '_address', - type: 'address', - }, - ], - name: 'AddressMissingFromWhitelist', - type: 'error', - }, - { - inputs: [], - name: 'BotMethodsPaused', - type: 'error', - }, - { - inputs: [], - name: 'CannotBeZeroAddress', - type: 'error', - }, - { - inputs: [], - name: 'CannotRepriceWithZeroSwETHSupply', - type: 'error', - }, - { - inputs: [], - name: 'CoreMethodsPaused', - type: 'error', - }, - { - inputs: [], - name: 'InvalidETHDeposit', - type: 'error', - }, - { - inputs: [], - name: 'InvalidMethodCall', - type: 'error', - }, - { - inputs: [], - name: 'InvalidPreRewardETHReserves', - type: 'error', - }, - { - inputs: [], - name: 'NoActiveValidators', - type: 'error', - }, - { - inputs: [], - name: 'NoTokensToWithdraw', - type: 'error', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'remainingTime', - type: 'uint256', - }, - ], - name: 'NotEnoughTimeElapsedForReprice', - type: 'error', - }, - { - inputs: [], - name: 'NotInWhitelist', - type: 'error', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'x', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'y', - type: 'uint256', - }, - ], - name: 'PRBMath_MulDiv18_Overflow', - type: 'error', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'x', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'y', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'denominator', - type: 'uint256', - }, - ], - name: 'PRBMath_MulDiv_Overflow', - type: 'error', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'repriceDiff', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'maximumRepriceDiff', - type: 'uint256', - }, - ], - name: 'RepriceDifferenceTooLarge', - type: 'error', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'repriceswETHDiff', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'maximumswETHRepriceDiff', - type: 'uint256', - }, - ], - name: 'RepriceswETHDifferenceTooLarge', - type: 'error', - }, - { - inputs: [], - name: 'RewardPercentageTotalOverflow', - type: 'error', - }, - { - inputs: [], - name: 'WhitelistAlreadyDisabled', - type: 'error', - }, - { - inputs: [], - name: 'WhitelistAlreadyEnabled', - type: 'error', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: '_address', - type: 'address', - }, - ], - name: 'AddedToWhitelist', - type: 'event', - }, - { - 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: 'from', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'swETHMinted', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'newTotalETHDeposited', - type: 'uint256', - }, - ], - name: 'ETHDepositReceived', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'to', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'swETHBurned', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'ethReturned', - type: 'uint256', - }, - ], - name: 'ETHWithdrawn', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint8', - name: 'version', - type: 'uint8', - }, - ], - name: 'Initialized', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: '_oldMaximumRepriceDifferencePercentage', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: '_newMaximumRepriceDifferencePercentage', - type: 'uint256', - }, - ], - name: 'MaximumRepriceDifferencePercentageUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: '_oldMaximumRepriceswETHDifferencePercentage', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: '_newMaximumRepriceswETHDifferencePercentage', - type: 'uint256', - }, - ], - name: 'MaximumRepriceswETHDifferencePercentageUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: '_oldMinimumRepriceTime', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: '_newMinimumRepriceTime', - type: 'uint256', - }, - ], - name: 'MinimumRepriceTimeUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'oldPercentage', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'newPercentage', - type: 'uint256', - }, - ], - name: 'NodeOperatorRewardPercentageUpdate', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: '_address', - type: 'address', - }, - ], - name: 'RemovedFromWhitelist', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'newEthReserves', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'newSwETHToETHRate', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'nodeOperatorRewards', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'swellTreasuryRewards', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'totalETHDeposited', - type: 'uint256', - }, - ], - name: 'Reprice', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'oldPercentage', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'newPercentage', - type: 'uint256', - }, - ], - name: 'SwellTreasuryRewardPercentageUpdate', - 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: [], - name: 'WhitelistDisabled', - type: 'event', - }, - { - anonymous: false, - inputs: [], - name: 'WhitelistEnabled', - type: 'event', - }, - { - stateMutability: 'nonpayable', - type: 'fallback', - }, - { - inputs: [], - name: 'AccessControlManager', - outputs: [ - { - internalType: 'contract IAccessControlManager', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_address', - type: 'address', - }, - ], - name: 'addToWhitelist', - outputs: [], - 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: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address[]', - name: '_addresses', - type: 'address[]', - }, - ], - name: 'batchAddToWhitelist', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address[]', - name: '_addresses', - type: 'address[]', - }, - ], - name: 'batchRemoveFromWhitelist', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'deposit', - outputs: [], - stateMutability: 'payable', - type: 'function', - }, - { - inputs: [], - name: 'disableWhitelist', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'enableWhitelist', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'ethToSwETHRate', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getRate', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'contract IAccessControlManager', - name: '_accessControlManager', - type: 'address', - }, - ], - name: 'initialize', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'lastRepriceETHReserves', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'lastRepriceUNIX', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'maximumRepriceDifferencePercentage', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'maximumRepriceswETHDifferencePercentage', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'minimumRepriceTime', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'nodeOperatorRewardPercentage', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_address', - type: 'address', - }, - ], - name: 'removeFromWhitelist', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_preRewardETHReserves', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_newETHRewards', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_swETHTotalSupply', - type: 'uint256', - }, - ], - name: 'reprice', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_maximumRepriceDifferencePercentage', - type: 'uint256', - }, - ], - name: 'setMaximumRepriceDifferencePercentage', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_maximumRepriceswETHDifferencePercentage', - type: 'uint256', - }, - ], - name: 'setMaximumRepriceswETHDifferencePercentage', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_minimumRepriceTime', - type: 'uint256', - }, - ], - name: 'setMinimumRepriceTime', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_newNodeOperatorRewardPercentage', - type: 'uint256', - }, - ], - name: 'setNodeOperatorRewardPercentage', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_newSwellTreasuryRewardPercentage', - type: 'uint256', - }, - ], - name: 'setSwellTreasuryRewardPercentage', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'swETHToETHRate', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'swellTreasuryRewardPercentage', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalETHDeposited', - 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: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'from', - type: 'address', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'whitelistEnabled', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'whitelistedAddresses', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'contract IERC20', - name: '_token', - type: 'address', - }, - ], - name: 'withdrawERC20', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type Sweth = typeof swethAbi; -export type SwethContract = GetContractReturnType; - -export class Sweth__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: swethAbi, publicClient: client }); - } -} diff --git a/src/apps/swell/contracts/viem/index.ts b/src/apps/swell/contracts/viem/index.ts deleted file mode 100644 index 1316a3caf..000000000 --- a/src/apps/swell/contracts/viem/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -export type { Sweth } from './Sweth'; - -export { Sweth__factory } from './Sweth'; diff --git a/src/apps/swell/ethereum/swell.sweth.token-fetcher.ts b/src/apps/swell/ethereum/swell.sweth.token-fetcher.ts deleted file mode 100644 index 1bd0a2ab3..000000000 --- a/src/apps/swell/ethereum/swell.sweth.token-fetcher.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { - GetAddressesParams, - DefaultAppTokenDefinition, - GetUnderlyingTokensParams, - UnderlyingTokenDefinition, - GetPricePerShareParams, - DefaultAppTokenDataProps, -} from '~position/template/app-token.template.types'; - -import { SwellViemContractFactory } from '../contracts'; -import { Sweth } from '../contracts/viem'; - -@PositionTemplate() -export class EthereumSwellSwethTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'swETH'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(SwellViemContractFactory) protected readonly contractFactory: SwellViemContractFactory, - ) { - super(appToolkit); - } - - getContract(_address: string) { - return this.contractFactory.sweth({ network: this.network, address: _address }); - } - - async getAddresses(_params: GetAddressesParams): Promise { - return ['0xf951e335afb289353dc249e82926178eac7ded78']; - } - - async getUnderlyingTokenDefinitions( - _params: GetUnderlyingTokensParams, - ): Promise { - return [{ address: '0x0000000000000000000000000000000000000000', network: this.network }]; - } - - async getPricePerShare({ - contract, - appToken, - }: GetPricePerShareParams): Promise { - const pricePerShareRaw = await contract.read.getRate(); - return [Number(pricePerShareRaw) / 10 ** appToken.decimals]; - } -} diff --git a/src/apps/swell/swell.module.ts b/src/apps/swell/swell.module.ts deleted file mode 100644 index 9359aa8e5..000000000 --- a/src/apps/swell/swell.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Module } from '@nestjs/common'; - -import { AbstractApp } from '~app/app.dynamic-module'; - -import { SwellViemContractFactory } from './contracts'; -import { EthereumSwellSwethTokenFetcher } from './ethereum/swell.sweth.token-fetcher'; - -@Module({ - providers: [EthereumSwellSwethTokenFetcher, SwellViemContractFactory], -}) -export class SwellAppModule extends AbstractApp() {} diff --git a/src/apps/tokemak/contracts/abis/tokemak-acc-toke.json b/src/apps/tokemak/contracts/abis/tokemak-acc-toke.json deleted file mode 100644 index b44f69077..000000000 --- a/src/apps/tokemak/contracts/abis/tokemak-acc-toke.json +++ /dev/null @@ -1,420 +0,0 @@ -[ - { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "fxStateSender", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "destinationOnL2", "type": "address" } - ], - "name": "DestinationsSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "bool", "name": "eventSendSet", "type": "bool" }], - "name": "EventSendSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint8", "name": "version", "type": "uint8" }], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256", "name": "maxCap", "type": "uint256" }], - "name": "MaxCapSetEvent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256", "name": "maxLockCycles", "type": "uint256" }], - "name": "MaxLockCyclesSetEvent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256", "name": "minLockCycles", "type": "uint256" }], - "name": "MinLockCyclesSetEvent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "address", "name": "account", "type": "address" }], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "indexed": true, "internalType": "bytes32", "name": "previousAdminRole", "type": "bytes32" }, - { "indexed": true, "internalType": "bytes32", "name": "newAdminRole", "type": "bytes32" } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "sender", "type": "address" } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "tokeSource", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "numCycles", "type": "uint256" }, - { "indexed": true, "internalType": "uint256", "name": "currentCycle", "type": "uint256" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "TokeLockedEvent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "address", "name": "account", "type": "address" }], - "name": "Unpaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "WithdrawalEvent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": true, "internalType": "address", "name": "account", "type": "address" }], - "name": "WithdrawalRequestCancelledEvent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "WithdrawalRequestedEvent", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "LOCK_FOR_ROLE", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "_eventSend", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "balance", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "cancelWithdrawalRequest", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "destinations", - "outputs": [ - { "internalType": "contract IFxStateSender", "name": "fxStateSender", "type": "address" }, - { "internalType": "address", "name": "destinationOnL2", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getCurrentCycleID", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "getDepositInfo", - "outputs": [ - { "internalType": "uint256", "name": "lockCycle", "type": "uint256" }, - { "internalType": "uint256", "name": "lockDuration", "type": "uint256" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }], - "name": "getRoleAdmin", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], - "name": "getWithdrawalInfo", - "outputs": [ - { "internalType": "uint256", "name": "minCycle", "type": "uint256" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "hasRole", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_manager", "type": "address" }, - { "internalType": "uint256", "name": "_minLockCycles", "type": "uint256" }, - { "internalType": "uint256", "name": "_maxLockCycles", "type": "uint256" }, - { "internalType": "contract IERC20Upgradeable", "name": "_toke", "type": "address" }, - { "internalType": "uint256", "name": "_maxCap", "type": "uint256" } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "tokeAmount", "type": "uint256" }, - { "internalType": "uint256", "name": "numOfCycles", "type": "uint256" } - ], - "name": "lockToke", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "tokeAmount", "type": "uint256" }, - { "internalType": "uint256", "name": "numOfCycles", "type": "uint256" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "lockTokeFor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "manager", - "outputs": [{ "internalType": "contract IManager", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maxCap", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maxLockCycles", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "minLockCycles", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], - "name": "requestWithdrawal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "requestedWithdrawals", - "outputs": [ - { "internalType": "uint256", "name": "minCycle", "type": "uint256" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bytes32", "name": "role", "type": "bytes32" }, - { "internalType": "address", "name": "account", "type": "address" } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_fxStateSender", "type": "address" }, - { "internalType": "address", "name": "_destinationOnL2", "type": "address" } - ], - "name": "setDestinations", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bool", "name": "_eventSendSet", "type": "bool" }], - "name": "setEventSend", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_maxCap", "type": "uint256" }], - "name": "setMaxCap", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_maxLockCycles", "type": "uint256" }], - "name": "setMaxLockCycles", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_minLockCycles", "type": "uint256" }], - "name": "setMinLockCycles", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" }], - "name": "supportsInterface", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "toke", - "outputs": [{ "internalType": "contract IERC20Upgradeable", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "withheldLiquidity", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - } -] diff --git a/src/apps/tokemak/contracts/abis/tokemak-reactor.json b/src/apps/tokemak/contracts/abis/tokemak-reactor.json deleted file mode 100644 index 6e7e3976c..000000000 --- a/src/apps/tokemak/contracts/abis/tokemak-reactor.json +++ /dev/null @@ -1,313 +0,0 @@ -[ - { - "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": false, "internalType": "address", "name": "destinationOnL1", "type": "address" }, - { "indexed": false, "internalType": "address", "name": "destinationOnL2", "type": "address" } - ], - "name": "DestinationsSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "bool", "name": "eventSendSet", "type": "bool" }], - "name": "EventSendSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "address", "name": "account", "type": "address" }], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": 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": false, "internalType": "address", "name": "account", "type": "address" }], - "name": "Unpaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": false, "internalType": "address", "name": "requestor", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "WithdrawalRequested", - "type": "event" - }, - { - "inputs": [], - "name": "_eventSend", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "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": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], - "name": "approveManager", - "outputs": [], - "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": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } - ], - "name": "decreaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], - "name": "deposit", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "account", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "depositFor", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "destinations", - "outputs": [ - { "internalType": "contract IFxStateSender", "name": "fxStateSender", "type": "address" }, - { "internalType": "address", "name": "destinationOnL2", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "spender", "type": "address" }, - { "internalType": "uint256", "name": "addedValue", "type": "uint256" } - ], - "name": "increaseAllowance", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "contract IWETH", "name": "_weth", "type": "address" }, - { "internalType": "contract IManager", "name": "_manager", "type": "address" }, - { "internalType": "string", "name": "_name", "type": "string" }, - { "internalType": "string", "name": "_symbol", "type": "string" } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "manager", - "outputs": [{ "internalType": "contract IManager", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { "inputs": [], "name": "pause", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "paused", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], - "name": "requestWithdrawal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "requestedWithdrawals", - "outputs": [ - { "internalType": "uint256", "name": "minCycle", "type": "uint256" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_fxStateSender", "type": "address" }, - { "internalType": "address", "name": "_destinationOnL2", "type": "address" } - ], - "name": "setDestinations", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bool", "name": "_eventSendSet", "type": "bool" }], - "name": "setEventSend", - "outputs": [], - "stateMutability": "nonpayable", - "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": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transfer", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "sender", "type": "address" }, - { "internalType": "address", "name": "recipient", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "underlyer", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { "inputs": [], "name": "unpause", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "weth", - "outputs": [{ "internalType": "contract IWETH", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "requestedAmount", "type": "uint256" }, - { "internalType": "bool", "name": "asEth", "type": "bool" } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "withheldLiquidity", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { "stateMutability": "payable", "type": "receive" } -] diff --git a/src/apps/tokemak/contracts/viem.contract-factory.ts b/src/apps/tokemak/contracts/viem.contract-factory.ts index 77b0580b5..9290ccfec 100644 --- a/src/apps/tokemak/contracts/viem.contract-factory.ts +++ b/src/apps/tokemak/contracts/viem.contract-factory.ts @@ -3,13 +3,7 @@ import { Injectable, Inject } from '@nestjs/common'; import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; import { Network } from '~types/network.interface'; -import { - TokemakAccToke__factory, - TokemakReactor__factory, - TokemakRewards__factory, - TokemakRewardsHash__factory, - TokemakTokeStaking__factory, -} from './viem'; +import { TokemakRewards__factory, TokemakRewardsHash__factory, TokemakTokeStaking__factory } from './viem'; type ContractOpts = { address: string; network: Network }; @@ -17,12 +11,6 @@ type ContractOpts = { address: string; network: Network }; export class TokemakViemContractFactory { constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) {} - tokemakAccToke({ address, network }: ContractOpts) { - return TokemakAccToke__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } - tokemakReactor({ address, network }: ContractOpts) { - return TokemakReactor__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } tokemakRewards({ address, network }: ContractOpts) { return TokemakRewards__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } diff --git a/src/apps/tokemak/contracts/viem/TokemakAccToke.ts b/src/apps/tokemak/contracts/viem/TokemakAccToke.ts deleted file mode 100644 index 56a43ecb9..000000000 --- a/src/apps/tokemak/contracts/viem/TokemakAccToke.ts +++ /dev/null @@ -1,896 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const tokemakAccTokeAbi = [ - { - inputs: [], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'fxStateSender', - type: 'address', - }, - { - indexed: false, - internalType: 'address', - name: 'destinationOnL2', - type: 'address', - }, - ], - name: 'DestinationsSet', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'bool', - name: 'eventSendSet', - type: 'bool', - }, - ], - name: 'EventSendSet', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint8', - name: 'version', - type: 'uint8', - }, - ], - name: 'Initialized', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'maxCap', - type: 'uint256', - }, - ], - name: 'MaxCapSetEvent', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'maxLockCycles', - type: 'uint256', - }, - ], - name: 'MaxLockCyclesSetEvent', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'minLockCycles', - type: 'uint256', - }, - ], - name: 'MinLockCyclesSetEvent', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'Paused', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'bytes32', - name: 'previousAdminRole', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'bytes32', - name: 'newAdminRole', - type: 'bytes32', - }, - ], - name: 'RoleAdminChanged', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'address', - name: 'account', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'sender', - type: 'address', - }, - ], - name: 'RoleGranted', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'address', - name: 'account', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'sender', - type: 'address', - }, - ], - name: 'RoleRevoked', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'tokeSource', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'account', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'numCycles', - type: 'uint256', - }, - { - indexed: true, - internalType: 'uint256', - name: 'currentCycle', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'TokeLockedEvent', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'Unpaused', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'account', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'WithdrawalEvent', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'WithdrawalRequestCancelledEvent', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'account', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'WithdrawalRequestedEvent', - type: 'event', - }, - { - inputs: [], - name: 'DEFAULT_ADMIN_ROLE', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'LOCK_FOR_ROLE', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: '_eventSend', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: 'balance', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'cancelWithdrawalRequest', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'pure', - type: 'function', - }, - { - inputs: [], - name: 'destinations', - outputs: [ - { - internalType: 'contract IFxStateSender', - name: 'fxStateSender', - type: 'address', - }, - { - internalType: 'address', - name: 'destinationOnL2', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getCurrentCycleID', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'getDepositInfo', - outputs: [ - { - internalType: 'uint256', - name: 'lockCycle', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'lockDuration', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - ], - name: 'getRoleAdmin', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'getWithdrawalInfo', - outputs: [ - { - internalType: 'uint256', - name: 'minCycle', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'grantRole', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'hasRole', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_manager', - type: 'address', - }, - { - internalType: 'uint256', - name: '_minLockCycles', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_maxLockCycles', - type: 'uint256', - }, - { - internalType: 'contract IERC20Upgradeable', - name: '_toke', - type: 'address', - }, - { - internalType: 'uint256', - name: '_maxCap', - type: 'uint256', - }, - ], - name: 'initialize', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'tokeAmount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'numOfCycles', - type: 'uint256', - }, - ], - name: 'lockToke', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'tokeAmount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'numOfCycles', - type: 'uint256', - }, - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'lockTokeFor', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'manager', - outputs: [ - { - internalType: 'contract IManager', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'maxCap', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'maxLockCycles', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'minLockCycles', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'pure', - type: 'function', - }, - { - inputs: [], - name: 'paused', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'renounceRole', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'requestWithdrawal', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'requestedWithdrawals', - outputs: [ - { - internalType: 'uint256', - name: 'minCycle', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: 'role', - type: 'bytes32', - }, - { - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'revokeRole', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_fxStateSender', - type: 'address', - }, - { - internalType: 'address', - name: '_destinationOnL2', - type: 'address', - }, - ], - name: 'setDestinations', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bool', - name: '_eventSendSet', - type: 'bool', - }, - ], - name: 'setEventSend', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_maxCap', - type: 'uint256', - }, - ], - name: 'setMaxCap', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_maxLockCycles', - type: 'uint256', - }, - ], - name: 'setMaxLockCycles', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_minLockCycles', - type: 'uint256', - }, - ], - name: 'setMinLockCycles', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes4', - name: 'interfaceId', - type: 'bytes4', - }, - ], - name: 'supportsInterface', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'pure', - type: 'function', - }, - { - inputs: [], - name: 'toke', - outputs: [ - { - internalType: 'contract IERC20Upgradeable', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'withdraw', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'withheldLiquidity', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, -] as const; - -export type TokemakAccToke = typeof tokemakAccTokeAbi; -export type TokemakAccTokeContract = GetContractReturnType; - -export class TokemakAccToke__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: tokemakAccTokeAbi, publicClient: client }); - } -} diff --git a/src/apps/tokemak/contracts/viem/TokemakReactor.ts b/src/apps/tokemak/contracts/viem/TokemakReactor.ts deleted file mode 100644 index 28009f94b..000000000 --- a/src/apps/tokemak/contracts/viem/TokemakReactor.ts +++ /dev/null @@ -1,687 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const tokemakReactorAbi = [ - { - 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: false, - internalType: 'address', - name: 'destinationOnL1', - type: 'address', - }, - { - indexed: false, - internalType: 'address', - name: 'destinationOnL2', - type: 'address', - }, - ], - name: 'DestinationsSet', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'bool', - name: 'eventSendSet', - type: 'bool', - }, - ], - name: 'EventSendSet', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'previousOwner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnershipTransferred', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'Paused', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: 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: false, - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'Unpaused', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'requestor', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'WithdrawalRequested', - type: 'event', - }, - { - inputs: [], - name: '_eventSend', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - 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: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'approveManager', - outputs: [], - 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: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'deposit', - outputs: [], - stateMutability: 'payable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'depositFor', - outputs: [], - stateMutability: 'payable', - type: 'function', - }, - { - inputs: [], - name: 'destinations', - outputs: [ - { - internalType: 'contract IFxStateSender', - name: 'fxStateSender', - type: 'address', - }, - { - internalType: 'address', - name: 'destinationOnL2', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'contract IWETH', - name: '_weth', - type: 'address', - }, - { - internalType: 'contract IManager', - name: '_manager', - type: 'address', - }, - { - internalType: 'string', - name: '_name', - type: 'string', - }, - { - internalType: 'string', - name: '_symbol', - type: 'string', - }, - ], - name: 'initialize', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'manager', - outputs: [ - { - internalType: 'contract IManager', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'name', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'owner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'pause', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'paused', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'renounceOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'requestWithdrawal', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'requestedWithdrawals', - outputs: [ - { - internalType: 'uint256', - name: 'minCycle', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_fxStateSender', - type: 'address', - }, - { - internalType: 'address', - name: '_destinationOnL2', - type: 'address', - }, - ], - name: 'setDestinations', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bool', - name: '_eventSendSet', - type: 'bool', - }, - ], - name: 'setEventSend', - outputs: [], - stateMutability: 'nonpayable', - 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: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'sender', - type: 'address', - }, - { - internalType: 'address', - name: 'recipient', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'transferOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'underlyer', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'unpause', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'weth', - outputs: [ - { - internalType: 'contract IWETH', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'requestedAmount', - type: 'uint256', - }, - { - internalType: 'bool', - name: 'asEth', - type: 'bool', - }, - ], - name: 'withdraw', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'withheldLiquidity', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - stateMutability: 'payable', - type: 'receive', - }, -] as const; - -export type TokemakReactor = typeof tokemakReactorAbi; -export type TokemakReactorContract = GetContractReturnType; - -export class TokemakReactor__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: tokemakReactorAbi, publicClient: client }); - } -} diff --git a/src/apps/tokemak/contracts/viem/index.ts b/src/apps/tokemak/contracts/viem/index.ts index 2333d8468..5ec7acef5 100644 --- a/src/apps/tokemak/contracts/viem/index.ts +++ b/src/apps/tokemak/contracts/viem/index.ts @@ -2,14 +2,10 @@ /* tslint:disable */ /* eslint-disable */ -export type { TokemakAccToke } from './TokemakAccToke'; -export type { TokemakReactor } from './TokemakReactor'; export type { TokemakRewardsHash } from './TokemakRewardsHash'; export type { TokemakRewards } from './TokemakRewards'; export type { TokemakTokeStaking } from './TokemakTokeStaking'; -export { TokemakAccToke__factory } from './TokemakAccToke'; -export { TokemakReactor__factory } from './TokemakReactor'; export { TokemakRewardsHash__factory } from './TokemakRewardsHash'; export { TokemakRewards__factory } from './TokemakRewards'; export { TokemakTokeStaking__factory } from './TokemakTokeStaking'; diff --git a/src/apps/tokemak/ethereum/tokemak.acc-toke.token-fetcher.ts b/src/apps/tokemak/ethereum/tokemak.acc-toke.token-fetcher.ts deleted file mode 100644 index 2f978b9d8..000000000 --- a/src/apps/tokemak/ethereum/tokemak.acc-toke.token-fetcher.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetUnderlyingTokensParams } from '~position/template/app-token.template.types'; - -import { TokemakViemContractFactory } from '../contracts'; -import { TokemakAccToke } from '../contracts/viem/TokemakAccToke'; - -@PositionTemplate() -export class EthereumTokemakAccTokeTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'accTOKE'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(TokemakViemContractFactory) private readonly contractFactory: TokemakViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.tokemakAccToke({ network: this.network, address }); - } - - async getAddresses(): Promise { - return ['0xa374a62ddbd21e3d5716cb04821cb710897c0972']; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.toke(), network: this.network }]; - } - - async getPricePerShare() { - return [1]; - } -} diff --git a/src/apps/tokemak/ethereum/tokemak.reactor.token-fetcher.ts b/src/apps/tokemak/ethereum/tokemak.reactor.token-fetcher.ts deleted file mode 100644 index c01defa51..000000000 --- a/src/apps/tokemak/ethereum/tokemak.reactor.token-fetcher.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { getLabelFromToken } from '~app-toolkit/helpers/presentation/image.present'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { GetDisplayPropsParams, GetUnderlyingTokensParams } from '~position/template/app-token.template.types'; - -import { TokemakViemContractFactory } from '../contracts'; -import { TokemakReactor } from '../contracts/viem'; - -@PositionTemplate() -export class EthereumTokemakReactorTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Reactors'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(TokemakViemContractFactory) private readonly contractFactory: TokemakViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.tokemakReactor({ network: this.network, address }); - } - - async getAddresses(): Promise { - return [ - '0xd3d13a578a53685b4ac36a1bab31912d2b2a2f36', // tWETH - '0x04bda0cf6ad025948af830e75228ed420b0e860d', // tUSDC - '0xa760e26aa76747020171fcf8bda108dfde8eb930', // tTOKE (Legacy) - '0x1b429e75369ea5cd84421c1cc182cee5f3192fd3', // tUNI-TOKE/ETH - '0x8858a739ea1dd3d80fe577ef4e0d03e88561faa3', // tSLP-TOKE/ETH - '0xe7a7d17e2177f66d035d9d50a7f48d8d8e31532d', // tOHM - '0xd3b5d9a561c293fb42b446fe7e237daa9bf9aa84', // tALCX - '0x15a629f0665a3eb97d7ae9a7ce7abf73aeb79415', // tTCR - '0xadf15ec41689fc5b6dca0db7c53c9bfe7981e655', // tFXS - '0xf49764c9c5d644ece6ae2d18ffd9f1e902629777', // tSUSHI - '0x808d3e6b23516967ceae4f17a5f9038383ed5311', // tFOX - '0xdc0b02849bb8e0f126a216a2840275da829709b0', // tAPW - '0x41f6a95bacf9bc43704c4a4902ba5473a8b00263', // tgOHM - '0x0ce34f4c26ba69158bc2eb8bf513221e44fdfb75', // tDAI - '0xeff721eae19885e17f5b80187d6527aad3ffc8de', // tSNX - '0x2fc6e9c1b2c07e18632efe51879415a580ad22e1', // tGAMMA - '0x03dcccd17cc36ee61f9004bcfd7a85f58b2d360d', // tFEI - '0x2e9f9becf5229379825d0d3c1299759943bd4fed', // tMIM - '0x482258099de8de2d0bda84215864800ea7e6b03d', // tWORMUST - '0x9eee9ee0cbd35014e12e1283d9388a40f69797a3', // tLUSD - '0x94671a3cee8c7a12ea72602978d1bb84e920efb2', // tFRAX - '0x7211508d283353e77b9a7ed2f22334c219ad4b4c', // tALUSD - '0x061aee9ab655e73719577ea1df116d7139b2a7e7', // tMYC - ]; - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - return [{ address: await contract.read.underlyer(), network: this.network }]; - } - - async getPricePerShare() { - return [1]; - } - - async getLabel({ appToken }: GetDisplayPropsParams) { - return `${getLabelFromToken(appToken.tokens[0])} Reactor`; - } -} diff --git a/src/apps/tokemak/tokemak.module.ts b/src/apps/tokemak/tokemak.module.ts index 3dbaf7e8b..deec8b9eb 100644 --- a/src/apps/tokemak/tokemak.module.ts +++ b/src/apps/tokemak/tokemak.module.ts @@ -4,19 +4,15 @@ import { AbstractApp } from '~app/app.dynamic-module'; import { TokemakClaimableResolver } from './common/tokemak.claimable.resolver'; import { TokemakViemContractFactory } from './contracts'; -import { EthereumTokemakAccTokeTokenFetcher } from './ethereum/tokemak.acc-toke.token-fetcher'; import { EthereumTokemakClaimableContractPositionFetcher } from './ethereum/tokemak.claimable.contract-position-fetcher'; import { EthereumTokemakFarmContractPositionFetcher } from './ethereum/tokemak.farm.contract-position-fetcher'; -import { EthereumTokemakReactorTokenFetcher } from './ethereum/tokemak.reactor.token-fetcher'; @Module({ providers: [ TokemakViemContractFactory, TokemakClaimableResolver, - EthereumTokemakReactorTokenFetcher, EthereumTokemakFarmContractPositionFetcher, EthereumTokemakClaimableContractPositionFetcher, - EthereumTokemakAccTokeTokenFetcher, ], }) export class TokemakAppModule extends AbstractApp() {} diff --git a/src/apps/unstoppable/arbitrum/unstoppable.glp-compounder.token-fetcher.ts b/src/apps/unstoppable/arbitrum/unstoppable.glp-compounder.token-fetcher.ts deleted file mode 100644 index 5e3eaf0df..000000000 --- a/src/apps/unstoppable/arbitrum/unstoppable.glp-compounder.token-fetcher.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { - GetAddressesParams, - DefaultAppTokenDefinition, - GetPricePerShareParams, -} from '~position/template/app-token.template.types'; - -import { UnstoppableViemContractFactory } from '../contracts'; -import { UnstoppableGlpVault } from '../contracts/viem'; - -@PositionTemplate() -export class ArbitrumUnstoppableGlpCompounderTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'GLP Compounder'; - - constructor( - @Inject(APP_TOOLKIT) readonly appToolkit: IAppToolkit, - @Inject(UnstoppableViemContractFactory) private readonly unstoppableContractFactory: UnstoppableViemContractFactory, - ) { - super(appToolkit); - } - - getContract(_address: string) { - return this.unstoppableContractFactory.unstoppableGlpVault({ address: _address, network: this.network }); - } - - async getAddresses(_params: GetAddressesParams): Promise { - return ['0xff6b69b78df465bf7e55d242fd11456158d1600a']; - } - - async getUnderlyingTokenDefinitions() { - return [{ address: '0x4277f8f2c384827b5273592ff7cebd9f2c1ac258', network: this.network }]; - } - - async getPricePerShare({ appToken, contract }: GetPricePerShareParams) { - const reserveRaw = await contract.read.totalAssets(); - const reserve = Number(reserveRaw) / 10 ** appToken.tokens[0].decimals; - return [reserve / appToken.supply]; - } -} diff --git a/src/apps/unstoppable/assets/logo.png b/src/apps/unstoppable/assets/logo.png deleted file mode 100644 index f8eaf428d..000000000 Binary files a/src/apps/unstoppable/assets/logo.png and /dev/null differ diff --git a/src/apps/unstoppable/contracts/abis/unstoppable-glp-vault.json b/src/apps/unstoppable/contracts/abis/unstoppable-glp-vault.json deleted file mode 100644 index 764b06a33..000000000 --- a/src/apps/unstoppable/contracts/abis/unstoppable-glp-vault.json +++ /dev/null @@ -1,1040 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "string", - "name": "_name", - "type": "string" - }, - { - "internalType": "string", - "name": "_symbol", - "type": "string" - }, - { - "internalType": "address", - "name": "_yieldStrategy", - "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": "address", - "name": "updater", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newRewardRouter", - "type": "address" - } - ], - "name": "GlpRewardRouterUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Harvest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "updater", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newRewardTracker", - "type": "address" - } - ], - "name": "RewardTrackerUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "updater", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newMinimum", - "type": "uint256" - } - ], - "name": "SensibleMinimumWethToHarvest", - "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": false, - "internalType": "address", - "name": "updater", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newYieldStrategy", - "type": "address" - } - ], - "name": "YieldStrategyUpdated", - "type": "event" - }, - { - "inputs": [], - "name": "GLP", - "outputs": [ - { - "internalType": "contract ERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "SGLP", - "outputs": [ - { - "internalType": "contract ERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WETH", - "outputs": [ - { - "internalType": "contract ERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "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": [ - { - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "name": "convertToAssets", - "outputs": [ - { - "internalType": "uint256", - "name": "assets", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "assets", - "type": "uint256" - } - ], - "name": "convertToShares", - "outputs": [ - { - "internalType": "uint256", - "name": "shares", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "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": "glpRewardRouterV2", - "outputs": [ - { - "internalType": "contract IRewardRouterV2", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "harvest", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "harvestTransferAndCompound", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "lastHarvestTimestamp", - "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": "", - "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": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "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": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_tokenAddress", - "type": "address" - } - ], - "name": "recover", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address payable", - "name": "_to", - "type": "address" - } - ], - "name": "recoverETH", - "outputs": [], - "stateMutability": "payable", - "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": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "rewardTracker", - "outputs": [ - { - "internalType": "contract IRewardTracker", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "sensibleMinimumWethToHarvest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_newAddress", - "type": "address" - } - ], - "name": "setGlpRewardRouter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_newAddress", - "type": "address" - } - ], - "name": "setGlpRewardTracker", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_newValue", - "type": "uint256" - } - ], - "name": "setSensibleMinimumWethToHarvest", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_newStrategy", - "type": "address" - } - ], - "name": "setYieldStrategy", - "outputs": [], - "stateMutability": "nonpayable", - "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": "totalHarvested", - "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": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "transferHarvestedFundsToStrategy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "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": [], - "name": "yieldStrategy", - "outputs": [ - { - "internalType": "contract IStrategy", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/src/apps/unstoppable/contracts/index.ts b/src/apps/unstoppable/contracts/index.ts deleted file mode 100644 index 5dcfebdf6..000000000 --- a/src/apps/unstoppable/contracts/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -export * from './viem.contract-factory'; diff --git a/src/apps/unstoppable/contracts/viem.contract-factory.ts b/src/apps/unstoppable/contracts/viem.contract-factory.ts deleted file mode 100644 index e320fbc50..000000000 --- a/src/apps/unstoppable/contracts/viem.contract-factory.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Injectable, Inject } from '@nestjs/common'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { Network } from '~types/network.interface'; - -import { UnstoppableGlpVault__factory } from './viem'; - -type ContractOpts = { address: string; network: Network }; - -@Injectable() -export class UnstoppableViemContractFactory { - constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) {} - - unstoppableGlpVault({ address, network }: ContractOpts) { - return UnstoppableGlpVault__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } -} diff --git a/src/apps/unstoppable/contracts/viem/UnstoppableGlpVault.ts b/src/apps/unstoppable/contracts/viem/UnstoppableGlpVault.ts deleted file mode 100644 index 8d588e29b..000000000 --- a/src/apps/unstoppable/contracts/viem/UnstoppableGlpVault.ts +++ /dev/null @@ -1,1054 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const unstoppableGlpVaultAbi = [ - { - inputs: [ - { - internalType: 'string', - name: '_name', - type: 'string', - }, - { - internalType: 'string', - name: '_symbol', - type: 'string', - }, - { - internalType: 'address', - name: '_yieldStrategy', - 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: 'address', - name: 'updater', - type: 'address', - }, - { - indexed: false, - internalType: 'address', - name: 'newRewardRouter', - type: 'address', - }, - ], - name: 'GlpRewardRouterUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Harvest', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'previousOwner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnershipTransferred', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'updater', - type: 'address', - }, - { - indexed: false, - internalType: 'address', - name: 'newRewardTracker', - type: 'address', - }, - ], - name: 'RewardTrackerUpdated', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'updater', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'newMinimum', - type: 'uint256', - }, - ], - name: 'SensibleMinimumWethToHarvest', - 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: false, - internalType: 'address', - name: 'updater', - type: 'address', - }, - { - indexed: false, - internalType: 'address', - name: 'newYieldStrategy', - type: 'address', - }, - ], - name: 'YieldStrategyUpdated', - type: 'event', - }, - { - inputs: [], - name: 'GLP', - outputs: [ - { - internalType: 'contract ERC20', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'SGLP', - outputs: [ - { - internalType: 'contract ERC20', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'WETH', - outputs: [ - { - internalType: 'contract ERC20', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - 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: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'convertToAssets', - outputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'assets', - type: 'uint256', - }, - ], - name: 'convertToShares', - outputs: [ - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'subtractedValue', - type: 'uint256', - }, - ], - name: 'decreaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - 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: 'glpRewardRouterV2', - outputs: [ - { - internalType: 'contract IRewardRouterV2', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'harvest', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'harvestTransferAndCompound', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'spender', - type: 'address', - }, - { - internalType: 'uint256', - name: 'addedValue', - type: 'uint256', - }, - ], - name: 'increaseAllowance', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'lastHarvestTimestamp', - 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: '', - 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: 'owner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - 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: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_tokenAddress', - type: 'address', - }, - ], - name: 'recover', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address payable', - name: '_to', - type: 'address', - }, - ], - name: 'recoverETH', - outputs: [], - stateMutability: 'payable', - 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: 'renounceOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'rewardTracker', - outputs: [ - { - internalType: 'contract IRewardTracker', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'sensibleMinimumWethToHarvest', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_newAddress', - type: 'address', - }, - ], - name: 'setGlpRewardRouter', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_newAddress', - type: 'address', - }, - ], - name: 'setGlpRewardTracker', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_newValue', - type: 'uint256', - }, - ], - name: 'setSensibleMinimumWethToHarvest', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_newStrategy', - type: 'address', - }, - ], - name: 'setYieldStrategy', - outputs: [], - stateMutability: 'nonpayable', - 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: 'totalHarvested', - 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: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transfer', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'from', - type: 'address', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'transferHarvestedFundsToStrategy', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'transferOwnership', - outputs: [], - 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: [], - name: 'yieldStrategy', - outputs: [ - { - internalType: 'contract IStrategy', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, -] as const; - -export type UnstoppableGlpVault = typeof unstoppableGlpVaultAbi; -export type UnstoppableGlpVaultContract = GetContractReturnType; - -export class UnstoppableGlpVault__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: unstoppableGlpVaultAbi, publicClient: client }); - } -} diff --git a/src/apps/unstoppable/contracts/viem/index.ts b/src/apps/unstoppable/contracts/viem/index.ts deleted file mode 100644 index b8ffa4a53..000000000 --- a/src/apps/unstoppable/contracts/viem/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -export type { UnstoppableGlpVault } from './UnstoppableGlpVault'; - -export { UnstoppableGlpVault__factory } from './UnstoppableGlpVault'; diff --git a/src/apps/unstoppable/unstoppable.module.ts b/src/apps/unstoppable/unstoppable.module.ts deleted file mode 100644 index d3d6c7fc7..000000000 --- a/src/apps/unstoppable/unstoppable.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Module } from '@nestjs/common'; - -import { AbstractApp } from '~app/app.dynamic-module'; - -import { ArbitrumUnstoppableGlpCompounderTokenFetcher } from './arbitrum/unstoppable.glp-compounder.token-fetcher'; -import { UnstoppableViemContractFactory } from './contracts'; - -@Module({ - providers: [ArbitrumUnstoppableGlpCompounderTokenFetcher, UnstoppableViemContractFactory], -}) -export class UnstoppableAppModule extends AbstractApp() {}