@venusprotocol/venus-protocol 7.3.0-dev.3 → 7.3.0-dev.4
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/artifacts/@openzeppelin/contracts/access/IAccessControl.sol/IAccessControl.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/access/Ownable.sol/Ownable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/access/Ownable2Step.sol/Ownable2Step.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/interfaces/IERC1967.sol/IERC1967.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/interfaces/draft-IERC1822.sol/IERC1822Proxiable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol/ERC1967Proxy.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol/ERC1967Upgrade.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/proxy/Proxy.sol/Proxy.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/proxy/beacon/IBeacon.sol/IBeacon.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol/ProxyAdmin.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol/ITransparentUpgradeableProxy.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol/TransparentUpgradeableProxy.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/security/ReentrancyGuard.sol/ReentrancyGuard.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.json +297 -0
- package/artifacts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.json +233 -0
- package/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol/IERC20Permit.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol/SafeERC20.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/utils/Address.sol/Address.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/utils/StorageSlot.sol/StorageSlot.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol/Ownable2StepUpgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol/OwnableUpgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol/Initializable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol/PausableUpgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol/ReentrancyGuardUpgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol/IERC20Upgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol/IERC20MetadataUpgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20PermitUpgradeable.sol/IERC20PermitUpgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol/SafeERC20Upgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol/SafeCastUpgradeable.dbg.json +1 -1
- package/artifacts/build-info/5d3c5040759360fa4c28ba5b26a6b9f1.json +1 -0
- package/artifacts/contracts/Governance/VTreasuryV8.sol/VTreasuryV8.dbg.json +1 -1
- package/artifacts/contracts/test/MockToken.sol/MockToken.dbg.json +4 -0
- package/artifacts/contracts/test/MockToken.sol/MockToken.json +315 -0
- package/contracts/test/MockToken.sol +22 -0
- package/deploy/010-deploy-mock-tokens.ts +30 -0
- package/deploy/011-deploy-markets.ts +92 -0
- package/deployments/bscmainnet/JumpRateModel_base0bps_slope687bps_jump25000bps_kink8000bps.json +380 -0
- package/deployments/bscmainnet/solcInputs/7830d2b3dd486e9651687b362529ec15.json +345 -0
- package/deployments/bscmainnet/vFDUSD_Proxy.json +2382 -0
- package/deployments/bscmainnet.json +11054 -11355
- package/deployments/bscmainnet_addresses.json +2 -1
- package/deployments/bsctestnet/JumpRateModel_base0bps_slope687bps_jump25000bps_kink8000bps.json +380 -0
- package/deployments/bsctestnet/MockFDUSD.json +458 -0
- package/deployments/bsctestnet/solcInputs/7830d2b3dd486e9651687b362529ec15.json +345 -0
- package/deployments/bsctestnet/solcInputs/f4ba922efa57be24c0606389b67afaaa.json +46 -0
- package/deployments/bsctestnet/vFDUSD_Proxy.json +2382 -0
- package/deployments/bsctestnet.json +17362 -17871
- package/deployments/bsctestnet_addresses.json +3 -1
- package/dist/deploy/010-deploy-mock-tokens.d.ts +3 -0
- package/dist/deploy/010-deploy-mock-tokens.js +24 -0
- package/dist/deploy/011-deploy-markets.d.ts +3 -0
- package/dist/deploy/011-deploy-markets.js +76 -0
- package/dist/deployments/bscmainnet.json +11054 -11355
- package/dist/deployments/bscmainnet_addresses.json +202 -0
- package/dist/deployments/bsctestnet.json +17362 -17871
- package/dist/deployments/bsctestnet_addresses.json +121 -0
- package/dist/hardhat.config.js +1 -3
- package/dist/helpers/deploymentConfig.d.ts +47 -0
- package/dist/helpers/deploymentConfig.js +157 -0
- package/dist/helpers/utils.d.ts +2 -0
- package/dist/helpers/utils.js +27 -0
- package/dist/typechain/@openzeppelin/contracts/token/ERC20/ERC20.d.ts +198 -0
- package/dist/typechain/@openzeppelin/contracts/token/ERC20/ERC20.js +3 -0
- package/dist/typechain/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.d.ts +166 -0
- package/dist/typechain/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.js +3 -0
- package/dist/typechain/@openzeppelin/contracts/token/ERC20/extensions/index.d.ts +1 -0
- package/dist/typechain/@openzeppelin/contracts/token/ERC20/index.d.ts +1 -0
- package/dist/typechain/contracts/test/MockToken.d.ts +214 -0
- package/dist/typechain/contracts/test/MockToken.js +3 -0
- package/dist/typechain/contracts/test/index.d.ts +1 -0
- package/dist/typechain/factories/@openzeppelin/contracts/token/ERC20/ERC20__factory.d.ts +239 -0
- package/dist/typechain/factories/@openzeppelin/contracts/token/ERC20/ERC20__factory.js +326 -0
- package/dist/typechain/factories/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata__factory.d.ts +178 -0
- package/dist/typechain/factories/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata__factory.js +239 -0
- package/dist/typechain/factories/@openzeppelin/contracts/token/ERC20/extensions/index.d.ts +1 -0
- package/dist/typechain/factories/@openzeppelin/contracts/token/ERC20/extensions/index.js +3 -1
- package/dist/typechain/factories/@openzeppelin/contracts/token/ERC20/index.d.ts +1 -0
- package/dist/typechain/factories/@openzeppelin/contracts/token/ERC20/index.js +3 -1
- package/dist/typechain/factories/contracts/test/MockToken__factory.d.ts +253 -0
- package/dist/typechain/factories/contracts/test/MockToken__factory.js +344 -0
- package/dist/typechain/factories/contracts/test/index.d.ts +1 -0
- package/dist/typechain/factories/contracts/test/index.js +3 -1
- package/dist/typechain/index.d.ts +6 -0
- package/dist/typechain/index.js +12 -6
- package/package.json +1 -1
- package/artifacts/build-info/836b5274e4a94df50d1ff043d8579f59.json +0 -1
- package/deployments/bscmainnet/Comptroller.json +0 -2237
- package/deployments/bsctestnet/Comptroller.json +0 -2754
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_format": "hh-sol-artifact-1",
|
|
3
|
+
"contractName": "MockToken",
|
|
4
|
+
"sourceName": "contracts/test/MockToken.sol",
|
|
5
|
+
"abi": [
|
|
6
|
+
{
|
|
7
|
+
"inputs": [
|
|
8
|
+
{
|
|
9
|
+
"internalType": "string",
|
|
10
|
+
"name": "name_",
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"internalType": "string",
|
|
15
|
+
"name": "symbol_",
|
|
16
|
+
"type": "string"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"internalType": "uint8",
|
|
20
|
+
"name": "decimals_",
|
|
21
|
+
"type": "uint8"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"stateMutability": "nonpayable",
|
|
25
|
+
"type": "constructor"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"anonymous": false,
|
|
29
|
+
"inputs": [
|
|
30
|
+
{
|
|
31
|
+
"indexed": true,
|
|
32
|
+
"internalType": "address",
|
|
33
|
+
"name": "owner",
|
|
34
|
+
"type": "address"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"indexed": true,
|
|
38
|
+
"internalType": "address",
|
|
39
|
+
"name": "spender",
|
|
40
|
+
"type": "address"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"indexed": false,
|
|
44
|
+
"internalType": "uint256",
|
|
45
|
+
"name": "value",
|
|
46
|
+
"type": "uint256"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"name": "Approval",
|
|
50
|
+
"type": "event"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"anonymous": false,
|
|
54
|
+
"inputs": [
|
|
55
|
+
{
|
|
56
|
+
"indexed": true,
|
|
57
|
+
"internalType": "address",
|
|
58
|
+
"name": "from",
|
|
59
|
+
"type": "address"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"indexed": true,
|
|
63
|
+
"internalType": "address",
|
|
64
|
+
"name": "to",
|
|
65
|
+
"type": "address"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"indexed": false,
|
|
69
|
+
"internalType": "uint256",
|
|
70
|
+
"name": "value",
|
|
71
|
+
"type": "uint256"
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"name": "Transfer",
|
|
75
|
+
"type": "event"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"inputs": [
|
|
79
|
+
{
|
|
80
|
+
"internalType": "address",
|
|
81
|
+
"name": "owner",
|
|
82
|
+
"type": "address"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"internalType": "address",
|
|
86
|
+
"name": "spender",
|
|
87
|
+
"type": "address"
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"name": "allowance",
|
|
91
|
+
"outputs": [
|
|
92
|
+
{
|
|
93
|
+
"internalType": "uint256",
|
|
94
|
+
"name": "",
|
|
95
|
+
"type": "uint256"
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
"stateMutability": "view",
|
|
99
|
+
"type": "function"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"inputs": [
|
|
103
|
+
{
|
|
104
|
+
"internalType": "address",
|
|
105
|
+
"name": "spender",
|
|
106
|
+
"type": "address"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"internalType": "uint256",
|
|
110
|
+
"name": "amount",
|
|
111
|
+
"type": "uint256"
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
"name": "approve",
|
|
115
|
+
"outputs": [
|
|
116
|
+
{
|
|
117
|
+
"internalType": "bool",
|
|
118
|
+
"name": "",
|
|
119
|
+
"type": "bool"
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"stateMutability": "nonpayable",
|
|
123
|
+
"type": "function"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"inputs": [
|
|
127
|
+
{
|
|
128
|
+
"internalType": "address",
|
|
129
|
+
"name": "account",
|
|
130
|
+
"type": "address"
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
"name": "balanceOf",
|
|
134
|
+
"outputs": [
|
|
135
|
+
{
|
|
136
|
+
"internalType": "uint256",
|
|
137
|
+
"name": "",
|
|
138
|
+
"type": "uint256"
|
|
139
|
+
}
|
|
140
|
+
],
|
|
141
|
+
"stateMutability": "view",
|
|
142
|
+
"type": "function"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"inputs": [],
|
|
146
|
+
"name": "decimals",
|
|
147
|
+
"outputs": [
|
|
148
|
+
{
|
|
149
|
+
"internalType": "uint8",
|
|
150
|
+
"name": "",
|
|
151
|
+
"type": "uint8"
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
"stateMutability": "view",
|
|
155
|
+
"type": "function"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"inputs": [
|
|
159
|
+
{
|
|
160
|
+
"internalType": "address",
|
|
161
|
+
"name": "spender",
|
|
162
|
+
"type": "address"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"internalType": "uint256",
|
|
166
|
+
"name": "subtractedValue",
|
|
167
|
+
"type": "uint256"
|
|
168
|
+
}
|
|
169
|
+
],
|
|
170
|
+
"name": "decreaseAllowance",
|
|
171
|
+
"outputs": [
|
|
172
|
+
{
|
|
173
|
+
"internalType": "bool",
|
|
174
|
+
"name": "",
|
|
175
|
+
"type": "bool"
|
|
176
|
+
}
|
|
177
|
+
],
|
|
178
|
+
"stateMutability": "nonpayable",
|
|
179
|
+
"type": "function"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"inputs": [
|
|
183
|
+
{
|
|
184
|
+
"internalType": "uint256",
|
|
185
|
+
"name": "amount",
|
|
186
|
+
"type": "uint256"
|
|
187
|
+
}
|
|
188
|
+
],
|
|
189
|
+
"name": "faucet",
|
|
190
|
+
"outputs": [],
|
|
191
|
+
"stateMutability": "nonpayable",
|
|
192
|
+
"type": "function"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"inputs": [
|
|
196
|
+
{
|
|
197
|
+
"internalType": "address",
|
|
198
|
+
"name": "spender",
|
|
199
|
+
"type": "address"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"internalType": "uint256",
|
|
203
|
+
"name": "addedValue",
|
|
204
|
+
"type": "uint256"
|
|
205
|
+
}
|
|
206
|
+
],
|
|
207
|
+
"name": "increaseAllowance",
|
|
208
|
+
"outputs": [
|
|
209
|
+
{
|
|
210
|
+
"internalType": "bool",
|
|
211
|
+
"name": "",
|
|
212
|
+
"type": "bool"
|
|
213
|
+
}
|
|
214
|
+
],
|
|
215
|
+
"stateMutability": "nonpayable",
|
|
216
|
+
"type": "function"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"inputs": [],
|
|
220
|
+
"name": "name",
|
|
221
|
+
"outputs": [
|
|
222
|
+
{
|
|
223
|
+
"internalType": "string",
|
|
224
|
+
"name": "",
|
|
225
|
+
"type": "string"
|
|
226
|
+
}
|
|
227
|
+
],
|
|
228
|
+
"stateMutability": "view",
|
|
229
|
+
"type": "function"
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"inputs": [],
|
|
233
|
+
"name": "symbol",
|
|
234
|
+
"outputs": [
|
|
235
|
+
{
|
|
236
|
+
"internalType": "string",
|
|
237
|
+
"name": "",
|
|
238
|
+
"type": "string"
|
|
239
|
+
}
|
|
240
|
+
],
|
|
241
|
+
"stateMutability": "view",
|
|
242
|
+
"type": "function"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"inputs": [],
|
|
246
|
+
"name": "totalSupply",
|
|
247
|
+
"outputs": [
|
|
248
|
+
{
|
|
249
|
+
"internalType": "uint256",
|
|
250
|
+
"name": "",
|
|
251
|
+
"type": "uint256"
|
|
252
|
+
}
|
|
253
|
+
],
|
|
254
|
+
"stateMutability": "view",
|
|
255
|
+
"type": "function"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"inputs": [
|
|
259
|
+
{
|
|
260
|
+
"internalType": "address",
|
|
261
|
+
"name": "to",
|
|
262
|
+
"type": "address"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"internalType": "uint256",
|
|
266
|
+
"name": "amount",
|
|
267
|
+
"type": "uint256"
|
|
268
|
+
}
|
|
269
|
+
],
|
|
270
|
+
"name": "transfer",
|
|
271
|
+
"outputs": [
|
|
272
|
+
{
|
|
273
|
+
"internalType": "bool",
|
|
274
|
+
"name": "",
|
|
275
|
+
"type": "bool"
|
|
276
|
+
}
|
|
277
|
+
],
|
|
278
|
+
"stateMutability": "nonpayable",
|
|
279
|
+
"type": "function"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"inputs": [
|
|
283
|
+
{
|
|
284
|
+
"internalType": "address",
|
|
285
|
+
"name": "from",
|
|
286
|
+
"type": "address"
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"internalType": "address",
|
|
290
|
+
"name": "to",
|
|
291
|
+
"type": "address"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"internalType": "uint256",
|
|
295
|
+
"name": "amount",
|
|
296
|
+
"type": "uint256"
|
|
297
|
+
}
|
|
298
|
+
],
|
|
299
|
+
"name": "transferFrom",
|
|
300
|
+
"outputs": [
|
|
301
|
+
{
|
|
302
|
+
"internalType": "bool",
|
|
303
|
+
"name": "",
|
|
304
|
+
"type": "bool"
|
|
305
|
+
}
|
|
306
|
+
],
|
|
307
|
+
"stateMutability": "nonpayable",
|
|
308
|
+
"type": "function"
|
|
309
|
+
}
|
|
310
|
+
],
|
|
311
|
+
"bytecode": "0x60a06040523480156200001157600080fd5b5060405162000c9f38038062000c9f83398101604081905262000034916200012a565b828260036200004483826200023e565b5060046200005382826200023e565b50505060ff16608052506200030a9050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200008d57600080fd5b81516001600160401b0380821115620000aa57620000aa62000065565b604051601f8301601f19908116603f01168101908282118183101715620000d557620000d562000065565b81604052838152602092508683858801011115620000f257600080fd5b600091505b83821015620001165785820183015181830184015290820190620000f7565b600093810190920192909252949350505050565b6000806000606084860312156200014057600080fd5b83516001600160401b03808211156200015857600080fd5b62000166878388016200007b565b945060208601519150808211156200017d57600080fd5b506200018c868287016200007b565b925050604084015160ff81168114620001a457600080fd5b809150509250925092565b600181811c90821680620001c457607f821691505b602082108103620001e557634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200023957600081815260208120601f850160051c81016020861015620002145750805b601f850160051c820191505b81811015620002355782815560010162000220565b5050505b505050565b81516001600160401b038111156200025a576200025a62000065565b62000272816200026b8454620001af565b84620001eb565b602080601f831160018114620002aa5760008415620002915750858301515b600019600386901b1c1916600185901b17855562000235565b600085815260208120601f198616915b82811015620002db57888601518255948401946001909101908401620002ba565b5085821015620002fa5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805161097962000326600039600061012601526109796000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80635791589711610071578063579158971461016357806370a082311461017857806395d89b41146101a1578063a457c2d7146101a9578063a9059cbb146101bc578063dd62ed3e146101cf57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f5780633950935114610150575b600080fd5b6100c16101e2565b6040516100ce91906107aa565b60405180910390f35b6100ea6100e5366004610814565b610274565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a36600461083e565b61028e565b60405160ff7f00000000000000000000000000000000000000000000000000000000000000001681526020016100ce565b6100ea61015e366004610814565b6102b2565b61017661017136600461087a565b6102d4565b005b6100fe610186366004610893565b6001600160a01b031660009081526020819052604090205490565b6100c16102e1565b6100ea6101b7366004610814565b6102f0565b6100ea6101ca366004610814565b610370565b6100fe6101dd3660046108b5565b61037e565b6060600380546101f1906108e8565b80601f016020809104026020016040519081016040528092919081815260200182805461021d906108e8565b801561026a5780601f1061023f5761010080835404028352916020019161026a565b820191906000526020600020905b81548152906001019060200180831161024d57829003601f168201915b5050505050905090565b6000336102828185856103a9565b60019150505b92915050565b60003361029c8582856104cd565b6102a7858585610547565b506001949350505050565b6000336102828185856102c5838361037e565b6102cf9190610922565b6103a9565b6102de33826106eb565b50565b6060600480546101f1906108e8565b600033816102fe828661037e565b9050838110156103635760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102a782868684036103a9565b600033610282818585610547565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b03831661040b5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161035a565b6001600160a01b03821661046c5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161035a565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104d9848461037e565b9050600019811461054157818110156105345760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161035a565b61054184848484036103a9565b50505050565b6001600160a01b0383166105ab5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161035a565b6001600160a01b03821661060d5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161035a565b6001600160a01b038316600090815260208190526040902054818110156106855760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161035a565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610541565b6001600160a01b0382166107415760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161035a565b80600260008282546107539190610922565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b600060208083528351808285015260005b818110156107d7578581018301518582016040015282016107bb565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461080f57600080fd5b919050565b6000806040838503121561082757600080fd5b610830836107f8565b946020939093013593505050565b60008060006060848603121561085357600080fd5b61085c846107f8565b925061086a602085016107f8565b9150604084013590509250925092565b60006020828403121561088c57600080fd5b5035919050565b6000602082840312156108a557600080fd5b6108ae826107f8565b9392505050565b600080604083850312156108c857600080fd5b6108d1836107f8565b91506108df602084016107f8565b90509250929050565b600181811c908216806108fc57607f821691505b60208210810361091c57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561028857634e487b7160e01b600052601160045260246000fdfea2646970667358221220f513c17ca161f9a552f68fc09ae122683585ee68b58b2787910f2be4dd0d4f0c64736f6c63430008140033",
|
|
312
|
+
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c80635791589711610071578063579158971461016357806370a082311461017857806395d89b41146101a1578063a457c2d7146101a9578063a9059cbb146101bc578063dd62ed3e146101cf57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f5780633950935114610150575b600080fd5b6100c16101e2565b6040516100ce91906107aa565b60405180910390f35b6100ea6100e5366004610814565b610274565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a36600461083e565b61028e565b60405160ff7f00000000000000000000000000000000000000000000000000000000000000001681526020016100ce565b6100ea61015e366004610814565b6102b2565b61017661017136600461087a565b6102d4565b005b6100fe610186366004610893565b6001600160a01b031660009081526020819052604090205490565b6100c16102e1565b6100ea6101b7366004610814565b6102f0565b6100ea6101ca366004610814565b610370565b6100fe6101dd3660046108b5565b61037e565b6060600380546101f1906108e8565b80601f016020809104026020016040519081016040528092919081815260200182805461021d906108e8565b801561026a5780601f1061023f5761010080835404028352916020019161026a565b820191906000526020600020905b81548152906001019060200180831161024d57829003601f168201915b5050505050905090565b6000336102828185856103a9565b60019150505b92915050565b60003361029c8582856104cd565b6102a7858585610547565b506001949350505050565b6000336102828185856102c5838361037e565b6102cf9190610922565b6103a9565b6102de33826106eb565b50565b6060600480546101f1906108e8565b600033816102fe828661037e565b9050838110156103635760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102a782868684036103a9565b600033610282818585610547565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b03831661040b5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161035a565b6001600160a01b03821661046c5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161035a565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006104d9848461037e565b9050600019811461054157818110156105345760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161035a565b61054184848484036103a9565b50505050565b6001600160a01b0383166105ab5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161035a565b6001600160a01b03821661060d5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161035a565b6001600160a01b038316600090815260208190526040902054818110156106855760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161035a565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610541565b6001600160a01b0382166107415760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161035a565b80600260008282546107539190610922565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b600060208083528351808285015260005b818110156107d7578581018301518582016040015282016107bb565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461080f57600080fd5b919050565b6000806040838503121561082757600080fd5b610830836107f8565b946020939093013593505050565b60008060006060848603121561085357600080fd5b61085c846107f8565b925061086a602085016107f8565b9150604084013590509250925092565b60006020828403121561088c57600080fd5b5035919050565b6000602082840312156108a557600080fd5b6108ae826107f8565b9392505050565b600080604083850312156108c857600080fd5b6108d1836107f8565b91506108df602084016107f8565b90509250929050565b600181811c908216806108fc57607f821691505b60208210810361091c57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561028857634e487b7160e01b600052601160045260246000fdfea2646970667358221220f513c17ca161f9a552f68fc09ae122683585ee68b58b2787910f2be4dd0d4f0c64736f6c63430008140033",
|
|
313
|
+
"linkReferences": {},
|
|
314
|
+
"deployedLinkReferences": {}
|
|
315
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/ERC20.sol)
|
|
3
|
+
|
|
4
|
+
pragma solidity ^0.8.0;
|
|
5
|
+
|
|
6
|
+
import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
|
|
7
|
+
|
|
8
|
+
contract MockToken is ERC20 {
|
|
9
|
+
uint8 private immutable _decimals;
|
|
10
|
+
|
|
11
|
+
constructor(string memory name_, string memory symbol_, uint8 decimals_) ERC20(name_, symbol_) {
|
|
12
|
+
_decimals = decimals_;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function faucet(uint256 amount) external {
|
|
16
|
+
_mint(msg.sender, amount);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function decimals() public view virtual override returns (uint8) {
|
|
20
|
+
return _decimals;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { DeployFunction } from "hardhat-deploy/types";
|
|
2
|
+
import { HardhatRuntimeEnvironment } from "hardhat/types";
|
|
3
|
+
|
|
4
|
+
import { getConfig } from "../helpers/deploymentConfig";
|
|
5
|
+
|
|
6
|
+
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
|
|
7
|
+
const { deployments, getNamedAccounts }: any = hre;
|
|
8
|
+
const { deploy } = deployments;
|
|
9
|
+
const { deployer } = await getNamedAccounts();
|
|
10
|
+
|
|
11
|
+
const { tokensConfig } = await getConfig(hre.network.name);
|
|
12
|
+
|
|
13
|
+
for (const token of tokensConfig) {
|
|
14
|
+
if (token.isMock) {
|
|
15
|
+
const contractName = `Mock${token.symbol}`;
|
|
16
|
+
await deploy(contractName, {
|
|
17
|
+
from: deployer,
|
|
18
|
+
contract: "MockToken",
|
|
19
|
+
args: [token.name, token.symbol, token.decimals],
|
|
20
|
+
log: true,
|
|
21
|
+
autoMine: true, // speed up deployment on local network (ganache, hardhat), no effect on live networks
|
|
22
|
+
skipIfAlreadyDeployed: true,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
func.tags = ["MockTokens"];
|
|
29
|
+
|
|
30
|
+
export default func;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { BigNumber, BigNumberish } from "ethers";
|
|
2
|
+
import { parseUnits } from "ethers/lib/utils";
|
|
3
|
+
import { ethers } from "hardhat";
|
|
4
|
+
import { DeployFunction, DeployResult } from "hardhat-deploy/types";
|
|
5
|
+
import { HardhatRuntimeEnvironment } from "hardhat/types";
|
|
6
|
+
|
|
7
|
+
import { InterestRateModels, getConfig, getTokenConfig } from "../helpers/deploymentConfig";
|
|
8
|
+
|
|
9
|
+
const mantissaToBps = (num: BigNumberish) => {
|
|
10
|
+
return BigNumber.from(num).div(parseUnits("1", 14)).toString();
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const VTOKEN_DECIMALS = 8;
|
|
14
|
+
const EMPTY_BYTES_ARRAY = "0x";
|
|
15
|
+
|
|
16
|
+
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
|
|
17
|
+
const { deployments, getNamedAccounts } = hre;
|
|
18
|
+
const { deploy } = deployments;
|
|
19
|
+
|
|
20
|
+
const { deployer } = await getNamedAccounts();
|
|
21
|
+
const { tokensConfig, marketsConfig, preconfiguredAddresses } = await getConfig(hre.network.name);
|
|
22
|
+
|
|
23
|
+
const comptrollerDeployment = await deployments.get("Unitroller");
|
|
24
|
+
|
|
25
|
+
console.log(`Got deployment of Unitroller with address: ${comptrollerDeployment.address}`);
|
|
26
|
+
|
|
27
|
+
for (const market of marketsConfig) {
|
|
28
|
+
const { name, asset, symbol, rateModel, baseRatePerYear, multiplierPerYear, jumpMultiplierPerYear, kink_ } = market;
|
|
29
|
+
|
|
30
|
+
const token = getTokenConfig(asset, tokensConfig);
|
|
31
|
+
let tokenContract;
|
|
32
|
+
if (token.isMock) {
|
|
33
|
+
tokenContract = await ethers.getContract(`Mock${token.symbol}`);
|
|
34
|
+
} else {
|
|
35
|
+
tokenContract = await ethers.getContractAt(
|
|
36
|
+
"@openzeppelin/contracts/token/ERC20/ERC20.sol:ERC20",
|
|
37
|
+
token.tokenAddress,
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
let rateModelAddress: string;
|
|
42
|
+
if (rateModel === InterestRateModels.JumpRate.toString()) {
|
|
43
|
+
const [b, m, j, k] = [baseRatePerYear, multiplierPerYear, jumpMultiplierPerYear, kink_].map(mantissaToBps);
|
|
44
|
+
const rateModelName = `JumpRateModel_base${b}bps_slope${m}bps_jump${j}bps_kink${k}bps`;
|
|
45
|
+
console.log(`Deploying interest rate model ${rateModelName}`);
|
|
46
|
+
const result: DeployResult = await deploy(rateModelName, {
|
|
47
|
+
from: deployer,
|
|
48
|
+
contract: "JumpRateModel",
|
|
49
|
+
args: [baseRatePerYear, multiplierPerYear, jumpMultiplierPerYear, kink_],
|
|
50
|
+
log: true,
|
|
51
|
+
});
|
|
52
|
+
rateModelAddress = result.address;
|
|
53
|
+
} else {
|
|
54
|
+
const [b, m] = [baseRatePerYear, multiplierPerYear].map(mantissaToBps);
|
|
55
|
+
const rateModelName = `WhitePaperInterestRateModel_base${b}bps_slope${m}bps`;
|
|
56
|
+
console.log(`Deploying interest rate model ${rateModelName}`);
|
|
57
|
+
const result: DeployResult = await deploy(rateModelName, {
|
|
58
|
+
from: deployer,
|
|
59
|
+
contract: "WhitePaperInterestRateModel",
|
|
60
|
+
args: [baseRatePerYear, multiplierPerYear],
|
|
61
|
+
log: true,
|
|
62
|
+
});
|
|
63
|
+
rateModelAddress = result.address;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const underlyingDecimals = Number(await tokenContract.decimals());
|
|
67
|
+
|
|
68
|
+
console.log(`Deploying VBep20 Proxy for ${symbol} with Implementation ${preconfiguredAddresses.VTokenImpl}`);
|
|
69
|
+
|
|
70
|
+
await deploy(`${symbol}_Proxy`, {
|
|
71
|
+
contract: "VBep20Delegator",
|
|
72
|
+
from: deployer,
|
|
73
|
+
args: [
|
|
74
|
+
tokenContract.address,
|
|
75
|
+
comptrollerDeployment.address,
|
|
76
|
+
rateModelAddress,
|
|
77
|
+
parseUnits("1", underlyingDecimals + 18 - VTOKEN_DECIMALS),
|
|
78
|
+
name,
|
|
79
|
+
symbol,
|
|
80
|
+
VTOKEN_DECIMALS,
|
|
81
|
+
preconfiguredAddresses.NormalTimelock,
|
|
82
|
+
preconfiguredAddresses.VTokenImpl,
|
|
83
|
+
EMPTY_BYTES_ARRAY,
|
|
84
|
+
],
|
|
85
|
+
log: true,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
func.tags = ["Markets"];
|
|
91
|
+
|
|
92
|
+
export default func;
|