@venusprotocol/isolated-pools 3.7.0 → 3.8.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/dist/deploy/001-deploy-mock-tokens.js +2 -1
- package/dist/deploy/004-swap-router.js +7 -7
- package/dist/deploy/006-deploy-pool-registry.js +3 -3
- package/dist/deploy/007-deploy-pool-lens.js +1 -1
- package/dist/deploy/008-deploy-comptrollers.js +4 -5
- package/dist/deploy/009-deploy-vtokens.js +7 -8
- package/dist/deploy/010-deploy-reward-distributors.js +5 -5
- package/dist/deploy/011-initial-liquidity.js +12 -15
- package/dist/deploy/012-transfer-pools-ownership.js +18 -18
- package/dist/deploy/013-vip-based-config.js +30 -30
- package/dist/deploy/014-riskfund-protocolshare.d.ts +1 -1
- package/dist/deploy/014-riskfund-protocolshare.js +4 -4
- package/dist/deploy/014-shortfall-protocolshare.js +8 -3
- package/dist/deploy/015-funds-config.js +0 -5
- package/dist/deploy/018-native-token-gateway.js +3 -3
- package/dist/deploy/019-deploy-ir-models.js +3 -5
- package/dist/hardhat.config.js +44 -2
- package/dist/helpers/deploymentConfig.js +2 -2
- package/dist/helpers/deploymentUtils.d.ts +4 -5
- package/dist/helpers/deploymentUtils.js +9 -14
- package/dist/type-extensions.d.ts +6 -0
- package/dist/type-extensions.js +3 -0
- package/dist/typechain/factories/IVToken__factory.d.ts +5 -1
- package/dist/typechain/factories/IVToken__factory.js +201 -1
- package/package.json +5 -4
- package/typechain/IVToken.d.ts +341 -4
- package/typechain/factories/IVToken__factory.ts +201 -1
- package/dist/deploy/016-deploy-beacon-implementations.d.ts +0 -3
- package/dist/deploy/016-deploy-beacon-implementations.js +0 -32
- package/dist/deploy/017-update-pool-registry.d.ts +0 -3
- package/dist/deploy/017-update-pool-registry.js +0 -28
package/dist/hardhat.config.js
CHANGED
|
@@ -40,54 +40,90 @@ require("solidity-docgen");
|
|
|
40
40
|
const utils_1 = require("./helpers/utils");
|
|
41
41
|
dotenv.config();
|
|
42
42
|
const DEPLOYER_PRIVATE_KEY = process.env.DEPLOYER_PRIVATE_KEY;
|
|
43
|
+
const getRpcUrl = (networkName) => {
|
|
44
|
+
let uri;
|
|
45
|
+
if (networkName) {
|
|
46
|
+
uri = process.env[`ARCHIVE_NODE_${networkName}`];
|
|
47
|
+
}
|
|
48
|
+
if (!uri) {
|
|
49
|
+
throw new Error(`invalid uri or network not supported by node provider : ${uri}`);
|
|
50
|
+
}
|
|
51
|
+
return uri;
|
|
52
|
+
};
|
|
53
|
+
(0, config_1.extendEnvironment)(hre => {
|
|
54
|
+
hre.getNetworkName = () => process.env.HARDHAT_FORK_NETWORK || hre.network.name;
|
|
55
|
+
});
|
|
43
56
|
(0, config_1.extendConfig)((config) => {
|
|
44
57
|
if (process.env.EXPORT !== "true") {
|
|
45
58
|
config.external = {
|
|
46
59
|
...config.external,
|
|
47
60
|
deployments: {
|
|
61
|
+
hardhat: [],
|
|
48
62
|
bsctestnet: [
|
|
49
63
|
"node_modules/@venusprotocol/oracle/deployments/bsctestnet",
|
|
50
64
|
"node_modules/@venusprotocol/venus-protocol/deployments/bsctestnet",
|
|
51
65
|
"node_modules/@venusprotocol/protocol-reserve/deployments/bsctestnet",
|
|
66
|
+
"node_modules/@venusprotocol/governance-contracts/deployments/bsctestnet",
|
|
52
67
|
],
|
|
53
68
|
sepolia: [
|
|
54
69
|
"node_modules/@venusprotocol/oracle/deployments/sepolia",
|
|
55
70
|
"node_modules/@venusprotocol/venus-protocol/deployments/sepolia",
|
|
56
71
|
"node_modules/@venusprotocol/protocol-reserve/deployments/sepolia",
|
|
72
|
+
"node_modules/@venusprotocol/governance-contracts/deployments/sepolia",
|
|
57
73
|
],
|
|
58
74
|
ethereum: [
|
|
59
75
|
"node_modules/@venusprotocol/oracle/deployments/ethereum",
|
|
60
76
|
"node_modules/@venusprotocol/venus-protocol/deployments/ethereum",
|
|
61
77
|
"node_modules/@venusprotocol/protocol-reserve/deployments/ethereum",
|
|
78
|
+
"node_modules/@venusprotocol/governance-contracts/deployments/ethereum",
|
|
62
79
|
],
|
|
63
80
|
bscmainnet: [
|
|
64
81
|
"node_modules/@venusprotocol/oracle/deployments/bscmainnet",
|
|
65
82
|
"node_modules/@venusprotocol/venus-protocol/deployments/bscmainnet",
|
|
66
83
|
"node_modules/@venusprotocol/protocol-reserve/deployments/bscmainnet",
|
|
84
|
+
"node_modules/@venusprotocol/governance-contracts/deployments/bscmainnet",
|
|
67
85
|
],
|
|
68
86
|
opbnbmainnet: [
|
|
69
87
|
"node_modules/@venusprotocol/oracle/deployments/opbnbmainnet",
|
|
70
88
|
"node_modules/@venusprotocol/protocol-reserve/deployments/opbnbmainnet",
|
|
89
|
+
"node_modules/@venusprotocol/governance-contracts/deployments/opbnbmainnet",
|
|
71
90
|
],
|
|
72
91
|
opbnbtestnet: [
|
|
73
92
|
"node_modules/@venusprotocol/oracle/deployments/opbnbtestnet",
|
|
74
93
|
"node_modules/@venusprotocol/protocol-reserve/deployments/opbnbtestnet",
|
|
94
|
+
"node_modules/@venusprotocol/governance-contracts/deployments/opbnbtestnet",
|
|
75
95
|
],
|
|
76
96
|
arbitrumsepolia: [
|
|
77
97
|
"node_modules/@venusprotocol/oracle/deployments/arbitrumsepolia",
|
|
78
98
|
"node_modules/@venusprotocol/protocol-reserve/deployments/arbitrumsepolia",
|
|
99
|
+
"node_modules/@venusprotocol/governance-contracts/deployments/arbitrumsepolia",
|
|
100
|
+
],
|
|
101
|
+
arbitrumone: [
|
|
102
|
+
"node_modules/@venusprotocol/oracle/deployments/arbitrumone",
|
|
103
|
+
"node_modules/@venusprotocol/protocol-reserve/deployments/arbitrumone",
|
|
104
|
+
"node_modules/@venusprotocol/governance-contracts/deployments/arbitrumsepolia",
|
|
79
105
|
],
|
|
80
|
-
arbitrumone: ["node_modules/@venusprotocol/protocol-reserve/deployments/arbitrumone"],
|
|
81
106
|
basesepolia: [
|
|
82
107
|
"node_modules/@venusprotocol/oracle/deployments/basesepolia",
|
|
83
108
|
"node_modules/@venusprotocol/protocol-reserve/deployments/basesepolia",
|
|
109
|
+
"node_modules/@venusprotocol/governance-contracts/deployments/basesepolia",
|
|
84
110
|
],
|
|
85
111
|
basemainnet: [
|
|
86
112
|
"node_modules/@venusprotocol/oracle/deployments/basemainnet",
|
|
87
113
|
"node_modules/@venusprotocol/protocol-reserve/deployments/basemainnet",
|
|
114
|
+
"node_modules/@venusprotocol/governance-contracts/deployments/basemainnet",
|
|
88
115
|
],
|
|
89
116
|
},
|
|
90
117
|
};
|
|
118
|
+
if (process.env.HARDHAT_FORK_NETWORK) {
|
|
119
|
+
config.external.deployments.hardhat = [
|
|
120
|
+
`./deployments/${process.env.HARDHAT_FORK_NETWORK}`,
|
|
121
|
+
`node_modules/@venusprotocol/oracle/deployments/${process.env.HARDHAT_FORK_NETWORK}`,
|
|
122
|
+
`node_modules/@venusprotocol/venus-protocol/deployments/${process.env.HARDHAT_FORK_NETWORK}`,
|
|
123
|
+
`node_modules/@venusprotocol/protocol-reserve/deployments/${process.env.HARDHAT_FORK_NETWORK}`,
|
|
124
|
+
`node_modules/@venusprotocol/governance-contracts/deployments/${process.env.HARDHAT_FORK_NETWORK}`,
|
|
125
|
+
];
|
|
126
|
+
}
|
|
91
127
|
}
|
|
92
128
|
});
|
|
93
129
|
// This is a sample Hardhat task. To learn how to create your own go to
|
|
@@ -223,7 +259,13 @@ const config = {
|
|
|
223
259
|
hardhat: {
|
|
224
260
|
allowUnlimitedContractSize: true,
|
|
225
261
|
loggingEnabled: false,
|
|
226
|
-
live:
|
|
262
|
+
live: !!process.env.HARDHAT_FORK_NETWORK,
|
|
263
|
+
forking: process.env.HARDHAT_FORK_NETWORK
|
|
264
|
+
? {
|
|
265
|
+
url: getRpcUrl(process.env.HARDHAT_FORK_NETWORK),
|
|
266
|
+
blockNumber: process.env.HARDHAT_FORK_NUMBER ? parseInt(process.env.HARDHAT_FORK_NUMBER) : undefined,
|
|
267
|
+
}
|
|
268
|
+
: undefined,
|
|
227
269
|
},
|
|
228
270
|
development: {
|
|
229
271
|
url: "http://127.0.0.1:8545/",
|
|
@@ -3910,7 +3910,7 @@ exports.globalConfig = {
|
|
|
3910
3910
|
// 3600 XVS for Borrowers
|
|
3911
3911
|
{
|
|
3912
3912
|
asset: "XVS",
|
|
3913
|
-
markets: ["
|
|
3913
|
+
markets: ["CRV", "crvUSD"],
|
|
3914
3914
|
supplySpeeds: ["925925925925925", "3703703703703703"],
|
|
3915
3915
|
borrowSpeeds: ["1388888888888888", "5555555555555555"],
|
|
3916
3916
|
},
|
|
@@ -3922,7 +3922,7 @@ exports.globalConfig = {
|
|
|
3922
3922
|
},
|
|
3923
3923
|
{
|
|
3924
3924
|
asset: "XVS",
|
|
3925
|
-
markets: ["
|
|
3925
|
+
markets: ["CRV", "crvUSD"],
|
|
3926
3926
|
supplySpeeds: ["694444444444444", "694444444444444"],
|
|
3927
3927
|
borrowSpeeds: ["1041666666666666", "1041666666666666"],
|
|
3928
3928
|
},
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { HardhatRuntimeEnvironment } from "hardhat/types";
|
|
2
1
|
import { ERC20, MockToken } from "../typechain";
|
|
3
2
|
import { DeploymentInfo, PoolConfig, TokenConfig } from "./deploymentConfig";
|
|
4
|
-
export declare const toAddress: (addressOrAlias: string
|
|
3
|
+
export declare const toAddress: (addressOrAlias: string) => Promise<string>;
|
|
5
4
|
export declare const getUnderlyingMock: (assetSymbol: string) => Promise<MockToken>;
|
|
6
5
|
export declare const getUnderlyingToken: (assetSymbol: string, tokensConfig: TokenConfig[]) => Promise<ERC20>;
|
|
7
|
-
export declare const getUnregisteredPools: (poolConfig: PoolConfig[]
|
|
8
|
-
export declare const getUnregisteredVTokens: (poolConfig: PoolConfig[]
|
|
9
|
-
export declare const getUnregisteredRewardsDistributors: (poolConfig: PoolConfig[]
|
|
6
|
+
export declare const getUnregisteredPools: (poolConfig: PoolConfig[]) => Promise<PoolConfig[]>;
|
|
7
|
+
export declare const getUnregisteredVTokens: (poolConfig: PoolConfig[]) => Promise<PoolConfig[]>;
|
|
8
|
+
export declare const getUnregisteredRewardsDistributors: (poolConfig: PoolConfig[]) => Promise<PoolConfig[]>;
|
|
10
9
|
export declare const getBlockOrTimestampBasedDeploymentInfo: (network: string) => DeploymentInfo;
|
|
@@ -3,17 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getBlockOrTimestampBasedDeploymentInfo = exports.getUnregisteredRewardsDistributors = exports.getUnregisteredVTokens = exports.getUnregisteredPools = exports.getUnderlyingToken = exports.getUnderlyingMock = exports.toAddress = void 0;
|
|
4
4
|
const hardhat_1 = require("hardhat");
|
|
5
5
|
const deploymentConfig_1 = require("./deploymentConfig");
|
|
6
|
-
const toAddress = async (addressOrAlias
|
|
7
|
-
const { getNamedAccounts } = hre;
|
|
8
|
-
const { deployments } = hre;
|
|
6
|
+
const toAddress = async (addressOrAlias) => {
|
|
9
7
|
if (addressOrAlias.startsWith("0x")) {
|
|
10
8
|
return addressOrAlias;
|
|
11
9
|
}
|
|
12
10
|
if (addressOrAlias.startsWith("account:")) {
|
|
13
|
-
const namedAccounts = await getNamedAccounts();
|
|
11
|
+
const namedAccounts = await (0, hardhat_1.getNamedAccounts)();
|
|
14
12
|
return namedAccounts[addressOrAlias.slice("account:".length)];
|
|
15
13
|
}
|
|
16
|
-
const deployment = await deployments.get(addressOrAlias);
|
|
14
|
+
const deployment = await hardhat_1.deployments.get(addressOrAlias);
|
|
17
15
|
return deployment.address;
|
|
18
16
|
};
|
|
19
17
|
exports.toAddress = toAddress;
|
|
@@ -30,12 +28,11 @@ const getUnderlyingToken = async (assetSymbol, tokensConfig) => {
|
|
|
30
28
|
return hardhat_1.ethers.getContractAt("@openzeppelin/contracts/token/ERC20/ERC20.sol:ERC20", underlyingAddress);
|
|
31
29
|
};
|
|
32
30
|
exports.getUnderlyingToken = getUnderlyingToken;
|
|
33
|
-
const getUnregisteredPools = async (poolConfig
|
|
34
|
-
const { deployments } = hre;
|
|
31
|
+
const getUnregisteredPools = async (poolConfig) => {
|
|
35
32
|
const registry = await hardhat_1.ethers.getContract("PoolRegistry");
|
|
36
33
|
const registeredPools = (await registry.getAllPools()).map((p) => p.comptroller);
|
|
37
34
|
const isRegistered = await Promise.all(poolConfig.map(async (pool) => {
|
|
38
|
-
const comptroller = await deployments.getOrNull(`Comptroller_${pool.name}`);
|
|
35
|
+
const comptroller = await hardhat_1.deployments.getOrNull(`Comptroller_${pool.name}`);
|
|
39
36
|
if (!comptroller) {
|
|
40
37
|
// If the Comptroller deployment doesn't exist, it's not registered
|
|
41
38
|
return false;
|
|
@@ -45,8 +42,7 @@ const getUnregisteredPools = async (poolConfig, hre) => {
|
|
|
45
42
|
return poolConfig.filter((_, idx) => !isRegistered[idx]);
|
|
46
43
|
};
|
|
47
44
|
exports.getUnregisteredPools = getUnregisteredPools;
|
|
48
|
-
const getUnregisteredVTokens = async (poolConfig
|
|
49
|
-
const { deployments } = hre;
|
|
45
|
+
const getUnregisteredVTokens = async (poolConfig) => {
|
|
50
46
|
const registry = await hardhat_1.ethers.getContract("PoolRegistry");
|
|
51
47
|
const registeredPools = await registry.getAllPools();
|
|
52
48
|
const comptrollers = await Promise.all(registeredPools.map(async (p) => {
|
|
@@ -57,7 +53,7 @@ const getUnregisteredVTokens = async (poolConfig, hre) => {
|
|
|
57
53
|
}))).flat();
|
|
58
54
|
return Promise.all(poolConfig.map(async (pool) => {
|
|
59
55
|
const isRegistered = await Promise.all(pool.vtokens.map(async (vTokenConfig) => {
|
|
60
|
-
const vToken = await deployments.getOrNull(`VToken_${vTokenConfig.name}`);
|
|
56
|
+
const vToken = await hardhat_1.deployments.getOrNull(`VToken_${vTokenConfig.name}`);
|
|
61
57
|
if (!vToken) {
|
|
62
58
|
// If the VToken deployment doesn't exist, it's not registered
|
|
63
59
|
return false;
|
|
@@ -68,8 +64,7 @@ const getUnregisteredVTokens = async (poolConfig, hre) => {
|
|
|
68
64
|
}));
|
|
69
65
|
};
|
|
70
66
|
exports.getUnregisteredVTokens = getUnregisteredVTokens;
|
|
71
|
-
const getUnregisteredRewardsDistributors = async (poolConfig
|
|
72
|
-
const { deployments } = hre;
|
|
67
|
+
const getUnregisteredRewardsDistributors = async (poolConfig) => {
|
|
73
68
|
const registry = await hardhat_1.ethers.getContract("PoolRegistry");
|
|
74
69
|
const registeredPools = await registry.getAllPools();
|
|
75
70
|
const comptrollers = await Promise.all(registeredPools.map(async (p) => {
|
|
@@ -81,7 +76,7 @@ const getUnregisteredRewardsDistributors = async (poolConfig, hre) => {
|
|
|
81
76
|
return Promise.all(poolConfig.map(async (pool) => {
|
|
82
77
|
const rewards = pool.rewards || [];
|
|
83
78
|
const isRegistered = await Promise.all(rewards.map(async (reward) => {
|
|
84
|
-
const rewardsDistributor = await deployments.getOrNull(`RewardsDistributor_${reward.asset}_${pool.name}`);
|
|
79
|
+
const rewardsDistributor = await hardhat_1.deployments.getOrNull(`RewardsDistributor_${reward.asset}_${pool.name}`);
|
|
85
80
|
if (!rewardsDistributor) {
|
|
86
81
|
// If the RewardsDistributor deployment doesn't exist, it's not registered
|
|
87
82
|
return false;
|
|
@@ -3,7 +3,11 @@ import { Provider } from "@ethersproject/providers";
|
|
|
3
3
|
import type { IVToken, IVTokenInterface } from "../IVToken";
|
|
4
4
|
export declare class IVToken__factory {
|
|
5
5
|
static readonly abi: {
|
|
6
|
-
inputs:
|
|
6
|
+
inputs: {
|
|
7
|
+
internalType: string;
|
|
8
|
+
name: string;
|
|
9
|
+
type: string;
|
|
10
|
+
}[];
|
|
7
11
|
name: string;
|
|
8
12
|
outputs: {
|
|
9
13
|
internalType: string;
|
|
@@ -6,6 +6,206 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.IVToken__factory = void 0;
|
|
7
7
|
const ethers_1 = require("ethers");
|
|
8
8
|
const _abi = [
|
|
9
|
+
{
|
|
10
|
+
inputs: [
|
|
11
|
+
{
|
|
12
|
+
internalType: "address",
|
|
13
|
+
name: "account",
|
|
14
|
+
type: "address",
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
name: "borrowBalanceCurrent",
|
|
18
|
+
outputs: [
|
|
19
|
+
{
|
|
20
|
+
internalType: "uint256",
|
|
21
|
+
name: "",
|
|
22
|
+
type: "uint256",
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
stateMutability: "nonpayable",
|
|
26
|
+
type: "function",
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
inputs: [
|
|
30
|
+
{
|
|
31
|
+
internalType: "address",
|
|
32
|
+
name: "borrower",
|
|
33
|
+
type: "address",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
internalType: "uint256",
|
|
37
|
+
name: "borrowAmount",
|
|
38
|
+
type: "uint256",
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
name: "borrowBehalf",
|
|
42
|
+
outputs: [
|
|
43
|
+
{
|
|
44
|
+
internalType: "uint256",
|
|
45
|
+
name: "",
|
|
46
|
+
type: "uint256",
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
stateMutability: "nonpayable",
|
|
50
|
+
type: "function",
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
inputs: [],
|
|
54
|
+
name: "exchangeRateCurrent",
|
|
55
|
+
outputs: [
|
|
56
|
+
{
|
|
57
|
+
internalType: "uint256",
|
|
58
|
+
name: "",
|
|
59
|
+
type: "uint256",
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
stateMutability: "nonpayable",
|
|
63
|
+
type: "function",
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
inputs: [
|
|
67
|
+
{
|
|
68
|
+
internalType: "address",
|
|
69
|
+
name: "receiver",
|
|
70
|
+
type: "address",
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
internalType: "uint256",
|
|
74
|
+
name: "mintAmount",
|
|
75
|
+
type: "uint256",
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
name: "mintBehalf",
|
|
79
|
+
outputs: [
|
|
80
|
+
{
|
|
81
|
+
internalType: "uint256",
|
|
82
|
+
name: "",
|
|
83
|
+
type: "uint256",
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
stateMutability: "nonpayable",
|
|
87
|
+
type: "function",
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
inputs: [
|
|
91
|
+
{
|
|
92
|
+
internalType: "uint256",
|
|
93
|
+
name: "redeemTokens",
|
|
94
|
+
type: "uint256",
|
|
95
|
+
},
|
|
96
|
+
],
|
|
97
|
+
name: "redeem",
|
|
98
|
+
outputs: [
|
|
99
|
+
{
|
|
100
|
+
internalType: "uint256",
|
|
101
|
+
name: "",
|
|
102
|
+
type: "uint256",
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
stateMutability: "nonpayable",
|
|
106
|
+
type: "function",
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
inputs: [
|
|
110
|
+
{
|
|
111
|
+
internalType: "address",
|
|
112
|
+
name: "redeemer",
|
|
113
|
+
type: "address",
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
internalType: "uint256",
|
|
117
|
+
name: "redeemTokens",
|
|
118
|
+
type: "uint256",
|
|
119
|
+
},
|
|
120
|
+
],
|
|
121
|
+
name: "redeemBehalf",
|
|
122
|
+
outputs: [
|
|
123
|
+
{
|
|
124
|
+
internalType: "uint256",
|
|
125
|
+
name: "",
|
|
126
|
+
type: "uint256",
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
stateMutability: "nonpayable",
|
|
130
|
+
type: "function",
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
inputs: [
|
|
134
|
+
{
|
|
135
|
+
internalType: "address",
|
|
136
|
+
name: "redeemer",
|
|
137
|
+
type: "address",
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
internalType: "uint256",
|
|
141
|
+
name: "redeemAmount",
|
|
142
|
+
type: "uint256",
|
|
143
|
+
},
|
|
144
|
+
],
|
|
145
|
+
name: "redeemUnderlyingBehalf",
|
|
146
|
+
outputs: [
|
|
147
|
+
{
|
|
148
|
+
internalType: "uint256",
|
|
149
|
+
name: "",
|
|
150
|
+
type: "uint256",
|
|
151
|
+
},
|
|
152
|
+
],
|
|
153
|
+
stateMutability: "nonpayable",
|
|
154
|
+
type: "function",
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
inputs: [
|
|
158
|
+
{
|
|
159
|
+
internalType: "address",
|
|
160
|
+
name: "borrower",
|
|
161
|
+
type: "address",
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
internalType: "uint256",
|
|
165
|
+
name: "repayAmount",
|
|
166
|
+
type: "uint256",
|
|
167
|
+
},
|
|
168
|
+
],
|
|
169
|
+
name: "repayBorrowBehalf",
|
|
170
|
+
outputs: [
|
|
171
|
+
{
|
|
172
|
+
internalType: "uint256",
|
|
173
|
+
name: "",
|
|
174
|
+
type: "uint256",
|
|
175
|
+
},
|
|
176
|
+
],
|
|
177
|
+
stateMutability: "nonpayable",
|
|
178
|
+
type: "function",
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
inputs: [
|
|
182
|
+
{
|
|
183
|
+
internalType: "address",
|
|
184
|
+
name: "from",
|
|
185
|
+
type: "address",
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
internalType: "address",
|
|
189
|
+
name: "to",
|
|
190
|
+
type: "address",
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
internalType: "uint256",
|
|
194
|
+
name: "amount",
|
|
195
|
+
type: "uint256",
|
|
196
|
+
},
|
|
197
|
+
],
|
|
198
|
+
name: "transferFrom",
|
|
199
|
+
outputs: [
|
|
200
|
+
{
|
|
201
|
+
internalType: "bool",
|
|
202
|
+
name: "",
|
|
203
|
+
type: "bool",
|
|
204
|
+
},
|
|
205
|
+
],
|
|
206
|
+
stateMutability: "nonpayable",
|
|
207
|
+
type: "function",
|
|
208
|
+
},
|
|
9
209
|
{
|
|
10
210
|
inputs: [],
|
|
11
211
|
name: "underlying",
|
|
@@ -16,7 +216,7 @@ const _abi = [
|
|
|
16
216
|
type: "address",
|
|
17
217
|
},
|
|
18
218
|
],
|
|
19
|
-
stateMutability: "
|
|
219
|
+
stateMutability: "nonpayable",
|
|
20
220
|
type: "function",
|
|
21
221
|
},
|
|
22
222
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@venusprotocol/isolated-pools",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.0-dev.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"files": [
|
|
6
6
|
"artifacts",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@openzeppelin/contracts-upgradeable": "^4.8.3",
|
|
49
49
|
"@openzeppelin/hardhat-upgrades": "^1.21.0",
|
|
50
50
|
"@solidity-parser/parser": "^0.13.2",
|
|
51
|
-
"@venusprotocol/solidity-utilities": "
|
|
51
|
+
"@venusprotocol/solidity-utilities": "2.0.3",
|
|
52
52
|
"ethers": "^5.7.0",
|
|
53
53
|
"hardhat-deploy": "^0.11.14",
|
|
54
54
|
"module-alias": "^2.2.2"
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"@typescript-eslint/parser": "^5.27.1",
|
|
80
80
|
"@venusprotocol/governance-contracts": "2.6.0",
|
|
81
81
|
"@venusprotocol/oracle": "2.7.0",
|
|
82
|
-
"@venusprotocol/protocol-reserve": "
|
|
82
|
+
"@venusprotocol/protocol-reserve": "3.0.1",
|
|
83
83
|
"@venusprotocol/venus-protocol": "9.4.0",
|
|
84
84
|
"bignumber.js": "9.0.0",
|
|
85
85
|
"chai": "^4.3.6",
|
|
@@ -113,7 +113,8 @@
|
|
|
113
113
|
"ganache-core": "github:compound-finance/ganache-core.git#jflatow/unbreak-fork",
|
|
114
114
|
"solidity-parser-antlr": "https://github.com/solidity-parser/parser#0.8.2",
|
|
115
115
|
"@defi-wonderland/smock": "2.3.5",
|
|
116
|
-
"hardhat": "2.19.4"
|
|
116
|
+
"hardhat": "2.19.4",
|
|
117
|
+
"@venusprotocol/solidity-utilities": "2.0.3"
|
|
117
118
|
},
|
|
118
119
|
"publishConfig": {
|
|
119
120
|
"access": "public",
|