@raac/rpc 1.1.0-beta.36 → 1.1.0-beta.38
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/11155111.json +18 -18
- package/dist/configs/chains/8453.json +18 -18
- package/dist/scripts/index.js +18 -18
- package/package.json +1 -1
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"raachouseprices": {
|
|
18
18
|
"id": "raachouseprices",
|
|
19
19
|
"name": "RAAC House Prices",
|
|
20
|
-
"contract": "
|
|
20
|
+
"contract": "0x629D15E7d881Bd937Dc1ef80C028dD1CeCE04156"
|
|
21
21
|
},
|
|
22
22
|
"auctionfactory": {
|
|
23
23
|
"id": "auctionfactory",
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
"feecollector": {
|
|
38
38
|
"id": "feecollector",
|
|
39
39
|
"name": "Fee Collector",
|
|
40
|
-
"contract": "
|
|
40
|
+
"contract": "0x1Aa8542c5EDA40397CD6cc278f6119baF8C4AA31"
|
|
41
41
|
},
|
|
42
42
|
"treasury": {
|
|
43
43
|
"id": "treasury",
|
|
44
44
|
"name": "Treasury",
|
|
45
|
-
"contract": "
|
|
45
|
+
"contract": "0xa3B67Ae47C1aCDc0Ec3c083026995E3D1E782492"
|
|
46
46
|
},
|
|
47
47
|
"repairfund": {
|
|
48
48
|
"id": "repairfund",
|
|
@@ -57,26 +57,26 @@
|
|
|
57
57
|
"rwavault": {
|
|
58
58
|
"id": "rwavault",
|
|
59
59
|
"name": "RWA Vault",
|
|
60
|
-
"contract": "
|
|
60
|
+
"contract": "0x970c09dDd3cAfbc9eECFC13FD0306bEeb84Bbb3B"
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
"pools": {
|
|
64
64
|
"stabilitypool": {
|
|
65
65
|
"id": "stabilitypool",
|
|
66
66
|
"name": "Stability Pool",
|
|
67
|
-
"contract": "
|
|
67
|
+
"contract": "0x618Cd2383De86E8BAe2174edaC9ad2Bc55311fe3"
|
|
68
68
|
},
|
|
69
69
|
"lendingpool": {
|
|
70
70
|
"id": "lendingpool",
|
|
71
71
|
"name": "Lending Pool",
|
|
72
|
-
"contract": "
|
|
72
|
+
"contract": "0x96A1D6529f647986f008567f7bD44F5522F73499"
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
"nfts": {
|
|
76
76
|
"raacnft": {
|
|
77
77
|
"id": "raacnft",
|
|
78
78
|
"name": "RAAC NFT",
|
|
79
|
-
"contract": "
|
|
79
|
+
"contract": "0xDC46a04E1EfA8f44f75dff6F464b5187EfD820Df"
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
82
|
"assets": {
|
|
@@ -90,43 +90,43 @@
|
|
|
90
90
|
"id": "crvusd",
|
|
91
91
|
"name": "CRVUSD",
|
|
92
92
|
"decimals": 18,
|
|
93
|
-
"contract": "
|
|
93
|
+
"contract": "0xB8ec73Db9B0eD3aED4901191DC371ff78b766971"
|
|
94
94
|
},
|
|
95
95
|
"rtoken": {
|
|
96
96
|
"id": "rtoken",
|
|
97
97
|
"name": "RToken",
|
|
98
98
|
"decimals": 18,
|
|
99
|
-
"contract": "
|
|
99
|
+
"contract": "0xFaA8f8B85899AE81A7562a4d743D7a9CE1f350b9"
|
|
100
100
|
},
|
|
101
101
|
"detoken": {
|
|
102
102
|
"id": "detoken",
|
|
103
103
|
"name": "DEToken",
|
|
104
104
|
"decimals": 18,
|
|
105
|
-
"contract": "
|
|
105
|
+
"contract": "0x8F27A9aeBB56D2125afD6d4a49B6b0e14C26009E"
|
|
106
106
|
},
|
|
107
107
|
"raactoken": {
|
|
108
108
|
"id": "raactoken",
|
|
109
109
|
"name": "RAAC",
|
|
110
110
|
"decimals": 18,
|
|
111
|
-
"contract": "
|
|
111
|
+
"contract": "0x2039e203F2d8E7fAA732ae95f03696E95C955611"
|
|
112
112
|
},
|
|
113
113
|
"veraac": {
|
|
114
114
|
"id": "veraac",
|
|
115
115
|
"name": "VERAAC",
|
|
116
116
|
"decimals": 18,
|
|
117
|
-
"contract": "
|
|
117
|
+
"contract": "0x0FC9A0812BA0e2797B00245f2001aE84dF980499"
|
|
118
118
|
},
|
|
119
119
|
"debttoken": {
|
|
120
120
|
"id": "debttoken",
|
|
121
121
|
"name": "Debt Token",
|
|
122
122
|
"decimals": 18,
|
|
123
|
-
"contract": "
|
|
123
|
+
"contract": "0x8F27A9aeBB56D2125afD6d4a49B6b0e14C26009E"
|
|
124
124
|
},
|
|
125
125
|
"rwaindextoken": {
|
|
126
126
|
"id": "rwaindextoken",
|
|
127
127
|
"name": "RWA Index Token",
|
|
128
128
|
"decimals": 18,
|
|
129
|
-
"contract": "
|
|
129
|
+
"contract": "0xc574a3ceF679C8f65c7E79781b66c30a493b7b2F"
|
|
130
130
|
}
|
|
131
131
|
},
|
|
132
132
|
"adapters": {
|
|
@@ -134,13 +134,13 @@
|
|
|
134
134
|
"raacnftadapter": {
|
|
135
135
|
"id": "raacnftadapter",
|
|
136
136
|
"name": "RAAC NFT Adapter",
|
|
137
|
-
"contract": "
|
|
137
|
+
"contract": "0xFD664C6AD6818F88129487c10BA276FCF25246CD",
|
|
138
138
|
"type": "ERC721"
|
|
139
139
|
},
|
|
140
140
|
"rwaindextokenadapter": {
|
|
141
141
|
"id": "rwaindextokenadapter",
|
|
142
142
|
"name": "RWA Index Token",
|
|
143
|
-
"contract": "
|
|
143
|
+
"contract": "0xE55A4914e21ee450c76E4cb04b5b5aE3d8B7a13a",
|
|
144
144
|
"type": "ERC20"
|
|
145
145
|
}
|
|
146
146
|
},
|
|
@@ -148,13 +148,13 @@
|
|
|
148
148
|
"raacnftadapter": {
|
|
149
149
|
"id": "raacnftadapter",
|
|
150
150
|
"name": "RAAC NFT Adapter",
|
|
151
|
-
"contract": "
|
|
151
|
+
"contract": "0x83dAd1fcf882dBbBAb2fc5C8De66c2638C45424E",
|
|
152
152
|
"type": "ERC721"
|
|
153
153
|
},
|
|
154
154
|
"crvusdadapter": {
|
|
155
155
|
"id": "crvusdadapter",
|
|
156
156
|
"name": "CRVUSD Adapter",
|
|
157
|
-
"contract": "
|
|
157
|
+
"contract": "0xb0B1eB2095Eef3533122D4224EADE6b16caF7bC4",
|
|
158
158
|
"type": "ERC20"
|
|
159
159
|
}
|
|
160
160
|
}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"raachouseprices": {
|
|
18
18
|
"id": "raachouseprices",
|
|
19
19
|
"name": "RAAC House Prices",
|
|
20
|
-
"contract": "
|
|
20
|
+
"contract": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9"
|
|
21
21
|
},
|
|
22
22
|
"auctionfactory": {
|
|
23
23
|
"id": "auctionfactory",
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
"feecollector": {
|
|
38
38
|
"id": "feecollector",
|
|
39
39
|
"name": "Fee Collector",
|
|
40
|
-
"contract": "
|
|
40
|
+
"contract": "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853"
|
|
41
41
|
},
|
|
42
42
|
"treasury": {
|
|
43
43
|
"id": "treasury",
|
|
44
44
|
"name": "Treasury",
|
|
45
|
-
"contract": "
|
|
45
|
+
"contract": "0x0165878A594ca255338adfa4d48449f69242Eb8F"
|
|
46
46
|
},
|
|
47
47
|
"repairfund": {
|
|
48
48
|
"id": "repairfund",
|
|
@@ -57,26 +57,26 @@
|
|
|
57
57
|
"rwavault": {
|
|
58
58
|
"id": "rwavault",
|
|
59
59
|
"name": "RWA Vault",
|
|
60
|
-
"contract": "
|
|
60
|
+
"contract": "0xa85233C63b9Ee964Add6F2cffe00Fd84eb32338f"
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
"pools": {
|
|
64
64
|
"stabilitypool": {
|
|
65
65
|
"id": "stabilitypool",
|
|
66
66
|
"name": "Stability Pool",
|
|
67
|
-
"contract": "
|
|
67
|
+
"contract": "0xc6e7DF5E7b4f2A278906862b61205850344D4e7d"
|
|
68
68
|
},
|
|
69
69
|
"lendingpool": {
|
|
70
70
|
"id": "lendingpool",
|
|
71
71
|
"name": "Lending Pool",
|
|
72
|
-
"contract": "
|
|
72
|
+
"contract": "0x9A676e781A523b5d0C0e43731313A708CB607508"
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
"nfts": {
|
|
76
76
|
"raacnft": {
|
|
77
77
|
"id": "raacnft",
|
|
78
78
|
"name": "RAAC NFT",
|
|
79
|
-
"contract": "
|
|
79
|
+
"contract": "0x67d269191c92Caf3cD7723F116c85e6E9bf55933"
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
82
|
"assets": {
|
|
@@ -90,43 +90,43 @@
|
|
|
90
90
|
"id": "crvusd",
|
|
91
91
|
"name": "CRVUSD",
|
|
92
92
|
"decimals": 18,
|
|
93
|
-
"contract": "
|
|
93
|
+
"contract": "0x5FbDB2315678afecb367f032d93F642f64180aa3"
|
|
94
94
|
},
|
|
95
95
|
"rtoken": {
|
|
96
96
|
"id": "rtoken",
|
|
97
97
|
"name": "RToken",
|
|
98
98
|
"decimals": 18,
|
|
99
|
-
"contract": "
|
|
99
|
+
"contract": "0x610178dA211FEF7D417bC0e6FeD39F05609AD788"
|
|
100
100
|
},
|
|
101
101
|
"detoken": {
|
|
102
102
|
"id": "detoken",
|
|
103
103
|
"name": "DEToken",
|
|
104
104
|
"decimals": 18,
|
|
105
|
-
"contract": "
|
|
105
|
+
"contract": "0x68B1D87F95878fE05B998F19b66F4baba5De1aed"
|
|
106
106
|
},
|
|
107
107
|
"raactoken": {
|
|
108
108
|
"id": "raactoken",
|
|
109
109
|
"name": "RAAC",
|
|
110
110
|
"decimals": 18,
|
|
111
|
-
"contract": "
|
|
111
|
+
"contract": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512"
|
|
112
112
|
},
|
|
113
113
|
"veraac": {
|
|
114
114
|
"id": "veraac",
|
|
115
115
|
"name": "VERAAC",
|
|
116
116
|
"decimals": 18,
|
|
117
|
-
"contract": "
|
|
117
|
+
"contract": "0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6"
|
|
118
118
|
},
|
|
119
119
|
"debttoken": {
|
|
120
120
|
"id": "debttoken",
|
|
121
121
|
"name": "Debt Token",
|
|
122
122
|
"decimals": 18,
|
|
123
|
-
"contract": "
|
|
123
|
+
"contract": "0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e"
|
|
124
124
|
},
|
|
125
125
|
"rwaindextoken": {
|
|
126
126
|
"id": "rwaindextoken",
|
|
127
127
|
"name": "Index Token",
|
|
128
128
|
"decimals": 18,
|
|
129
|
-
"contract": "
|
|
129
|
+
"contract": "0x322813Fd9A801c5507c9de605d63CEA4f2CE6c44"
|
|
130
130
|
}
|
|
131
131
|
},
|
|
132
132
|
"adapters": {
|
|
@@ -134,13 +134,13 @@
|
|
|
134
134
|
"raacnftadapter": {
|
|
135
135
|
"id": "raacnftadapter",
|
|
136
136
|
"name": "RAAC NFT Adapter",
|
|
137
|
-
"contract": "
|
|
137
|
+
"contract": "0xc3e53F4d16Ae77Db1c982e75a937B9f60FE63690",
|
|
138
138
|
"type": "ERC721"
|
|
139
139
|
},
|
|
140
140
|
"rwaindextokenadapter": {
|
|
141
141
|
"id": "rwaindextokenadapter",
|
|
142
142
|
"name": "RWA Index Token",
|
|
143
|
-
"contract": "
|
|
143
|
+
"contract": "0xE6E340D132b5f46d1e472DebcD681B2aBc16e57E",
|
|
144
144
|
"type": "ERC20"
|
|
145
145
|
}
|
|
146
146
|
},
|
|
@@ -148,13 +148,13 @@
|
|
|
148
148
|
"raacnftadapter": {
|
|
149
149
|
"id": "raacnftadapter",
|
|
150
150
|
"name": "RAAC NFT Adapter",
|
|
151
|
-
"contract": "
|
|
151
|
+
"contract": "0xa82fF9aFd8f496c3d6ac40E2a0F282E47488CFc9",
|
|
152
152
|
"type": "ERC721"
|
|
153
153
|
},
|
|
154
154
|
"crvusdadapter": {
|
|
155
155
|
"id": "crvusdadapter",
|
|
156
156
|
"name": "CRVUSD Adapter",
|
|
157
|
-
"contract": "
|
|
157
|
+
"contract": "0x7a2088a1bFc9d81c55368AE168C2C02570cB814F",
|
|
158
158
|
"type": "ERC20"
|
|
159
159
|
}
|
|
160
160
|
}
|
package/dist/scripts/index.js
CHANGED
|
@@ -10,7 +10,7 @@ const RPCLibrary_1 = __importDefault(require("../RPCLibrary"));
|
|
|
10
10
|
const contracts_1 = require("../utils/contracts");
|
|
11
11
|
const artifacts_1 = require("../utils/artifacts");
|
|
12
12
|
const _helpers_1 = require("../pools/rwaVault/_helpers");
|
|
13
|
-
const chainId =
|
|
13
|
+
const chainId = 8453;
|
|
14
14
|
const config = chains_1.default[chainId];
|
|
15
15
|
const TEST_MNEMONIC = process.env.TEST_MNEMONIC;
|
|
16
16
|
const TEST_PRIVATE_KEY = process.env.TEST_PRIVATE_KEY;
|
|
@@ -18,14 +18,18 @@ async function getProvider() {
|
|
|
18
18
|
return new ethers_1.ethers.JsonRpcProvider(config.rpcs[0]);
|
|
19
19
|
}
|
|
20
20
|
async function createWallet(mnemonic, provider) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
if (chainId === 8453) {
|
|
22
|
+
const wallet = ethers_1.ethers.Wallet.fromPhrase(mnemonic, provider);
|
|
23
|
+
console.info(`[${chainId}]: Loaded wallet from mnemonic: ${wallet.address}`);
|
|
24
|
+
// the signer is the wallet
|
|
25
|
+
return wallet;
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
// load from private key
|
|
29
|
+
const wallet = new ethers_1.ethers.Wallet(TEST_PRIVATE_KEY, provider);
|
|
30
|
+
console.info(`[${chainId}]: Loaded wallet from private key: ${wallet.address}`);
|
|
31
|
+
return wallet;
|
|
32
|
+
}
|
|
29
33
|
}
|
|
30
34
|
async function setup() {
|
|
31
35
|
const provider = await getProvider();
|
|
@@ -42,12 +46,11 @@ async function setup() {
|
|
|
42
46
|
// signer.address,
|
|
43
47
|
// signer
|
|
44
48
|
// );
|
|
45
|
-
//
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
// );
|
|
49
|
+
// set the base uri to instruxi data gateway
|
|
50
|
+
await rpc.nfts.setBaseUri(chainId, "http://44.211.155.244:3000/v1/properties/", signer);
|
|
51
|
+
if (chainId !== 8453) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
51
54
|
const RWAVaultAddress = (0, contracts_1.getContractAddress)(chainId, "rwavault");
|
|
52
55
|
const RWAVaultABI = (0, artifacts_1.getABI)("rwavault");
|
|
53
56
|
const RWAVaultContract = new ethers_1.ethers.Contract(RWAVaultAddress, RWAVaultABI, signer);
|
|
@@ -55,9 +58,6 @@ async function setup() {
|
|
|
55
58
|
const RAACHousePriceOracleABI = (0, artifacts_1.getABI)("raachousepriceoracle");
|
|
56
59
|
const RAACHousePriceOracleContract = new ethers_1.ethers.Contract(RAACHousePriceOracleAddress, RAACHousePriceOracleABI, signer);
|
|
57
60
|
//
|
|
58
|
-
console.log(await RAACHousePriceOracleContract.donId());
|
|
59
|
-
await (await RAACHousePriceOracleContract.setDonId("0x66756e2d657468657265756d2d7365706f6c69612d3100000000000000000000")).wait();
|
|
60
|
-
return;
|
|
61
61
|
console.log(await rpc.pools.lendingPool.getLendingPoolInfo(chainId, signer.address, provider));
|
|
62
62
|
console.log(await rpc.wallet.assets.getBalance(chainId, "rtoken", signer.address, provider));
|
|
63
63
|
console.log(await rpc.nfts.getTokensByOwner(chainId, signer.address, provider));
|