@bgd-labs/aave-address-book 1.1.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/.gitmodules +4 -0
- package/CHANGELOG.md +56 -0
- package/LICENSE +7 -0
- package/README.md +94 -0
- package/addressbook_logo.png +0 -0
- package/dist/AaveAddressBook.d.ts +17 -0
- package/dist/AaveAddressBook.js +20 -0
- package/dist/AaveV2Avalanche.d.ts +9 -0
- package/dist/AaveV2Avalanche.js +12 -0
- package/dist/AaveV2Ethereum.d.ts +9 -0
- package/dist/AaveV2Ethereum.js +12 -0
- package/dist/AaveV2EthereumAMM.d.ts +9 -0
- package/dist/AaveV2EthereumAMM.js +12 -0
- package/dist/AaveV2EthereumArc.d.ts +9 -0
- package/dist/AaveV2EthereumArc.js +12 -0
- package/dist/AaveV2Fuji.d.ts +9 -0
- package/dist/AaveV2Fuji.js +12 -0
- package/dist/AaveV2Mumbai.d.ts +9 -0
- package/dist/AaveV2Mumbai.js +12 -0
- package/dist/AaveV2Polygon.d.ts +9 -0
- package/dist/AaveV2Polygon.js +12 -0
- package/dist/AaveV3Arbitrum.d.ts +9 -0
- package/dist/AaveV3Arbitrum.js +12 -0
- package/dist/AaveV3Avalanche.d.ts +9 -0
- package/dist/AaveV3Avalanche.js +12 -0
- package/dist/AaveV3Fantom.d.ts +9 -0
- package/dist/AaveV3Fantom.js +12 -0
- package/dist/AaveV3FantomTestnet.d.ts +9 -0
- package/dist/AaveV3FantomTestnet.js +12 -0
- package/dist/AaveV3Fuji.d.ts +9 -0
- package/dist/AaveV3Fuji.js +12 -0
- package/dist/AaveV3Harmony.d.ts +9 -0
- package/dist/AaveV3Harmony.js +12 -0
- package/dist/AaveV3Mumbai.d.ts +9 -0
- package/dist/AaveV3Mumbai.js +12 -0
- package/dist/AaveV3Optimism.d.ts +9 -0
- package/dist/AaveV3Optimism.js +12 -0
- package/dist/AaveV3OptimismKovan.d.ts +9 -0
- package/dist/AaveV3OptimismKovan.js +12 -0
- package/dist/AaveV3Polygon.d.ts +9 -0
- package/dist/AaveV3Polygon.js +12 -0
- package/foundry.toml +8 -0
- package/lib/forge-std/.github/workflows/tests.yml +27 -0
- package/lib/forge-std/.gitmodules +3 -0
- package/lib/forge-std/LICENSE-APACHE +203 -0
- package/lib/forge-std/LICENSE-MIT +25 -0
- package/lib/forge-std/README.md +246 -0
- package/lib/forge-std/lib/ds-test/LICENSE +674 -0
- package/lib/forge-std/lib/ds-test/Makefile +14 -0
- package/lib/forge-std/lib/ds-test/default.nix +4 -0
- package/lib/forge-std/lib/ds-test/demo/demo.sol +222 -0
- package/lib/forge-std/lib/ds-test/src/test.sol +469 -0
- package/lib/forge-std/src/Script.sol +39 -0
- package/lib/forge-std/src/StdJson.sol +118 -0
- package/lib/forge-std/src/Test.sol +1134 -0
- package/lib/forge-std/src/Vm.sol +231 -0
- package/lib/forge-std/src/console.sol +1533 -0
- package/lib/forge-std/src/console2.sol +1538 -0
- package/lib/forge-std/src/test/Script.t.sol +12 -0
- package/lib/forge-std/src/test/StdAssertions.t.sol +591 -0
- package/lib/forge-std/src/test/StdCheats.t.sol +282 -0
- package/lib/forge-std/src/test/StdError.t.sol +124 -0
- package/lib/forge-std/src/test/StdMath.t.sol +200 -0
- package/lib/forge-std/src/test/StdStorage.t.sol +321 -0
- package/lib/forge-std/src/test/fixtures/broadcast.log.json +187 -0
- package/package.json +39 -0
- package/src/AaveAddressBook.sol +28 -0
- package/src/AaveAddressBookV2.sol +143 -0
- package/src/AaveAddressBookV2Testnet.sol +74 -0
- package/src/AaveAddressBookV3.sol +166 -0
- package/src/AaveAddressBookV3Testnet.sol +120 -0
- package/src/AaveGovernanceV2.sol +549 -0
- package/src/AaveV2.sol +931 -0
- package/src/AaveV2Avalanche.sol +35 -0
- package/src/AaveV2Ethereum.sol +36 -0
- package/src/AaveV2EthereumAMM.sol +36 -0
- package/src/AaveV2EthereumArc.sol +36 -0
- package/src/AaveV2Fuji.sol +35 -0
- package/src/AaveV2Mumbai.sol +35 -0
- package/src/AaveV2Polygon.sol +35 -0
- package/src/AaveV3.sol +2406 -0
- package/src/AaveV3Arbitrum.sol +34 -0
- package/src/AaveV3Avalanche.sol +34 -0
- package/src/AaveV3Fantom.sol +34 -0
- package/src/AaveV3FantomTestnet.sol +34 -0
- package/src/AaveV3Fuji.sol +34 -0
- package/src/AaveV3Harmony.sol +34 -0
- package/src/AaveV3HarmonyTestnet.sol +34 -0
- package/src/AaveV3Mumbai.sol +34 -0
- package/src/AaveV3Optimism.sol +34 -0
- package/src/AaveV3OptimismKovan.sol +34 -0
- package/src/AaveV3Polygon.sol +34 -0
- package/src/Common.sol +9 -0
- package/src/test/AaveV2Ethereum.t.sol +72 -0
- package/src/test/AaveV2Misfits.t.sol +33 -0
- package/src/test/AaveV3Avalanche.t.sol +65 -0
- package/src/ts/AaveAddressBook.ts +17 -0
- package/src/ts/AaveV2Avalanche.ts +11 -0
- package/src/ts/AaveV2Ethereum.ts +12 -0
- package/src/ts/AaveV2EthereumAMM.ts +12 -0
- package/src/ts/AaveV2EthereumArc.ts +12 -0
- package/src/ts/AaveV2Fuji.ts +11 -0
- package/src/ts/AaveV2Mumbai.ts +11 -0
- package/src/ts/AaveV2Polygon.ts +11 -0
- package/src/ts/AaveV3Arbitrum.ts +12 -0
- package/src/ts/AaveV3Avalanche.ts +12 -0
- package/src/ts/AaveV3Fantom.ts +12 -0
- package/src/ts/AaveV3FantomTestnet.ts +12 -0
- package/src/ts/AaveV3Fuji.ts +12 -0
- package/src/ts/AaveV3Harmony.ts +12 -0
- package/src/ts/AaveV3Mumbai.ts +12 -0
- package/src/ts/AaveV3Optimism.ts +12 -0
- package/src/ts/AaveV3OptimismKovan.ts +12 -0
- package/src/ts/AaveV3Polygon.ts +12 -0
- package/tsconfig.json +101 -0
|
@@ -0,0 +1,321 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,187 @@
|
|
|
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
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@bgd-labs/aave-address-book",
|
|
3
|
+
"version": "1.1.1",
|
|
4
|
+
"description": "This repository contains an up-to-date registry of all addresses of the Aave ecosystem's smart contracts, for its usage in Solidity codebases.",
|
|
5
|
+
"directories": {
|
|
6
|
+
"lib": "lib"
|
|
7
|
+
},
|
|
8
|
+
"main": "./dist/AaveAddressBook.js",
|
|
9
|
+
"types": "./dist/AaveAddressBook.d.ts",
|
|
10
|
+
"sideEffects": false,
|
|
11
|
+
"scripts": {
|
|
12
|
+
"prettier": "prettier --write 'src/**/*.sol'",
|
|
13
|
+
"generate": "ts-node scripts/generator.ts",
|
|
14
|
+
"build:typechain": "typechain --target ethers-v5 --out-dir dist './out/*/*.json'",
|
|
15
|
+
"build:js": "tsc --project tsconfig.json --outDir dist",
|
|
16
|
+
"publish": "npm publish --access=public"
|
|
17
|
+
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/bgd-labs/aave-address-book.git"
|
|
21
|
+
},
|
|
22
|
+
"author": "",
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"bugs": {
|
|
25
|
+
"url": "https://github.com/bgd-labs/aave-address-book/issues"
|
|
26
|
+
},
|
|
27
|
+
"homepage": "https://github.com/bgd-labs/aave-address-book#readme",
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@typechain/ethers-v5": "^10.1.0",
|
|
30
|
+
"@types/node": "^17.0.41",
|
|
31
|
+
"@types/prettier": "^2.6.3",
|
|
32
|
+
"ethers": "^5.6.5",
|
|
33
|
+
"prettier": "^2.6.2",
|
|
34
|
+
"prettier-plugin-solidity": "^1.0.0-beta.19",
|
|
35
|
+
"ts-node": "^10.8.0",
|
|
36
|
+
"typechain": "^8.1.0",
|
|
37
|
+
"typescript": "^4.7.3"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity >=0.6.0;
|
|
3
|
+
|
|
4
|
+
import {AaveV2Ethereum} from "./AaveV2Ethereum.sol";
|
|
5
|
+
import {AaveV2EthereumAMM} from "./AaveV2EthereumAMM.sol";
|
|
6
|
+
import {AaveV2EthereumArc} from "./AaveV2EthereumArc.sol";
|
|
7
|
+
import {AaveV2Mumbai} from "./AaveV2Mumbai.sol";
|
|
8
|
+
import {AaveV3Mumbai} from "./AaveV3Mumbai.sol";
|
|
9
|
+
import {AaveV2Polygon} from "./AaveV2Polygon.sol";
|
|
10
|
+
import {AaveV3Polygon} from "./AaveV3Polygon.sol";
|
|
11
|
+
import {AaveV2Fuji} from "./AaveV2Fuji.sol";
|
|
12
|
+
import {AaveV3Fuji} from "./AaveV3Fuji.sol";
|
|
13
|
+
import {AaveV2Avalanche} from "./AaveV2Avalanche.sol";
|
|
14
|
+
import {AaveV3Avalanche} from "./AaveV3Avalanche.sol";
|
|
15
|
+
import {AaveV3Arbitrum} from "./AaveV3Arbitrum.sol";
|
|
16
|
+
import {AaveV3FantomTestnet} from "./AaveV3FantomTestnet.sol";
|
|
17
|
+
import {AaveV3Fantom} from "./AaveV3Fantom.sol";
|
|
18
|
+
import {AaveV3Harmony} from "./AaveV3Harmony.sol";
|
|
19
|
+
import {AaveV3OptimismKovan} from "./AaveV3OptimismKovan.sol";
|
|
20
|
+
import {AaveV3Optimism} from "./AaveV3Optimism.sol";
|
|
21
|
+
|
|
22
|
+
import {AaveAddressBookV2Testnet} from "./AaveAddressBookV2Testnet.sol";
|
|
23
|
+
import {AaveAddressBookV2} from "./AaveAddressBookV2.sol";
|
|
24
|
+
import {AaveAddressBookV3Testnet} from "./AaveAddressBookV3Testnet.sol";
|
|
25
|
+
import {AaveAddressBookV3} from "./AaveAddressBookV3.sol";
|
|
26
|
+
|
|
27
|
+
import {Token} from "./Common.sol";
|
|
28
|
+
import {AaveGovernanceV2, IGovernanceStrategy} from "./AaveGovernanceV2.sol";
|