@raac/rpc 1.2.0-beta.2 → 1.2.0-beta.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/dist/RPCLibrary.js +2 -0
- package/dist/configs/chains/1.json +7 -13
- package/dist/contracts/governance/proposals/getProposal.js +14 -11
- package/dist/types/RPCLibrary.d.ts +2 -0
- package/dist/types/configs/chains/index.d.ts +0 -12
- package/dist/types/configs/index.d.ts +0 -6
- package/dist/types/utils/contracts.d.ts +0 -12
- package/package.json +1 -1
package/dist/RPCLibrary.js
CHANGED
|
@@ -169,6 +169,7 @@ const getProposalThreshold_1 = require("./contracts/governance/proposals/getProp
|
|
|
169
169
|
const getVotes_1 = require("./contracts/governance/proposals/getVotes");
|
|
170
170
|
const propose_1 = require("./contracts/governance/proposals/propose");
|
|
171
171
|
const getProposal_1 = require("./contracts/governance/proposals/getProposal");
|
|
172
|
+
const getProposalCount_1 = require("./contracts/governance/proposals/getProposalCount");
|
|
172
173
|
const getQuorum_1 = require("./contracts/governance/proposals/getQuorum");
|
|
173
174
|
const getVotingDelay_1 = require("./contracts/governance/proposals/getVotingDelay");
|
|
174
175
|
// Timelock
|
|
@@ -464,6 +465,7 @@ class RPCLibrary {
|
|
|
464
465
|
getVotes: getVotes_1.getVotes,
|
|
465
466
|
propose: propose_1.propose,
|
|
466
467
|
getProposal: getProposal_1.getProposal,
|
|
468
|
+
getProposalCount: getProposalCount_1.getProposalCount,
|
|
467
469
|
getQuorum: getQuorum_1.getQuorum,
|
|
468
470
|
getVotingDelay: getVotingDelay_1.getVotingDelay,
|
|
469
471
|
},
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"raachouseprices": {
|
|
18
18
|
"id": "raachouseprices",
|
|
19
19
|
"name": "RAAC House Prices",
|
|
20
|
-
"contract": "
|
|
20
|
+
"contract": "0x1a97dAd63F29974aA4a54d4E337C183eD1545A70"
|
|
21
21
|
},
|
|
22
22
|
"auctionfactory": {
|
|
23
23
|
"id": "auctionfactory",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"rwavault": {
|
|
73
73
|
"id": "rwavault",
|
|
74
74
|
"name": "RWA Vault",
|
|
75
|
-
"contract": "
|
|
75
|
+
"contract": "0x575fFB62F712410A4ECa56C2Eb37596cEc3cc732"
|
|
76
76
|
},
|
|
77
77
|
"complianceregistry": {
|
|
78
78
|
"id": "complianceregistry",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"raachousepriceoracle": {
|
|
93
93
|
"id": "raachousepriceoracle",
|
|
94
94
|
"name": "RAAC House Price Oracle",
|
|
95
|
-
"contract": "
|
|
95
|
+
"contract": "0x556553877fC8E643A78f6925C465991d73B0179C"
|
|
96
96
|
},
|
|
97
97
|
"raacprimerateoracle": {
|
|
98
98
|
"id": "raacprimerateoracle",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"crvusdtousdoracle": {
|
|
103
103
|
"id": "crvusdtousdoracle",
|
|
104
104
|
"name": "CRVUSD to USD Oracle",
|
|
105
|
-
"contract": "
|
|
105
|
+
"contract": "0x947867e0aD5d75D9Cd4D48d44F9Ca236D17Bbb40"
|
|
106
106
|
}
|
|
107
107
|
},
|
|
108
108
|
"governance": {
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
"raacnft": {
|
|
159
159
|
"id": "raacnft",
|
|
160
160
|
"name": "RAAC NFT",
|
|
161
|
-
"contract": "
|
|
161
|
+
"contract": "0xA8390c2BE8a42E32a6c06522FD31EC5dd78823E4"
|
|
162
162
|
}
|
|
163
163
|
},
|
|
164
164
|
"assets": {
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
"id": "rwaindextoken",
|
|
221
221
|
"name": "RWA Index Token",
|
|
222
222
|
"decimals": 18,
|
|
223
|
-
"contract": "
|
|
223
|
+
"contract": "0xe6a60d2886b11256C24C128210159133096e5CcF"
|
|
224
224
|
}
|
|
225
225
|
},
|
|
226
226
|
"adapters": {
|
|
@@ -242,14 +242,8 @@
|
|
|
242
242
|
"raacnftadapter": {
|
|
243
243
|
"id": "raacnftadapter",
|
|
244
244
|
"name": "RAAC NFT Adapter",
|
|
245
|
-
"contract": "
|
|
245
|
+
"contract": "0xB1b35C62B99a450c474e9dAd75fA121d3Daa1d34",
|
|
246
246
|
"type": "ERC721"
|
|
247
|
-
},
|
|
248
|
-
"crvusdadapter": {
|
|
249
|
-
"id": "crvusdadapter",
|
|
250
|
-
"name": "CRVUSD Adapter",
|
|
251
|
-
"contract": "0x9C731Cfc4161d8BF5fc38a7B2421ef0263d69AeE",
|
|
252
|
-
"type": "ERC20"
|
|
253
247
|
}
|
|
254
248
|
}
|
|
255
249
|
}
|
|
@@ -36,18 +36,21 @@ const getProposal = async (chainId, proposalId, provider) => {
|
|
|
36
36
|
const abi = (0, artifacts_1.getABI)("governance");
|
|
37
37
|
const contract = new ethers_1.ethers.Contract(contractAddress, abi, provider);
|
|
38
38
|
const proposal = await contract.getProposal(proposalId);
|
|
39
|
+
// Destructure by index: ethers v6 Result extends Array, so `proposal.values`
|
|
40
|
+
// resolves to Array.prototype.values (the iterator) instead of the struct field.
|
|
41
|
+
const [id, proposer, proposalType, startTime, endTime, executed, canceled, descriptionHash, targets, rawValues, calldatas,] = proposal;
|
|
39
42
|
return {
|
|
40
|
-
id: Number(
|
|
41
|
-
proposer
|
|
42
|
-
proposalType: Number(
|
|
43
|
-
startTime: Number(
|
|
44
|
-
endTime: Number(
|
|
45
|
-
executed
|
|
46
|
-
canceled
|
|
47
|
-
descriptionHash
|
|
48
|
-
targets:
|
|
49
|
-
values:
|
|
50
|
-
calldatas:
|
|
43
|
+
id: Number(id),
|
|
44
|
+
proposer,
|
|
45
|
+
proposalType: Number(proposalType),
|
|
46
|
+
startTime: Number(startTime),
|
|
47
|
+
endTime: Number(endTime),
|
|
48
|
+
executed,
|
|
49
|
+
canceled,
|
|
50
|
+
descriptionHash,
|
|
51
|
+
targets: Array.from(targets),
|
|
52
|
+
values: Array.from(rawValues).map((v) => ethers_1.ethers.formatEther(v)),
|
|
53
|
+
calldatas: Array.from(calldatas),
|
|
51
54
|
};
|
|
52
55
|
};
|
|
53
56
|
exports.getProposal = getProposal;
|
|
@@ -137,6 +137,7 @@ import { getProposalThreshold as getProposalThresholdProposals } from "./contrac
|
|
|
137
137
|
import { getVotes as getVotesProposals } from "./contracts/governance/proposals/getVotes";
|
|
138
138
|
import { propose as proposeProposals } from "./contracts/governance/proposals/propose";
|
|
139
139
|
import { getProposal as getProposalProposals } from "./contracts/governance/proposals/getProposal";
|
|
140
|
+
import { getProposalCount as getProposalCountProposals } from "./contracts/governance/proposals/getProposalCount";
|
|
140
141
|
import { getQuorum as getQuorumProposals } from "./contracts/governance/proposals/getQuorum";
|
|
141
142
|
import { getVotingDelay as getVotingDelayProposals } from "./contracts/governance/proposals/getVotingDelay";
|
|
142
143
|
import { getConstants as getConstantsTimelock } from "./contracts/governance/timelock/getConstants";
|
|
@@ -335,6 +336,7 @@ declare class RPCLibrary {
|
|
|
335
336
|
getVotes: typeof getVotesProposals;
|
|
336
337
|
propose: typeof proposeProposals;
|
|
337
338
|
getProposal: typeof getProposalProposals;
|
|
339
|
+
getProposalCount: typeof getProposalCountProposals;
|
|
338
340
|
getQuorum: typeof getQuorumProposals;
|
|
339
341
|
getVotingDelay: typeof getVotingDelayProposals;
|
|
340
342
|
};
|
|
@@ -245,12 +245,6 @@ declare const chains: {
|
|
|
245
245
|
contract: string;
|
|
246
246
|
type: string;
|
|
247
247
|
};
|
|
248
|
-
crvusdadapter: {
|
|
249
|
-
id: string;
|
|
250
|
-
name: string;
|
|
251
|
-
contract: string;
|
|
252
|
-
type: string;
|
|
253
|
-
};
|
|
254
248
|
};
|
|
255
249
|
};
|
|
256
250
|
};
|
|
@@ -506,12 +500,6 @@ export declare const configs: {
|
|
|
506
500
|
contract: string;
|
|
507
501
|
type: string;
|
|
508
502
|
};
|
|
509
|
-
crvusdadapter: {
|
|
510
|
-
id: string;
|
|
511
|
-
name: string;
|
|
512
|
-
contract: string;
|
|
513
|
-
type: string;
|
|
514
|
-
};
|
|
515
503
|
};
|
|
516
504
|
};
|
|
517
505
|
};
|
|
@@ -247,12 +247,6 @@ export declare const getConfigs: () => {
|
|
|
247
247
|
contract: string;
|
|
248
248
|
type: string;
|
|
249
249
|
};
|
|
250
|
-
crvusdadapter: {
|
|
251
|
-
id: string;
|
|
252
|
-
name: string;
|
|
253
|
-
contract: string;
|
|
254
|
-
type: string;
|
|
255
|
-
};
|
|
256
250
|
};
|
|
257
251
|
};
|
|
258
252
|
};
|
|
@@ -516,12 +510,6 @@ declare const _default: {
|
|
|
516
510
|
contract: string;
|
|
517
511
|
type: string;
|
|
518
512
|
};
|
|
519
|
-
crvusdadapter: {
|
|
520
|
-
id: string;
|
|
521
|
-
name: string;
|
|
522
|
-
contract: string;
|
|
523
|
-
type: string;
|
|
524
|
-
};
|
|
525
513
|
};
|
|
526
514
|
};
|
|
527
515
|
};
|