Skip to content

Commit f751ffe

Browse files
committed
fix: fix release funds
1 parent 1f82efa commit f751ffe

File tree

4 files changed

+5
-11
lines changed

4 files changed

+5
-11
lines changed

packages/cli/source/commands/releaseFunds.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ function ReleaseFunds({ options = {} }: Props) {
146146
const withBalances = allPools.reduce((acc, curr) => {
147147
const tokensWithBalance = curr[1].filter(t => tokensWithBalances.has(t.underlyingAddress));
148148
if (tokensWithBalance.length) {
149-
acc[curr[0]] = tokensWithBalance.map(t => t.vTokenAddress);
149+
acc[curr[0]] = tokensWithBalance.map(t => t.underlyingAddress);
150150
}
151151
return acc;
152152
}, {} as Record<Address, readonly Address[]>);

packages/keeper-bots/src/converter-bot/queries/getCoreMarkets.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Address } from "viem";
22

33
import getConfig from "../../config";
4-
import { coreComptrollerAbi, vBep20InterfaceAbi } from "../../config/abis/generated";
4+
import { coreComptrollerAbi, coreVTokenAbi } from "../../config/abis/generated";
55
import getAddresses from "../../config/addresses";
66
import publicClient from "../../config/clients/publicClient";
77
import type { PoolAddressArray } from "../types";
@@ -19,7 +19,7 @@ export const getCoreMarkets = async (): Promise<PoolAddressArray[]> => {
1919
const underlyingAddresses = await publicClient.multicall({
2020
contracts: markets.map(m => ({
2121
address: m,
22-
abi: vBep20InterfaceAbi,
22+
abi: coreVTokenAbi,
2323
functionName: "underlying",
2424
args: [],
2525
})),

packages/keeper-bots/src/converter-bot/queries/getIsolatedMarkets.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Address } from "viem";
22

3-
import { vBep20InterfaceAbi } from "../../config/abis/generated";
4-
import { poolLensAbi } from "../../config/abis/generated";
3+
import { poolLensAbi, ilVTokenAbi } from "../../config/abis/generated";
54
import getAddresses from "../../config/addresses";
65
import publicClient from "../../config/clients/publicClient";
76
import type { PoolAddressArray } from "../types";
@@ -20,7 +19,7 @@ export const getIsolatedMarkets = async (): Promise<PoolAddressArray[]> => {
2019
return await publicClient.multicall({
2120
contracts: p.vTokens.map(m => ({
2221
address: m.vToken,
23-
abi: vBep20InterfaceAbi,
22+
abi: ilVTokenAbi,
2423
functionName: "underlying",
2524
args: [],
2625
})),

packages/keeper-bots/wagmi.config.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,10 @@ import vBnbAdminArtifact from "@venusprotocol/venus-protocol/artifacts/contracts
77
import diamondComptrollerArtifact from "@venusprotocol/venus-protocol/artifacts/contracts/Comptroller/Diamond/DiamondConsolidated.sol/DiamondConsolidated.json" assert { type: "json" };
88
import venusLensArtifact from "@venusprotocol/venus-protocol/artifacts/contracts/Lens/VenusLens.sol/VenusLens.json" assert { type: "json" };
99
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" };
1110
import { defineConfig } from "@wagmi/cli";
1211
import { Abi } from "abitype";
1312

1413
const getExternalContracts = async (): Promise<{ name: string; abi: Abi }[]> => [
15-
{
16-
abi: vBep20InterfaceArtifact.abi as Abi,
17-
name: "VBep20Interface",
18-
},
1914
{
2015
abi: poolLensArtifact.abi as Abi,
2116
name: "PoolLens",

0 commit comments

Comments
 (0)