File tree Expand file tree Collapse file tree 4 files changed +5
-11
lines changed
src/converter-bot/queries Expand file tree Collapse file tree 4 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ function ReleaseFunds({ options = {} }: Props) {
146
146
const withBalances = allPools . reduce ( ( acc , curr ) => {
147
147
const tokensWithBalance = curr [ 1 ] . filter ( t => tokensWithBalances . has ( t . underlyingAddress ) ) ;
148
148
if ( tokensWithBalance . length ) {
149
- acc [ curr [ 0 ] ] = tokensWithBalance . map ( t => t . vTokenAddress ) ;
149
+ acc [ curr [ 0 ] ] = tokensWithBalance . map ( t => t . underlyingAddress ) ;
150
150
}
151
151
return acc ;
152
152
} , { } as Record < Address , readonly Address [ ] > ) ;
Original file line number Diff line number Diff line change 1
1
import { Address } from "viem" ;
2
2
3
3
import getConfig from "../../config" ;
4
- import { coreComptrollerAbi , vBep20InterfaceAbi } from "../../config/abis/generated" ;
4
+ import { coreComptrollerAbi , coreVTokenAbi } from "../../config/abis/generated" ;
5
5
import getAddresses from "../../config/addresses" ;
6
6
import publicClient from "../../config/clients/publicClient" ;
7
7
import type { PoolAddressArray } from "../types" ;
@@ -19,7 +19,7 @@ export const getCoreMarkets = async (): Promise<PoolAddressArray[]> => {
19
19
const underlyingAddresses = await publicClient . multicall ( {
20
20
contracts : markets . map ( m => ( {
21
21
address : m ,
22
- abi : vBep20InterfaceAbi ,
22
+ abi : coreVTokenAbi ,
23
23
functionName : "underlying" ,
24
24
args : [ ] ,
25
25
} ) ) ,
Original file line number Diff line number Diff line change 1
1
import { Address } from "viem" ;
2
2
3
- import { vBep20InterfaceAbi } from "../../config/abis/generated" ;
4
- import { poolLensAbi } from "../../config/abis/generated" ;
3
+ import { poolLensAbi , ilVTokenAbi } from "../../config/abis/generated" ;
5
4
import getAddresses from "../../config/addresses" ;
6
5
import publicClient from "../../config/clients/publicClient" ;
7
6
import type { PoolAddressArray } from "../types" ;
@@ -20,7 +19,7 @@ export const getIsolatedMarkets = async (): Promise<PoolAddressArray[]> => {
20
19
return await publicClient . multicall ( {
21
20
contracts : p . vTokens . map ( m => ( {
22
21
address : m . vToken ,
23
- abi : vBep20InterfaceAbi ,
22
+ abi : ilVTokenAbi ,
24
23
functionName : "underlying" ,
25
24
args : [ ] ,
26
25
} ) ) ,
Original file line number Diff line number Diff line change @@ -7,15 +7,10 @@ import vBnbAdminArtifact from "@venusprotocol/venus-protocol/artifacts/contracts
7
7
import diamondComptrollerArtifact from "@venusprotocol/venus-protocol/artifacts/contracts/Comptroller/Diamond/DiamondConsolidated.sol/DiamondConsolidated.json" assert { type : "json" } ;
8
8
import venusLensArtifact from "@venusprotocol/venus-protocol/artifacts/contracts/Lens/VenusLens.sol/VenusLens.json" assert { type : "json" } ;
9
9
import coreVTokenArtifact from "@venusprotocol/venus-protocol/artifacts/contracts/Tokens/VTokens/VBep20Delegate.sol/VBep20Delegate.json" assert { type : "json" } ;
10
- import vBep20InterfaceArtifact from "@venusprotocol/venus-protocol/artifacts/contracts/Tokens/VTokens/VTokenInterfaces.sol/VBep20Interface.json" assert { type : "json" } ;
11
10
import { defineConfig } from "@wagmi/cli" ;
12
11
import { Abi } from "abitype" ;
13
12
14
13
const getExternalContracts = async ( ) : Promise < { name : string ; abi : Abi } [ ] > => [
15
- {
16
- abi : vBep20InterfaceArtifact . abi as Abi ,
17
- name : "VBep20Interface" ,
18
- } ,
19
14
{
20
15
abi : poolLensArtifact . abi as Abi ,
21
16
name : "PoolLens" ,
You can’t perform that action at this time.
0 commit comments