@raac/rpc 1.1.0-beta.51 → 1.1.0-beta.53
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/artifacts/core/pools/LendingPool/LendingPool.sol/LendingPool.json +2 -2
- package/dist/artifacts/core/tokens/DEToken.sol/DEToken.json +2 -2
- package/dist/artifacts/core/tokens/RAACToken.sol/RAACToken.json +2 -2
- package/dist/artifacts/core/tokens/RToken.sol/RToken.json +2 -2
- package/dist/artifacts/core/tokens/RWAIndexToken.sol/RWAIndexToken.json +2 -2
- package/dist/artifacts/core/tokens/veRAACToken.sol/veRAACToken.json +2 -2
- package/dist/artifacts/mocks/core/tokens/crvUSDToken.sol/crvUSDToken.json +2 -2
- package/dist/artifacts/zeno/Auction.sol/Auction.json +2 -2
- package/dist/artifacts/zeno/AuctionFactory.sol/AuctionFactory.json +2 -2
- package/dist/artifacts/zeno/Zeno.sol/Zeno.json +2 -2
- package/dist/artifacts/zeno/ZenoFactory.sol/ZenoFactory.json +2 -2
- package/dist/configs/chains/11155111.json +22 -22
- package/dist/scripts/index.js +23 -18
- package/package.json +1 -1
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;
|
|
@@ -49,35 +49,40 @@ async function setup() {
|
|
|
49
49
|
const housePriceAddress = (0, contracts_1.getContractAddress)(chainId, "raachouseprices");
|
|
50
50
|
const housePriceABI = (0, artifacts_1.getABI)("raachouseprices");
|
|
51
51
|
const housePriceContract = new ethers_1.ethers.Contract(housePriceAddress, housePriceABI, signer);
|
|
52
|
-
|
|
52
|
+
// await (await housePriceContract.setOracle(signer.address)).wait();
|
|
53
|
+
// console.log(await rpc.pools.lendingPool.getLendingPoolInfo(chainId, signer.address, provider))
|
|
53
54
|
// console.log(await LendingPoolContract.rateData())
|
|
54
|
-
return;
|
|
55
55
|
// Add funds in the Mock Liquidity Pool
|
|
56
56
|
const CURVE_POOL_ADDRESSES = {
|
|
57
|
-
11155111: '
|
|
57
|
+
11155111: '0x645A38Bbe56Dc014fb28536bEA9796b2b2D92c0c', // Sepolia
|
|
58
58
|
8453: '0x5eb3Bc0a489C5A8288765d2336659EbCA68FCd00', // Base
|
|
59
59
|
};
|
|
60
60
|
const MockLiquidityPoolAddress = CURVE_POOL_ADDRESSES[chainId];
|
|
61
61
|
const MockLiquidityPoolABI = ["function add_liquidity(uint256[2] memory amounts, uint256) external returns (uint256)", "function getTotalLiquidity(address _pairedToken) external view returns (uint256 raacLiquidity, uint256 pairedLiquidity)"];
|
|
62
62
|
const MockLiquidityPoolContract = new ethers_1.ethers.Contract(MockLiquidityPoolAddress, MockLiquidityPoolABI, signer);
|
|
63
63
|
// mint 10 million in crvusd
|
|
64
|
-
console.log("Minting 10 million in crvusd");
|
|
65
|
-
await rpc.wallet.assets.mintAsset(chainId, "crvusd", 10000000n, signer.address, signer)
|
|
66
|
-
// deposit 5 million in the RWA Vault
|
|
67
|
-
console.log("Depositing 5 million in the RWA Vault");
|
|
64
|
+
// console.log("Minting 10 million in crvusd");
|
|
65
|
+
// await rpc.wallet.assets.mintAsset(chainId, "crvusd", 10000000n, signer.address, signer)
|
|
66
|
+
// // deposit 5 million in the RWA Vault
|
|
67
|
+
// console.log("Depositing 5 million in the RWA Vault");
|
|
68
|
+
// await rpc.wallet.assets.approveAsset(chainId, "crvusd", await rpc.pools.rwaVault.getAdapterAddress(chainId, "crvusdadapter").address, "5000000", signer);
|
|
69
|
+
// const data = new ethers.AbiCoder().encode(["uint256"], [ ethers.parseEther("5000000") ])
|
|
70
|
+
// await rpc.pools.rwaVault.depositToRWAVault(chainId, "crvusdadapter", data, signer.address, signer)
|
|
71
|
+
// // deposit 5 million in the Mock Liquidity Pool
|
|
72
|
+
// console.log("Depositing 5 million in the Mock Liquidity Pool");
|
|
73
|
+
// await rpc.wallet.assets.approveAsset(chainId, "crvusd", MockLiquidityPoolAddress, "5000000", signer);
|
|
74
|
+
// const indextokenBalance = (await rpc.wallet.assets.getBalance(chainId, "rwaindextoken", signer.address, provider)).balance
|
|
75
|
+
// await rpc.wallet.assets.approveAsset(chainId, "rwaindextoken", MockLiquidityPoolAddress, indextokenBalance, signer);
|
|
76
|
+
// await (await MockLiquidityPoolContract.add_liquidity([ethers.parseEther("5000000"), ethers.parseEther(indextokenBalance.toString())], 0)).wait();
|
|
77
|
+
// // check the liquidity in the pools
|
|
78
|
+
// console.log("Checking the liquidity in the pools");
|
|
79
|
+
// const liquidity = await MockLiquidityPoolContract.getTotalLiquidity(await rpc.contracts.getContractAddress(chainId, "rwaindextoken"))
|
|
80
|
+
// console.log("Liquidity in the Mock Liquidity Pool", liquidity);
|
|
81
|
+
// mint the current user 5 million irAAC
|
|
82
|
+
console.log("Minting 5 million irAAC");
|
|
68
83
|
await rpc.wallet.assets.approveAsset(chainId, "crvusd", await rpc.pools.rwaVault.getAdapterAddress(chainId, "crvusdadapter").address, "5000000", signer);
|
|
69
84
|
const data = new ethers_1.ethers.AbiCoder().encode(["uint256"], [ethers_1.ethers.parseEther("5000000")]);
|
|
70
85
|
await rpc.pools.rwaVault.depositToRWAVault(chainId, "crvusdadapter", data, signer.address, signer);
|
|
71
|
-
// deposit 5 million in the Mock Liquidity Pool
|
|
72
|
-
console.log("Depositing 5 million in the Mock Liquidity Pool");
|
|
73
|
-
await rpc.wallet.assets.approveAsset(chainId, "crvusd", MockLiquidityPoolAddress, "5000000", signer);
|
|
74
|
-
const indextokenBalance = (await rpc.wallet.assets.getBalance(chainId, "rwaindextoken", signer.address, provider)).balance;
|
|
75
|
-
await rpc.wallet.assets.approveAsset(chainId, "rwaindextoken", MockLiquidityPoolAddress, indextokenBalance, signer);
|
|
76
|
-
await (await MockLiquidityPoolContract.add_liquidity([ethers_1.ethers.parseEther("5000000"), ethers_1.ethers.parseEther(indextokenBalance.toString())], 0)).wait();
|
|
77
|
-
// check the liquidity in the pools
|
|
78
|
-
console.log("Checking the liquidity in the pools");
|
|
79
|
-
const liquidity = await MockLiquidityPoolContract.getTotalLiquidity(await rpc.contracts.getContractAddress(chainId, "rwaindextoken"));
|
|
80
|
-
console.log("Liquidity in the Mock Liquidity Pool", liquidity);
|
|
81
86
|
return;
|
|
82
87
|
/// END OF ADD FUNDS IN THE MOCK LIQUIDITY POOL
|
|
83
88
|
// // // send myself some CRVUSD
|