@raac/rpc 2.0.0-beta.12 → 2.0.0-beta.13

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.
Files changed (82) hide show
  1. package/dist/RPCLibrary.js +53 -22
  2. package/dist/configs/chains/11155111.json +16 -41
  3. package/dist/contracts/complianceRegistry/getStatuses.js +40 -0
  4. package/dist/contracts/crvUSDToUSDOracle/getState.js +58 -0
  5. package/dist/contracts/curve/common/_helpers.js +57 -0
  6. package/dist/contracts/curve/common/addLiquidity.js +30 -0
  7. package/dist/contracts/curve/common/calcTokenAmount.js +23 -0
  8. package/dist/contracts/curve/common/calcWithdrawOneCoin.js +21 -0
  9. package/dist/contracts/curve/common/exchange.js +33 -0
  10. package/dist/contracts/curve/common/getDy.js +22 -0
  11. package/dist/contracts/curve/common/index.js +7 -0
  12. package/dist/contracts/curve/common/removeLiquidity.js +30 -0
  13. package/dist/contracts/curve/common/removeLiquidityOneCoin.js +31 -0
  14. package/dist/contracts/faucet/claim.js +37 -0
  15. package/dist/contracts/faucet/index.js +17 -0
  16. package/dist/contracts/feeCollector/getState.js +100 -0
  17. package/dist/contracts/getRoles.js +35 -0
  18. package/dist/contracts/housePrices/getState.js +41 -0
  19. package/dist/contracts/psm/getVaultSettings.js +60 -0
  20. package/dist/contracts/treasury/getState.js +46 -0
  21. package/dist/minter/emissionSchedule.js +90 -0
  22. package/dist/pools/lendingPool/getAdminState.js +47 -0
  23. package/dist/pools/rwaVault/getRegisteredAdapters.js +78 -0
  24. package/dist/pools/rwaVault/getSeedStatus.js +45 -0
  25. package/dist/pools/stabilityPool/getAdminState.js +42 -0
  26. package/dist/pools/stabilityPool/liquidation.js +297 -0
  27. package/dist/prices/tokenPricesUSD.js +0 -2
  28. package/dist/types/RPCLibrary.d.ts +44 -14
  29. package/dist/types/contracts/complianceRegistry/getStatuses.d.ts +25 -0
  30. package/dist/types/contracts/crvUSDToUSDOracle/getState.d.ts +36 -0
  31. package/dist/types/contracts/curve/common/_helpers.d.ts +10 -1
  32. package/dist/types/contracts/curve/common/addLiquidity.d.ts +14 -0
  33. package/dist/types/contracts/curve/common/calcTokenAmount.d.ts +10 -0
  34. package/dist/types/contracts/curve/common/calcWithdrawOneCoin.d.ts +8 -0
  35. package/dist/types/contracts/curve/common/exchange.d.ts +16 -0
  36. package/dist/types/contracts/curve/common/getDy.d.ts +8 -0
  37. package/dist/types/contracts/curve/common/index.d.ts +7 -0
  38. package/dist/types/contracts/curve/common/removeLiquidity.d.ts +14 -0
  39. package/dist/types/contracts/curve/common/removeLiquidityOneCoin.d.ts +15 -0
  40. package/dist/types/contracts/faucet/claim.d.ts +18 -0
  41. package/dist/types/contracts/faucet/index.d.ts +1 -0
  42. package/dist/types/contracts/feeCollector/getState.d.ts +42 -0
  43. package/dist/types/contracts/getRoles.d.ts +15 -0
  44. package/dist/types/contracts/housePrices/getState.d.ts +24 -0
  45. package/dist/types/contracts/psm/getVaultSettings.d.ts +38 -0
  46. package/dist/types/contracts/treasury/getState.d.ts +24 -0
  47. package/dist/types/minter/emissionSchedule.d.ts +53 -0
  48. package/dist/types/pools/lendingPool/getAdminState.d.ts +26 -0
  49. package/dist/types/pools/rwaVault/getRegisteredAdapters.d.ts +33 -0
  50. package/dist/types/pools/rwaVault/getSeedStatus.d.ts +27 -0
  51. package/dist/types/pools/stabilityPool/getAdminState.d.ts +25 -0
  52. package/dist/types/pools/stabilityPool/liquidation.d.ts +112 -0
  53. package/dist/types/typechain-types/contracts/core/collectors/index.d.ts +0 -2
  54. package/dist/types/typechain-types/contracts/mocks/core/tokens/index.d.ts +0 -1
  55. package/dist/types/typechain-types/factories/contracts/core/collectors/index.d.ts +0 -1
  56. package/dist/types/typechain-types/factories/contracts/mocks/core/tokens/index.d.ts +0 -1
  57. package/dist/types/typechain-types/index.d.ts +0 -4
  58. package/dist/types/utils/artifacts.d.ts +0 -198
  59. package/dist/utils/artifacts.js +0 -4
  60. package/package.json +14 -4
  61. package/dist/artifacts/core/collectors/fee-streamer/RentStreamer.sol/RentStreamer.json +0 -838
  62. package/dist/artifacts/mocks/core/tokens/USDCTokenLimited.sol/USDCTokenLimited.json +0 -558
  63. package/dist/contracts/rentStreamer/_helpers.js +0 -19
  64. package/dist/contracts/rentStreamer/getEpochProjection.js +0 -91
  65. package/dist/contracts/rentStreamer/getScheduled.js +0 -19
  66. package/dist/contracts/rentStreamer/getState.js +0 -40
  67. package/dist/contracts/rentStreamer/previewRelease.js +0 -23
  68. package/dist/contracts/rentStreamer/release.js +0 -22
  69. package/dist/contracts/rentStreamer/sync.js +0 -21
  70. package/dist/types/contracts/rentStreamer/_helpers.d.ts +0 -4
  71. package/dist/types/contracts/rentStreamer/getEpochProjection.d.ts +0 -40
  72. package/dist/types/contracts/rentStreamer/getScheduled.d.ts +0 -12
  73. package/dist/types/contracts/rentStreamer/getState.d.ts +0 -33
  74. package/dist/types/contracts/rentStreamer/previewRelease.d.ts +0 -20
  75. package/dist/types/contracts/rentStreamer/release.d.ts +0 -12
  76. package/dist/types/contracts/rentStreamer/sync.d.ts +0 -11
  77. package/dist/types/typechain-types/contracts/core/collectors/fee-streamer/RentStreamer.d.ts +0 -422
  78. package/dist/types/typechain-types/contracts/core/collectors/fee-streamer/index.d.ts +0 -1
  79. package/dist/types/typechain-types/contracts/mocks/core/tokens/USDCTokenLimited.d.ts +0 -238
  80. package/dist/types/typechain-types/factories/contracts/core/collectors/fee-streamer/RentStreamer__factory.d.ts +0 -665
  81. package/dist/types/typechain-types/factories/contracts/core/collectors/fee-streamer/index.d.ts +0 -1
  82. package/dist/types/typechain-types/factories/contracts/mocks/core/tokens/USDCTokenLimited__factory.d.ts +0 -439
