@raac/rpc 2.0.0-beta.1 → 2.0.0-beta.2
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/dist/configs/chains/1.json +3 -0
- package/dist/configs/chains/11155111.json +4 -0
- package/dist/configs/chains/17000.json +4 -0
- package/dist/configs/chains/18453.json +4 -0
- package/dist/configs/chains/8453.json +4 -0
- package/dist/contracts/findContract.js +9 -8
- package/dist/contracts/resolveName.js +1 -1
- package/dist/types/configs/chains/index.d.ts +6 -0
- package/dist/types/configs/index.d.ts +3 -0
- package/dist/types/contracts/findContract.d.ts +3 -1
- package/dist/types/utils/contracts.d.ts +6 -0
- package/package.json +1 -1
|
@@ -224,12 +224,14 @@
|
|
|
224
224
|
"raacnftadapter": {
|
|
225
225
|
"id": "raacnftadapter",
|
|
226
226
|
"name": "RAAC NFT Adapter",
|
|
227
|
+
"label": "Lending Pool",
|
|
227
228
|
"contract": "0xd8Cb90b0A5b288F5f0c9a519Ae4B1B47D5E69353",
|
|
228
229
|
"type": "ERC721"
|
|
229
230
|
},
|
|
230
231
|
"rwaindextokenadapter": {
|
|
231
232
|
"id": "rwaindextokenadapter",
|
|
232
233
|
"name": "RWA Index Token",
|
|
234
|
+
"label": "Lending Pool",
|
|
233
235
|
"contract": "0x216433c8408A349B4b7342d60F948d89317E3366",
|
|
234
236
|
"type": "ERC20"
|
|
235
237
|
}
|
|
@@ -238,6 +240,7 @@
|
|
|
238
240
|
"raacnftadapter": {
|
|
239
241
|
"id": "raacnftadapter",
|
|
240
242
|
"name": "RAAC NFT Adapter",
|
|
243
|
+
"label": "RWA Vault",
|
|
241
244
|
"contract": "0xB1b35C62B99a450c474e9dAd75fA121d3Daa1d34",
|
|
242
245
|
"type": "ERC721"
|
|
243
246
|
}
|
|
@@ -276,12 +276,14 @@
|
|
|
276
276
|
"raacnftadapter": {
|
|
277
277
|
"id": "raacnftadapter",
|
|
278
278
|
"name": "RAAC NFT Adapter",
|
|
279
|
+
"label": "Lending Pool",
|
|
279
280
|
"contract": "0x0000000000000000000000000000000000000000",
|
|
280
281
|
"type": "ERC721"
|
|
281
282
|
},
|
|
282
283
|
"rwaindextokenadapter": {
|
|
283
284
|
"id": "rwaindextokenadapter",
|
|
284
285
|
"name": "RWA Index Token",
|
|
286
|
+
"label": "Lending Pool",
|
|
285
287
|
"contract": "0xeBab0C5152C406F74E76cB01f4eA9b57BdFad184",
|
|
286
288
|
"type": "ERC20"
|
|
287
289
|
}
|
|
@@ -290,12 +292,14 @@
|
|
|
290
292
|
"raacnftadapter": {
|
|
291
293
|
"id": "raacnftadapter",
|
|
292
294
|
"name": "RAAC NFT Adapter",
|
|
295
|
+
"label": "RWA Vault",
|
|
293
296
|
"contract": "0xd545a0a87571122f07F2B2367b5257DC8aa34640",
|
|
294
297
|
"type": "ERC721"
|
|
295
298
|
},
|
|
296
299
|
"crvusdadapter": {
|
|
297
300
|
"id": "crvusdadapter",
|
|
298
301
|
"name": "CRVUSD Adapter",
|
|
302
|
+
"label": "RWA Vault",
|
|
299
303
|
"contract": "0x0000000000000000000000000000000000000000",
|
|
300
304
|
"type": "ERC20"
|
|
301
305
|
}
|
|
@@ -229,12 +229,14 @@
|
|
|
229
229
|
"raacnftadapter": {
|
|
230
230
|
"id": "raacnftadapter",
|
|
231
231
|
"name": "RAAC NFT Adapter",
|
|
232
|
+
"label": "Lending Pool",
|
|
232
233
|
"contract": "",
|
|
233
234
|
"type": "ERC721"
|
|
234
235
|
},
|
|
235
236
|
"rwaindextokenadapter": {
|
|
236
237
|
"id": "rwaindextokenadapter",
|
|
237
238
|
"name": "RWA Index Token",
|
|
239
|
+
"label": "Lending Pool",
|
|
238
240
|
"contract": "",
|
|
239
241
|
"type": "ERC20"
|
|
240
242
|
}
|
|
@@ -243,12 +245,14 @@
|
|
|
243
245
|
"raacnftadapter": {
|
|
244
246
|
"id": "raacnftadapter",
|
|
245
247
|
"name": "RAAC NFT Adapter",
|
|
248
|
+
"label": "RWA Vault",
|
|
246
249
|
"contract": "",
|
|
247
250
|
"type": "ERC721"
|
|
248
251
|
},
|
|
249
252
|
"crvusdadapter": {
|
|
250
253
|
"id": "crvusdadapter",
|
|
251
254
|
"name": "CRVUSD",
|
|
255
|
+
"label": "RWA Vault",
|
|
252
256
|
"contract": "",
|
|
253
257
|
"type": "ERC20"
|
|
254
258
|
}
|
|
@@ -229,12 +229,14 @@
|
|
|
229
229
|
"raacnftadapter": {
|
|
230
230
|
"id": "raacnftadapter",
|
|
231
231
|
"name": "RAAC NFT Adapter",
|
|
232
|
+
"label": "Lending Pool",
|
|
232
233
|
"contract": "0x998abeb3E57409262aE5b751f60747921B33613E",
|
|
233
234
|
"type": "ERC721"
|
|
234
235
|
},
|
|
235
236
|
"rwaindextokenadapter": {
|
|
236
237
|
"id": "rwaindextokenadapter",
|
|
237
238
|
"name": "RWA Index Token",
|
|
239
|
+
"label": "Lending Pool",
|
|
238
240
|
"contract": "0x95401dc811bb5740090279Ba06cfA8fcF6113778",
|
|
239
241
|
"type": "ERC20"
|
|
240
242
|
}
|
|
@@ -243,12 +245,14 @@
|
|
|
243
245
|
"raacnftadapter": {
|
|
244
246
|
"id": "raacnftadapter",
|
|
245
247
|
"name": "RAAC NFT Adapter",
|
|
248
|
+
"label": "RWA Vault",
|
|
246
249
|
"contract": "0x99bbA657f2BbC93c02D617f8bA121cB8Fc104Acf",
|
|
247
250
|
"type": "ERC721"
|
|
248
251
|
},
|
|
249
252
|
"crvusdadapter": {
|
|
250
253
|
"id": "crvusdadapter",
|
|
251
254
|
"name": "CRVUSD Adapter",
|
|
255
|
+
"label": "RWA Vault",
|
|
252
256
|
"contract": "0xc3e53F4d16Ae77Db1c982e75a937B9f60FE63690",
|
|
253
257
|
"type": "ERC20"
|
|
254
258
|
}
|
|
@@ -325,12 +325,14 @@
|
|
|
325
325
|
"raacnftadapter": {
|
|
326
326
|
"id": "raacnftadapter",
|
|
327
327
|
"name": "RAAC NFT Adapter",
|
|
328
|
+
"label": "Lending Pool",
|
|
328
329
|
"contract": "0x7a2088a1bFc9d81c55368AE168C2C02570cB814F",
|
|
329
330
|
"type": "ERC721"
|
|
330
331
|
},
|
|
331
332
|
"rwaindextokenadapter": {
|
|
332
333
|
"id": "rwaindextokenadapter",
|
|
333
334
|
"name": "RWA Index Token",
|
|
335
|
+
"label": "Lending Pool",
|
|
334
336
|
"contract": "0x4A679253410272dd5232B3Ff7cF5dbB88f295319",
|
|
335
337
|
"type": "ERC20"
|
|
336
338
|
}
|
|
@@ -339,12 +341,14 @@
|
|
|
339
341
|
"raacnftadapter": {
|
|
340
342
|
"id": "raacnftadapter",
|
|
341
343
|
"name": "RAAC NFT Adapter",
|
|
344
|
+
"label": "RWA Vault",
|
|
342
345
|
"contract": "0x322813Fd9A801c5507c9de605d63CEA4f2CE6c44",
|
|
343
346
|
"type": "ERC721"
|
|
344
347
|
},
|
|
345
348
|
"crvusdadapter": {
|
|
346
349
|
"id": "crvusdadapter",
|
|
347
350
|
"name": "CRVUSD Adapter",
|
|
351
|
+
"label": "RWA Vault",
|
|
348
352
|
"contract": "0x4ed7c70F96B99c776995fB64377f0d4aB3B0e1C1",
|
|
349
353
|
"type": "ERC20"
|
|
350
354
|
}
|
|
@@ -24,29 +24,30 @@ function listContracts(chainId) {
|
|
|
24
24
|
};
|
|
25
25
|
// gauges: { <system>: { label, gaugeType, controller, distributor, gauges: [{ id, name, contract }] } }
|
|
26
26
|
for (const [key, system] of Object.entries((config.gauges ?? {}))) {
|
|
27
|
-
push({ address: system.controller, id: `${key}.controller`, name: `${system.label} Controller`, section: "gauges", abi: "gaugecontroller" });
|
|
28
|
-
push({ address: system.distributor, id: `${key}.distributor`, name: `${system.label} Distributor`, section: "gauges", abi: "gaugerewardsdistributor" });
|
|
27
|
+
push({ address: system.controller, id: `${key}.controller`, name: `${system.label} Controller`, label: `${system.label} Controller`, section: "gauges", abi: "gaugecontroller" });
|
|
28
|
+
push({ address: system.distributor, id: `${key}.distributor`, name: `${system.label} Distributor`, label: `${system.label} Distributor`, section: "gauges", abi: "gaugerewardsdistributor" });
|
|
29
29
|
for (const gauge of system.gauges ?? []) {
|
|
30
|
-
push({ address: gauge.contract, id: gauge.id, name: gauge.name, section: "gauges", abi: abiKey(system.gaugeType.toLowerCase()) });
|
|
30
|
+
push({ address: gauge.contract, id: gauge.id, name: gauge.name, label: gauge.name, section: "gauges", abi: abiKey(system.gaugeType.toLowerCase()) });
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
for (const section of FLAT_SECTIONS) {
|
|
34
34
|
for (const [key, value] of Object.entries((config[section] ?? {}))) {
|
|
35
|
-
push({ address: value.contract, id: value.id ?? key, name: value.name ?? key, section, abi: abiKey(key.toLowerCase()) });
|
|
35
|
+
push({ address: value.contract, id: value.id ?? key, name: value.name ?? key, label: value.name ?? key, section, abi: abiKey(key.toLowerCase()) });
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
// adapters: { <pool or vault>: { <adapter>: { contract, type: "ERC20" | "ERC721" } } }
|
|
38
|
+
// adapters: { <pool or vault>: { <adapter>: { contract, type: "ERC20" | "ERC721", label } } }
|
|
39
|
+
// `label` names the pool or vault the adapter belongs to - the adapter itself is internal.
|
|
39
40
|
for (const [owner, adapters] of Object.entries((config.adapters ?? {}))) {
|
|
40
41
|
for (const [key, value] of Object.entries(adapters)) {
|
|
41
42
|
const standard = (value.type ?? "").toLowerCase();
|
|
42
43
|
const kind = owner === "lendingpool" ? "assetadapter" : "vaultadapter";
|
|
43
|
-
push({ address: value.contract, id: value.id ?? key, name: value.name ?? key, section: "adapters", abi: abiKey(`${standard}${kind}`) });
|
|
44
|
+
push({ address: value.contract, id: value.id ?? key, name: value.name ?? key, label: value.label ?? value.name ?? key, section: "adapters", abi: abiKey(`${standard}${kind}`) });
|
|
44
45
|
}
|
|
45
46
|
}
|
|
46
47
|
// proposals: [{ id, label, governance, timelock }]
|
|
47
48
|
for (const instance of (config.proposals ?? [])) {
|
|
48
|
-
push({ address: instance.governance, id: `${instance.id}.governance`, name: `${instance.label} Governance`, section: "proposals", abi: "governance" });
|
|
49
|
-
push({ address: instance.timelock, id: `${instance.id}.timelock`, name: `${instance.label} Timelock`, section: "proposals", abi: "timelockcontroller" });
|
|
49
|
+
push({ address: instance.governance, id: `${instance.id}.governance`, name: `${instance.label} Governance`, label: `${instance.label} Governance`, section: "proposals", abi: "governance" });
|
|
50
|
+
push({ address: instance.timelock, id: `${instance.id}.timelock`, name: `${instance.label} Timelock`, label: `${instance.label} Timelock`, section: "proposals", abi: "timelockcontroller" });
|
|
50
51
|
}
|
|
51
52
|
return found;
|
|
52
53
|
}
|
|
@@ -222,12 +222,14 @@ declare const chains: {
|
|
|
222
222
|
raacnftadapter: {
|
|
223
223
|
id: string;
|
|
224
224
|
name: string;
|
|
225
|
+
label: string;
|
|
225
226
|
contract: string;
|
|
226
227
|
type: string;
|
|
227
228
|
};
|
|
228
229
|
rwaindextokenadapter: {
|
|
229
230
|
id: string;
|
|
230
231
|
name: string;
|
|
232
|
+
label: string;
|
|
231
233
|
contract: string;
|
|
232
234
|
type: string;
|
|
233
235
|
};
|
|
@@ -236,6 +238,7 @@ declare const chains: {
|
|
|
236
238
|
raacnftadapter: {
|
|
237
239
|
id: string;
|
|
238
240
|
name: string;
|
|
241
|
+
label: string;
|
|
239
242
|
contract: string;
|
|
240
243
|
type: string;
|
|
241
244
|
};
|
|
@@ -471,12 +474,14 @@ export declare const configs: {
|
|
|
471
474
|
raacnftadapter: {
|
|
472
475
|
id: string;
|
|
473
476
|
name: string;
|
|
477
|
+
label: string;
|
|
474
478
|
contract: string;
|
|
475
479
|
type: string;
|
|
476
480
|
};
|
|
477
481
|
rwaindextokenadapter: {
|
|
478
482
|
id: string;
|
|
479
483
|
name: string;
|
|
484
|
+
label: string;
|
|
480
485
|
contract: string;
|
|
481
486
|
type: string;
|
|
482
487
|
};
|
|
@@ -485,6 +490,7 @@ export declare const configs: {
|
|
|
485
490
|
raacnftadapter: {
|
|
486
491
|
id: string;
|
|
487
492
|
name: string;
|
|
493
|
+
label: string;
|
|
488
494
|
contract: string;
|
|
489
495
|
type: string;
|
|
490
496
|
};
|
|
@@ -222,12 +222,14 @@ declare function getChainsConfig(): {
|
|
|
222
222
|
raacnftadapter: {
|
|
223
223
|
id: string;
|
|
224
224
|
name: string;
|
|
225
|
+
label: string;
|
|
225
226
|
contract: string;
|
|
226
227
|
type: string;
|
|
227
228
|
};
|
|
228
229
|
rwaindextokenadapter: {
|
|
229
230
|
id: string;
|
|
230
231
|
name: string;
|
|
232
|
+
label: string;
|
|
231
233
|
contract: string;
|
|
232
234
|
type: string;
|
|
233
235
|
};
|
|
@@ -236,6 +238,7 @@ declare function getChainsConfig(): {
|
|
|
236
238
|
raacnftadapter: {
|
|
237
239
|
id: string;
|
|
238
240
|
name: string;
|
|
241
|
+
label: string;
|
|
239
242
|
contract: string;
|
|
240
243
|
type: string;
|
|
241
244
|
};
|
|
@@ -5,8 +5,10 @@ export interface ContractInfo {
|
|
|
5
5
|
address: string;
|
|
6
6
|
/** The entry's id in the chain config, e.g. "treasury" or "RAAC_pmUSD". */
|
|
7
7
|
id: string;
|
|
8
|
-
/** The entry's
|
|
8
|
+
/** The entry's internal name, e.g. "Treasury". */
|
|
9
9
|
name: string;
|
|
10
|
+
/** The user-facing name, e.g. "Treasury". Same as `name` except for adapters, which report their pool or vault ("RWA Vault"). */
|
|
11
|
+
label: string;
|
|
10
12
|
/** Top-level config section the entry came from, e.g. "contracts", "gauges", "proposals". */
|
|
11
13
|
section: string;
|
|
12
14
|
/** Key into `ABIS`, or null when this library ships no ABI for the contract. */
|
|
@@ -224,12 +224,14 @@ export declare const getConfigs: () => {
|
|
|
224
224
|
raacnftadapter: {
|
|
225
225
|
id: string;
|
|
226
226
|
name: string;
|
|
227
|
+
label: string;
|
|
227
228
|
contract: string;
|
|
228
229
|
type: string;
|
|
229
230
|
};
|
|
230
231
|
rwaindextokenadapter: {
|
|
231
232
|
id: string;
|
|
232
233
|
name: string;
|
|
234
|
+
label: string;
|
|
233
235
|
contract: string;
|
|
234
236
|
type: string;
|
|
235
237
|
};
|
|
@@ -238,6 +240,7 @@ export declare const getConfigs: () => {
|
|
|
238
240
|
raacnftadapter: {
|
|
239
241
|
id: string;
|
|
240
242
|
name: string;
|
|
243
|
+
label: string;
|
|
241
244
|
contract: string;
|
|
242
245
|
type: string;
|
|
243
246
|
};
|
|
@@ -481,12 +484,14 @@ declare const _default: {
|
|
|
481
484
|
raacnftadapter: {
|
|
482
485
|
id: string;
|
|
483
486
|
name: string;
|
|
487
|
+
label: string;
|
|
484
488
|
contract: string;
|
|
485
489
|
type: string;
|
|
486
490
|
};
|
|
487
491
|
rwaindextokenadapter: {
|
|
488
492
|
id: string;
|
|
489
493
|
name: string;
|
|
494
|
+
label: string;
|
|
490
495
|
contract: string;
|
|
491
496
|
type: string;
|
|
492
497
|
};
|
|
@@ -495,6 +500,7 @@ declare const _default: {
|
|
|
495
500
|
raacnftadapter: {
|
|
496
501
|
id: string;
|
|
497
502
|
name: string;
|
|
503
|
+
label: string;
|
|
498
504
|
contract: string;
|
|
499
505
|
type: string;
|
|
500
506
|
};
|