@raac/rpc 1.1.0-beta.80 → 1.1.0-beta.82
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.
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"raachouseprices": {
|
|
18
18
|
"id": "raachouseprices",
|
|
19
19
|
"name": "RAAC House Prices",
|
|
20
|
-
"contract": "
|
|
20
|
+
"contract": "0x96EBC781867cF33F0Fac64e44388CBF065c78e92"
|
|
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": "0xf460b2436753AEed5Df275CA33528f5C9abB579D"
|
|
41
41
|
},
|
|
42
42
|
"treasury": {
|
|
43
43
|
"id": "treasury",
|
|
44
44
|
"name": "Treasury",
|
|
45
|
-
"contract": "
|
|
45
|
+
"contract": "0xDc1FCd959881533CCFBfB572881CdC6d8a2b35E7"
|
|
46
46
|
},
|
|
47
47
|
"repairfund": {
|
|
48
48
|
"id": "repairfund",
|
|
@@ -57,17 +57,17 @@
|
|
|
57
57
|
"rwavault": {
|
|
58
58
|
"id": "rwavault",
|
|
59
59
|
"name": "RWA Vault",
|
|
60
|
-
"contract": "
|
|
60
|
+
"contract": "0xEC9e67e9b6ceD5e48b5Dd39915414e7BbDf952f2"
|
|
61
61
|
},
|
|
62
62
|
"complianceregistry": {
|
|
63
63
|
"id": "complianceregistry",
|
|
64
64
|
"name": "Compliance Registry",
|
|
65
|
-
"contract": "
|
|
65
|
+
"contract": "0x95bc6FCfB69BDbF723De06bCa1a689ad68762CC5"
|
|
66
66
|
},
|
|
67
67
|
"rwaindextokencollector": {
|
|
68
68
|
"id": "rwaindextokencollector",
|
|
69
69
|
"name": "RWA Index Token Collector",
|
|
70
|
-
"contract": "
|
|
70
|
+
"contract": "0xdbEd45218e5c040Cdf696C740937997162cFb720"
|
|
71
71
|
},
|
|
72
72
|
"raactokencollector": {
|
|
73
73
|
"id": "raactokencollector",
|
|
@@ -77,41 +77,41 @@
|
|
|
77
77
|
"raachousepriceoracle": {
|
|
78
78
|
"id": "raachousepriceoracle",
|
|
79
79
|
"name": "RAAC House Price Oracle",
|
|
80
|
-
"contract": "
|
|
80
|
+
"contract": "0x8C881051D397014E6D4ea711764E6875506d88D1"
|
|
81
81
|
},
|
|
82
82
|
"raacprimerateoracle": {
|
|
83
83
|
"id": "raacprimerateoracle",
|
|
84
84
|
"name": "RAAC Prime Rate Oracle",
|
|
85
|
-
"contract": "
|
|
85
|
+
"contract": "0x312F47A51F398C6504B31794dfCf604acF174c67"
|
|
86
86
|
},
|
|
87
87
|
"crvusdtousdoracle": {
|
|
88
88
|
"id": "crvusdtousdoracle",
|
|
89
89
|
"name": "CRVUSD to USD Oracle",
|
|
90
|
-
"contract": "
|
|
90
|
+
"contract": "0x627897baf46851500F116cec76346921C3292246"
|
|
91
91
|
},
|
|
92
92
|
"nftroyaltyfeecollector": {
|
|
93
93
|
"id": "nftroyaltyfeecollector",
|
|
94
94
|
"name": "NFT Royalty Fee Collector",
|
|
95
|
-
"contract": "
|
|
95
|
+
"contract": "0x352b225A9f96ad9d90A1e8db4f1908943729b511"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"pools": {
|
|
99
99
|
"stabilitypool": {
|
|
100
100
|
"id": "stabilitypool",
|
|
101
101
|
"name": "Stability Pool",
|
|
102
|
-
"contract": "
|
|
102
|
+
"contract": "0xd7663c079445A070Ef24405CD5ef1511B9d9E060"
|
|
103
103
|
},
|
|
104
104
|
"lendingpool": {
|
|
105
105
|
"id": "lendingpool",
|
|
106
106
|
"name": "Lending Pool",
|
|
107
|
-
"contract": "
|
|
107
|
+
"contract": "0xefCff23AEed94ae0f23377DFDaB78C3c868eeB33"
|
|
108
108
|
}
|
|
109
109
|
},
|
|
110
110
|
"nfts": {
|
|
111
111
|
"raacnft": {
|
|
112
112
|
"id": "raacnft",
|
|
113
113
|
"name": "RAAC NFT",
|
|
114
|
-
"contract": "
|
|
114
|
+
"contract": "0xb16453caAFF3c75e9D090793dD60C46668c1de52"
|
|
115
115
|
}
|
|
116
116
|
},
|
|
117
117
|
"assets": {
|
|
@@ -125,19 +125,19 @@
|
|
|
125
125
|
"id": "crvusd",
|
|
126
126
|
"name": "CRVUSD",
|
|
127
127
|
"decimals": 18,
|
|
128
|
-
"contract": "
|
|
128
|
+
"contract": "0x8047a14301583CAaf9e2128D5F88F9f435659d35"
|
|
129
129
|
},
|
|
130
130
|
"rtoken": {
|
|
131
131
|
"id": "rtoken",
|
|
132
132
|
"name": "RToken",
|
|
133
133
|
"decimals": 18,
|
|
134
|
-
"contract": "
|
|
134
|
+
"contract": "0xc96c34825aa96A77A4AD884e393960a70c5f1186"
|
|
135
135
|
},
|
|
136
136
|
"detoken": {
|
|
137
137
|
"id": "detoken",
|
|
138
138
|
"name": "DEToken",
|
|
139
139
|
"decimals": 18,
|
|
140
|
-
"contract": "
|
|
140
|
+
"contract": "0x5841dc06d2C9e0D2605392f669be71Bfe6d04cf7"
|
|
141
141
|
},
|
|
142
142
|
"raactoken": {
|
|
143
143
|
"id": "raactoken",
|
|
@@ -155,13 +155,13 @@
|
|
|
155
155
|
"id": "debttoken",
|
|
156
156
|
"name": "Debt Token",
|
|
157
157
|
"decimals": 18,
|
|
158
|
-
"contract": "
|
|
158
|
+
"contract": "0x98db917a623a92a8553Fe59b9f05B8c936aa1E1e"
|
|
159
159
|
},
|
|
160
160
|
"rwaindextoken": {
|
|
161
161
|
"id": "rwaindextoken",
|
|
162
162
|
"name": "RWA Index Token",
|
|
163
163
|
"decimals": 18,
|
|
164
|
-
"contract": "
|
|
164
|
+
"contract": "0x1c1789629B2511821aC78618eBd23d41E7b04989"
|
|
165
165
|
}
|
|
166
166
|
},
|
|
167
167
|
"adapters": {
|
|
@@ -169,13 +169,13 @@
|
|
|
169
169
|
"raacnftadapter": {
|
|
170
170
|
"id": "raacnftadapter",
|
|
171
171
|
"name": "RAAC NFT Adapter",
|
|
172
|
-
"contract": "
|
|
172
|
+
"contract": "0x608aD2608DAdDb633ceBe22d6Fcb7C9e660FfA65",
|
|
173
173
|
"type": "ERC721"
|
|
174
174
|
},
|
|
175
175
|
"rwaindextokenadapter": {
|
|
176
176
|
"id": "rwaindextokenadapter",
|
|
177
177
|
"name": "RWA Index Token",
|
|
178
|
-
"contract": "
|
|
178
|
+
"contract": "0x5374287a807c5513fC31bc9AECE5aC40f0e37c71",
|
|
179
179
|
"type": "ERC20"
|
|
180
180
|
}
|
|
181
181
|
},
|
|
@@ -183,7 +183,7 @@
|
|
|
183
183
|
"raacnftadapter": {
|
|
184
184
|
"id": "raacnftadapter",
|
|
185
185
|
"name": "RAAC NFT Adapter",
|
|
186
|
-
"contract": "
|
|
186
|
+
"contract": "0x531F5d54Fda86f103E297ECE796c8B799B835E0c",
|
|
187
187
|
"type": "ERC721"
|
|
188
188
|
},
|
|
189
189
|
"crvusdadapter": {
|
|
@@ -4,11 +4,10 @@ const _helpers_1 = require("./_helpers");
|
|
|
4
4
|
async function getRWAVaultInfo(chainId, provider) {
|
|
5
5
|
try {
|
|
6
6
|
const rwaVaultContract = await (0, _helpers_1.getRWAVaultContract)(chainId, provider);
|
|
7
|
-
const [totalAssets, pricePerShare, vaultToken,
|
|
7
|
+
const [totalAssets, pricePerShare, vaultToken, stabilityPool, vrfConsumer, indexTokenMintingFee, feeCollector, vrfRequestDelay, allowVRFRequest,] = await Promise.all([
|
|
8
8
|
rwaVaultContract.totalAssets(),
|
|
9
9
|
rwaVaultContract.pricePerShare(),
|
|
10
10
|
rwaVaultContract.vaultToken(),
|
|
11
|
-
rwaVaultContract.underlyingAssetToken(),
|
|
12
11
|
rwaVaultContract.stabilityPool(),
|
|
13
12
|
rwaVaultContract.vrfConsumer(),
|
|
14
13
|
rwaVaultContract.indexTokenMintingFee(),
|
|
@@ -20,7 +19,6 @@ async function getRWAVaultInfo(chainId, provider) {
|
|
|
20
19
|
totalAssets: totalAssets.toString(),
|
|
21
20
|
pricePerShare: pricePerShare.toString(),
|
|
22
21
|
vaultToken,
|
|
23
|
-
underlyingAssetToken,
|
|
24
22
|
stabilityPool,
|
|
25
23
|
vrfConsumer,
|
|
26
24
|
indexTokenMintingFee: indexTokenMintingFee.toString(),
|
package/dist/scripts/index.js
CHANGED
|
@@ -11,7 +11,7 @@ const contracts_1 = require("../utils/contracts");
|
|
|
11
11
|
const artifacts_1 = require("../utils/artifacts");
|
|
12
12
|
const _helpers_1 = require("../pools/rwaVault/_helpers");
|
|
13
13
|
const ethers5_1 = require("ethers5");
|
|
14
|
-
const chainId =
|
|
14
|
+
const chainId = 11155111;
|
|
15
15
|
const config = chains_1.default[chainId];
|
|
16
16
|
const TEST_MNEMONIC = process.env.TEST_MNEMONIC;
|
|
17
17
|
const TEST_PRIVATE_KEY = process.env.TEST_PRIVATE_KEY;
|
|
@@ -140,6 +140,12 @@ async function setup() {
|
|
|
140
140
|
// console.log(tx);
|
|
141
141
|
// let tx = await StabilityPoolContract.setLiquidationVaultTokenSplit(2_50, 2_50, 90_00, 5_00)
|
|
142
142
|
// await tx.wait();
|
|
143
|
+
// console.log(await raacNFTContract.hasRole(await raacNFTContract.ADMIN_ROLE(), signer.address))
|
|
144
|
+
console.log(await housePriceContract.oracle());
|
|
145
|
+
// await (await housePriceContract.setOracle(signer.address)).wait();
|
|
146
|
+
// return;
|
|
147
|
+
await (await housePriceContract.setHousePrice("8", ethers_1.ethers.parseEther("63500"))).wait();
|
|
148
|
+
return;
|
|
143
149
|
await (await RWAVaultContract.registerDepositableAdapter("0x322813Fd9A801c5507c9de605d63CEA4f2CE6c44")).wait();
|
|
144
150
|
// // console.log(await rpc.wallet.assets.getBalance(chainId, "rwaindextoken", signer.address, provider))
|
|
145
151
|
// // set the base uri to instruxi data gateway
|
|
@@ -9,7 +9,7 @@ const chains_1 = __importDefault(require("../configs/chains"));
|
|
|
9
9
|
const RPCLibrary_1 = __importDefault(require("../RPCLibrary"));
|
|
10
10
|
const contracts_1 = require("../utils/contracts");
|
|
11
11
|
const artifacts_1 = require("../utils/artifacts");
|
|
12
|
-
const chainId =
|
|
12
|
+
const chainId = 11155111;
|
|
13
13
|
const config = chains_1.default[chainId];
|
|
14
14
|
const TEST_MNEMONIC = process.env.TEST_MNEMONIC;
|
|
15
15
|
const TEST_PRIVATE_KEY = process.env.TEST_PRIVATE_KEY;
|
|
@@ -58,16 +58,16 @@ async function setupLiquidityPool() {
|
|
|
58
58
|
"function add_liquidity(uint256[2] amounts, uint256 min_mint_amount, address receiver) external",
|
|
59
59
|
];
|
|
60
60
|
const MockLiquidityPoolContract = new ethers_1.ethers.Contract(MockLiquidityPoolAddress, MockLiquidityPoolABI, signer);
|
|
61
|
-
// mint
|
|
61
|
+
// mint 200 million in crvusd
|
|
62
62
|
console.log("Minting 100 million in crvusd");
|
|
63
63
|
await rpc.wallet.assets.mintAsset(chainId, "crvusd", 200000000n, signer.address, signer);
|
|
64
|
-
// deposit
|
|
64
|
+
// deposit 100 million in the RWA Vault
|
|
65
65
|
console.log("Depositing 5 million in the RWA Vault");
|
|
66
66
|
await rpc.wallet.assets.approveAsset(chainId, "crvusd", await rpc.pools.rwaVault.getAdapterAddress(chainId, "crvusdadapter")
|
|
67
67
|
.address, "100000000", signer);
|
|
68
68
|
const d1 = new ethers_1.ethers.AbiCoder().encode(["uint256"], [ethers_1.ethers.parseEther("100000000")]);
|
|
69
69
|
await rpc.pools.rwaVault.depositToRWAVault(chainId, "crvusdadapter", d1, signer.address, "0", signer);
|
|
70
|
-
// deposit
|
|
70
|
+
// deposit 100 million in the Mock Liquidity Pool
|
|
71
71
|
console.log("Depositing 5 million in the Mock Liquidity Pool");
|
|
72
72
|
await rpc.wallet.assets.approveAsset(chainId, "crvusd", MockLiquidityPoolAddress, "100000000", signer);
|
|
73
73
|
const indextokenBalance = (await rpc.wallet.assets.getBalance(chainId, "rwaindextoken", signer.address, provider)).balance;
|