@raac/rpc 1.1.0-beta.82 → 1.1.0-beta.83

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.
@@ -53,27 +53,43 @@ async function setupLiquidityPool() {
53
53
  rpc.address = signer.address;
54
54
  rpc.provider = provider;
55
55
  rpc.chainId = chainId;
56
- const MockLiquidityPoolAddress = "0x9E545E3C0baAB3E08CdfD552C960A1050f373042";
56
+ const MockLiquidityPoolAddress = "0x0cAa0daa4f5EC8934428Ae406965B044f42F7D49";
57
57
  const MockLiquidityPoolABI = [
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
61
  // mint 200 million in crvusd
62
62
  console.log("Minting 100 million in crvusd");
63
- await rpc.wallet.assets.mintAsset(chainId, "crvusd", 200000000n, signer.address, signer);
63
+ await rpc.wallet.assets.mintAsset(chainId, "crvusd", 9800000n, signer.address, signer);
64
64
  // deposit 100 million in the RWA Vault
65
- console.log("Depositing 5 million in the RWA Vault");
66
- await rpc.wallet.assets.approveAsset(chainId, "crvusd", await rpc.pools.rwaVault.getAdapterAddress(chainId, "crvusdadapter")
67
- .address, "100000000", signer);
68
- const d1 = new ethers_1.ethers.AbiCoder().encode(["uint256"], [ethers_1.ethers.parseEther("100000000")]);
69
- await rpc.pools.rwaVault.depositToRWAVault(chainId, "crvusdadapter", d1, signer.address, "0", signer);
65
+ // console.log("Depositing 5 million in the RWA Vault");
66
+ // await rpc.wallet.assets.approveAsset(
67
+ // chainId,
68
+ // "crvusd",
69
+ // await rpc.pools.rwaVault.getAdapterAddress(chainId, "crvusdadapter")
70
+ // .address,
71
+ // "100000000",
72
+ // signer
73
+ // );
74
+ // const d1 = new ethers.AbiCoder().encode(
75
+ // ["uint256"],
76
+ // [ethers.parseEther("5000000")]
77
+ // );
78
+ // await rpc.pools.rwaVault.depositToRWAVault(
79
+ // chainId,
80
+ // "crvusdadapter",
81
+ // d1,
82
+ // signer.address,
83
+ // "0",
84
+ // signer
85
+ // );
70
86
  // deposit 100 million in the Mock Liquidity Pool
71
87
  console.log("Depositing 5 million in the Mock Liquidity Pool");
72
- await rpc.wallet.assets.approveAsset(chainId, "crvusd", MockLiquidityPoolAddress, "100000000", signer);
88
+ await rpc.wallet.assets.approveAsset(chainId, "crvusd", MockLiquidityPoolAddress, "9800000", signer);
73
89
  const indextokenBalance = (await rpc.wallet.assets.getBalance(chainId, "rwaindextoken", signer.address, provider)).balance;
74
90
  await rpc.wallet.assets.approveAsset(chainId, "rwaindextoken", MockLiquidityPoolAddress, indextokenBalance, signer);
75
91
  await (await MockLiquidityPoolContract.add_liquidity([
76
- ethers_1.ethers.parseEther("100000000"),
92
+ ethers_1.ethers.parseEther("9800000"),
77
93
  ethers_1.ethers.parseEther(indextokenBalance.toString()),
78
94
  ], 0, signer.address)).wait();
79
95
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raac/rpc",
3
- "version": "1.1.0-beta.82",
3
+ "version": "1.1.0-beta.83",
4
4
  "description": "RPC Library for RAAC ",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/types/index.d.ts",