diff --git a/src/apps/abracadabra/abracadabra.module.ts b/src/apps/abracadabra/abracadabra.module.ts index 4ed2efb09..4a062deb5 100644 --- a/src/apps/abracadabra/abracadabra.module.ts +++ b/src/apps/abracadabra/abracadabra.module.ts @@ -6,20 +6,16 @@ import { ArbitrumAbracadabraCauldronContractPositionFetcher } from './arbitrum/a import { ArbitrumAbracadabraFarmBoostedContractPositionFetcher } from './arbitrum/abracadabra.farm-boosted.contract-position-fetcher'; import { ArbitrumAbracadabraFarmContractPositionFetcher } from './arbitrum/abracadabra.farm.contract-position-fetcher'; import { ArbitrumAbracadabraMspellContractPositionFetcher } from './arbitrum/abracadabra.m-spell.contract-position-fetcher'; -import { ArbitrumAbracadabraMagicGlpTokenFetcher } from './arbitrum/abracadabra.magic-glp.token-fetcher'; import { ArbitrumAbracadabraStakedSpellTokenFetcher } from './arbitrum/abracadabra.staked-spell.token-fetcher'; import { AvalancheAbracadabraCauldronContractPositionFetcher } from './avalanche/abracadabra.cauldron.contract-position-fetcher'; import { AvalancheAbracadabraFarmContractPositionFetcher } from './avalanche/abracadabra.farm.contract-position-fetcher'; import { AvalancheAbracadabraMspellContractPositionFetcher } from './avalanche/abracadabra.m-spell.contract-position-fetcher'; -import { AvalancheAbracadabraMagicGlpTokenFetcher } from './avalanche/abracadabra.magic-glp.token-fetcher'; import { AvalancheAbracadabraStakedSpellTokenFetcher } from './avalanche/abracadabra.staked-spell.token-fetcher'; import { BinanceSmartChainAbracadabraCauldronContractPositionFetcher } from './binance-smart-chain/abracadabra.cauldron.contract-position-fetcher'; import { AbracadabraViemContractFactory } from './contracts'; import { EthereumAbracadabraCauldronContractPositionFetcher } from './ethereum/abracadabra.cauldron.contract-position-fetcher'; import { EthereumAbracadabraFarmContractPositionFetcher } from './ethereum/abracadabra.farm.contract-position-fetcher'; import { EthereumAbracadabraMspellContractPositionFetcher } from './ethereum/abracadabra.m-spell.contract-position-fetcher'; -import { EthereumAbracadabraMagicApeTokenFetcher } from './ethereum/abracadabra.magic-ape.token-fetcher'; -import { EthereumAbracadabraStakedSpellTokenFetcher } from './ethereum/abracadabra.staked-spell.token-fetcher'; import { FantomAbracadabraCauldronContractPositionFetcher } from './fantom/abracadabra.cauldron.contract-position-fetcher'; import { FantomAbracadabraFarmContractPositionFetcher } from './fantom/abracadabra.farm.contract-position-fetcher'; import { FantomAbracadabraMspellContractPositionFetcher } from './fantom/abracadabra.m-spell.contract-position-fetcher'; @@ -33,14 +29,12 @@ import { OptimismAbracadabraErc20VaultsTokenFetcher } from './optimism/abracadab // Arbitrum ArbitrumAbracadabraCauldronContractPositionFetcher, ArbitrumAbracadabraFarmContractPositionFetcher, - ArbitrumAbracadabraMagicGlpTokenFetcher, ArbitrumAbracadabraMspellContractPositionFetcher, ArbitrumAbracadabraStakedSpellTokenFetcher, ArbitrumAbracadabraFarmBoostedContractPositionFetcher, // Avalanche AvalancheAbracadabraCauldronContractPositionFetcher, AvalancheAbracadabraFarmContractPositionFetcher, - AvalancheAbracadabraMagicGlpTokenFetcher, AvalancheAbracadabraMspellContractPositionFetcher, AvalancheAbracadabraStakedSpellTokenFetcher, // Binance-smart-chain @@ -48,9 +42,7 @@ import { OptimismAbracadabraErc20VaultsTokenFetcher } from './optimism/abracadab // Ethereum EthereumAbracadabraCauldronContractPositionFetcher, EthereumAbracadabraFarmContractPositionFetcher, - EthereumAbracadabraMagicApeTokenFetcher, EthereumAbracadabraMspellContractPositionFetcher, - EthereumAbracadabraStakedSpellTokenFetcher, // Fantom FantomAbracadabraCauldronContractPositionFetcher, FantomAbracadabraFarmContractPositionFetcher, diff --git a/src/apps/abracadabra/arbitrum/abracadabra.arbitrum.constants.ts b/src/apps/abracadabra/arbitrum/abracadabra.arbitrum.constants.ts index 8be5980e6..1f64b0c03 100644 --- a/src/apps/abracadabra/arbitrum/abracadabra.arbitrum.constants.ts +++ b/src/apps/abracadabra/arbitrum/abracadabra.arbitrum.constants.ts @@ -12,19 +12,10 @@ export const ARBITRUM_CAULDRONS: AbracadabraCauldronContractPositionDefinition[] { version: 'V4', type: 'REGULAR', address: '0x66805f6e719d7e67d46e8b2501c1237980996c6a' }, // gmLINK ]; -export const ARBITRUM_GLP_TOKEN_ADDRESS = '0x4277f8f2c384827b5273592ff7cebd9f2c1ac258'; -export const AVALANCHE_GLP_TOKEN_ADDRESS = '0x01234181085565ed162a948b6a5e88758cd7c7b8'; - export const CURVE_MIM_3POOL_FARM = '0x839de324a1ab773f76a53900d70ac1b913d2b387'; export const M_SPELL_ADDRESS = '0x1df188958a8674b5177f77667b8d173c3cdd9e51'; export const S_SPELL_ADDRESS = '0xf7428ffcb2581a2804998efbb036a43255c8a8d3'; export const SPELL_ADDRESS = '0xf7428ffcb2581a2804998efbb036a43255c8a8d3'; -export const MAGIC_GLP_ADDRESS = '0x85667409a723684fe1e57dd1abde8d88c2f54214'; -export const GLP_REWARD_TRACKER_ADDRESSES = [ - '0x4e971a87900b931ff39d1aad67697f49835400b6', - '0x1addd80e6039594ee970e5872d247bf0414c8903', -]; -export const MAGIC_GLP_HARVESTOR_ADDRESS = '0xc99a4863173ef52ccb7ea05440da0e37ba39c139'; export const MAGIC_GLP_ANNUAL_HARVESTS = HOURS_PER_YEAR; diff --git a/src/apps/abracadabra/arbitrum/abracadabra.magic-glp.token-fetcher.ts b/src/apps/abracadabra/arbitrum/abracadabra.magic-glp.token-fetcher.ts deleted file mode 100644 index ec81c758e..000000000 --- a/src/apps/abracadabra/arbitrum/abracadabra.magic-glp.token-fetcher.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { AbracadabraMagicGlpTokenFetcher } from '../common/abracadabra.magic-glp.token-fetcher'; - -import { - ARBITRUM_GLP_TOKEN_ADDRESS, - GLP_REWARD_TRACKER_ADDRESSES, - MAGIC_GLP_ADDRESS, - MAGIC_GLP_ANNUAL_HARVESTS, - MAGIC_GLP_HARVESTOR_ADDRESS, -} from './abracadabra.arbitrum.constants'; - -@PositionTemplate() -export class ArbitrumAbracadabraMagicGlpTokenFetcher extends AbracadabraMagicGlpTokenFetcher { - vaultAddress = MAGIC_GLP_ADDRESS; - rewardTrackerAddresses = GLP_REWARD_TRACKER_ADDRESSES; - magicGlpHarvestorAddress = MAGIC_GLP_HARVESTOR_ADDRESS; - magicGlpAnnualHarvests = MAGIC_GLP_ANNUAL_HARVESTS; - glpTokenAddress = ARBITRUM_GLP_TOKEN_ADDRESS; -} diff --git a/src/apps/abracadabra/avalanche/abracadabra.magic-glp.token-fetcher.ts b/src/apps/abracadabra/avalanche/abracadabra.magic-glp.token-fetcher.ts deleted file mode 100644 index 77cdd7c21..000000000 --- a/src/apps/abracadabra/avalanche/abracadabra.magic-glp.token-fetcher.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { AVALANCHE_GLP_TOKEN_ADDRESS } from '../arbitrum/abracadabra.arbitrum.constants'; -import { HOURS_PER_YEAR } from '../common/abracadabra.common.constants'; -import { AbracadabraMagicGlpTokenFetcher } from '../common/abracadabra.magic-glp.token-fetcher'; - -@PositionTemplate() -export class AvalancheAbracadabraMagicGlpTokenFetcher extends AbracadabraMagicGlpTokenFetcher { - vaultAddress = '0x5efc10c353fa30c5758037fdf0a233e971ecc2e0'; - rewardTrackerAddresses = ['0xd2d1162512f927a7e282ef43a362659e4f2a728f', '0x9e295b5b976a184b14ad8cd72413ad846c299660']; - magicGlpHarvestorAddress = '0x05b3b96df07b4630373ae7506e51777b547335b0'; - magicGlpAnnualHarvests = HOURS_PER_YEAR; - glpTokenAddress = AVALANCHE_GLP_TOKEN_ADDRESS; -} diff --git a/src/apps/abracadabra/common/abracadabra.magic-ape.token-fetcher.ts b/src/apps/abracadabra/common/abracadabra.magic-ape.token-fetcher.ts deleted file mode 100644 index 90e320774..000000000 --- a/src/apps/abracadabra/common/abracadabra.magic-ape.token-fetcher.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { Inject } from '@nestjs/common'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { getTokenImg } from '~app-toolkit/helpers/presentation/image.present'; -import { Erc4626 } from '~contract/contracts/viem'; -import { - DefaultAppTokenDataProps, - DefaultAppTokenDefinition, - GetDataPropsParams, - GetDisplayPropsParams, -} from '~position/template/app-token.template.types'; -import { Erc4626VaultTemplateTokenFetcher } from '~position/template/erc4626-vault.template.token-fetcher'; - -import { AbracadabraViemContractFactory } from '../contracts'; - -const BASIS_POINTS_DIVISOR = 10000; - -export abstract class AbracadabraMagicApeTokenFetcher extends Erc4626VaultTemplateTokenFetcher { - groupLabel = 'Magic APE'; - - abstract get magicApeAnnualHarvests(): number | Promise; - abstract get magicApeLensAddress(): string | Promise; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(AbracadabraViemContractFactory) protected readonly contractFactory: AbracadabraViemContractFactory, - ) { - super(appToolkit); - } - - async getLabel({ contract }: GetDisplayPropsParams): Promise { - return contract.read.name(); - } - - async getImages({ - appToken, - }: GetDisplayPropsParams): Promise { - return [getTokenImg(appToken.address, this.network)]; - } - - async getApy({ - multicall, - appToken, - }: GetDataPropsParams): Promise { - const [magicApeLensAddress, magicApeAnnualHarvests] = await Promise.all([ - this.magicApeLensAddress, - this.magicApeAnnualHarvests, - ]); - const magicApe = multicall.wrap( - this.contractFactory.abracadabraMagicApe({ - address: appToken.address, - network: this.network, - }), - ); - const magicApeLens = multicall.wrap( - this.contractFactory.abracadabraMagicApeLens({ - address: magicApeLensAddress, - network: this.network, - }), - ); - - const [feePercent, apr] = await Promise.all([ - magicApe.read.feePercentBips().then(feeBips => feeBips / BASIS_POINTS_DIVISOR), - magicApeLens.read.getApeCoinInfo().then(apeCoinInfo => Number(apeCoinInfo.apr) / BASIS_POINTS_DIVISOR), - ]); - - const apy = Math.pow(1 + apr / magicApeAnnualHarvests, magicApeAnnualHarvests) - 1; - const apyWithFees = apy * (1 - feePercent); - return apyWithFees * 100; - } -} diff --git a/src/apps/abracadabra/common/abracadabra.magic-glp.token-fetcher.ts b/src/apps/abracadabra/common/abracadabra.magic-glp.token-fetcher.ts deleted file mode 100644 index 7839a25a0..000000000 --- a/src/apps/abracadabra/common/abracadabra.magic-glp.token-fetcher.ts +++ /dev/null @@ -1,112 +0,0 @@ -import { Inject } from '@nestjs/common'; -import { BigNumber } from 'ethers'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { getTokenImg } from '~app-toolkit/helpers/presentation/image.present'; -import { Erc4626 } from '~contract/contracts/viem'; -import { isAppToken } from '~position/position.interface'; -import { - DefaultAppTokenDataProps, - DefaultAppTokenDefinition, - GetDataPropsParams, - GetDisplayPropsParams, - UnderlyingTokenDefinition, -} from '~position/template/app-token.template.types'; -import { Erc4626VaultTemplateTokenFetcher } from '~position/template/erc4626-vault.template.token-fetcher'; - -import { AbracadabraViemContractFactory } from '../contracts'; - -const SECONDS_PER_YEAR = 31536000; -const BASIS_POINTS_DIVISOR = 10000; - -export abstract class AbracadabraMagicGlpTokenFetcher extends Erc4626VaultTemplateTokenFetcher { - groupLabel = 'Magic GLP'; - abstract glpTokenAddress: string; - abstract get rewardTrackerAddresses(): string[] | Promise[]; - abstract get magicGlpHarvestorAddress(): string | Promise; - abstract get magicGlpAnnualHarvests(): number | Promise; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(AbracadabraViemContractFactory) protected readonly contractFactory: AbracadabraViemContractFactory, - ) { - super(appToolkit); - } - - async getUnderlyingTokenDefinitions(): Promise { - // Override as the underlying is sGLP, but users expect to see GLP - return [{ address: this.glpTokenAddress, network: this.network }]; - } - - async getLabel({ contract }: GetDisplayPropsParams): Promise { - return contract.read.name(); - } - - async getImages({ - appToken, - }: GetDisplayPropsParams): Promise { - return [getTokenImg(appToken.address, this.network)]; - } - - async getApy({ - multicall, - appToken, - tokenLoader, - }: GetDataPropsParams): Promise { - const [magicGlpHarvestorAddress, magicGlpAnnualHarvests, rewardTrackerAddresses] = await Promise.all([ - this.magicGlpHarvestorAddress, - this.magicGlpAnnualHarvests, - Promise.all(this.rewardTrackerAddresses), - ]); - const magicGlpHarvestor = multicall.wrap( - this.contractFactory.abracadabraMagicGlpHarvestor({ - address: magicGlpHarvestorAddress, - network: this.network, - }), - ); - const rewardTrackers = rewardTrackerAddresses.map(rewardTrackerAddress => - multicall.wrap( - this.contractFactory.gmxRewardTracker({ - address: rewardTrackerAddress, - network: this.network, - }), - ), - ); - - const [magicGlpFeeProcent, annualUsdRewards] = await Promise.all([ - magicGlpHarvestor.read.feePercentBips().then(magicGlpFeeProcent => magicGlpFeeProcent / BASIS_POINTS_DIVISOR), - Promise.all( - rewardTrackers.map(async tracker => { - const [tokensPerInterval, rewardToken] = await Promise.all([ - tracker.read.tokensPerInterval(), - tracker.read.rewardToken().then(rewardTokenAddress => - tokenLoader.getOne({ - network: this.network, - address: rewardTokenAddress, - }), - ), - ]); - - if (rewardToken == null) { - return 0; - } else { - const tokensPerYearRaw = BigNumber.from(tokensPerInterval).mul(SECONDS_PER_YEAR); - const tokensPerYear = Number(tokensPerYearRaw) / 10 ** rewardToken.decimals; - return tokensPerYear * rewardToken.price; - } - }), - ), - ]); - - const glp = appToken.tokens[0]; - const glpSupplyUsd = isAppToken(glp) ? glp.supply * glp.price : null; - if (glpSupplyUsd == null || glpSupplyUsd <= 0) { - return 0; - } else { - const apr = annualUsdRewards.map(annualUsdReward => annualUsdReward / glpSupplyUsd).reduce((a, b) => a + b, 0); - const apy = Math.pow(1 + apr / magicGlpAnnualHarvests, magicGlpAnnualHarvests) - 1; - const apyWithFees = apy * (1 - magicGlpFeeProcent); - return apyWithFees * 100; - } - } -} diff --git a/src/apps/abracadabra/ethereum/abracadabra.magic-ape.token-fetcher.ts b/src/apps/abracadabra/ethereum/abracadabra.magic-ape.token-fetcher.ts deleted file mode 100644 index 33612c919..000000000 --- a/src/apps/abracadabra/ethereum/abracadabra.magic-ape.token-fetcher.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { AbracadabraMagicApeTokenFetcher } from '../common/abracadabra.magic-ape.token-fetcher'; - -@PositionTemplate() -export class EthereumAbracadabraMagicApeTokenFetcher extends AbracadabraMagicApeTokenFetcher { - vaultAddress = '0xf35b31b941d94b249eaded041db1b05b7097feb6'; - magicApeAnnualHarvests = 730; - magicApeLensAddress = '0xefdac7dd721985b4bd7fede78465fe3525b468fd'; -} diff --git a/src/apps/abracadabra/ethereum/abracadabra.staked-spell.token-fetcher.ts b/src/apps/abracadabra/ethereum/abracadabra.staked-spell.token-fetcher.ts deleted file mode 100644 index 3e1a3270c..000000000 --- a/src/apps/abracadabra/ethereum/abracadabra.staked-spell.token-fetcher.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { VaultTemplateTokenFetcher } from '~position/template/vault.template.token-fetcher'; - -@PositionTemplate() -export class EthereumAbracadabraStakedSpellTokenFetcher extends VaultTemplateTokenFetcher { - groupLabel = 'Staked SPELL'; - - vaultAddress = '0x26fa3fffb6efe8c1e69103acb4044c26b9a106a9'; - underlyingTokenAddress = '0x090185f2135308bad17527004364ebcc2d37e5f6'; -} diff --git a/src/apps/aelin/aelin.module.ts b/src/apps/aelin/aelin.module.ts index e0d977f44..32b3c9946 100644 --- a/src/apps/aelin/aelin.module.ts +++ b/src/apps/aelin/aelin.module.ts @@ -6,7 +6,6 @@ import { AelinViemContractFactory } from './contracts'; import { EthereumAelinPoolTokenFetcher } from './ethereum/aelin.pool.token-fetcher'; import { OptimismAelinFarmContractPositionFetcher } from './optimism/aelin.farm.contract-position-fetcher'; import { OptimismAelinPoolTokenFetcher } from './optimism/aelin.pool.token-fetcher'; -import { OptimismAelinVAelinTokenFetcher } from './optimism/aelin.v-aelin.token-fetcher'; @Module({ providers: [ @@ -15,7 +14,6 @@ import { OptimismAelinVAelinTokenFetcher } from './optimism/aelin.v-aelin.token- EthereumAelinPoolTokenFetcher, // Optimism OptimismAelinPoolTokenFetcher, - OptimismAelinVAelinTokenFetcher, OptimismAelinFarmContractPositionFetcher, ], }) diff --git a/src/apps/aelin/optimism/aelin.v-aelin.token-fetcher.ts b/src/apps/aelin/optimism/aelin.v-aelin.token-fetcher.ts deleted file mode 100644 index 244421c97..000000000 --- a/src/apps/aelin/optimism/aelin.v-aelin.token-fetcher.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { WrapperTemplateTokenFetcher } from '~position/template/wrapper.template.token-fetcher'; - -@PositionTemplate() -export class OptimismAelinVAelinTokenFetcher extends WrapperTemplateTokenFetcher { - groupLabel = 'vAELIN'; - - vaultAddress = '0x780f70882ff4929d1a658a4e8ec8d4316b24748a'; - underlyingTokenAddress = '0x61baadcf22d2565b0f471b291c475db5555e0b76'; -} diff --git a/src/apps/beethoven-x/beethoven-x.module.ts b/src/apps/beethoven-x/beethoven-x.module.ts index 8a05c34e4..360c7a5eb 100644 --- a/src/apps/beethoven-x/beethoven-x.module.ts +++ b/src/apps/beethoven-x/beethoven-x.module.ts @@ -5,7 +5,6 @@ import { BalancerV2ViemContractFactory } from '~apps/balancer-v2/contracts'; import { BeethovenXViemContractFactory } from './contracts'; import { FantomBeethovenXChefContractPositionFetcher } from './fantom/beethoven-x.chef.contract-position-fetcher'; -import { FantomBeethovenXFBeetsTokenFetcher } from './fantom/beethoven-x.f-beets.token-fetcher'; import { FantomBeethovenXPoolTokenFetcher } from './fantom/beethoven-x.pool.token-fetcher'; import { OptimismBeethovenXFarmContractPositionFetcher } from './optimism/beethoven-x.farm.contract-position-fetcher'; import { OptimismBeethovenXPoolTokenFetcher } from './optimism/beethoven-x.pool.token-fetcher'; @@ -17,7 +16,6 @@ import { OptimismBeethovenXPoolTokenFetcher } from './optimism/beethoven-x.pool. // Fantom FantomBeethovenXChefContractPositionFetcher, FantomBeethovenXPoolTokenFetcher, - FantomBeethovenXFBeetsTokenFetcher, // Optimism OptimismBeethovenXFarmContractPositionFetcher, OptimismBeethovenXPoolTokenFetcher, diff --git a/src/apps/beethoven-x/fantom/beethoven-x.f-beets.token-fetcher.ts b/src/apps/beethoven-x/fantom/beethoven-x.f-beets.token-fetcher.ts deleted file mode 100644 index 8c34c584c..000000000 --- a/src/apps/beethoven-x/fantom/beethoven-x.f-beets.token-fetcher.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { VaultTemplateTokenFetcher } from '~position/template/vault.template.token-fetcher'; - -@PositionTemplate() -export class FantomBeethovenXFBeetsTokenFetcher extends VaultTemplateTokenFetcher { - groupLabel = 'Staking'; - - vaultAddress = '0xfcef8a994209d6916eb2c86cdd2afd60aa6f54b1'; - underlyingTokenAddress = '0xcde5a11a4acb4ee4c805352cec57e236bdbc3837'; -} diff --git a/src/apps/chicken-bond/chicken-bond.module.ts b/src/apps/chicken-bond/chicken-bond.module.ts index f3afc5340..4fb83a630 100644 --- a/src/apps/chicken-bond/chicken-bond.module.ts +++ b/src/apps/chicken-bond/chicken-bond.module.ts @@ -3,14 +3,9 @@ import { Module } from '@nestjs/common'; import { AbstractApp } from '~app/app.dynamic-module'; import { ChickenBondViemContractFactory } from './contracts'; -import { EthereumChickenBondBlusdTokenFetcher } from './ethereum/chicken-bond.blusd.token-fetcher'; import { EthereumChickenBondBondContractPositionFetcher } from './ethereum/chicken-bond.bond.contract-position-fetcher'; @Module({ - providers: [ - ChickenBondViemContractFactory, - EthereumChickenBondBlusdTokenFetcher, - EthereumChickenBondBondContractPositionFetcher, - ], + providers: [ChickenBondViemContractFactory, EthereumChickenBondBondContractPositionFetcher], }) export class ChickenBondAppModule extends AbstractApp() {} diff --git a/src/apps/chicken-bond/ethereum/chicken-bond.blusd.token-fetcher.ts b/src/apps/chicken-bond/ethereum/chicken-bond.blusd.token-fetcher.ts deleted file mode 100644 index 55988a0c1..000000000 --- a/src/apps/chicken-bond/ethereum/chicken-bond.blusd.token-fetcher.ts +++ /dev/null @@ -1,52 +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 { GetPriceParams } from '~position/template/app-token.template.types'; - -import { ChickenBondViemContractFactory } from '../contracts'; -import { ChickenBondBlusd } from '../contracts/viem'; - -@PositionTemplate() -export class EthereumChickenBondBlusdTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'bLUSD'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(ChickenBondViemContractFactory) protected readonly contractFactory: ChickenBondViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.chickenBondBlusd({ address, network: this.network }); - } - - async getAddresses() { - return ['0xb9d7dddca9a4ac480991865efef82e01273f79c3']; - } - - async getUnderlyingTokenDefinitions() { - return [{ address: '0x5f98805a4e8be255a32880fdec7f6728c6568ba0', network: this.network }]; - } - - async getPricePerShare() { - return [1]; - } - - async getPrice({ multicall }: GetPriceParams): Promise { - // Temporary solution until Curve is migrated to template - const curvePoolContract = this.contractFactory.curvePool({ - address: '0x74ed5d42203806c8cdcf2f04ca5f60dc777b901c', - network: this.network, - }); - const oneUnit = BigNumber.from(10).pow(18).toString(); - - const priceRaw = await multicall.wrap(curvePoolContract).read.get_dy([BigInt(0), BigInt(1), BigInt(oneUnit)]); - const price = Number(priceRaw) / 10 ** 18; - - return price; - } -} diff --git a/src/apps/gamma-strategies/ethereum/gamma-strategies.x-gamma.token-fetcher.ts b/src/apps/gamma-strategies/ethereum/gamma-strategies.x-gamma.token-fetcher.ts deleted file mode 100644 index a3ae1fb22..000000000 --- a/src/apps/gamma-strategies/ethereum/gamma-strategies.x-gamma.token-fetcher.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { VaultTemplateTokenFetcher } from '~position/template/vault.template.token-fetcher'; - -@PositionTemplate() -export class EthereumGammaStrategiesXGammaTokenFetcher extends VaultTemplateTokenFetcher { - groupLabel = 'xGAMMA'; - vaultAddress = '0x26805021988f1a45dc708b5fb75fc75f21747d8c'; - underlyingTokenAddress = '0x6bea7cfef803d1e3d5f7c0103f7ded065644e197'; -} diff --git a/src/apps/gamma-strategies/gamma-strategies.module.ts b/src/apps/gamma-strategies/gamma-strategies.module.ts index e8a310084..9e776ead4 100644 --- a/src/apps/gamma-strategies/gamma-strategies.module.ts +++ b/src/apps/gamma-strategies/gamma-strategies.module.ts @@ -8,7 +8,6 @@ import { CeloGammaStrategiesPoolTokenFetcher } from './celo/gamma-strategies.poo import { GammaStrategiesDefinitionResolver } from './common/gamma-strategies.definition-resolver'; import { GammaStrategiesViemContractFactory } from './contracts'; import { EthereumGammaStrategiesPoolTokenFetcher } from './ethereum/gamma-strategies.pool.token-fetcher'; -import { EthereumGammaStrategiesXGammaTokenFetcher } from './ethereum/gamma-strategies.x-gamma.token-fetcher'; import { OptimismGammaStrategiesPoolTokenFetcher } from './optimism/gamma-strategies.pool.token-fetcher'; import { OptimismGammaStrategiesUniFarmContractPositionFetcher } from './optimism/gamma-strategies.uni-farm.contract-position-fetcher'; import { PolygonGammaStrategiesPoolTokenFetcher } from './polygon/gamma-strategies.pool.token-fetcher'; @@ -20,7 +19,6 @@ import { PolygonGammaStrategiesQuickSwapFarmContractPositionFetcher } from './po ArbitrumGammaStrategiesZyberFarmContractPositionFetcher, CeloGammaStrategiesPoolTokenFetcher, EthereumGammaStrategiesPoolTokenFetcher, - EthereumGammaStrategiesXGammaTokenFetcher, GammaStrategiesViemContractFactory, GammaStrategiesDefinitionResolver, OptimismGammaStrategiesPoolTokenFetcher, diff --git a/src/apps/hector-network/fantom/hector-network.s-hec-v1.token-fetcher.ts b/src/apps/hector-network/fantom/hector-network.s-hec-v1.token-fetcher.ts deleted file mode 100644 index ac3593556..000000000 --- a/src/apps/hector-network/fantom/hector-network.s-hec-v1.token-fetcher.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { WrapperTemplateTokenFetcher } from '~position/template/wrapper.template.token-fetcher'; - -@PositionTemplate() -export class FantomHectorNetworkSHecV1TokenFetcher extends WrapperTemplateTokenFetcher { - groupLabel = 'Staked HEC V1'; - - vaultAddress = '0x36f26880c6406b967bdb9901cde43abc9d53f106'; - underlyingTokenAddress = '0x5c4fdfc5233f935f20d2adba572f770c2e377ab0'; -} diff --git a/src/apps/hector-network/fantom/hector-network.s-hec-v2.token-fetcher.ts b/src/apps/hector-network/fantom/hector-network.s-hec-v2.token-fetcher.ts deleted file mode 100644 index 325c99719..000000000 --- a/src/apps/hector-network/fantom/hector-network.s-hec-v2.token-fetcher.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { WrapperTemplateTokenFetcher } from '~position/template/wrapper.template.token-fetcher'; - -@PositionTemplate() -export class FantomHectorNetworkSHecV2TokenFetcher extends WrapperTemplateTokenFetcher { - groupLabel = 'Staked HEC V2'; - - vaultAddress = '0x75bdef24285013387a47775828bec90b91ca9a5f'; - underlyingTokenAddress = '0x5c4fdfc5233f935f20d2adba572f770c2e377ab0'; -} diff --git a/src/apps/hector-network/fantom/hector-network.ws-hec.token-fetcher.ts b/src/apps/hector-network/fantom/hector-network.ws-hec.token-fetcher.ts deleted file mode 100644 index 7ef850ec1..000000000 --- a/src/apps/hector-network/fantom/hector-network.ws-hec.token-fetcher.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { VaultTemplateTokenFetcher } from '~position/template/vault.template.token-fetcher'; - -@PositionTemplate() -export class FantomHectorNetworkWsHecTokenFetcher extends VaultTemplateTokenFetcher { - groupLabel = 'Wrapped sHEC V2'; - - vaultAddress = '0x94ccf60f700146bea8ef7832820800e2dfa92eda'; - underlyingTokenAddress = '0x75bdef24285013387a47775828bec90b91ca9a5f'; -} diff --git a/src/apps/hector-network/hector-network.module.ts b/src/apps/hector-network/hector-network.module.ts index a40704c38..0981561e6 100644 --- a/src/apps/hector-network/hector-network.module.ts +++ b/src/apps/hector-network/hector-network.module.ts @@ -7,10 +7,7 @@ import { HectorNetworkViemContractFactory } from './contracts'; import { FantomHectorNetworkBondNoTreasuryContractPositionFetcher } from './fantom/hector-network.bond-no-treasury.contract-position-fetcher'; import { FantomHectorNetworkBondContractPositionFetcher } from './fantom/hector-network.bond.contract-position-fetcher'; import { FantomHectorNetworkFarmContractPositionFetcher } from './fantom/hector-network.farm.contract-position-fetcher'; -import { FantomHectorNetworkSHecV1TokenFetcher } from './fantom/hector-network.s-hec-v1.token-fetcher'; -import { FantomHectorNetworkSHecV2TokenFetcher } from './fantom/hector-network.s-hec-v2.token-fetcher'; import { FantomHectorNetworkStakeBondContractPositionFetcher } from './fantom/hector-network.stake-bond.contract-position-fetcher'; -import { FantomHectorNetworkWsHecTokenFetcher } from './fantom/hector-network.ws-hec.token-fetcher'; @Module({ providers: [ @@ -18,10 +15,7 @@ import { FantomHectorNetworkWsHecTokenFetcher } from './fantom/hector-network.ws FantomHectorNetworkBondContractPositionFetcher, FantomHectorNetworkBondNoTreasuryContractPositionFetcher, FantomHectorNetworkFarmContractPositionFetcher, - FantomHectorNetworkSHecV1TokenFetcher, - FantomHectorNetworkSHecV2TokenFetcher, FantomHectorNetworkStakeBondContractPositionFetcher, - FantomHectorNetworkWsHecTokenFetcher, HectorNetworkViemContractFactory, ], diff --git a/src/apps/insurace/assets/logo.png b/src/apps/insurace/assets/logo.png deleted file mode 100644 index a9ae842dd..000000000 Binary files a/src/apps/insurace/assets/logo.png and /dev/null differ diff --git a/src/apps/insurace/avalanche/insurace.mining.token-fetcher.ts b/src/apps/insurace/avalanche/insurace.mining.token-fetcher.ts deleted file mode 100644 index 264c1981e..000000000 --- a/src/apps/insurace/avalanche/insurace.mining.token-fetcher.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { ZERO_ADDRESS } from '~app-toolkit/constants/address'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { InsuraceMiningTokenDefinition, InsuraceMiningTokenFetcher } from '../common/insurace.mining.token-fetcher'; - -@PositionTemplate() -export class AvalancheInsuraceMiningTokenFetcher extends InsuraceMiningTokenFetcher { - groupLabel = 'Mining Pools'; - insurTokenAddress = '0x544c42fbb96b39b21df61cf322b5edc285ee7429'; - stakersPoolV2Address = '0xf851cbb9940f8baebd1d0eaf259335c108e9e893'; - - async getDefinitions(): Promise { - const governanceMiningPools = [ - { - address: '0x563d10af7395db31f9b0030b39fc4e3ef2598fee', - underlyingTokenAddress: '0x544c42fbb96b39b21df61cf322b5edc285ee7429', // INSUR - }, - ]; - - const underwritingMiningPools = [ - { - address: '0xdecafc91000d4d3802a0562a8fb896f29b6a7480', - underlyingTokenAddress: ZERO_ADDRESS, // AVAX - }, - { - address: '0xa29b59a149f62d390dee27b144c0092ca7dbba96', - underlyingTokenAddress: '0xd586e7f844cea2f87f50152665bcbc2c279d8d70', // DAI.e - }, - { - address: '0x5b9d6666398b86e2541b08b00468ae6434f79441', - underlyingTokenAddress: '0xa7d7079b0fead91f3e65f86e8915cb59c1a4c664', // USDC.e - }, - { - address: '0xdbbb520b40c7b7c6498dbd532aee5e28c62b3611', - underlyingTokenAddress: '0xc7198437980c041c805a1edcba50c1ce5db95118', // USDT.e - }, - { - address: '0x22182ee443e109472fa3ff95311e4532ff5880f9', - underlyingTokenAddress: '0x49d5c2bdffac6ce2bfdb6640f4f80f226bc10bab', // WETH.e - }, - ]; - - return [...governanceMiningPools, ...underwritingMiningPools]; - } -} diff --git a/src/apps/insurace/binance-smart-chain/insurace.mining.token-fetcher.ts b/src/apps/insurace/binance-smart-chain/insurace.mining.token-fetcher.ts deleted file mode 100644 index fce4bbba9..000000000 --- a/src/apps/insurace/binance-smart-chain/insurace.mining.token-fetcher.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { ZERO_ADDRESS } from '~app-toolkit/constants/address'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { InsuraceMiningTokenDefinition, InsuraceMiningTokenFetcher } from '../common/insurace.mining.token-fetcher'; - -@PositionTemplate() -export class BinanceSmartChainInsuraceMiningTokenFetcher extends InsuraceMiningTokenFetcher { - groupLabel = 'Mining Pools'; - insurTokenAddress = '0x3192ccddf1cdce4ff055ebc80f3f0231b86a7e30'; - stakersPoolV2Address = '0xd50e8ce9d5c1f5228bcc77e318907bb4960578ef'; - - async getDefinitions(): Promise { - const governanceMiningPools = [ - { - address: '0xa5eb163588e25f6de18b9e164ba39daa6086f52b', - underlyingTokenAddress: '0x3192ccddf1cdce4ff055ebc80f3f0231b86a7e30', // INSUR - }, - ]; - - const underwritingMiningPools = [ - { - address: '0x563d10af7395db31f9b0030b39fc4e3ef2598fee', - underlyingTokenAddress: ZERO_ADDRESS, // BNB - }, - { - address: '0xdbbb520b40c7b7c6498dbd532aee5e28c62b3611', - underlyingTokenAddress: '0xe9e7cea3dedca5984780bafc599bd69add087d56', // BUSD - }, - { - address: '0xf2ce369b6e2b96952741af463dddd7061f565946', - underlyingTokenAddress: '0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d', // USDC - }, - { - address: '0x22182ee443e109472fa3ff95311e4532ff5880f9', - underlyingTokenAddress: '0x55d398326f99059ff775485246999027b3197955', // USDT - }, - { - address: '0x5b9d6666398b86e2541b08b00468ae6434f79441', - underlyingTokenAddress: '0x2170ed0880ac9a755fd29b2688956bd959f933f8', // ETH - }, - ]; - - return [...governanceMiningPools, ...underwritingMiningPools]; - } -} diff --git a/src/apps/insurace/common/insurace.mining.token-fetcher.ts b/src/apps/insurace/common/insurace.mining.token-fetcher.ts deleted file mode 100644 index 965178f0c..000000000 --- a/src/apps/insurace/common/insurace.mining.token-fetcher.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { Inject } from '@nestjs/common'; -import { BigNumber } from 'ethers'; - -import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; -import { BLOCKS_PER_DAY } from '~app-toolkit/constants/blocks'; -import { getLabelFromToken } from '~app-toolkit/helpers/presentation/image.present'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { - DefaultAppTokenDataProps, - DefaultAppTokenDefinition, - GetAddressesParams, - GetDataPropsParams, - GetDisplayPropsParams, - GetPricePerShareParams, - GetUnderlyingTokensParams, -} from '~position/template/app-token.template.types'; - -import { InsuraceViemContractFactory } from '../contracts'; -import { InsuracePoolToken } from '../contracts/viem'; - -export type InsuraceMiningTokenDefinition = { - address: string; - underlyingTokenAddress: string; -}; - -export abstract class InsuraceMiningTokenFetcher extends AppTokenTemplatePositionFetcher< - InsuracePoolToken, - DefaultAppTokenDataProps, - InsuraceMiningTokenDefinition -> { - abstract insurTokenAddress: string; - abstract stakersPoolV2Address: string; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(InsuraceViemContractFactory) protected readonly contractFactory: InsuraceViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.insuracePoolToken({ address, network: this.network }); - } - - async getAddresses({ definitions }: GetAddressesParams) { - return definitions.map(v => v.address); - } - - async getUnderlyingTokenDefinitions({ - definition, - }: GetUnderlyingTokensParams) { - return [{ address: definition.underlyingTokenAddress, network: this.network }]; - } - - async getPricePerShare({ - appToken, - multicall, - }: GetPricePerShareParams) { - const stakersPool = this.contractFactory.insuraceStakersPoolV2({ - address: this.stakersPoolV2Address, - network: this.network, - }); - - const reserveRaw = await multicall.wrap(stakersPool).read.stakedAmountPT([appToken.tokens[0].address]); - const reserve = Number(reserveRaw) / 10 ** appToken.tokens[0].decimals; - - const pricePerShare = reserve / appToken.supply; - return [pricePerShare]; - } - - async getApy({ - appToken, - multicall, - tokenLoader, - }: GetDataPropsParams) { - const insurToken = await tokenLoader.getOne({ address: this.insurTokenAddress, network: this.network }); - if (!insurToken) return 0; - - const stakersPool = this.contractFactory.insuraceStakersPoolV2({ - address: this.stakersPoolV2Address, - network: this.network, - }); - - const [totalInsurPerBlock, totalPoolWeight, poolWeight] = await Promise.all([ - multicall.wrap(stakersPool).read.rewardPerBlock(), - multicall.wrap(stakersPool).read.totalPoolWeight(), - multicall.wrap(stakersPool).read.poolWeightPT([appToken.address]), - ]); - - if (Number(totalPoolWeight) <= 0) return 0; - const liquidity = appToken.price * appToken.supply; - const insurPerBlock = - Number(BigNumber.from(totalInsurPerBlock).mul(poolWeight).div(totalPoolWeight)) / 10 ** insurToken.decimals; - const blocksPerYear = 365 * BLOCKS_PER_DAY[this.network]; - - const apy = ((insurPerBlock * blocksPerYear * insurToken.price) / liquidity) * 100; - return apy; - } - - async getLabel({ appToken }: GetDisplayPropsParams) { - return getLabelFromToken(appToken.tokens[0]); - } -} diff --git a/src/apps/insurace/contracts/abis/insurace-pool-token.json b/src/apps/insurace/contracts/abis/insurace-pool-token.json deleted file mode 100644 index c1b9f03e8..000000000 --- a/src/apps/insurace/contracts/abis/insurace-pool-token.json +++ /dev/null @@ -1,341 +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": "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": "_amount", "type": "uint256" } - ], - "name": "TokenBurn", - "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": "TokenMint", - "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": [ - { "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" }, - { "internalType": "uint256", "name": "_amount", "type": "uint256" }, - { "internalType": "uint256", "name": "_poolRewardPerLPToken", "type": "uint256" } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "burnWeightPH", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_account", "type": "address" }], - "name": "burnableAmtOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "burnableAmtPH", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_account", "type": "address" }, - { "internalType": "uint256", "name": "_amount", "type": "uint256" } - ], - "name": "canMintPerAccountCap", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "_amount", "type": "uint256" }], - "name": "canMintPerTotalSupply", - "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": "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": "uint8", "name": "_decimals", "type": "uint8" } - ], - "name": "initializeLPToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "lpTokenBurner", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "lpTokenMinter", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_account", "type": "address" }, - { "internalType": "uint256", "name": "_amount", "type": "uint256" }, - { "internalType": "uint256", "name": "_poolRewardPerLPToken", "type": "uint256" } - ], - "name": "mint", - "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": "pauseAll", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "paused", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "pendingBurnAmtPH", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "perAccountCap", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_account", "type": "address" }, - { "internalType": "uint256", "name": "_amount", "type": "uint256" }, - { "internalType": "uint256", "name": "_blockWeightDuration", "type": "uint256" } - ], - "name": "proposeToBurn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "rewardDebt", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_account", "type": "address" }], - "name": "rewardDebtOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "_lpTokenMinter", "type": "address" }, - { "internalType": "address", "name": "_lpTokenBurner", "type": "address" } - ], - "name": "setup", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint8", "name": "_decimals", "type": "uint8" }], - "name": "setupDecimals", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "_totalSupplyCap", "type": "uint256" }, - { "internalType": "uint256", "name": "_perAccountCap", "type": "uint256" } - ], - "name": "setupMintCap", - "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": [], - "name": "totalSupplyCap", - "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": "unPauseAll", "outputs": [], "stateMutability": "nonpayable", "type": "function" } -] diff --git a/src/apps/insurace/contracts/abis/insurace-stakers-pool-v-2.json b/src/apps/insurace/contracts/abis/insurace-stakers-pool-v-2.json deleted file mode 100644 index 39c858d2e..000000000 --- a/src/apps/insurace/contracts/abis/insurace-stakers-pool-v-2.json +++ /dev/null @@ -1,848 +0,0 @@ -[ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "_fromToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "_paymentToken", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_settleAmtPT", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_claimId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_fromRate", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_toRate", - "type": "uint256" - } - ], - "name": "ClaimPayoutEvent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "_rewardStartBlock", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_rewardEndBlock", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_rewardPerBlock", - "type": "uint256" - } - ], - "name": "SetRewardInfo", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "signer", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "enabled", - "type": "bool" - } - ], - "name": "SetStakersPoolSignerEvent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "StakedAmountPTEvent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "addStkAmount", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_fromToken", - "type": "address" - }, - { - "internalType": "address", - "name": "_paymentToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_settleAmtPT", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_claimToSettlementPool", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_claimId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_fromRate", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_toRate", - "type": "uint256" - } - ], - "name": "claimPayout", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_lpToken", - "type": "address" - } - ], - "name": "getPoolRewardPerLPToken", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_lpToken", - "type": "address" - } - ], - "name": "getRewardPerBlockPerPool", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getRewardToken", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_token", - "type": "address" - } - ], - "name": "getStakedAmountPT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "address", - "name": "_lpToken", - "type": "address" - }, - { - "internalType": "address", - "name": "_to", - "type": "address" - } - ], - "name": "harvestRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "harvestedRewardsPerAPerLPT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "initializeStakersPoolV2", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "insurTokenAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "nonceFlagMap", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "poolLastCalcBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "poolRewardPerLPToken", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "poolWeightPT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_lpToken", - "type": "address" - } - ], - "name": "reCalcPoolPT", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_rewardPerBlock", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "_lpTokens", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "_weightList", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "_nounce", - "type": "uint256" - }, - { - "internalType": "uint8[]", - "name": "v", - "type": "uint8[]" - }, - { - "internalType": "bytes32[]", - "name": "r", - "type": "bytes32[]" - }, - { - "internalType": "bytes32[]", - "name": "s", - "type": "bytes32[]" - } - ], - "name": "rebalancePools", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "rewardEndBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rewardPerBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rewardStartBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "securityMatrix", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_lpToken", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_poolWeightPT", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "_lpTokens", - "type": "address[]" - } - ], - "name": "setPoolWeight", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_rewardStartBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_rewardEndBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_rewardPerBlock", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "_lpTokens", - "type": "address[]" - } - ], - "name": "setRewardInfo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "signer", - "type": "address" - }, - { - "internalType": "bool", - "name": "enabled", - "type": "bool" - } - ], - "name": "setStakersPoolSigner", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "address", - "name": "_lpToken", - "type": "address" - } - ], - "name": "settlePendingRewards", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_securityMatrix", - "type": "address" - }, - { - "internalType": "address", - "name": "_insurTokenAddress", - "type": "address" - } - ], - "name": "setup", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "address", - "name": "_lpToken", - "type": "address" - } - ], - "name": "showHarvestRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "address", - "name": "_lpToken", - "type": "address" - } - ], - "name": "showPendingRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "signerFlagMap", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "stakedAmountPT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "stkRewardsPerAPerLPT", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalPoolWeight", - "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 payable", - "name": "_to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_withdrawAmtAfterFee", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_token", - "type": "address" - }, - { - "internalType": "address", - "name": "_feePool", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_fee", - "type": "uint256" - } - ], - "name": "withdrawTokens", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/insurace/contracts/index.ts b/src/apps/insurace/contracts/index.ts deleted file mode 100644 index 5dcfebdf6..000000000 --- a/src/apps/insurace/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/insurace/contracts/viem.contract-factory.ts b/src/apps/insurace/contracts/viem.contract-factory.ts deleted file mode 100644 index a60ab5c45..000000000 --- a/src/apps/insurace/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 { InsuracePoolToken__factory, InsuraceStakersPoolV2__factory } from './viem'; - -type ContractOpts = { address: string; network: Network }; - -@Injectable() -export class InsuraceViemContractFactory { - constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) {} - - insuracePoolToken({ address, network }: ContractOpts) { - return InsuracePoolToken__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } - insuraceStakersPoolV2({ address, network }: ContractOpts) { - return InsuraceStakersPoolV2__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } -} diff --git a/src/apps/insurace/contracts/viem/InsuracePoolToken.ts b/src/apps/insurace/contracts/viem/InsuracePoolToken.ts deleted file mode 100644 index ecfb98741..000000000 --- a/src/apps/insurace/contracts/viem/InsuracePoolToken.ts +++ /dev/null @@ -1,791 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const insuracePoolTokenAbi = [ - { - 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: '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: '_amount', - type: 'uint256', - }, - ], - name: 'TokenBurn', - 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: 'TokenMint', - 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: [ - { - 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', - }, - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_poolRewardPerLPToken', - type: 'uint256', - }, - ], - name: 'burn', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'burnWeightPH', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_account', - type: 'address', - }, - ], - name: 'burnableAmtOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'burnableAmtPH', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_account', - type: 'address', - }, - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'canMintPerAccountCap', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'canMintPerTotalSupply', - 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: '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: 'uint8', - name: '_decimals', - type: 'uint8', - }, - ], - name: 'initializeLPToken', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'lpTokenBurner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'lpTokenMinter', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_account', - type: 'address', - }, - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_poolRewardPerLPToken', - type: 'uint256', - }, - ], - name: 'mint', - 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: 'pauseAll', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'paused', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'pendingBurnAmtPH', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'perAccountCap', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_account', - type: 'address', - }, - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_blockWeightDuration', - type: 'uint256', - }, - ], - name: 'proposeToBurn', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'renounceOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'rewardDebt', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_account', - type: 'address', - }, - ], - name: 'rewardDebtOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_lpTokenMinter', - type: 'address', - }, - { - internalType: 'address', - name: '_lpTokenBurner', - type: 'address', - }, - ], - name: 'setup', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint8', - name: '_decimals', - type: 'uint8', - }, - ], - name: 'setupDecimals', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_totalSupplyCap', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_perAccountCap', - type: 'uint256', - }, - ], - name: 'setupMintCap', - 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: [], - name: 'totalSupplyCap', - 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: 'unPauseAll', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type InsuracePoolToken = typeof insuracePoolTokenAbi; -export type InsuracePoolTokenContract = GetContractReturnType; - -export class InsuracePoolToken__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: insuracePoolTokenAbi, publicClient: client }); - } -} diff --git a/src/apps/insurace/contracts/viem/InsuraceStakersPoolV2.ts b/src/apps/insurace/contracts/viem/InsuraceStakersPoolV2.ts deleted file mode 100644 index 38f092be2..000000000 --- a/src/apps/insurace/contracts/viem/InsuraceStakersPoolV2.ts +++ /dev/null @@ -1,862 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const insuraceStakersPoolV2Abi = [ - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: '_fromToken', - type: 'address', - }, - { - indexed: false, - internalType: 'address', - name: '_paymentToken', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: '_settleAmtPT', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: '_claimId', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: '_fromRate', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: '_toRate', - type: 'uint256', - }, - ], - name: 'ClaimPayoutEvent', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'previousOwner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnershipTransferred', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'Paused', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: '_rewardStartBlock', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: '_rewardEndBlock', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256', - name: '_rewardPerBlock', - type: 'uint256', - }, - ], - name: 'SetRewardInfo', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: 'signer', - type: 'address', - }, - { - indexed: false, - internalType: 'bool', - name: 'enabled', - type: 'bool', - }, - ], - name: 'SetStakersPoolSignerEvent', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'address', - name: '_token', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'StakedAmountPTEvent', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'account', - type: 'address', - }, - ], - name: 'Unpaused', - type: 'event', - }, - { - inputs: [ - { - internalType: 'address', - name: '_token', - type: 'address', - }, - { - internalType: 'uint256', - name: '_amount', - type: 'uint256', - }, - ], - name: 'addStkAmount', - outputs: [], - stateMutability: 'payable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_fromToken', - type: 'address', - }, - { - internalType: 'address', - name: '_paymentToken', - type: 'address', - }, - { - internalType: 'uint256', - name: '_settleAmtPT', - type: 'uint256', - }, - { - internalType: 'address', - name: '_claimToSettlementPool', - type: 'address', - }, - { - internalType: 'uint256', - name: '_claimId', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_fromRate', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_toRate', - type: 'uint256', - }, - ], - name: 'claimPayout', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_lpToken', - type: 'address', - }, - ], - name: 'getPoolRewardPerLPToken', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_lpToken', - type: 'address', - }, - ], - name: 'getRewardPerBlockPerPool', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getRewardToken', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_token', - type: 'address', - }, - ], - name: 'getStakedAmountPT', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_account', - type: 'address', - }, - { - internalType: 'address', - name: '_lpToken', - type: 'address', - }, - { - internalType: 'address', - name: '_to', - type: 'address', - }, - ], - name: 'harvestRewards', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'harvestedRewardsPerAPerLPT', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'initializeStakersPoolV2', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'insurTokenAddress', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - name: 'nonceFlagMap', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'owner', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'paused', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'poolLastCalcBlock', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'poolRewardPerLPToken', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'poolWeightPT', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_lpToken', - type: 'address', - }, - ], - name: 'reCalcPoolPT', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_rewardPerBlock', - type: 'uint256', - }, - { - internalType: 'address[]', - name: '_lpTokens', - type: 'address[]', - }, - { - internalType: 'uint256[]', - name: '_weightList', - type: 'uint256[]', - }, - { - internalType: 'uint256', - name: '_nounce', - type: 'uint256', - }, - { - internalType: 'uint8[]', - name: 'v', - type: 'uint8[]', - }, - { - internalType: 'bytes32[]', - name: 'r', - type: 'bytes32[]', - }, - { - internalType: 'bytes32[]', - name: 's', - type: 'bytes32[]', - }, - ], - name: 'rebalancePools', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'renounceOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'rewardEndBlock', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'rewardPerBlock', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'rewardStartBlock', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'securityMatrix', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_lpToken', - type: 'address', - }, - { - internalType: 'uint256', - name: '_poolWeightPT', - type: 'uint256', - }, - { - internalType: 'address[]', - name: '_lpTokens', - type: 'address[]', - }, - ], - name: 'setPoolWeight', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: '_rewardStartBlock', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_rewardEndBlock', - type: 'uint256', - }, - { - internalType: 'uint256', - name: '_rewardPerBlock', - type: 'uint256', - }, - { - internalType: 'address[]', - name: '_lpTokens', - type: 'address[]', - }, - ], - name: 'setRewardInfo', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'signer', - type: 'address', - }, - { - internalType: 'bool', - name: 'enabled', - type: 'bool', - }, - ], - name: 'setStakersPoolSigner', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_account', - type: 'address', - }, - { - internalType: 'address', - name: '_lpToken', - type: 'address', - }, - ], - name: 'settlePendingRewards', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_securityMatrix', - type: 'address', - }, - { - internalType: 'address', - name: '_insurTokenAddress', - type: 'address', - }, - ], - name: 'setup', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_account', - type: 'address', - }, - { - internalType: 'address', - name: '_lpToken', - type: 'address', - }, - ], - name: 'showHarvestRewards', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_account', - type: 'address', - }, - { - internalType: 'address', - name: '_lpToken', - type: 'address', - }, - ], - name: 'showPendingRewards', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'signerFlagMap', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'stakedAmountPT', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'stkRewardsPerAPerLPT', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalPoolWeight', - 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 payable', - name: '_to', - type: 'address', - }, - { - internalType: 'uint256', - name: '_withdrawAmtAfterFee', - type: 'uint256', - }, - { - internalType: 'address', - name: '_token', - type: 'address', - }, - { - internalType: 'address', - name: '_feePool', - type: 'address', - }, - { - internalType: 'uint256', - name: '_fee', - type: 'uint256', - }, - ], - name: 'withdrawTokens', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type InsuraceStakersPoolV2 = typeof insuraceStakersPoolV2Abi; -export type InsuraceStakersPoolV2Contract = GetContractReturnType; - -export class InsuraceStakersPoolV2__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: insuraceStakersPoolV2Abi, publicClient: client }); - } -} diff --git a/src/apps/insurace/contracts/viem/index.ts b/src/apps/insurace/contracts/viem/index.ts deleted file mode 100644 index 40f287139..000000000 --- a/src/apps/insurace/contracts/viem/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -export type { InsuracePoolToken } from './InsuracePoolToken'; -export type { InsuraceStakersPoolV2 } from './InsuraceStakersPoolV2'; - -export { InsuracePoolToken__factory } from './InsuracePoolToken'; -export { InsuraceStakersPoolV2__factory } from './InsuraceStakersPoolV2'; diff --git a/src/apps/insurace/ethereum/insurace.mining.token-fetcher.ts b/src/apps/insurace/ethereum/insurace.mining.token-fetcher.ts deleted file mode 100644 index 69b766f6a..000000000 --- a/src/apps/insurace/ethereum/insurace.mining.token-fetcher.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { ZERO_ADDRESS } from '~app-toolkit/constants/address'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { InsuraceMiningTokenDefinition, InsuraceMiningTokenFetcher } from '../common/insurace.mining.token-fetcher'; - -@PositionTemplate() -export class EthereumInsuraceMiningTokenFetcher extends InsuraceMiningTokenFetcher { - groupLabel = 'Mining Pools'; - insurTokenAddress = '0x544c42fbb96b39b21df61cf322b5edc285ee7429'; - stakersPoolV2Address = '0x136d841d4bece3fc0e4debb94356d8b6b4b93209'; - - async getDefinitions(): Promise { - const governanceMiningPools = [ - { - address: '0x7e68521a2814a84868da716b9f436b53e6764c1d', - underlyingTokenAddress: '0x544c42fbb96b39b21df61cf322b5edc285ee7429', // INSUR - }, - ]; - const underwritingMiningPools = [ - { - address: '0xdf8bec949367b677b7c951219ed66035ddc73d3f', - underlyingTokenAddress: ZERO_ADDRESS, // ETH - }, - { - address: '0xee516e05cecfee5fe72930f3b38b87594434fd00', - underlyingTokenAddress: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', // WETH - }, - { - address: '0x5157e052ae30381e38874a9b3452aabc9f145182', - underlyingTokenAddress: '0x6b175474e89094c44da98b954eedeac495271d0f', // DAI - }, - { - address: '0x3d9317a27f3d83f0821deeeb0befdb68d4c9cd47', - underlyingTokenAddress: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', // USDC - }, - { - address: '0x8ce730bbaf5ed1b9e8cf2d857f474bdcdeb22275', - underlyingTokenAddress: '0xdac17f958d2ee523a2206206994597c13d831ec7', // USDT - }, - { - address: '0xd9aae8f651f323cbb39e328b8fda741d11a231e0', - underlyingTokenAddress: '0xe2f2a5c287993345a840db3b0845fbc70f5935a5', // mUSD - }, - ]; - - const liquidityMiningPools = [ - { - address: '0x07d8d49c5751566962a5169a9c8efdf64d1ca00b', - underlyingTokenAddress: '0x169bf778a5eadab0209c0524ea5ce8e7a616e33b', // Uniswap V2 INSUR/USDC LP - }, - ]; - - return [...governanceMiningPools, ...underwritingMiningPools, ...liquidityMiningPools]; - } -} diff --git a/src/apps/insurace/insurace.module.ts b/src/apps/insurace/insurace.module.ts deleted file mode 100644 index 67962660e..000000000 --- a/src/apps/insurace/insurace.module.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Module } from '@nestjs/common'; - -import { AbstractApp } from '~app/app.dynamic-module'; - -import { AvalancheInsuraceMiningTokenFetcher } from './avalanche/insurace.mining.token-fetcher'; -import { BinanceSmartChainInsuraceMiningTokenFetcher } from './binance-smart-chain/insurace.mining.token-fetcher'; -import { InsuraceViemContractFactory } from './contracts'; -import { EthereumInsuraceMiningTokenFetcher } from './ethereum/insurace.mining.token-fetcher'; -import { PolygonInsuraceMiningTokenFetcher } from './polygon/insurace.mining.token-fetcher'; - -@Module({ - providers: [ - InsuraceViemContractFactory, - // Avalanche - AvalancheInsuraceMiningTokenFetcher, - // Binance-smart-chain - BinanceSmartChainInsuraceMiningTokenFetcher, - // Ethereum - EthereumInsuraceMiningTokenFetcher, - // Polygon - PolygonInsuraceMiningTokenFetcher, - ], -}) -export class InsuraceAppModule extends AbstractApp() {} diff --git a/src/apps/insurace/polygon/insurace.mining.token-fetcher.ts b/src/apps/insurace/polygon/insurace.mining.token-fetcher.ts deleted file mode 100644 index 653f10c3a..000000000 --- a/src/apps/insurace/polygon/insurace.mining.token-fetcher.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { ZERO_ADDRESS } from '~app-toolkit/constants/address'; -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { InsuraceMiningTokenDefinition, InsuraceMiningTokenFetcher } from '../common/insurace.mining.token-fetcher'; - -@PositionTemplate() -export class PolygonInsuraceMiningTokenFetcher extends InsuraceMiningTokenFetcher { - groupLabel = 'Mining Pools'; - insurTokenAddress = '0x8a0e8b4b0903929f47c3ea30973940d4a9702067'; - stakersPoolV2Address = '0xd2171abb60d2994cf9acb767f2116cf47bbf596f'; - - async getDefinitions(): Promise { - const governanceMiningPools = [ - { - address: '0xdbbb520b40c7b7c6498dbd532aee5e28c62b3611', - underlyingTokenAddress: '0x8a0e8b4b0903929f47c3ea30973940d4a9702067', // INSUR - }, - ]; - const underwritingMiningPools = [ - { - underlyingTokenAddress: ZERO_ADDRESS, // MATIC - address: '0x599b132328a07b51b833609314824570a99ab9b0', - }, - { - underlyingTokenAddress: '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063', // DAI - address: '0x09eaa5c29cb01b39b544db165f484a0d015e562b', - }, - { - underlyingTokenAddress: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174', // USDC - address: '0xdecafc91000d4d3802a0562a8fb896f29b6a7480', - }, - { - underlyingTokenAddress: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f', // USDT - address: '0xa29b59a149f62d390dee27b144c0092ca7dbba96', - }, - { - underlyingTokenAddress: '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619', // WETH - address: '0x563d10af7395db31f9b0030b39fc4e3ef2598fee', - }, - ]; - - return [...governanceMiningPools, ...underwritingMiningPools]; - } -} diff --git a/src/apps/manifold-finance/assets/logo.png b/src/apps/manifold-finance/assets/logo.png deleted file mode 100644 index 14858aa10..000000000 Binary files a/src/apps/manifold-finance/assets/logo.png and /dev/null differ diff --git a/src/apps/manifold-finance/contracts/abis/x-fold.json b/src/apps/manifold-finance/contracts/abis/x-fold.json deleted file mode 100644 index 670965506..000000000 --- a/src/apps/manifold-finance/contracts/abis/x-fold.json +++ /dev/null @@ -1,322 +0,0 @@ -[ - { - "inputs": [ - { "internalType": "string", "name": "sharesSymbol", "type": "string" }, - { "internalType": "string", "name": "sharesName", "type": "string" }, - { "internalType": "contract IERC20", "name": "token_", "type": "address" }, - { "internalType": "address", "name": "initialOperator", "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": "txHash", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "target", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" }, - { "indexed": false, "internalType": "bytes", "name": "data", "type": "bytes" } - ], - "name": "CancelTransaction", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "txHash", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "target", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" }, - { "indexed": false, "internalType": "bytes", "name": "data", "type": "bytes" } - ], - "name": "ExecuteTransaction", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "bytes32", "name": "txHash", "type": "bytes32" }, - { "indexed": true, "internalType": "address", "name": "target", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" }, - { "indexed": false, "internalType": "bytes", "name": "data", "type": "bytes" }, - { "indexed": false, "internalType": "uint256", "name": "eta", "type": "uint256" } - ], - "name": "QueueTransaction", - "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": "DELAY", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "GRACE_PERIOD", - "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": [{ "internalType": "address", "name": "user", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "balance", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "shares", "type": "uint256" } - ], - "name": "burn", - "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": "shares", "type": "uint256" } - ], - "name": "burnFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "target", "type": "address" }, - { "internalType": "uint256", "name": "value", "type": "uint256" }, - { "internalType": "bytes", "name": "data", "type": "bytes" } - ], - "name": "cancelTransaction", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "target", "type": "address" }, - { "internalType": "uint256", "name": "value", "type": "uint256" }, - { "internalType": "bytes", "name": "data", "type": "bytes" } - ], - "name": "executeTransaction", - "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "amount", "type": "uint256" }, - { "internalType": "address", "name": "operatorVote", "type": "address" } - ], - "name": "mint", - "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": "", "type": "address" }], - "name": "nonces", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "operator", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pendingOperator", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pendingOperatorTime", - "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": [ - { "internalType": "address", "name": "target", "type": "address" }, - { "internalType": "uint256", "name": "value", "type": "uint256" }, - { "internalType": "bytes", "name": "data", "type": "bytes" } - ], - "name": "queueTransaction", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "name": "queuedTransactions", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "newOperator", "type": "address" }], - "name": "setOperator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "token", - "outputs": [{ "internalType": "contract IERC20", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "shares", "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": "shares", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "userVote", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "users", - "outputs": [ - { "internalType": "uint128", "name": "balance", "type": "uint128" }, - { "internalType": "uint128", "name": "lockedUntil", "type": "uint128" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "operatorVote", "type": "address" }], - "name": "vote", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "votes", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - } -] diff --git a/src/apps/manifold-finance/contracts/index.ts b/src/apps/manifold-finance/contracts/index.ts deleted file mode 100644 index 5dcfebdf6..000000000 --- a/src/apps/manifold-finance/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/manifold-finance/contracts/viem.contract-factory.ts b/src/apps/manifold-finance/contracts/viem.contract-factory.ts deleted file mode 100644 index 088ba9f00..000000000 --- a/src/apps/manifold-finance/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 { XFold__factory } from './viem'; - -type ContractOpts = { address: string; network: Network }; - -@Injectable() -export class ManifoldFinanceViemContractFactory { - constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) {} - - xFold({ address, network }: ContractOpts) { - return XFold__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } -} diff --git a/src/apps/manifold-finance/contracts/viem/XFold.ts b/src/apps/manifold-finance/contracts/viem/XFold.ts deleted file mode 100644 index 11c181808..000000000 --- a/src/apps/manifold-finance/contracts/viem/XFold.ts +++ /dev/null @@ -1,787 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const xFoldAbi = [ - { - inputs: [ - { - internalType: 'string', - name: 'sharesSymbol', - type: 'string', - }, - { - internalType: 'string', - name: 'sharesName', - type: 'string', - }, - { - internalType: 'contract IERC20', - name: 'token_', - type: 'address', - }, - { - internalType: 'address', - name: 'initialOperator', - 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: 'txHash', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'address', - name: 'target', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - indexed: false, - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - ], - name: 'CancelTransaction', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: 'txHash', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'address', - name: 'target', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - indexed: false, - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - ], - name: 'ExecuteTransaction', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: 'bytes32', - name: 'txHash', - type: 'bytes32', - }, - { - indexed: true, - internalType: 'address', - name: 'target', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - indexed: false, - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - { - indexed: false, - internalType: 'uint256', - name: 'eta', - type: 'uint256', - }, - ], - name: 'QueueTransaction', - 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: 'DELAY', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'DOMAIN_SEPARATOR', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'GRACE_PERIOD', - 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: [ - { - internalType: 'address', - name: 'user', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: 'balance', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'shares', - type: 'uint256', - }, - ], - name: 'burn', - 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: 'shares', - type: 'uint256', - }, - ], - name: 'burnFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'target', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - ], - name: 'cancelTransaction', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'decimals', - outputs: [ - { - internalType: 'uint8', - name: '', - type: 'uint8', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'target', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - ], - name: 'executeTransaction', - outputs: [ - { - internalType: 'bytes', - name: '', - type: 'bytes', - }, - ], - stateMutability: 'payable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'address', - name: 'operatorVote', - type: 'address', - }, - ], - name: 'mint', - 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: '', - type: 'address', - }, - ], - name: 'nonces', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'operator', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'pendingOperator', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'pendingOperatorTime', - 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: [ - { - internalType: 'address', - name: 'target', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - ], - name: 'queueTransaction', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - name: 'queuedTransactions', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'newOperator', - type: 'address', - }, - ], - name: 'setOperator', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'token', - outputs: [ - { - internalType: 'contract IERC20', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'shares', - 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: 'shares', - type: 'uint256', - }, - ], - name: 'transferFrom', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'userVote', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'users', - outputs: [ - { - internalType: 'uint128', - name: 'balance', - type: 'uint128', - }, - { - internalType: 'uint128', - name: 'lockedUntil', - type: 'uint128', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'operatorVote', - type: 'address', - }, - ], - name: 'vote', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'votes', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, -] as const; - -export type XFold = typeof xFoldAbi; -export type XFoldContract = GetContractReturnType; - -export class XFold__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: xFoldAbi, publicClient: client }); - } -} diff --git a/src/apps/manifold-finance/contracts/viem/index.ts b/src/apps/manifold-finance/contracts/viem/index.ts deleted file mode 100644 index b2869faa4..000000000 --- a/src/apps/manifold-finance/contracts/viem/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -export type { XFold } from './XFold'; - -export { XFold__factory } from './XFold'; diff --git a/src/apps/manifold-finance/ethereum/manifold-finance.staking.token-fetcher.ts b/src/apps/manifold-finance/ethereum/manifold-finance.staking.token-fetcher.ts deleted file mode 100644 index 977a9437d..000000000 --- a/src/apps/manifold-finance/ethereum/manifold-finance.staking.token-fetcher.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { WrapperTemplateTokenFetcher } from '~position/template/wrapper.template.token-fetcher'; - -@PositionTemplate() -export class EthereumManifoldFinanceStakingTokenFetcher extends WrapperTemplateTokenFetcher { - groupLabel = 'xFOLD'; - - vaultAddress = '0x454bd9e2b29eb5963048cc1a8bd6fd44e89899cb'; - underlyingTokenAddress = '0xd084944d3c05cd115c09d072b9f44ba3e0e45921'; -} diff --git a/src/apps/manifold-finance/manifold-finance.module.ts b/src/apps/manifold-finance/manifold-finance.module.ts deleted file mode 100644 index ad0a27ea6..000000000 --- a/src/apps/manifold-finance/manifold-finance.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Module } from '@nestjs/common'; - -import { AbstractApp } from '~app/app.dynamic-module'; - -import { ManifoldFinanceViemContractFactory } from './contracts'; -import { EthereumManifoldFinanceStakingTokenFetcher } from './ethereum/manifold-finance.staking.token-fetcher'; - -@Module({ - providers: [EthereumManifoldFinanceStakingTokenFetcher, ManifoldFinanceViemContractFactory], -}) -export class ManifoldFinanceAppModule extends AbstractApp() {} diff --git a/src/apps/maple/ethereum/maple.x-mpl.token-fetcher.ts b/src/apps/maple/ethereum/maple.x-mpl.token-fetcher.ts deleted file mode 100644 index fe392fea8..000000000 --- a/src/apps/maple/ethereum/maple.x-mpl.token-fetcher.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { VaultTemplateTokenFetcher } from '~position/template/vault.template.token-fetcher'; - -@PositionTemplate() -export class EthereumMapleXMplTokenFetcher extends VaultTemplateTokenFetcher { - groupLabel = 'xMPL'; - - vaultAddress = '0x4937a209d4cdbd3ecd48857277cfd4da4d82914c'; - underlyingTokenAddress = '0x33349b282065b0284d756f0577fb39c158f935e6'; -} diff --git a/src/apps/maple/maple.module.ts b/src/apps/maple/maple.module.ts index 4d1ff883a..8e062f54a 100644 --- a/src/apps/maple/maple.module.ts +++ b/src/apps/maple/maple.module.ts @@ -6,14 +6,12 @@ import { MaplePoolDefinitionResolver } from './common/maple.pool.definition-reso import { MapleViemContractFactory } from './contracts'; import { EthereumMaplePendingWithdrawalContractPositionFetcher } from './ethereum/maple.pending-withdrawal.contract-position-fetcher'; import { EthereumMaplePoolTokenFetcher } from './ethereum/maple.pool.token-fetcher'; -import { EthereumMapleXMplTokenFetcher } from './ethereum/maple.x-mpl.token-fetcher'; @Module({ providers: [ MapleViemContractFactory, MaplePoolDefinitionResolver, EthereumMaplePoolTokenFetcher, - EthereumMapleXMplTokenFetcher, EthereumMaplePendingWithdrawalContractPositionFetcher, ], }) diff --git a/src/apps/penguin/avalanche/penguin.i-pefi.token-fetcher.ts b/src/apps/penguin/avalanche/penguin.i-pefi.token-fetcher.ts deleted file mode 100644 index f93a7465d..000000000 --- a/src/apps/penguin/avalanche/penguin.i-pefi.token-fetcher.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { VaultTemplateTokenFetcher } from '~position/template/vault.template.token-fetcher'; - -@PositionTemplate() -export class AvalanchePenguinIPefiTokenFetcher extends VaultTemplateTokenFetcher { - groupLabel = 'iPEFI'; - - vaultAddress = '0xe9476e16fe488b90ada9ab5c7c2ada81014ba9ee'; - underlyingTokenAddress = '0xe896cdeaac9615145c0ca09c8cd5c25bced6384c'; -} diff --git a/src/apps/penguin/avalanche/penguin.x-pefi.token-fetcher.ts b/src/apps/penguin/avalanche/penguin.x-pefi.token-fetcher.ts deleted file mode 100644 index d2e58b721..000000000 --- a/src/apps/penguin/avalanche/penguin.x-pefi.token-fetcher.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { VaultTemplateTokenFetcher } from '~position/template/vault.template.token-fetcher'; - -@PositionTemplate() -export class AvalanchePenguinXPefiTokenFetcher extends VaultTemplateTokenFetcher { - groupLabel = 'xPEFI'; - - vaultAddress = '0xd79a36056c271b988c5f1953e664e61416a9820f'; - underlyingTokenAddress = '0xe896cdeaac9615145c0ca09c8cd5c25bced6384c'; -} diff --git a/src/apps/penguin/penguin.module.ts b/src/apps/penguin/penguin.module.ts index 13dcab096..dd9916a8e 100644 --- a/src/apps/penguin/penguin.module.ts +++ b/src/apps/penguin/penguin.module.ts @@ -4,9 +4,7 @@ import { AbstractApp } from '~app/app.dynamic-module'; import { AvalanchePenguinChefV1FarmContractPositionFetcher } from './avalanche/penguin.chef-v1-farm.contract-position-fetcher'; 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 { AvalanchePenguinXPefiTokenFetcher } from './avalanche/penguin.x-pefi.token-fetcher'; import { PenguinViemContractFactory } from './contracts'; @Module({ @@ -14,8 +12,6 @@ import { PenguinViemContractFactory } from './contracts'; PenguinViemContractFactory, AvalanchePenguinChefV1FarmContractPositionFetcher, AvalanchePenguinChefV2FarmContractPositionFetcher, - AvalanchePenguinIPefiTokenFetcher, - AvalanchePenguinXPefiTokenFetcher, AvalanchePenguinVaultClaimableContractPositionFetcher, ], }) diff --git a/src/apps/pirex/arbitrum/pirex.pxglp.token-fetcher.ts b/src/apps/pirex/arbitrum/pirex.pxglp.token-fetcher.ts deleted file mode 100644 index 2aedda7de..000000000 --- a/src/apps/pirex/arbitrum/pirex.pxglp.token-fetcher.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { WrapperTemplateTokenFetcher } from '~position/template/wrapper.template.token-fetcher'; - -@PositionTemplate() -export class ArbitrumPirexPxGlpTokenFetcher extends WrapperTemplateTokenFetcher { - groupLabel = 'Pirex GMX'; - vaultAddress = '0x0eac365e4d7de0e293078bd771ba7d0ba9a4c892'; - underlyingTokenAddress = '0x4277f8f2c384827b5273592ff7cebd9f2c1ac258'; -} diff --git a/src/apps/pirex/arbitrum/pirex.pxgmx.token-fetcher.ts b/src/apps/pirex/arbitrum/pirex.pxgmx.token-fetcher.ts deleted file mode 100644 index 295ed7ebd..000000000 --- a/src/apps/pirex/arbitrum/pirex.pxgmx.token-fetcher.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { WrapperTemplateTokenFetcher } from '~position/template/wrapper.template.token-fetcher'; - -@PositionTemplate() -export class ArbitrumPirexPxGmxTokenFetcher extends WrapperTemplateTokenFetcher { - groupLabel = 'Pirex GMX'; - vaultAddress = '0x9a592b4539e22eeb8b2a3df679d572c7712ef999'; - underlyingTokenAddress = '0xfc5a1a6eb076a2c7ad06ed22c90d7e710e35ad0a'; -} diff --git a/src/apps/pirex/assets/logo.png b/src/apps/pirex/assets/logo.png deleted file mode 100644 index 10f4153f4..000000000 Binary files a/src/apps/pirex/assets/logo.png and /dev/null differ diff --git a/src/apps/pirex/contracts/abis/pirex-px-cvx.json b/src/apps/pirex/contracts/abis/pirex-px-cvx.json deleted file mode 100644 index 64b6bf5e1..000000000 --- a/src/apps/pirex/contracts/abis/pirex-px-cvx.json +++ /dev/null @@ -1,312 +0,0 @@ -[ - { "inputs": [], "name": "InvalidEpoch", "type": "error" }, - { "inputs": [], "name": "InvalidFuturesRewards", "type": "error" }, - { "inputs": [], "name": "MismatchedFuturesRewards", "type": "error" }, - { "inputs": [], "name": "NoOperator", "type": "error" }, - { "inputs": [], "name": "NotAuthorized", "type": "error" }, - { "inputs": [], "name": "Paused", "type": "error" }, - { "inputs": [], "name": "ZeroAddress", "type": "error" }, - { "inputs": [], "name": "ZeroAmount", "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": "previousOwner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "address", "name": "operator", "type": "address" }], - "name": "SetOperator", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": false, "internalType": "uint256", "name": "id", "type": "uint256" }], - "name": "Snapshot", - "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": "uint256", "name": "epoch", "type": "uint256" }, - { "indexed": false, "internalType": "uint256[]", "name": "futuresRewards", "type": "uint256[]" } - ], - "name": "UpdateEpochFuturesRewards", - "type": "event" - }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "epoch", "type": "uint256" }, - { "internalType": "bytes32", "name": "token", "type": "bytes32" }, - { "internalType": "uint256", "name": "snapshotReward", "type": "uint256" }, - { "internalType": "uint256", "name": "futuresReward", "type": "uint256" } - ], - "name": "addEpochRewardMetadata", - "outputs": [], - "stateMutability": "nonpayable", - "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": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "account", "type": "address" }, - { "internalType": "uint256", "name": "snapshotId", "type": "uint256" } - ], - "name": "balanceOfAt", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "account", "type": "address" }, - { "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": [], - "name": "getCurrentEpoch", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getCurrentSnapshotId", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "epoch", "type": "uint256" }], - "name": "getEpoch", - "outputs": [ - { "internalType": "uint256", "name": "snapshotId", "type": "uint256" }, - { "internalType": "bytes32[]", "name": "rewards", "type": "bytes32[]" }, - { "internalType": "uint256[]", "name": "snapshotRewards", "type": "uint256[]" }, - { "internalType": "uint256[]", "name": "futuresRewards", "type": "uint256[]" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "account", "type": "address" }, - { "internalType": "uint256", "name": "epoch", "type": "uint256" } - ], - "name": "getEpochRedeemedSnapshotRewards", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "account", "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": "address", "name": "", "type": "address" }], - "name": "nonces", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "operator", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "from", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "amount", "type": "uint256" } - ], - "name": "operatorApprove", - "outputs": [], - "stateMutability": "nonpayable", - "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": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { "internalType": "address", "name": "account", "type": "address" }, - { "internalType": "uint256", "name": "epoch", "type": "uint256" }, - { "internalType": "uint256", "name": "redeemed", "type": "uint256" } - ], - "name": "setEpochRedeemedSnapshotRewards", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [{ "internalType": "address", "name": "_operator", "type": "address" }], - "name": "setOperator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "view", - "type": "function" - }, - { "inputs": [], "name": "takeEpochSnapshot", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [{ "internalType": "uint256", "name": "snapshotId", "type": "uint256" }], - "name": "totalSupplyAt", - "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": "epoch", "type": "uint256" }, - { "internalType": "uint256[]", "name": "futuresRewards", "type": "uint256[]" } - ], - "name": "updateEpochFuturesRewards", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/apps/pirex/contracts/index.ts b/src/apps/pirex/contracts/index.ts deleted file mode 100644 index 5dcfebdf6..000000000 --- a/src/apps/pirex/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/pirex/contracts/viem.contract-factory.ts b/src/apps/pirex/contracts/viem.contract-factory.ts deleted file mode 100644 index a042e1c08..000000000 --- a/src/apps/pirex/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 { PirexPxCvx__factory } from './viem'; - -type ContractOpts = { address: string; network: Network }; - -@Injectable() -export class PirexViemContractFactory { - constructor(@Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit) {} - - pirexPxCvx({ address, network }: ContractOpts) { - return PirexPxCvx__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); - } -} diff --git a/src/apps/pirex/contracts/viem/PirexPxCvx.ts b/src/apps/pirex/contracts/viem/PirexPxCvx.ts deleted file mode 100644 index 3ff43e6d6..000000000 --- a/src/apps/pirex/contracts/viem/PirexPxCvx.ts +++ /dev/null @@ -1,738 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import { getContract, GetContractReturnType, PublicClient } from 'viem'; - -export const pirexPxCvxAbi = [ - { - inputs: [], - name: 'InvalidEpoch', - type: 'error', - }, - { - inputs: [], - name: 'InvalidFuturesRewards', - type: 'error', - }, - { - inputs: [], - name: 'MismatchedFuturesRewards', - type: 'error', - }, - { - inputs: [], - name: 'NoOperator', - type: 'error', - }, - { - inputs: [], - name: 'NotAuthorized', - type: 'error', - }, - { - inputs: [], - name: 'Paused', - type: 'error', - }, - { - inputs: [], - name: 'ZeroAddress', - type: 'error', - }, - { - inputs: [], - name: 'ZeroAmount', - 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: 'previousOwner', - type: 'address', - }, - { - indexed: true, - internalType: 'address', - name: 'newOwner', - type: 'address', - }, - ], - name: 'OwnershipTransferred', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'address', - name: 'operator', - type: 'address', - }, - ], - name: 'SetOperator', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'id', - type: 'uint256', - }, - ], - name: 'Snapshot', - 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: 'uint256', - name: 'epoch', - type: 'uint256', - }, - { - indexed: false, - internalType: 'uint256[]', - name: 'futuresRewards', - type: 'uint256[]', - }, - ], - name: 'UpdateEpochFuturesRewards', - type: 'event', - }, - { - inputs: [], - name: 'DOMAIN_SEPARATOR', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'epoch', - type: 'uint256', - }, - { - internalType: 'bytes32', - name: 'token', - type: 'bytes32', - }, - { - internalType: 'uint256', - name: 'snapshotReward', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'futuresReward', - type: 'uint256', - }, - ], - name: 'addEpochRewardMetadata', - outputs: [], - stateMutability: 'nonpayable', - 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: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - { - internalType: 'uint256', - name: 'snapshotId', - type: 'uint256', - }, - ], - name: 'balanceOfAt', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - { - 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: [], - name: 'getCurrentEpoch', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'getCurrentSnapshotId', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'epoch', - type: 'uint256', - }, - ], - name: 'getEpoch', - outputs: [ - { - internalType: 'uint256', - name: 'snapshotId', - type: 'uint256', - }, - { - internalType: 'bytes32[]', - name: 'rewards', - type: 'bytes32[]', - }, - { - internalType: 'uint256[]', - name: 'snapshotRewards', - type: 'uint256[]', - }, - { - internalType: 'uint256[]', - name: 'futuresRewards', - type: 'uint256[]', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - { - internalType: 'uint256', - name: 'epoch', - type: 'uint256', - }, - ], - name: 'getEpochRedeemedSnapshotRewards', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - 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: 'address', - name: '', - type: 'address', - }, - ], - name: 'nonces', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'operator', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'from', - type: 'address', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'operatorApprove', - outputs: [], - stateMutability: 'nonpayable', - 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: 'renounceOwnership', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: 'account', - type: 'address', - }, - { - internalType: 'uint256', - name: 'epoch', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'redeemed', - type: 'uint256', - }, - ], - name: 'setEpochRedeemedSnapshotRewards', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'address', - name: '_operator', - type: 'address', - }, - ], - name: 'setOperator', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'symbol', - outputs: [ - { - internalType: 'string', - name: '', - type: 'string', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'takeEpochSnapshot', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [], - name: 'totalSupply', - outputs: [ - { - internalType: 'uint256', - name: '', - type: 'uint256', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'snapshotId', - type: 'uint256', - }, - ], - name: 'totalSupplyAt', - 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: 'epoch', - type: 'uint256', - }, - { - internalType: 'uint256[]', - name: 'futuresRewards', - type: 'uint256[]', - }, - ], - name: 'updateEpochFuturesRewards', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, -] as const; - -export type PirexPxCvx = typeof pirexPxCvxAbi; -export type PirexPxCvxContract = GetContractReturnType; - -export class PirexPxCvx__factory { - static connect(address: string, client: PublicClient) { - return getContract({ address, abi: pirexPxCvxAbi, publicClient: client }); - } -} diff --git a/src/apps/pirex/contracts/viem/index.ts b/src/apps/pirex/contracts/viem/index.ts deleted file mode 100644 index 32368f855..000000000 --- a/src/apps/pirex/contracts/viem/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -export type { PirexPxCvx } from './PirexPxCvx'; - -export { PirexPxCvx__factory } from './PirexPxCvx'; diff --git a/src/apps/pirex/ethereum/pirex.pxbtrfly.token-fetcher.ts b/src/apps/pirex/ethereum/pirex.pxbtrfly.token-fetcher.ts deleted file mode 100644 index 7b3cd05e2..000000000 --- a/src/apps/pirex/ethereum/pirex.pxbtrfly.token-fetcher.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { WrapperTemplateTokenFetcher } from '~position/template/wrapper.template.token-fetcher'; - -@PositionTemplate() -export class EthereumPirexPxBtrflyTokenFetcher extends WrapperTemplateTokenFetcher { - groupLabel = 'Pirex BTRFLY'; - vaultAddress = '0x10978db3885ba79bf1bc823e108085fb88e6f02f'; - underlyingTokenAddress = '0xc55126051b22ebb829d00368f4b12bde432de5da'; -} diff --git a/src/apps/pirex/ethereum/pirex.pxcvx.token-fetcher.ts b/src/apps/pirex/ethereum/pirex.pxcvx.token-fetcher.ts deleted file mode 100644 index a7ae63e7a..000000000 --- a/src/apps/pirex/ethereum/pirex.pxcvx.token-fetcher.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { WrapperTemplateTokenFetcher } from '~position/template/wrapper.template.token-fetcher'; - -@PositionTemplate() -export class EthereumPirexPxCvxTokenFetcher extends WrapperTemplateTokenFetcher { - groupLabel = 'Pirex Convex'; - vaultAddress = '0xbce0cf87f513102f22232436cca2ca49e815c3ac'; - underlyingTokenAddress = '0x4e3fbd56cd56c3e72c1403e103b45db9da5b9d2b'; -} diff --git a/src/apps/pirex/pirex.module.ts b/src/apps/pirex/pirex.module.ts deleted file mode 100644 index fd9cbf63e..000000000 --- a/src/apps/pirex/pirex.module.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Module } from '@nestjs/common'; - -import { AbstractApp } from '~app/app.dynamic-module'; - -import { ArbitrumPirexPxGlpTokenFetcher } from './arbitrum/pirex.pxglp.token-fetcher'; -import { ArbitrumPirexPxGmxTokenFetcher } from './arbitrum/pirex.pxgmx.token-fetcher'; -import { PirexViemContractFactory } from './contracts'; -import { EthereumPirexPxBtrflyTokenFetcher } from './ethereum/pirex.pxbtrfly.token-fetcher'; -import { EthereumPirexPxCvxTokenFetcher } from './ethereum/pirex.pxcvx.token-fetcher'; - -@Module({ - providers: [ - ArbitrumPirexPxGlpTokenFetcher, - ArbitrumPirexPxGmxTokenFetcher, - EthereumPirexPxCvxTokenFetcher, - EthereumPirexPxBtrflyTokenFetcher, - PirexViemContractFactory, - ], -}) -export class PirexAppModule extends AbstractApp() {} diff --git a/src/apps/redacted-cartel/ethereum/redacted-cartel.wx-btrfly-v1.token-fetcher.ts b/src/apps/redacted-cartel/ethereum/redacted-cartel.wx-btrfly-v1.token-fetcher.ts deleted file mode 100644 index 7f5937fff..000000000 --- a/src/apps/redacted-cartel/ethereum/redacted-cartel.wx-btrfly-v1.token-fetcher.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { VaultTemplateTokenFetcher } from '~position/template/vault.template.token-fetcher'; - -@PositionTemplate() -export class EthereumRedactedCartelWxBtrflyV1TokenFetcher extends VaultTemplateTokenFetcher { - groupLabel = 'wxBTRFLY v1'; - - vaultAddress = '0x186e55c0bebd2f69348d94c4a27556d93c5bd36c'; - underlyingTokenAddress = '0xcc94faf235cc5d3bf4bed3a30db5984306c86abc'; -} diff --git a/src/apps/redacted-cartel/ethereum/redacted-cartel.wx-btrfly.token-fetcher.ts b/src/apps/redacted-cartel/ethereum/redacted-cartel.wx-btrfly.token-fetcher.ts deleted file mode 100644 index b56779da7..000000000 --- a/src/apps/redacted-cartel/ethereum/redacted-cartel.wx-btrfly.token-fetcher.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { VaultTemplateTokenFetcher } from '~position/template/vault.template.token-fetcher'; - -@PositionTemplate() -export class EthereumRedactedCartelWxBtrflyTokenFetcher extends VaultTemplateTokenFetcher { - groupLabel = 'wxBTRFLY'; - - vaultAddress = '0x4b16d95ddf1ae4fe8227ed7b7e80cf13275e61c9'; - underlyingTokenAddress = '0xcc94faf235cc5d3bf4bed3a30db5984306c86abc'; -} diff --git a/src/apps/redacted-cartel/ethereum/redacted-cartel.x-btrfly.token-fetcher.ts b/src/apps/redacted-cartel/ethereum/redacted-cartel.x-btrfly.token-fetcher.ts deleted file mode 100644 index e394c62a9..000000000 --- a/src/apps/redacted-cartel/ethereum/redacted-cartel.x-btrfly.token-fetcher.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { WrapperWithReserveTemplateTokenFetcher } from '~position/template/wrapper-with-reserve.template.token-fetcher'; - -@PositionTemplate() -export class EthereumRedactedCartelXBtrflyTokenFetcher extends WrapperWithReserveTemplateTokenFetcher { - groupLabel = 'xBTRFLY'; - - vaultAddress = '0xcc94faf235cc5d3bf4bed3a30db5984306c86abc'; - underlyingTokenAddress = '0xc0d4ceb216b3ba9c3701b291766fdcba977cec3a'; - reserveAddress = '0xbde4dfb0dbb0dd8833efb6c5bd0ce048c852c487'; -} diff --git a/src/apps/redacted-cartel/redacted-cartel.module.ts b/src/apps/redacted-cartel/redacted-cartel.module.ts index b8f95f7b1..f114f2ac2 100644 --- a/src/apps/redacted-cartel/redacted-cartel.module.ts +++ b/src/apps/redacted-cartel/redacted-cartel.module.ts @@ -6,16 +6,10 @@ import { RedactedEarningsResolver } from './common/redacted.earnings-resolver'; import { RedactedCartelViemContractFactory } from './contracts'; import { EthereumRedactedCartelBondContractPositionFetcher } from './ethereum/redacted-cartel.bond.contract-position-fetcher'; import { EthereumRedactedCartelRevenueLockContractPositionFetcher } from './ethereum/redacted-cartel.revenue-lock.contract-position-fetcher'; -import { EthereumRedactedCartelWxBtrflyV1TokenFetcher } from './ethereum/redacted-cartel.wx-btrfly-v1.token-fetcher'; -import { EthereumRedactedCartelWxBtrflyTokenFetcher } from './ethereum/redacted-cartel.wx-btrfly.token-fetcher'; -import { EthereumRedactedCartelXBtrflyTokenFetcher } from './ethereum/redacted-cartel.x-btrfly.token-fetcher'; @Module({ providers: [ RedactedCartelViemContractFactory, - EthereumRedactedCartelXBtrflyTokenFetcher, - EthereumRedactedCartelWxBtrflyTokenFetcher, - EthereumRedactedCartelWxBtrflyV1TokenFetcher, EthereumRedactedCartelBondContractPositionFetcher, EthereumRedactedCartelRevenueLockContractPositionFetcher, RedactedEarningsResolver, diff --git a/src/apps/steak-hut/avalanche/steak-hut.ve.token-fetcher.ts b/src/apps/steak-hut/avalanche/steak-hut.ve.token-fetcher.ts deleted file mode 100644 index 1c40bc0b2..000000000 --- a/src/apps/steak-hut/avalanche/steak-hut.ve.token-fetcher.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; -import { WrapperTemplateTokenFetcher } from '~position/template/wrapper.template.token-fetcher'; - -@PositionTemplate() -export class AvalancheSteakHutVeTokenFetcher extends WrapperTemplateTokenFetcher { - groupLabel = 'Voting Escrow'; - - vaultAddress = '0xe7250b05bd8dee615ecc681eda1196add5156f2b'; - underlyingTokenAddress = '0x6e84a6216ea6dacc71ee8e6b0a5b7322eebc0fdd'; -} diff --git a/src/apps/steak-hut/steak-hut.module.ts b/src/apps/steak-hut/steak-hut.module.ts index e0c0226ec..b2b689d3d 100644 --- a/src/apps/steak-hut/steak-hut.module.ts +++ b/src/apps/steak-hut/steak-hut.module.ts @@ -4,16 +4,13 @@ import { AbstractApp } from '~app/app.dynamic-module'; import { AvalancheSteakHutPoolContractPositionFetcher } from './avalanche/steak-hut.pool.contract-position-fetcher'; import { AvalancheSteakHutStakingContractPositionFetcher } from './avalanche/steak-hut.staking.contract-position-fetcher'; -import { AvalancheSteakHutVeTokenFetcher } from './avalanche/steak-hut.ve.token-fetcher'; import { SteakHutViemContractFactory } from './contracts'; @Module({ providers: [ + SteakHutViemContractFactory, AvalancheSteakHutPoolContractPositionFetcher, AvalancheSteakHutStakingContractPositionFetcher, - AvalancheSteakHutVeTokenFetcher, - - SteakHutViemContractFactory, ], }) export class SteakHutAppModule extends AbstractApp() {} diff --git a/src/apps/trader-joe/avalanche/trader-joe.ve-joe.token-fetcher.ts b/src/apps/trader-joe/avalanche/trader-joe.ve-joe.token-fetcher.ts deleted file mode 100644 index 1bef8da85..000000000 --- a/src/apps/trader-joe/avalanche/trader-joe.ve-joe.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 { TraderJoeViemContractFactory } from '../contracts'; -import { TraderJoeVeJoe } from '../contracts/viem/TraderJoeVeJoe'; - -@PositionTemplate() -export class AvalancheTraderJoeVeJoeTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'veJOE'; - isExcludedFromBalances = true; - isExcludedFromExplore = true; - isExcludedFromTvl = true; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(TraderJoeViemContractFactory) protected readonly contractFactory: TraderJoeViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.traderJoeVeJoe({ address, network: this.network }); - } - - async getAddresses(): Promise { - return ['0x3cabf341943bc8466245e4d6f1ae0f8d071a1456']; - } - - async getUnderlyingTokenDefinitions() { - return []; - } - - async getPricePerShare() { - return [1]; - } - - async getPrice() { - return 0; // Valueless token - } -} diff --git a/src/apps/trader-joe/trader-joe.module.ts b/src/apps/trader-joe/trader-joe.module.ts index 347c4c571..de144ba77 100644 --- a/src/apps/trader-joe/trader-joe.module.ts +++ b/src/apps/trader-joe/trader-joe.module.ts @@ -9,7 +9,6 @@ import { AvalancheTraderJoeChefV3FarmContractPositionFetcher } from './avalanche import { AvalancheTraderJoePoolTokenFetcher } from './avalanche/trader-joe.pool.token-fetcher'; import { AvalancheTraderJoeSJoeContractPositionFetcher } from './avalanche/trader-joe.s-joe.contract-position-fetcher'; import { AvalancheTraderJoeVeJoeContractPositionFetcher } from './avalanche/trader-joe.ve-joe-farm.contract-position-fetcher'; -import { AvalancheTraderJoeVeJoeTokenFetcher } from './avalanche/trader-joe.ve-joe.token-fetcher'; import { AvalancheTraderJoeXJoeTokenFetcher } from './avalanche/trader-joe.x-joe.token-fetcher'; import { TraderJoeViemContractFactory } from './contracts'; @@ -24,7 +23,6 @@ import { TraderJoeViemContractFactory } from './contracts'; AvalancheTraderJoeXJoeTokenFetcher, AvalancheTraderJoeSJoeContractPositionFetcher, AvalancheTraderJoeVeJoeContractPositionFetcher, - AvalancheTraderJoeVeJoeTokenFetcher, ], }) export class TraderJoeAppModule extends AbstractApp() {} diff --git a/src/apps/vela/arbitrum/vela.vlp.token-fetcher.ts b/src/apps/vela/arbitrum/vela.vlp.token-fetcher.ts deleted file mode 100644 index 369cf5a98..000000000 --- a/src/apps/vela/arbitrum/vela.vlp.token-fetcher.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; - -import { VelaVlpTokenFetcher } from '../common/vela.vlp.token-fetcher'; - -@PositionTemplate() -export class ArbitrumVelaVlpTokenFetcher extends VelaVlpTokenFetcher { - vlpAddress = '0xc5b2d9fda8a82e8dcecd5e9e6e99b78a9188eb05'; - usdcAddress = '0xff970a61a04b1ca14834a43f5de4533ebddb5cc8'; - vaultAddress = '0xc4abade3a15064f9e3596943c699032748b13352'; -} diff --git a/src/apps/vela/common/vela.vlp.token-fetcher.ts b/src/apps/vela/common/vela.vlp.token-fetcher.ts deleted file mode 100644 index d7536ab55..000000000 --- a/src/apps/vela/common/vela.vlp.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 { Erc20 } from '~contract/contracts/viem'; -import { AppTokenTemplatePositionFetcher } from '~position/template/app-token.template.position-fetcher'; -import { UnderlyingTokenDefinition, GetPricePerShareParams } from '~position/template/app-token.template.types'; - -import { VelaViemContractFactory } from '../contracts'; - -export abstract class VelaVlpTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'VLP'; - - abstract vlpAddress: string; - abstract usdcAddress: string; - abstract vaultAddress: string; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(VelaViemContractFactory) private readonly velaContractFactory: VelaViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.appToolkit.globalViemContracts.erc20({ - address, - network: this.network, - }); - } - - async getAddresses(): Promise { - return [this.vlpAddress]; - } - - async getUnderlyingTokenDefinitions(): Promise { - return [{ address: this.usdcAddress, network: this.network }]; - } - - async getPricePerShare({ multicall }: GetPricePerShareParams): Promise { - const velaVault = multicall.wrap( - this.velaContractFactory.velaVault({ - address: this.vaultAddress, - network: this.network, - }), - ); - const basisPointsDivisor = 100000; - - const vlpPrice = await velaVault.read.getVLPPrice(); - const pricePerShare = Number(vlpPrice) / Number(basisPointsDivisor); - - return [pricePerShare]; - } -} diff --git a/src/apps/vela/vela.module.ts b/src/apps/vela/vela.module.ts index d9a411d85..529ac2e7f 100644 --- a/src/apps/vela/vela.module.ts +++ b/src/apps/vela/vela.module.ts @@ -3,10 +3,9 @@ import { Module } from '@nestjs/common'; import { AbstractApp } from '~app/app.dynamic-module'; import { ArbitrumVelaVlpFarmContractPositionFetcher } from './arbitrum/vela.token-farm.contract-position-fetcher'; -import { ArbitrumVelaVlpTokenFetcher } from './arbitrum/vela.vlp.token-fetcher'; import { VelaViemContractFactory } from './contracts'; @Module({ - providers: [ArbitrumVelaVlpFarmContractPositionFetcher, ArbitrumVelaVlpTokenFetcher, VelaViemContractFactory], + providers: [ArbitrumVelaVlpFarmContractPositionFetcher, VelaViemContractFactory], }) export class VelaAppModule extends AbstractApp() {} diff --git a/src/apps/velodrome-v2/optimism/velodrome-v2.pool.token-fetcher.ts b/src/apps/velodrome-v2/optimism/velodrome-v2.pool.token-fetcher.ts deleted file mode 100644 index 19d3da6c0..000000000 --- a/src/apps/velodrome-v2/optimism/velodrome-v2.pool.token-fetcher.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { Inject } from '@nestjs/common'; -import { range } from 'lodash'; - -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 { - GetAddressesParams, - GetDisplayPropsParams, - GetPricePerShareParams, - GetUnderlyingTokensParams, -} from '~position/template/app-token.template.types'; - -import { VelodromeV2ViemContractFactory } from '../contracts'; -import { VelodromeV2Pool } from '../contracts/viem/VelodromeV2Pool'; - -@PositionTemplate() -export class OptimismVelodromeV2PoolTokenFetcher extends AppTokenTemplatePositionFetcher { - groupLabel = 'Pools'; - - constructor( - @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(VelodromeV2ViemContractFactory) protected readonly contractFactory: VelodromeV2ViemContractFactory, - ) { - super(appToolkit); - } - - getContract(address: string) { - return this.contractFactory.velodromeV2Pool({ address, network: this.network }); - } - - async getDefinitions() { - const multicall = this.appToolkit.getViemMulticall(this.network); - const factoryContract = this.contractFactory.velodromeV2PoolFactory({ - address: '0xf1046053aa5682b4f9a81b5481394da16be5ff5a', - network: this.network, - }); - - const poolLength = await multicall.wrap(factoryContract).read.allPoolsLength(); - - const poolAddresses = await Promise.all( - range(0, Number(poolLength)).map(async i => { - const poolAddressRaw = await multicall.wrap(factoryContract).read.allPools([BigInt(i)]); - return { address: poolAddressRaw.toLowerCase() }; - }), - ); - - return poolAddresses; - } - - async getAddresses({ definitions }: GetAddressesParams) { - return definitions.map(v => v.address); - } - - async getUnderlyingTokenDefinitions({ contract }: GetUnderlyingTokensParams) { - const [token0, token1] = await contract.read.tokens(); - - return [ - { address: token0.toLowerCase(), network: this.network }, - { address: token1.toLowerCase(), network: this.network }, - ]; - } - - async getPricePerShare({ contract, appToken }: GetPricePerShareParams) { - const [reserveRaw0, reserveRaw1] = await Promise.all([contract.read.reserve0(), contract.read.reserve1()]); - - const reserves = [reserveRaw0, reserveRaw1].map((v, i) => Number(v) / 10 ** appToken.tokens[i].decimals); - return reserves.map(v => v / appToken.supply); - } - - async getLabel({ appToken }: GetDisplayPropsParams) { - return appToken.tokens.map(v => getLabelFromToken(v)).join(' / '); - } -} diff --git a/src/apps/velodrome-v2/velodrome-v2.module.ts b/src/apps/velodrome-v2/velodrome-v2.module.ts index 951f6e197..3e9fe5943 100644 --- a/src/apps/velodrome-v2/velodrome-v2.module.ts +++ b/src/apps/velodrome-v2/velodrome-v2.module.ts @@ -6,14 +6,12 @@ import { VelodromeV2AddressesResolver } from './common/velodrome-v2.addresses-re import { VelodromeV2ViemContractFactory } from './contracts'; import { OptimismVelodromeV2BribeContractPositionFetcher } from './optimism/velodrome-v2.bribe.contract-position-fetcher'; import { OptimismVelodromeV2GaugeContractPositionFetcher } from './optimism/velodrome-v2.gauge.contract-position-fetcher'; -import { OptimismVelodromeV2PoolTokenFetcher } from './optimism/velodrome-v2.pool.token-fetcher'; import { OptimismVelodromeV2VotingEscrowContractPositionFetcher } from './optimism/velodrome-v2.voting-escrow.contract-position-fetcher'; @Module({ providers: [ VelodromeV2ViemContractFactory, VelodromeV2AddressesResolver, - OptimismVelodromeV2PoolTokenFetcher, OptimismVelodromeV2VotingEscrowContractPositionFetcher, OptimismVelodromeV2GaugeContractPositionFetcher, OptimismVelodromeV2BribeContractPositionFetcher,