@@ -50,56 +50,6 @@ declare const ABIS: {
50
50
  anonymous?: undefined;
51
51
  })[];
52
52
  pmusd: any[];
53
- usdc: ({
54
- inputs: {
55
- internalType: string;
56
- name: string;
57
- type: string;
58
- }[];
59
- stateMutability: string;
60
- type: string;
61
- name?: undefined;
62
- anonymous?: undefined;
63
- outputs?: undefined;
64
- } | {
65
- inputs: {
66
- internalType: string;
67
- name: string;
68
- type: string;
69
- }[];
70
- name: string;
71
- type: string;
72
- stateMutability?: undefined;
73
- anonymous?: undefined;
74
- outputs?: undefined;
75
- } | {
76
- anonymous: boolean;
77
- inputs: {
78
- indexed: boolean;
79
- internalType: string;
80
- name: string;
81
- type: string;
82
- }[];
83
- name: string;
84
- type: string;
85
- stateMutability?: undefined;
86
- outputs?: undefined;
87
- } | {
88
- inputs: {
89
- internalType: string;
90
- name: string;
91
- type: string;
92
- }[];
93
- name: string;
94
- outputs: {
95
- internalType: string;
96
- name: string;
97
- type: string;
98
- }[];
99
- stateMutability: string;
100
- type: string;
101
- anonymous?: undefined;
102
- })[];
103
53
  xpm: any[];
