From d49785c3d274a9f481461c11254accf1c7b9e298 Mon Sep 17 00:00:00 2001 From: William Poulin Date: Tue, 12 Dec 2023 10:45:25 -0500 Subject: [PATCH] feat(looksrare): Add staking v2 position --- .../abis/looks-rare-staking-rewards-v-2.json | 241 ++++++++ .../contracts/viem.contract-factory.ts | 5 +- .../viem/LooksRareStakingRewardsV2.ts | 532 ++++++++++++++++++ src/apps/looks-rare/contracts/viem/index.ts | 2 + ...re.compounder.contract-position-fetcher.ts | 2 +- ...e.staking-v1.contract-position-fetcher.ts} | 2 +- ...re.staking-v2.contract-position-fetcher.ts | 68 +++ src/apps/looks-rare/looks-rare.module.ts | 6 +- 8 files changed, 853 insertions(+), 5 deletions(-) create mode 100644 src/apps/looks-rare/contracts/abis/looks-rare-staking-rewards-v-2.json create mode 100644 src/apps/looks-rare/contracts/viem/LooksRareStakingRewardsV2.ts rename src/apps/looks-rare/ethereum/{looks-rare.farm.contract-position-fetcher.ts => looks-rare.staking-v1.contract-position-fetcher.ts} (94%) create mode 100644 src/apps/looks-rare/ethereum/looks-rare.staking-v2.contract-position-fetcher.ts diff --git a/src/apps/looks-rare/contracts/abis/looks-rare-staking-rewards-v-2.json b/src/apps/looks-rare/contracts/abis/looks-rare-staking-rewards-v-2.json new file mode 100644 index 000000000..d0435a1ad --- /dev/null +++ b/src/apps/looks-rare/contracts/abis/looks-rare-staking-rewards-v-2.json @@ -0,0 +1,241 @@ +[ + { + "inputs": [ + { "internalType": "address", "name": "_rewardsDistribution", "type": "address" }, + { "internalType": "address", "name": "_rewardToken", "type": "address" }, + { "internalType": "address", "name": "_stakingToken", "type": "address" }, + { "internalType": "uint256", "name": "_rewardsDuration", "type": "uint256" } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [{ "internalType": "address", "name": "target", "type": "address" }], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], + "name": "AddressInsufficientBalance", + "type": "error" + }, + { "inputs": [], "name": "FailedInnerCall", "type": "error" }, + { "inputs": [], "name": "ReentrancyGuardReentrantCall", "type": "error" }, + { + "inputs": [{ "internalType": "address", "name": "token", "type": "address" }], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "tokenAddress", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "Recovered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [{ "indexed": false, "internalType": "uint256", "name": "reward", "type": "uint256" }], + "name": "RewardAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "reward", "type": "uint256" } + ], + "name": "RewardPaid", + "type": "event" + }, + { + "anonymous": false, + "inputs": [{ "indexed": true, "internalType": "address", "name": "_rewardsDistribution", "type": "address" }], + "name": "RewardsDistributionUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "Staked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "user", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "Withdrawn", + "type": "event" + }, + { + "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], + "name": "balanceOf", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], + "name": "earned", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { "inputs": [], "name": "exit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, + { "inputs": [], "name": "getReward", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "lastTimeRewardApplicable", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastUpdateTime", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "reward", "type": "uint256" }], + "name": "notifyRewardAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "periodFinish", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "tokenAddress", "type": "address" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "recoverERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "rewardPerToken", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardPerTokenStored", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardRate", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardToken", + "outputs": [{ "internalType": "contract IERC20", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "rewards", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardsDistribution", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardsDuration", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "_rewardsDistribution", "type": "address" }], + "name": "setNewRewardsDistribution", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], + "name": "stake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { "internalType": "address", "name": "onBehalf", "type": "address" } + ], + "name": "stakeOnBehalf", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "stakingBase", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "stakingToken", + "outputs": [{ "internalType": "contract IERC20", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "userRewardPerTokenPaid", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/src/apps/looks-rare/contracts/viem.contract-factory.ts b/src/apps/looks-rare/contracts/viem.contract-factory.ts index 29ce3e84f..18ebb0d12 100644 --- a/src/apps/looks-rare/contracts/viem.contract-factory.ts +++ b/src/apps/looks-rare/contracts/viem.contract-factory.ts @@ -3,7 +3,7 @@ import { Injectable, Inject } from '@nestjs/common'; import { IAppToolkit, APP_TOOLKIT } from '~app-toolkit/app-toolkit.interface'; import { Network } from '~types/network.interface'; -import { LooksRareCompounder__factory, LooksRareFeeSharing__factory } from './viem'; +import { LooksRareCompounder__factory, LooksRareFeeSharing__factory, LooksRareStakingRewardsV2__factory } from './viem'; type ContractOpts = { address: string; network: Network }; @@ -17,4 +17,7 @@ export class LooksRareViemContractFactory { looksRareFeeSharing({ address, network }: ContractOpts) { return LooksRareFeeSharing__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } + looksRareStakingRewardsV2({ address, network }: ContractOpts) { + return LooksRareStakingRewardsV2__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); + } } diff --git a/src/apps/looks-rare/contracts/viem/LooksRareStakingRewardsV2.ts b/src/apps/looks-rare/contracts/viem/LooksRareStakingRewardsV2.ts new file mode 100644 index 000000000..25e51c43b --- /dev/null +++ b/src/apps/looks-rare/contracts/viem/LooksRareStakingRewardsV2.ts @@ -0,0 +1,532 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { getContract, GetContractReturnType, PublicClient } from 'viem'; + +export const looksRareStakingRewardsV2Abi = [ + { + inputs: [ + { + internalType: 'address', + name: '_rewardsDistribution', + type: 'address', + }, + { + internalType: 'address', + name: '_rewardToken', + type: 'address', + }, + { + internalType: 'address', + name: '_stakingToken', + type: 'address', + }, + { + internalType: 'uint256', + name: '_rewardsDuration', + type: 'uint256', + }, + ], + stateMutability: 'nonpayable', + type: 'constructor', + }, + { + inputs: [ + { + internalType: 'address', + name: 'target', + type: 'address', + }, + ], + name: 'AddressEmptyCode', + type: 'error', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'AddressInsufficientBalance', + type: 'error', + }, + { + inputs: [], + name: 'FailedInnerCall', + type: 'error', + }, + { + inputs: [], + name: 'ReentrancyGuardReentrantCall', + type: 'error', + }, + { + inputs: [ + { + internalType: 'address', + name: 'token', + type: 'address', + }, + ], + name: 'SafeERC20FailedOperation', + type: 'error', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'tokenAddress', + type: 'address', + }, + { + indexed: true, + internalType: 'address', + name: 'to', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'Recovered', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'uint256', + name: 'reward', + type: 'uint256', + }, + ], + name: 'RewardAdded', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'user', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'reward', + type: 'uint256', + }, + ], + name: 'RewardPaid', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: '_rewardsDistribution', + type: 'address', + }, + ], + name: 'RewardsDistributionUpdated', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'user', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'Staked', + type: 'event', + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'user', + type: 'address', + }, + { + indexed: false, + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'Withdrawn', + type: 'event', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'balanceOf', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'account', + type: 'address', + }, + ], + name: 'earned', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'exit', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'getReward', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'lastTimeRewardApplicable', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'lastUpdateTime', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'reward', + type: 'uint256', + }, + ], + name: 'notifyRewardAmount', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'periodFinish', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: 'tokenAddress', + type: 'address', + }, + { + internalType: 'address', + name: 'to', + type: 'address', + }, + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'recoverERC20', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'rewardPerToken', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'rewardPerTokenStored', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'rewardRate', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'rewardToken', + outputs: [ + { + internalType: 'contract IERC20', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'rewards', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'rewardsDistribution', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'rewardsDuration', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '_rewardsDistribution', + type: 'address', + }, + ], + name: 'setNewRewardsDistribution', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'stake', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + { + internalType: 'address', + name: 'onBehalf', + type: 'address', + }, + ], + name: 'stakeOnBehalf', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, + { + inputs: [], + name: 'stakingBase', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'stakingToken', + outputs: [ + { + internalType: 'contract IERC20', + name: '', + type: 'address', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [], + name: 'totalSupply', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'address', + name: '', + type: 'address', + }, + ], + name: 'userRewardPerTokenPaid', + outputs: [ + { + internalType: 'uint256', + name: '', + type: 'uint256', + }, + ], + stateMutability: 'view', + type: 'function', + }, + { + inputs: [ + { + internalType: 'uint256', + name: 'amount', + type: 'uint256', + }, + ], + name: 'withdraw', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', + }, +] as const; + +export type LooksRareStakingRewardsV2 = typeof looksRareStakingRewardsV2Abi; +export type LooksRareStakingRewardsV2Contract = GetContractReturnType; + +export class LooksRareStakingRewardsV2__factory { + static connect(address: string, client: PublicClient) { + return getContract({ address, abi: looksRareStakingRewardsV2Abi, publicClient: client }); + } +} diff --git a/src/apps/looks-rare/contracts/viem/index.ts b/src/apps/looks-rare/contracts/viem/index.ts index 89b3fadb6..905d73604 100644 --- a/src/apps/looks-rare/contracts/viem/index.ts +++ b/src/apps/looks-rare/contracts/viem/index.ts @@ -4,6 +4,8 @@ export type { LooksRareCompounder } from './LooksRareCompounder'; export type { LooksRareFeeSharing } from './LooksRareFeeSharing'; +export type { LooksRareStakingRewardsV2 } from './LooksRareStakingRewardsV2'; export { LooksRareCompounder__factory } from './LooksRareCompounder'; export { LooksRareFeeSharing__factory } from './LooksRareFeeSharing'; +export { LooksRareStakingRewardsV2__factory } from './LooksRareStakingRewardsV2'; diff --git a/src/apps/looks-rare/ethereum/looks-rare.compounder.contract-position-fetcher.ts b/src/apps/looks-rare/ethereum/looks-rare.compounder.contract-position-fetcher.ts index ec440f2ed..18c0c026b 100644 --- a/src/apps/looks-rare/ethereum/looks-rare.compounder.contract-position-fetcher.ts +++ b/src/apps/looks-rare/ethereum/looks-rare.compounder.contract-position-fetcher.ts @@ -46,7 +46,7 @@ export class EthereumLooksRareCompounderContractPositionFetcher extends Contract } async getLabel({ contractPosition }: GetDisplayPropsParams) { - return `${getLabelFromToken(contractPosition.tokens[0])} Compounder`; + return getLabelFromToken(contractPosition.tokens[0]); } async getTokenBalancesPerPosition({ address, contract }: GetTokenBalancesParams) { diff --git a/src/apps/looks-rare/ethereum/looks-rare.farm.contract-position-fetcher.ts b/src/apps/looks-rare/ethereum/looks-rare.staking-v1.contract-position-fetcher.ts similarity index 94% rename from src/apps/looks-rare/ethereum/looks-rare.farm.contract-position-fetcher.ts rename to src/apps/looks-rare/ethereum/looks-rare.staking-v1.contract-position-fetcher.ts index 3ab7f1a07..95dc7b432 100644 --- a/src/apps/looks-rare/ethereum/looks-rare.farm.contract-position-fetcher.ts +++ b/src/apps/looks-rare/ethereum/looks-rare.staking-v1.contract-position-fetcher.ts @@ -16,7 +16,7 @@ import { LooksRareViemContractFactory } from '../contracts'; import { LooksRareFeeSharing } from '../contracts/viem'; @PositionTemplate() -export class EthereumLooksRareFarmContractPositionFetcher extends ContractPositionTemplatePositionFetcher { +export class EthereumLooksRareStakingV1ContractPositionFetcher extends ContractPositionTemplatePositionFetcher { groupLabel = 'Staking'; constructor( diff --git a/src/apps/looks-rare/ethereum/looks-rare.staking-v2.contract-position-fetcher.ts b/src/apps/looks-rare/ethereum/looks-rare.staking-v2.contract-position-fetcher.ts new file mode 100644 index 000000000..9ab2740d4 --- /dev/null +++ b/src/apps/looks-rare/ethereum/looks-rare.staking-v2.contract-position-fetcher.ts @@ -0,0 +1,68 @@ +import { Inject } from '@nestjs/common'; +import { BigNumberish } from 'ethers'; + +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 { MetaType } from '~position/position.interface'; +import { ContractPositionTemplatePositionFetcher } from '~position/template/contract-position.template.position-fetcher'; +import { + DefaultContractPositionDefinition, + GetDisplayPropsParams, + GetTokenBalancesParams, + GetTokenDefinitionsParams, +} from '~position/template/contract-position.template.types'; + +import { LooksRareViemContractFactory } from '../contracts'; +import { LooksRareStakingRewardsV2 } from '../contracts/viem'; + +@PositionTemplate() +export class EthereumLooksRareStakingV2ContractPositionFetcher extends ContractPositionTemplatePositionFetcher { + groupLabel = 'Staking V2'; + + constructor( + @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, + @Inject(LooksRareViemContractFactory) protected readonly contractFactory: LooksRareViemContractFactory, + ) { + super(appToolkit); + } + + getContract(address: string) { + return this.contractFactory.looksRareStakingRewardsV2({ address, network: this.network }); + } + + async getDefinitions(): Promise { + return [{ address: '0x0000000000017b2a2a6a336079abc67f6f48ab9a' }]; + } + + async getTokenDefinitions({ contract }: GetTokenDefinitionsParams) { + return [ + { + metaType: MetaType.SUPPLIED, + address: await contract.read.stakingToken(), + network: this.network, + }, + { + metaType: MetaType.CLAIMABLE, + address: await contract.read.rewardToken(), + network: this.network, + }, + ]; + } + + async getLabel({ contractPosition }: GetDisplayPropsParams) { + return getLabelFromToken(contractPosition.tokens[0]); + } + + async getTokenBalancesPerPosition({ + address, + contract, + }: GetTokenBalancesParams): Promise { + const [suppliedBalance, claimableBalance] = await Promise.all([ + contract.read.balanceOf([address]), + contract.read.rewards([address]), + ]); + + return [suppliedBalance, claimableBalance]; + } +} diff --git a/src/apps/looks-rare/looks-rare.module.ts b/src/apps/looks-rare/looks-rare.module.ts index 079e4ae07..08e967796 100644 --- a/src/apps/looks-rare/looks-rare.module.ts +++ b/src/apps/looks-rare/looks-rare.module.ts @@ -4,13 +4,15 @@ import { AbstractApp } from '~app/app.dynamic-module'; import { LooksRareViemContractFactory } from './contracts'; import { EthereumLooksRareCompounderContractPositionFetcher } from './ethereum/looks-rare.compounder.contract-position-fetcher'; -import { EthereumLooksRareFarmContractPositionFetcher } from './ethereum/looks-rare.farm.contract-position-fetcher'; +import { EthereumLooksRareStakingV1ContractPositionFetcher } from './ethereum/looks-rare.staking-v1.contract-position-fetcher'; +import { EthereumLooksRareStakingV2ContractPositionFetcher } from './ethereum/looks-rare.staking-v2.contract-position-fetcher'; @Module({ providers: [ LooksRareViemContractFactory, - EthereumLooksRareFarmContractPositionFetcher, + EthereumLooksRareStakingV1ContractPositionFetcher, EthereumLooksRareCompounderContractPositionFetcher, + EthereumLooksRareStakingV2ContractPositionFetcher, ], }) export class LooksRareAppModule extends AbstractApp() {}