@bgd-labs/aave-address-book 1.2.1 → 1.4.0
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/.editorconfig +13 -0
- package/.prettierignore +4 -0
- package/.prettierrc +15 -0
- package/CHANGELOG.md +30 -0
- package/README.md +84 -36
- package/dist/AaveAddressBook.d.ts +6 -1
- package/dist/AaveAddressBook.js +8 -2
- package/dist/AaveGovernanceV2.d.ts +4 -0
- package/dist/AaveGovernanceV2.js +7 -0
- package/dist/AaveSafetyModule.d.ts +2 -0
- package/dist/AaveSafetyModule.js +5 -0
- package/dist/AaveV2Avalanche.d.ts +3 -0
- package/dist/AaveV2Avalanche.js +5 -1
- package/dist/AaveV2Ethereum.d.ts +3 -0
- package/dist/AaveV2Ethereum.js +5 -1
- package/dist/AaveV2EthereumAMM.d.ts +3 -0
- package/dist/AaveV2EthereumAMM.js +5 -1
- package/dist/AaveV2EthereumArc.js +1 -0
- package/dist/AaveV2Fuji.d.ts +2 -0
- package/dist/AaveV2Fuji.js +4 -1
- package/dist/AaveV2Goerli.d.ts +12 -0
- package/dist/AaveV2Goerli.js +16 -0
- package/dist/AaveV2Mumbai.d.ts +2 -0
- package/dist/AaveV2Mumbai.js +4 -1
- package/dist/AaveV2Polygon.d.ts +4 -1
- package/dist/AaveV2Polygon.js +6 -2
- package/dist/AaveV3Arbitrum.d.ts +8 -0
- package/dist/AaveV3Arbitrum.js +10 -1
- package/dist/AaveV3ArbitrumGoerli.d.ts +17 -0
- package/dist/AaveV3ArbitrumGoerli.js +21 -0
- package/dist/AaveV3Avalanche.d.ts +8 -0
- package/dist/AaveV3Avalanche.js +10 -1
- package/dist/AaveV3Fantom.d.ts +8 -0
- package/dist/AaveV3Fantom.js +10 -1
- package/dist/AaveV3FantomTestnet.d.ts +7 -0
- package/dist/AaveV3FantomTestnet.js +9 -1
- package/dist/AaveV3Fuji.d.ts +7 -0
- package/dist/AaveV3Fuji.js +9 -1
- package/dist/AaveV3Goerli.d.ts +17 -0
- package/dist/AaveV3Goerli.js +21 -0
- package/dist/AaveV3Harmony.d.ts +6 -0
- package/dist/AaveV3Harmony.js +8 -1
- package/dist/AaveV3Mumbai.d.ts +7 -0
- package/dist/AaveV3Mumbai.js +9 -1
- package/dist/AaveV3Optimism.d.ts +8 -0
- package/dist/AaveV3Optimism.js +10 -1
- package/dist/AaveV3OptimismGoerli.d.ts +17 -0
- package/dist/AaveV3OptimismGoerli.js +21 -0
- package/dist/AaveV3Polygon.d.ts +9 -1
- package/dist/AaveV3Polygon.js +11 -2
- package/package.json +2 -5
- package/src/AaveAddressBook.sol +5 -7
- package/src/AaveGovernanceV2.sol +19 -1
- package/src/AaveMisc.sol +86 -0
- package/src/AaveV2.sol +16 -0
- package/src/AaveV2Avalanche.sol +1 -1
- package/src/AaveV2Ethereum.sol +1 -1
- package/src/AaveV2EthereumAMM.sol +1 -1
- package/src/AaveV2EthereumArc.sol +1 -1
- package/src/AaveV2Fuji.sol +1 -1
- package/src/AaveV2Goerli.sol +35 -0
- package/src/AaveV2Mumbai.sol +1 -1
- package/src/AaveV2Polygon.sol +3 -2
- package/src/AaveV3.sol +70 -8
- package/src/AaveV3Arbitrum.sol +19 -4
- package/src/AaveV3ArbitrumGoerli.sol +49 -0
- package/src/AaveV3Avalanche.sol +19 -4
- package/src/AaveV3Fantom.sol +19 -4
- package/src/AaveV3FantomTestnet.sol +19 -4
- package/src/AaveV3Fuji.sol +19 -4
- package/src/AaveV3Goerli.sol +49 -0
- package/src/AaveV3Harmony.sol +19 -4
- package/src/AaveV3Mumbai.sol +19 -4
- package/src/AaveV3Optimism.sol +19 -4
- package/src/AaveV3OptimismGoerli.sol +49 -0
- package/src/AaveV3Polygon.sol +19 -4
- package/src/test/AaveV2Misfits.t.sol +2 -3
- package/src/test/AaveV3Avalanche.t.sol +10 -3
- package/src/ts/AaveAddressBook.ts +7 -1
- package/src/ts/AaveGovernanceV2.ts +4 -0
- package/src/ts/AaveSafetyModule.ts +2 -0
- package/src/ts/AaveV2Avalanche.ts +6 -0
- package/src/ts/AaveV2Ethereum.ts +6 -0
- package/src/ts/AaveV2EthereumAMM.ts +6 -0
- package/src/ts/AaveV2EthereumArc.ts +1 -0
- package/src/ts/AaveV2Fuji.ts +3 -0
- package/src/ts/AaveV2Goerli.ts +15 -0
- package/src/ts/AaveV2Mumbai.ts +3 -0
- package/src/ts/AaveV2Polygon.ts +8 -1
- package/src/ts/AaveV3Arbitrum.ts +15 -0
- package/src/ts/AaveV3ArbitrumGoerli.ts +25 -0
- package/src/ts/AaveV3Avalanche.ts +15 -0
- package/src/ts/AaveV3Fantom.ts +15 -0
- package/src/ts/AaveV3FantomTestnet.ts +12 -0
- package/src/ts/AaveV3Fuji.ts +12 -0
- package/src/ts/AaveV3Goerli.ts +25 -0
- package/src/ts/AaveV3Harmony.ts +11 -0
- package/src/ts/AaveV3Mumbai.ts +12 -0
- package/src/ts/AaveV3Optimism.ts +15 -0
- package/src/ts/AaveV3OptimismGoerli.ts +25 -0
- package/src/ts/AaveV3Polygon.ts +16 -1
- package/dist/AaveV3OptimismKovan.d.ts +0 -10
- package/dist/AaveV3OptimismKovan.js +0 -13
- package/lib/forge-std/.gitmodules +0 -3
- package/lib/forge-std/LICENSE-APACHE +0 -203
- package/lib/forge-std/LICENSE-MIT +0 -25
- package/lib/forge-std/README.md +0 -246
- package/lib/forge-std/lib/ds-test/LICENSE +0 -674
- package/lib/forge-std/lib/ds-test/Makefile +0 -14
- package/lib/forge-std/lib/ds-test/default.nix +0 -4
- package/lib/forge-std/lib/ds-test/demo/demo.sol +0 -222
- package/lib/forge-std/lib/ds-test/src/test.sol +0 -469
- package/lib/forge-std/src/Script.sol +0 -39
- package/lib/forge-std/src/StdJson.sol +0 -118
- package/lib/forge-std/src/Test.sol +0 -1134
- package/lib/forge-std/src/Vm.sol +0 -231
- package/lib/forge-std/src/console.sol +0 -1533
- package/lib/forge-std/src/console2.sol +0 -1538
- package/lib/forge-std/src/test/Script.t.sol +0 -12
- package/lib/forge-std/src/test/StdAssertions.t.sol +0 -591
- package/lib/forge-std/src/test/StdCheats.t.sol +0 -282
- package/lib/forge-std/src/test/StdError.t.sol +0 -124
- package/lib/forge-std/src/test/StdMath.t.sol +0 -200
- package/lib/forge-std/src/test/StdStorage.t.sol +0 -321
- package/lib/forge-std/src/test/fixtures/broadcast.log.json +0 -187
- package/src/AaveAddressBookV2.sol +0 -143
- package/src/AaveAddressBookV2Testnet.sol +0 -74
- package/src/AaveAddressBookV3.sol +0 -166
- package/src/AaveAddressBookV3Testnet.sol +0 -120
- package/src/AaveV3HarmonyTestnet.sol +0 -34
- package/src/AaveV3OptimismKovan.sol +0 -34
- package/src/Common.sol +0 -9
- package/src/ts/AaveV3OptimismKovan.ts +0 -13
|
@@ -1,321 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity >=0.7.0 <0.9.0;
|
|
3
|
-
|
|
4
|
-
import "../Test.sol";
|
|
5
|
-
|
|
6
|
-
contract StdStorageTest is Test {
|
|
7
|
-
using stdStorage for StdStorage;
|
|
8
|
-
|
|
9
|
-
StorageTest test;
|
|
10
|
-
|
|
11
|
-
function setUp() public {
|
|
12
|
-
test = new StorageTest();
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function testStorageHidden() public {
|
|
16
|
-
assertEq(uint256(keccak256("my.random.var")), stdstore.target(address(test)).sig("hidden()").find());
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function testStorageObvious() public {
|
|
20
|
-
assertEq(uint256(0), stdstore.target(address(test)).sig("exists()").find());
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function testStorageCheckedWriteHidden() public {
|
|
24
|
-
stdstore.target(address(test)).sig(test.hidden.selector).checked_write(100);
|
|
25
|
-
assertEq(uint256(test.hidden()), 100);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function testStorageCheckedWriteObvious() public {
|
|
29
|
-
stdstore.target(address(test)).sig(test.exists.selector).checked_write(100);
|
|
30
|
-
assertEq(test.exists(), 100);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function testStorageMapStructA() public {
|
|
34
|
-
uint256 slot = stdstore
|
|
35
|
-
.target(address(test))
|
|
36
|
-
.sig(test.map_struct.selector)
|
|
37
|
-
.with_key(address(this))
|
|
38
|
-
.depth(0)
|
|
39
|
-
.find();
|
|
40
|
-
assertEq(uint256(keccak256(abi.encode(address(this), 4))), slot);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function testStorageMapStructB() public {
|
|
44
|
-
uint256 slot = stdstore
|
|
45
|
-
.target(address(test))
|
|
46
|
-
.sig(test.map_struct.selector)
|
|
47
|
-
.with_key(address(this))
|
|
48
|
-
.depth(1)
|
|
49
|
-
.find();
|
|
50
|
-
assertEq(uint256(keccak256(abi.encode(address(this), 4))) + 1, slot);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function testStorageDeepMap() public {
|
|
54
|
-
uint256 slot = stdstore
|
|
55
|
-
.target(address(test))
|
|
56
|
-
.sig(test.deep_map.selector)
|
|
57
|
-
.with_key(address(this))
|
|
58
|
-
.with_key(address(this))
|
|
59
|
-
.find();
|
|
60
|
-
assertEq(uint256(keccak256(abi.encode(address(this), keccak256(abi.encode(address(this), uint(5)))))), slot);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
function testStorageCheckedWriteDeepMap() public {
|
|
64
|
-
stdstore
|
|
65
|
-
.target(address(test))
|
|
66
|
-
.sig(test.deep_map.selector)
|
|
67
|
-
.with_key(address(this))
|
|
68
|
-
.with_key(address(this))
|
|
69
|
-
.checked_write(100);
|
|
70
|
-
assertEq(100, test.deep_map(address(this), address(this)));
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
function testStorageDeepMapStructA() public {
|
|
74
|
-
uint256 slot = stdstore
|
|
75
|
-
.target(address(test))
|
|
76
|
-
.sig(test.deep_map_struct.selector)
|
|
77
|
-
.with_key(address(this))
|
|
78
|
-
.with_key(address(this))
|
|
79
|
-
.depth(0)
|
|
80
|
-
.find();
|
|
81
|
-
assertEq(bytes32(uint256(keccak256(abi.encode(address(this), keccak256(abi.encode(address(this), uint(6)))))) + 0), bytes32(slot));
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function testStorageDeepMapStructB() public {
|
|
85
|
-
uint256 slot = stdstore
|
|
86
|
-
.target(address(test))
|
|
87
|
-
.sig(test.deep_map_struct.selector)
|
|
88
|
-
.with_key(address(this))
|
|
89
|
-
.with_key(address(this))
|
|
90
|
-
.depth(1)
|
|
91
|
-
.find();
|
|
92
|
-
assertEq(bytes32(uint256(keccak256(abi.encode(address(this), keccak256(abi.encode(address(this), uint(6)))))) + 1), bytes32(slot));
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
function testStorageCheckedWriteDeepMapStructA() public {
|
|
96
|
-
stdstore
|
|
97
|
-
.target(address(test))
|
|
98
|
-
.sig(test.deep_map_struct.selector)
|
|
99
|
-
.with_key(address(this))
|
|
100
|
-
.with_key(address(this))
|
|
101
|
-
.depth(0)
|
|
102
|
-
.checked_write(100);
|
|
103
|
-
(uint256 a, uint256 b) = test.deep_map_struct(address(this), address(this));
|
|
104
|
-
assertEq(100, a);
|
|
105
|
-
assertEq(0, b);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
function testStorageCheckedWriteDeepMapStructB() public {
|
|
109
|
-
stdstore
|
|
110
|
-
.target(address(test))
|
|
111
|
-
.sig(test.deep_map_struct.selector)
|
|
112
|
-
.with_key(address(this))
|
|
113
|
-
.with_key(address(this))
|
|
114
|
-
.depth(1)
|
|
115
|
-
.checked_write(100);
|
|
116
|
-
(uint256 a, uint256 b) = test.deep_map_struct(address(this), address(this));
|
|
117
|
-
assertEq(0, a);
|
|
118
|
-
assertEq(100, b);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
function testStorageCheckedWriteMapStructA() public {
|
|
122
|
-
stdstore
|
|
123
|
-
.target(address(test))
|
|
124
|
-
.sig(test.map_struct.selector)
|
|
125
|
-
.with_key(address(this))
|
|
126
|
-
.depth(0)
|
|
127
|
-
.checked_write(100);
|
|
128
|
-
(uint256 a, uint256 b) = test.map_struct(address(this));
|
|
129
|
-
assertEq(a, 100);
|
|
130
|
-
assertEq(b, 0);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
function testStorageCheckedWriteMapStructB() public {
|
|
134
|
-
stdstore
|
|
135
|
-
.target(address(test))
|
|
136
|
-
.sig(test.map_struct.selector)
|
|
137
|
-
.with_key(address(this))
|
|
138
|
-
.depth(1)
|
|
139
|
-
.checked_write(100);
|
|
140
|
-
(uint256 a, uint256 b) = test.map_struct(address(this));
|
|
141
|
-
assertEq(a, 0);
|
|
142
|
-
assertEq(b, 100);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
function testStorageStructA() public {
|
|
146
|
-
uint256 slot = stdstore.target(address(test)).sig(test.basic.selector).depth(0).find();
|
|
147
|
-
assertEq(uint256(7), slot);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
function testStorageStructB() public {
|
|
151
|
-
uint256 slot = stdstore.target(address(test)).sig(test.basic.selector).depth(1).find();
|
|
152
|
-
assertEq(uint256(7) + 1, slot);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
function testStorageCheckedWriteStructA() public {
|
|
156
|
-
stdstore.target(address(test)).sig(test.basic.selector).depth(0).checked_write(100);
|
|
157
|
-
(uint256 a, uint256 b) = test.basic();
|
|
158
|
-
assertEq(a, 100);
|
|
159
|
-
assertEq(b, 1337);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
function testStorageCheckedWriteStructB() public {
|
|
163
|
-
stdstore.target(address(test)).sig(test.basic.selector).depth(1).checked_write(100);
|
|
164
|
-
(uint256 a, uint256 b) = test.basic();
|
|
165
|
-
assertEq(a, 1337);
|
|
166
|
-
assertEq(b, 100);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
function testStorageMapAddrFound() public {
|
|
170
|
-
uint256 slot = stdstore.target(address(test)).sig(test.map_addr.selector).with_key(address(this)).find();
|
|
171
|
-
assertEq(uint256(keccak256(abi.encode(address(this), uint(1)))), slot);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
function testStorageMapUintFound() public {
|
|
175
|
-
uint256 slot = stdstore.target(address(test)).sig(test.map_uint.selector).with_key(100).find();
|
|
176
|
-
assertEq(uint256(keccak256(abi.encode(100, uint(2)))), slot);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
function testStorageCheckedWriteMapUint() public {
|
|
180
|
-
stdstore.target(address(test)).sig(test.map_uint.selector).with_key(100).checked_write(100);
|
|
181
|
-
assertEq(100, test.map_uint(100));
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
function testStorageCheckedWriteMapAddr() public {
|
|
185
|
-
stdstore.target(address(test)).sig(test.map_addr.selector).with_key(address(this)).checked_write(100);
|
|
186
|
-
assertEq(100, test.map_addr(address(this)));
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
function testStorageCheckedWriteMapBool() public {
|
|
190
|
-
stdstore.target(address(test)).sig(test.map_bool.selector).with_key(address(this)).checked_write(true);
|
|
191
|
-
assertTrue(test.map_bool(address(this)));
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
function testFailStorageCheckedWriteMapPacked() public {
|
|
195
|
-
// expect PackedSlot error but not external call so cant expectRevert
|
|
196
|
-
stdstore.target(address(test)).sig(test.read_struct_lower.selector).with_key(address(uint160(1337))).checked_write(100);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
function testStorageCheckedWriteMapPackedSuccess() public {
|
|
200
|
-
uint256 full = test.map_packed(address(1337));
|
|
201
|
-
// keep upper 128, set lower 128 to 1337
|
|
202
|
-
full = (full & (uint256((1 << 128) - 1) << 128)) | 1337;
|
|
203
|
-
stdstore.target(address(test)).sig(test.map_packed.selector).with_key(address(uint160(1337))).checked_write(full);
|
|
204
|
-
assertEq(1337, test.read_struct_lower(address(1337)));
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
function testFailStorageConst() public {
|
|
208
|
-
// vm.expectRevert(abi.encodeWithSignature("NotStorage(bytes4)", bytes4(keccak256("const()"))));
|
|
209
|
-
stdstore.target(address(test)).sig("const()").find();
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
function testFailStorageNativePack() public {
|
|
213
|
-
stdstore.target(address(test)).sig(test.tA.selector).find();
|
|
214
|
-
stdstore.target(address(test)).sig(test.tB.selector).find();
|
|
215
|
-
|
|
216
|
-
// these both would fail
|
|
217
|
-
stdstore.target(address(test)).sig(test.tC.selector).find();
|
|
218
|
-
stdstore.target(address(test)).sig(test.tD.selector).find();
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
function testStorageReadBytes32() public {
|
|
222
|
-
bytes32 val = stdstore.target(address(test)).sig(test.tE.selector).read_bytes32();
|
|
223
|
-
assertEq(val, hex"1337");
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
function testStorageReadBool_False() public {
|
|
227
|
-
bool val = stdstore.target(address(test)).sig(test.tB.selector).read_bool();
|
|
228
|
-
assertEq(val, false);
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
function testStorageReadBool_True() public {
|
|
232
|
-
bool val = stdstore.target(address(test)).sig(test.tH.selector).read_bool();
|
|
233
|
-
assertEq(val, true);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
function testStorageReadBool_Revert() public {
|
|
237
|
-
vm.expectRevert("stdStorage read_bool(StdStorage): Cannot decode. Make sure you are reading a bool.");
|
|
238
|
-
this.readNonBoolValue();
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
function readNonBoolValue() public {
|
|
242
|
-
stdstore.target(address(test)).sig(test.tE.selector).read_bool();
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
function testStorageReadAddress() public {
|
|
246
|
-
address val = stdstore.target(address(test)).sig(test.tF.selector).read_address();
|
|
247
|
-
assertEq(val, address(1337));
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
function testStorageReadUint() public {
|
|
251
|
-
uint256 val = stdstore.target(address(test)).sig(test.exists.selector).read_uint();
|
|
252
|
-
assertEq(val, 1);
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
function testStorageReadInt() public {
|
|
256
|
-
int256 val = stdstore.target(address(test)).sig(test.tG.selector).read_int();
|
|
257
|
-
assertEq(val, type(int256).min);
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
contract StorageTest {
|
|
262
|
-
uint256 public exists = 1;
|
|
263
|
-
mapping(address => uint256) public map_addr;
|
|
264
|
-
mapping(uint256 => uint256) public map_uint;
|
|
265
|
-
mapping(address => uint256) public map_packed;
|
|
266
|
-
mapping(address => UnpackedStruct) public map_struct;
|
|
267
|
-
mapping(address => mapping(address => uint256)) public deep_map;
|
|
268
|
-
mapping(address => mapping(address => UnpackedStruct)) public deep_map_struct;
|
|
269
|
-
UnpackedStruct public basic;
|
|
270
|
-
|
|
271
|
-
uint248 public tA;
|
|
272
|
-
bool public tB;
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
bool public tC = false;
|
|
276
|
-
uint248 public tD = 1;
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
struct UnpackedStruct {
|
|
280
|
-
uint256 a;
|
|
281
|
-
uint256 b;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
mapping(address => bool) public map_bool;
|
|
285
|
-
|
|
286
|
-
bytes32 public tE = hex"1337";
|
|
287
|
-
address public tF = address(1337);
|
|
288
|
-
int256 public tG = type(int256).min;
|
|
289
|
-
bool public tH = true;
|
|
290
|
-
|
|
291
|
-
constructor() {
|
|
292
|
-
basic = UnpackedStruct({
|
|
293
|
-
a: 1337,
|
|
294
|
-
b: 1337
|
|
295
|
-
});
|
|
296
|
-
|
|
297
|
-
uint256 two = (1<<128) | 1;
|
|
298
|
-
map_packed[msg.sender] = two;
|
|
299
|
-
map_packed[address(bytes20(uint160(1337)))] = 1<<128;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
function read_struct_upper(address who) public view returns (uint256) {
|
|
303
|
-
return map_packed[who] >> 128;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
function read_struct_lower(address who) public view returns (uint256) {
|
|
307
|
-
return map_packed[who] & ((1 << 128) - 1);
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
function hidden() public view returns (bytes32 t) {
|
|
311
|
-
bytes32 slot = keccak256("my.random.var");
|
|
312
|
-
/// @solidity memory-safe-assembly
|
|
313
|
-
assembly {
|
|
314
|
-
t := sload(slot)
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
function const() public pure returns (bytes32 t) {
|
|
319
|
-
t = bytes32(hex"1337");
|
|
320
|
-
}
|
|
321
|
-
}
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"transactions": [
|
|
3
|
-
{
|
|
4
|
-
"hash": "0xc6006863c267735a11476b7f15b15bc718e117e2da114a2be815dd651e1a509f",
|
|
5
|
-
"type": "CALL",
|
|
6
|
-
"contractName": "Test",
|
|
7
|
-
"contractAddress": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
|
|
8
|
-
"function": "multiple_arguments(uint256,address,uint256[]):(uint256)",
|
|
9
|
-
"arguments": ["1", "0000000000000000000000000000000000001337", "[3,4]"],
|
|
10
|
-
"tx": {
|
|
11
|
-
"type": "0x02",
|
|
12
|
-
"from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
|
|
13
|
-
"to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
|
|
14
|
-
"gas": "0x73b9",
|
|
15
|
-
"value": "0x0",
|
|
16
|
-
"data": "0x23e99187000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000013370000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000004",
|
|
17
|
-
"nonce": "0x3",
|
|
18
|
-
"accessList": []
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"hash": "0xedf2b38d8d896519a947a1acf720f859bb35c0c5ecb8dd7511995b67b9853298",
|
|
23
|
-
"type": "CALL",
|
|
24
|
-
"contractName": "Test",
|
|
25
|
-
"contractAddress": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
|
|
26
|
-
"function": "inc():(uint256)",
|
|
27
|
-
"arguments": [],
|
|
28
|
-
"tx": {
|
|
29
|
-
"type": "0x02",
|
|
30
|
-
"from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
|
|
31
|
-
"to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
|
|
32
|
-
"gas": "0xdcb2",
|
|
33
|
-
"value": "0x0",
|
|
34
|
-
"data": "0x371303c0",
|
|
35
|
-
"nonce": "0x4",
|
|
36
|
-
"accessList": []
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"hash": "0xa57e8e3981a6c861442e46c9471bd19cb3e21f9a8a6c63a72e7b5c47c6675a7c",
|
|
41
|
-
"type": "CALL",
|
|
42
|
-
"contractName": "Test",
|
|
43
|
-
"contractAddress": "0x7c6b4bbe207d642d98d5c537142d85209e585087",
|
|
44
|
-
"function": "t(uint256):(uint256)",
|
|
45
|
-
"arguments": ["1"],
|
|
46
|
-
"tx": {
|
|
47
|
-
"type": "0x02",
|
|
48
|
-
"from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
|
|
49
|
-
"to": "0x7c6b4bbe207d642d98d5c537142d85209e585087",
|
|
50
|
-
"gas": "0x8599",
|
|
51
|
-
"value": "0x0",
|
|
52
|
-
"data": "0xafe29f710000000000000000000000000000000000000000000000000000000000000001",
|
|
53
|
-
"nonce": "0x5",
|
|
54
|
-
"accessList": []
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
],
|
|
58
|
-
"receipts": [
|
|
59
|
-
{
|
|
60
|
-
"transactionHash": "0x481dc86e40bba90403c76f8e144aa9ff04c1da2164299d0298573835f0991181",
|
|
61
|
-
"transactionIndex": "0x0",
|
|
62
|
-
"blockHash": "0xef0730448490304e5403be0fa8f8ce64f118e9adcca60c07a2ae1ab921d748af",
|
|
63
|
-
"blockNumber": "0x1",
|
|
64
|
-
"from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
|
|
65
|
-
"to": null,
|
|
66
|
-
"cumulativeGasUsed": "0x13f3a",
|
|
67
|
-
"gasUsed": "0x13f3a",
|
|
68
|
-
"contractAddress": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
|
|
69
|
-
"logs": [],
|
|
70
|
-
"status": "0x1",
|
|
71
|
-
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
|
72
|
-
"effectiveGasPrice": "0xee6b2800"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
"transactionHash": "0x6a187183545b8a9e7f1790e847139379bf5622baff2cb43acf3f5c79470af782",
|
|
76
|
-
"transactionIndex": "0x0",
|
|
77
|
-
"blockHash": "0xf3acb96a90071640c2a8c067ae4e16aad87e634ea8d8bbbb5b352fba86ba0148",
|
|
78
|
-
"blockNumber": "0x2",
|
|
79
|
-
"from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
|
|
80
|
-
"to": null,
|
|
81
|
-
"cumulativeGasUsed": "0x45d80",
|
|
82
|
-
"gasUsed": "0x45d80",
|
|
83
|
-
"contractAddress": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
|
|
84
|
-
"logs": [],
|
|
85
|
-
"status": "0x1",
|
|
86
|
-
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
|
87
|
-
"effectiveGasPrice": "0xee6b2800"
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
"transactionHash": "0x064ad173b4867bdef2fb60060bbdaf01735fbf10414541ea857772974e74ea9d",
|
|
91
|
-
"transactionIndex": "0x0",
|
|
92
|
-
"blockHash": "0x8373d02109d3ee06a0225f23da4c161c656ccc48fe0fcee931d325508ae73e58",
|
|
93
|
-
"blockNumber": "0x3",
|
|
94
|
-
"from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
|
|
95
|
-
"to": "0x4e59b44847b379578588920ca78fbf26c0b4956c",
|
|
96
|
-
"cumulativeGasUsed": "0x45feb",
|
|
97
|
-
"gasUsed": "0x45feb",
|
|
98
|
-
"contractAddress": null,
|
|
99
|
-
"logs": [],
|
|
100
|
-
"status": "0x1",
|
|
101
|
-
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
|
102
|
-
"effectiveGasPrice": "0xee6b2800"
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"transactionHash": "0xc6006863c267735a11476b7f15b15bc718e117e2da114a2be815dd651e1a509f",
|
|
106
|
-
"transactionIndex": "0x0",
|
|
107
|
-
"blockHash": "0x16712fae5c0e18f75045f84363fb6b4d9a9fe25e660c4ce286833a533c97f629",
|
|
108
|
-
"blockNumber": "0x4",
|
|
109
|
-
"from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
|
|
110
|
-
"to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
|
|
111
|
-
"cumulativeGasUsed": "0x5905",
|
|
112
|
-
"gasUsed": "0x5905",
|
|
113
|
-
"contractAddress": null,
|
|
114
|
-
"logs": [],
|
|
115
|
-
"status": "0x1",
|
|
116
|
-
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
|
117
|
-
"effectiveGasPrice": "0xee6b2800"
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
"transactionHash": "0xedf2b38d8d896519a947a1acf720f859bb35c0c5ecb8dd7511995b67b9853298",
|
|
121
|
-
"transactionIndex": "0x0",
|
|
122
|
-
"blockHash": "0x156b88c3eb9a1244ba00a1834f3f70de735b39e3e59006dd03af4fe7d5480c11",
|
|
123
|
-
"blockNumber": "0x5",
|
|
124
|
-
"from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
|
|
125
|
-
"to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
|
|
126
|
-
"cumulativeGasUsed": "0xa9c4",
|
|
127
|
-
"gasUsed": "0xa9c4",
|
|
128
|
-
"contractAddress": null,
|
|
129
|
-
"logs": [],
|
|
130
|
-
"status": "0x1",
|
|
131
|
-
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
|
132
|
-
"effectiveGasPrice": "0xee6b2800"
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
"transactionHash": "0xa57e8e3981a6c861442e46c9471bd19cb3e21f9a8a6c63a72e7b5c47c6675a7c",
|
|
136
|
-
"transactionIndex": "0x0",
|
|
137
|
-
"blockHash": "0xcf61faca67dbb2c28952b0b8a379e53b1505ae0821e84779679390cb8571cadb",
|
|
138
|
-
"blockNumber": "0x6",
|
|
139
|
-
"from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
|
|
140
|
-
"to": "0x7c6b4bbe207d642d98d5c537142d85209e585087",
|
|
141
|
-
"cumulativeGasUsed": "0x66c5",
|
|
142
|
-
"gasUsed": "0x66c5",
|
|
143
|
-
"contractAddress": null,
|
|
144
|
-
"logs": [
|
|
145
|
-
{
|
|
146
|
-
"address": "0x7c6b4bbe207d642d98d5c537142d85209e585087",
|
|
147
|
-
"topics": [
|
|
148
|
-
"0x0b2e13ff20ac7b474198655583edf70dedd2c1dc980e329c4fbb2fc0748b796b"
|
|
149
|
-
],
|
|
150
|
-
"data": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000046865726500000000000000000000000000000000000000000000000000000000",
|
|
151
|
-
"blockHash": "0xcf61faca67dbb2c28952b0b8a379e53b1505ae0821e84779679390cb8571cadb",
|
|
152
|
-
"blockNumber": "0x6",
|
|
153
|
-
"transactionHash": "0xa57e8e3981a6c861442e46c9471bd19cb3e21f9a8a6c63a72e7b5c47c6675a7c",
|
|
154
|
-
"transactionIndex": "0x1",
|
|
155
|
-
"logIndex": "0x0",
|
|
156
|
-
"transactionLogIndex": "0x0",
|
|
157
|
-
"removed": false
|
|
158
|
-
}
|
|
159
|
-
],
|
|
160
|
-
"status": "0x1",
|
|
161
|
-
"logsBloom": "0x00000000000800000000000000000010000000000000000000000000000180000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100",
|
|
162
|
-
"effectiveGasPrice": "0xee6b2800"
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
"transactionHash": "0x11fbb10230c168ca1e36a7e5c69a6dbcd04fd9e64ede39d10a83e36ee8065c16",
|
|
166
|
-
"transactionIndex": "0x0",
|
|
167
|
-
"blockHash": "0xf1e0ed2eda4e923626ec74621006ed50b3fc27580dc7b4cf68a07ca77420e29c",
|
|
168
|
-
"blockNumber": "0x7",
|
|
169
|
-
"from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
|
|
170
|
-
"to": "0x0000000000000000000000000000000000001337",
|
|
171
|
-
"cumulativeGasUsed": "0x5208",
|
|
172
|
-
"gasUsed": "0x5208",
|
|
173
|
-
"contractAddress": null,
|
|
174
|
-
"logs": [],
|
|
175
|
-
"status": "0x1",
|
|
176
|
-
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
|
177
|
-
"effectiveGasPrice": "0xee6b2800"
|
|
178
|
-
}
|
|
179
|
-
],
|
|
180
|
-
"libraries": [
|
|
181
|
-
"src/Broadcast.t.sol:F:0x5fbdb2315678afecb367f032d93f642f64180aa3"
|
|
182
|
-
],
|
|
183
|
-
"pending": [],
|
|
184
|
-
"path": "broadcast/Broadcast.t.sol/31337/run-latest.json",
|
|
185
|
-
"returns": {},
|
|
186
|
-
"timestamp": 1655140035
|
|
187
|
-
}
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity >=0.6.0;
|
|
3
|
-
|
|
4
|
-
import {ILendingPoolAddressesProvider, ILendingPool, ILendingPoolConfigurator, IAaveOracle, IAaveProtocolDataProvider} from "./AaveV2.sol";
|
|
5
|
-
import {Token} from "./Common.sol";
|
|
6
|
-
|
|
7
|
-
library AaveAddressBookV2 {
|
|
8
|
-
string public constant AaveV2Ethereum = "AaveV2Ethereum";
|
|
9
|
-
string public constant AaveV2EthereumAMM = "AaveV2EthereumAMM";
|
|
10
|
-
string public constant AaveV2EthereumArc = "AaveV2EthereumArc";
|
|
11
|
-
string public constant AaveV2Polygon = "AaveV2Polygon";
|
|
12
|
-
string public constant AaveV2Avalanche = "AaveV2Avalanche";
|
|
13
|
-
|
|
14
|
-
struct Market {
|
|
15
|
-
ILendingPoolAddressesProvider POOL_ADDRESSES_PROVIDER;
|
|
16
|
-
ILendingPool POOL;
|
|
17
|
-
ILendingPoolConfigurator POOL_CONFIGURATOR;
|
|
18
|
-
IAaveOracle ORACLE;
|
|
19
|
-
IAaveProtocolDataProvider AAVE_PROTOCOL_DATA_PROVIDER;
|
|
20
|
-
address POOL_ADMIN;
|
|
21
|
-
address EMERGENCY_ADMIN;
|
|
22
|
-
address COLLECTOR;
|
|
23
|
-
address COLLECTOR_CONTROLLER;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function getMarket(string calldata market)
|
|
27
|
-
public
|
|
28
|
-
pure
|
|
29
|
-
returns (Market memory m)
|
|
30
|
-
{
|
|
31
|
-
if (
|
|
32
|
-
keccak256(abi.encodePacked(market)) ==
|
|
33
|
-
keccak256(abi.encodePacked(AaveV2Ethereum))
|
|
34
|
-
) {
|
|
35
|
-
return
|
|
36
|
-
Market(
|
|
37
|
-
ILendingPoolAddressesProvider(
|
|
38
|
-
0xB53C1a33016B2DC2fF3653530bfF1848a515c8c5
|
|
39
|
-
),
|
|
40
|
-
ILendingPool(0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9),
|
|
41
|
-
ILendingPoolConfigurator(
|
|
42
|
-
0x311Bb771e4F8952E6Da169b425E7e92d6Ac45756
|
|
43
|
-
),
|
|
44
|
-
IAaveOracle(0xA50ba011c48153De246E5192C8f9258A2ba79Ca9),
|
|
45
|
-
IAaveProtocolDataProvider(
|
|
46
|
-
0x057835Ad21a177dbdd3090bB1CAE03EaCF78Fc6d
|
|
47
|
-
),
|
|
48
|
-
0xEE56e2B3D491590B5b31738cC34d5232F378a8D5,
|
|
49
|
-
0xCA76Ebd8617a03126B6FB84F9b1c1A0fB71C2633,
|
|
50
|
-
0x464C71f6c2F760DdA6093dCB91C24c39e5d6e18c,
|
|
51
|
-
0x3d569673dAa0575c936c7c67c4E6AedA69CC630C
|
|
52
|
-
);
|
|
53
|
-
} else if (
|
|
54
|
-
keccak256(abi.encodePacked(market)) ==
|
|
55
|
-
keccak256(abi.encodePacked(AaveV2EthereumAMM))
|
|
56
|
-
) {
|
|
57
|
-
return
|
|
58
|
-
Market(
|
|
59
|
-
ILendingPoolAddressesProvider(
|
|
60
|
-
0xAcc030EF66f9dFEAE9CbB0cd1B25654b82cFA8d5
|
|
61
|
-
),
|
|
62
|
-
ILendingPool(0x7937D4799803FbBe595ed57278Bc4cA21f3bFfCB),
|
|
63
|
-
ILendingPoolConfigurator(
|
|
64
|
-
0x23A875eDe3F1030138701683e42E9b16A7F87768
|
|
65
|
-
),
|
|
66
|
-
IAaveOracle(0xA50ba011c48153De246E5192C8f9258A2ba79Ca9),
|
|
67
|
-
IAaveProtocolDataProvider(
|
|
68
|
-
0x0000000000000000000000000000000000000000
|
|
69
|
-
),
|
|
70
|
-
0xEE56e2B3D491590B5b31738cC34d5232F378a8D5,
|
|
71
|
-
0xB9062896ec3A615a4e4444DF183F0531a77218AE,
|
|
72
|
-
0x464C71f6c2F760DdA6093dCB91C24c39e5d6e18c,
|
|
73
|
-
0x3d569673dAa0575c936c7c67c4E6AedA69CC630C
|
|
74
|
-
);
|
|
75
|
-
} else if (
|
|
76
|
-
keccak256(abi.encodePacked(market)) ==
|
|
77
|
-
keccak256(abi.encodePacked(AaveV2EthereumArc))
|
|
78
|
-
) {
|
|
79
|
-
return
|
|
80
|
-
Market(
|
|
81
|
-
ILendingPoolAddressesProvider(
|
|
82
|
-
0x6FdfafB66d39cD72CFE7984D3Bbcc76632faAb00
|
|
83
|
-
),
|
|
84
|
-
ILendingPool(0x37D7306019a38Af123e4b245Eb6C28AF552e0bB0),
|
|
85
|
-
ILendingPoolConfigurator(
|
|
86
|
-
0x4e1c7865e7BE78A7748724Fa0409e88dc14E67aA
|
|
87
|
-
),
|
|
88
|
-
IAaveOracle(0xB8a7bc0d13B1f5460513040a97F404b4fea7D2f3),
|
|
89
|
-
IAaveProtocolDataProvider(
|
|
90
|
-
0x71B53fC437cCD988b1b89B1D4605c3c3d0C810ea
|
|
91
|
-
),
|
|
92
|
-
0xAce1d11d836cb3F51Ef658FD4D353fFb3c301218,
|
|
93
|
-
0x33B09130b035d6D7e57d76fEa0873d9545FA7557,
|
|
94
|
-
0x464C71f6c2F760DdA6093dCB91C24c39e5d6e18c,
|
|
95
|
-
0x3d569673dAa0575c936c7c67c4E6AedA69CC630C
|
|
96
|
-
);
|
|
97
|
-
} else if (
|
|
98
|
-
keccak256(abi.encodePacked(market)) ==
|
|
99
|
-
keccak256(abi.encodePacked(AaveV2Polygon))
|
|
100
|
-
) {
|
|
101
|
-
return
|
|
102
|
-
Market(
|
|
103
|
-
ILendingPoolAddressesProvider(
|
|
104
|
-
0xd05e3E715d945B59290df0ae8eF85c1BdB684744
|
|
105
|
-
),
|
|
106
|
-
ILendingPool(0x8dFf5E27EA6b7AC08EbFdf9eB090F32ee9a30fcf),
|
|
107
|
-
ILendingPoolConfigurator(
|
|
108
|
-
0x26db2B833021583566323E3b8985999981b9F1F3
|
|
109
|
-
),
|
|
110
|
-
IAaveOracle(0x0229F777B0fAb107F9591a41d5F02E4e98dB6f2d),
|
|
111
|
-
IAaveProtocolDataProvider(
|
|
112
|
-
0x7551b5D2763519d4e37e8B81929D336De671d46d
|
|
113
|
-
),
|
|
114
|
-
0xdc9A35B16DB4e126cFeDC41322b3a36454B1F772,
|
|
115
|
-
0x1450F2898D6bA2710C98BE9CAF3041330eD5ae58,
|
|
116
|
-
0x7734280A4337F37Fbf4651073Db7c28C80B339e9,
|
|
117
|
-
address(0)
|
|
118
|
-
);
|
|
119
|
-
} else if (
|
|
120
|
-
keccak256(abi.encodePacked(market)) ==
|
|
121
|
-
keccak256(abi.encodePacked(AaveV2Avalanche))
|
|
122
|
-
) {
|
|
123
|
-
return
|
|
124
|
-
Market(
|
|
125
|
-
ILendingPoolAddressesProvider(
|
|
126
|
-
0xb6A86025F0FE1862B372cb0ca18CE3EDe02A318f
|
|
127
|
-
),
|
|
128
|
-
ILendingPool(0x4F01AeD16D97E3aB5ab2B501154DC9bb0F1A5A2C),
|
|
129
|
-
ILendingPoolConfigurator(
|
|
130
|
-
0x230B618aD4C475393A7239aE03630042281BD86e
|
|
131
|
-
),
|
|
132
|
-
IAaveOracle(0xdC336Cd4769f4cC7E9d726DA53e6d3fC710cEB89),
|
|
133
|
-
IAaveProtocolDataProvider(
|
|
134
|
-
0x65285E9dfab318f57051ab2b139ccCf232945451
|
|
135
|
-
),
|
|
136
|
-
0x01244E7842254e3FD229CD263472076B1439D1Cd,
|
|
137
|
-
0x01244E7842254e3FD229CD263472076B1439D1Cd,
|
|
138
|
-
0x467b92aF281d14cB6809913AD016a607b5ba8A36,
|
|
139
|
-
address(0)
|
|
140
|
-
);
|
|
141
|
-
} else revert("Market does not exist");
|
|
142
|
-
}
|
|
143
|
-
}
|