104
54
  raacnft: ({
105
55
  inputs: {
@@ -1894,56 +1844,6 @@ declare const ABIS: {
1894
1844
  anonymous?: undefined;
1895
1845
  outputs?: undefined;
1896
1846
  })[];
1897
- rentstreamer: ({
1898
- inputs: {
1899
- internalType: string;
1900
- name: string;
1901
- type: string;
1902
- }[];
1903
- stateMutability: string;
1904
- type: string;
1905
- name?: undefined;
1906
- anonymous?: undefined;
1907
- outputs?: undefined;
1908
- } | {
1909
- inputs: {
1910
- internalType: string;
1911
- name: string;
1912
- type: string;
1913
- }[];
1914
- name: string;
1915
- type: string;
1916
- stateMutability?: undefined;
1917
- anonymous?: undefined;
1918
- outputs?: undefined;
1919
- } | {
1920
- anonymous: boolean;
1921
- inputs: {
1922
- indexed: boolean;
1923
- internalType: string;
1924
- name: string;
1925
- type: string;
1926
- }[];
1927
- name: string;
1928
- type: string;
1929
- stateMutability?: undefined;
1930
- outputs?: undefined;
1931
- } | {
1932
- inputs: {
1933
- internalType: string;
1934
- name: string;
1935
- type: string;
1936
- }[];
1937
- name: string;
1938
- outputs: {
1939
- internalType: string;
1940
- name: string;
1941
- type: string;
1942
- }[];
1943
- stateMutability: string;
1944
- type: string;
1945
- anonymous?: undefined;
1946
- })[];
1947
1847
  gaugecontroller: ({
1948
1848
  inputs: {
1949
1849
  internalType: string;
@@ -4525,104 +4425,6 @@ declare const getABI: (name: keyof typeof ABIS) => any[] | ({
4525
4425
  stateMutability: string;
4526
4426
  type: string;
4527
4427
  anonymous?: undefined;
4528
- })[] | ({
4529
- inputs: {
4530
- internalType: string;
4531
- name: string;
4532
- type: string;
4533
- }[];
4534
- stateMutability: string;
4535
- type: string;
4536
- name?: undefined;
4537
- anonymous?: undefined;
4538
- outputs?: undefined;
4539
- } | {
4540
- inputs: {
4541
- internalType: string;
4542
- name: string;
4543
- type: string;
4544
- }[];
4545
- name: string;
4546
- type: string;
4547
- stateMutability?: undefined;
4548
- anonymous?: undefined;
4549
- outputs?: undefined;
4550
- } | {
4551
- anonymous: boolean;
4552
- inputs: {
4553
- indexed: boolean;
4554
- internalType: string;
4555
- name: string;
4556
- type: string;
4557
- }[];
4558
- name: string;
4559
- type: string;
4560
- stateMutability?: undefined;
4561
- outputs?: undefined;
4562
- } | {
4563
- inputs: {
4564
- internalType: string;
4565
- name: string;
4566
- type: string;
4567
- }[];
4568
- name: string;
4569
- outputs: {
4570
- internalType: string;
4571
- name: string;
4572
- type: string;
4573
- }[];
4574
- stateMutability: string;
4575
- type: string;
4576
- anonymous?: undefined;
4577
- })[] | ({
4578
- inputs: {
4579
- internalType: string;
4580
- name: string;
4581
- type: string;
4582
- }[];
4583
- stateMutability: string;
4584
- type: string;
4585
- name?: undefined;
4586
- anonymous?: undefined;
4587
- outputs?: undefined;
4588
- } | {
4589
- inputs: {
4590
- internalType: string;
4591
- name: string;
4592
- type: string;
4593
- }[];
4594
- name: string;
4595
- type: string;
4596
- stateMutability?: undefined;
4597
- anonymous?: undefined;
4598
- outputs?: undefined;
4599
- } | {
4600
- anonymous: boolean;
4601
- inputs: {
4602
- indexed: boolean;
4603
- internalType: string;
4604
- name: string;
4605
- type: string;
4606
- }[];
4607
- name: string;
4608
- type: string;
4609
- stateMutability?: undefined;
4610
- outputs?: undefined;
4611
- } | {
4612
- inputs: {
4613
- internalType: string;
4614
- name: string;
4615
- type: string;
4616
- }[];
4617
- name: string;
4618
- outputs: {
4619
- internalType: string;
4620
- name: string;
4621
- type: string;
4622
- }[];
4623
- stateMutability: string;
4624
- type: string;
4625
- anonymous?: undefined;
4626
4428
  } | {
4627
4429
  inputs: {
4628
4430
  internalType: string;
@@ -38,8 +38,6 @@ const RWAIndexTokenCollector_json_1 = __importDefault(require("../artifacts/core
38
38
  const RAACTokenCollector_json_1 = __importDefault(require("../artifacts/core/collectors/RAACTokenCollector.sol/RAACTokenCollector.json"));
39
39
  const CrvUSDToUSDOracle_json_1 = __importDefault(require("../artifacts/core/oracles/CrvUSDToUSDOracle.sol/CrvUSDToUSDOracle.json"));
40
40
  const NFTRoyaltyFeeCollector_json_1 = __importDefault(require("../artifacts/core/collectors/NFTRoyaltyFeeCollector.sol/NFTRoyaltyFeeCollector.json"));
41
- const RentStreamer_json_1 = __importDefault(require("../artifacts/core/collectors/fee-streamer/RentStreamer.sol/RentStreamer.json"));
42
- const USDCTokenLimited_json_1 = __importDefault(require("../artifacts/mocks/core/tokens/USDCTokenLimited.sol/USDCTokenLimited.json"));
43
41
  const GaugeController_json_1 = __importDefault(require("../artifacts/core/governance/gauges/GaugeController.sol/GaugeController.json"));
44
42
  const BaseGauge_json_1 = __importDefault(require("../artifacts/core/governance/gauges/BaseGauge.sol/BaseGauge.json"));
45
43
  const RAACGauge_json_1 = __importDefault(require("../artifacts/core/governance/gauges/RAACGauge.sol/RAACGauge.json"));
@@ -95,7 +93,6 @@ const ABIS = {
95
93
  // Tokens
96
94
  crvusd: CRVUSD_ABI,
97
95
  pmusd: PMUSD_ABI,
98
- usdc: USDCTokenLimited_json_1.default.abi,
99
96
  xpm: XPM_ABI,
100
97
  // RAAC
101
98
  raacnft: RAACNFT_ABI,
@@ -137,7 +134,6 @@ const ABIS = {
137
134
  raactokencollector: RAACTokenCollector_json_1.default.abi,
138
135
  crvusdtousdoracle: CRVUSDTOUSDORACLE_ABI,
139
136
  nftroyaltyfeecollector: NFTRoyaltyFeeCollector_json_1.default.abi,
140
- rentstreamer: RentStreamer_json_1.default.abi,
141
137
  // Governance
142
138
  gaugecontroller: GAUGECONTROLLER_ABI,
143
139
  basegauge: BASEGAUGE_ABI,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raac/rpc",
3
- "version": "2.0.0-beta.12",
3
+ "version": "2.0.0-beta.13",
4
4
  "description": "RPC Library for RAAC",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -11,7 +11,13 @@
11
11
  "dev": "ts-node-dev --transpile-only --env-file=.env scripts/index.ts",
12
12
  "build": "tsc && cp -r typechain-types dist/types && cp -r generated dist/generated",
13
13
  "build:watch": "tsc --watch",
14
- "test": "echo \"Error: no test specified\" && exit 1",
14
+ "test": "npm run test:unit && npm run test:integration && npm run test:e2e",
15
+ "test:full": "npm run test:unit && npm run test:integration && npm run test:e2e && npm run test:browser",
16
+ "test:unit": "node -r ts-node/register -r tsconfig-paths/register --test tests/loader.unit.test.ts",
17
+ "test:integration": "node -r ts-node/register -r tsconfig-paths/register --test tests/loader.integration.test.ts",
18
+ "test:e2e": "npm run build && node -r ts-node/register -r tsconfig-paths/register --test tests/loader.e2e.test.ts",
19
+ "test:browser": "node tests/browser/server.js --local",
20
+ "test:browser:published": "open tests/browser/index.html",
15
21
  "sync": "bash setup.sh",
16
22
  "clean": "rm -rf dist",
17
23
  "prebuild": "npm run clean",
@@ -28,14 +34,18 @@
28
34
  "dependencies": {
29
35
  "@raac/chainlinkjs": "1.0.1",
30
36
  "csv-parser": "3.2.0",
31
- "ethers": "6.16.0",
37
+ "ethers": "6.17.0",
32
38
  "ethers5": "npm:ethers@5.8.0"
33
39
  },
34
40
  "devDependencies": {
35
41
  "@anthropic-ai/sdk": "^0.127.0",
42
+ "esbuild": "0.24.2",
36
43
  "eslint": "9.39.1",
37
44
  "ts-node": "10.9.2",
38
45
  "ts-node-dev": "2.0.0",
46
+ "tsconfig-paths": "4.2.0",
39
47
  "typescript": "5.9.3"
40
- }
48
+ },
49
+ "browser": "dist/browser.js",
50
+ "module": "dist/browser.js"
41
51
  }