@raac/rpc 1.1.0-beta.45 → 1.1.0-beta.47

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.
@@ -119,6 +119,7 @@ const approveNFT_1 = __importDefault(require("./nfts/approveNFT"));
119
119
  const vaultOpened_1 = __importDefault(require("./pools/lendingPool/vaultOpened"));
120
120
  const getWithdrawRequestInfo_2 = require("./pools/stabilityPool/getWithdrawRequestInfo");
121
121
  const requestWithdraw_2 = require("./pools/stabilityPool/requestWithdraw");
122
+ const artifacts_1 = require("./utils/artifacts");
122
123
  class RPCLibrary {
123
124
  signer;
124
125
  isConnected;
@@ -195,6 +196,7 @@ class RPCLibrary {
195
196
  feeCollector: {
196
197
  claimRewardFromPool: claimRewardFromPool_1.default,
197
198
  },
199
+ getABI: artifacts_1.getABI,
198
200
  };
199
201
  this.pools = {
200
202
  stabilityPool: {
@@ -0,0 +1,397 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "ComplianceRegistry",
4
+ "sourceName": "contracts/core/primitives/ComplianceRegistry.sol",
5
+ "abi": [
6
+ {
7
+ "inputs": [],
8
+ "stateMutability": "nonpayable",
9
+ "type": "constructor"
10
+ },
11
+ {
12
+ "inputs": [],
13
+ "name": "AccessControlBadConfirmation",
14
+ "type": "error"
15
+ },
16
+ {
17
+ "inputs": [
18
+ {
19
+ "internalType": "address",
20
+ "name": "account",
21
+ "type": "address"
22
+ },
23
+ {
24
+ "internalType": "bytes32",
25
+ "name": "neededRole",
26
+ "type": "bytes32"
27
+ }
28
+ ],
29
+ "name": "AccessControlUnauthorizedAccount",
30
+ "type": "error"
31
+ },
32
+ {
33
+ "inputs": [],
34
+ "name": "AlreadyBlacklisted",
35
+ "type": "error"
36
+ },
37
+ {
38
+ "inputs": [],
39
+ "name": "BlacklistedAddress",
40
+ "type": "error"
41
+ },
42
+ {
43
+ "inputs": [],
44
+ "name": "InvalidAddress",
45
+ "type": "error"
46
+ },
47
+ {
48
+ "inputs": [],
49
+ "name": "NotBlacklisted",
50
+ "type": "error"
51
+ },
52
+ {
53
+ "anonymous": false,
54
+ "inputs": [
55
+ {
56
+ "indexed": true,
57
+ "internalType": "address",
58
+ "name": "user",
59
+ "type": "address"
60
+ }
61
+ ],
62
+ "name": "Blacklisted",
63
+ "type": "event"
64
+ },
65
+ {
66
+ "anonymous": false,
67
+ "inputs": [
68
+ {
69
+ "indexed": true,
70
+ "internalType": "bytes32",
71
+ "name": "role",
72
+ "type": "bytes32"
73
+ },
74
+ {
75
+ "indexed": true,
76
+ "internalType": "bytes32",
77
+ "name": "previousAdminRole",
78
+ "type": "bytes32"
79
+ },
80
+ {
81
+ "indexed": true,
82
+ "internalType": "bytes32",
83
+ "name": "newAdminRole",
84
+ "type": "bytes32"
85
+ }
86
+ ],
87
+ "name": "RoleAdminChanged",
88
+ "type": "event"
89
+ },
90
+ {
91
+ "anonymous": false,
92
+ "inputs": [
93
+ {
94
+ "indexed": true,
95
+ "internalType": "bytes32",
96
+ "name": "role",
97
+ "type": "bytes32"
98
+ },
99
+ {
100
+ "indexed": true,
101
+ "internalType": "address",
102
+ "name": "account",
103
+ "type": "address"
104
+ },
105
+ {
106
+ "indexed": true,
107
+ "internalType": "address",
108
+ "name": "sender",
109
+ "type": "address"
110
+ }
111
+ ],
112
+ "name": "RoleGranted",
113
+ "type": "event"
114
+ },
115
+ {
116
+ "anonymous": false,
117
+ "inputs": [
118
+ {
119
+ "indexed": true,
120
+ "internalType": "bytes32",
121
+ "name": "role",
122
+ "type": "bytes32"
123
+ },
124
+ {
125
+ "indexed": true,
126
+ "internalType": "address",
127
+ "name": "account",
128
+ "type": "address"
129
+ },
130
+ {
131
+ "indexed": true,
132
+ "internalType": "address",
133
+ "name": "sender",
134
+ "type": "address"
135
+ }
136
+ ],
137
+ "name": "RoleRevoked",
138
+ "type": "event"
139
+ },
140
+ {
141
+ "anonymous": false,
142
+ "inputs": [
143
+ {
144
+ "indexed": true,
145
+ "internalType": "address",
146
+ "name": "user",
147
+ "type": "address"
148
+ }
149
+ ],
150
+ "name": "UnBlacklisted",
151
+ "type": "event"
152
+ },
153
+ {
154
+ "inputs": [],
155
+ "name": "BLACKLIST_ADMIN_ROLE",
156
+ "outputs": [
157
+ {
158
+ "internalType": "bytes32",
159
+ "name": "",
160
+ "type": "bytes32"
161
+ }
162
+ ],
163
+ "stateMutability": "view",
164
+ "type": "function"
165
+ },
166
+ {
167
+ "inputs": [],
168
+ "name": "DEFAULT_ADMIN_ROLE",
169
+ "outputs": [
170
+ {
171
+ "internalType": "bytes32",
172
+ "name": "",
173
+ "type": "bytes32"
174
+ }
175
+ ],
176
+ "stateMutability": "view",
177
+ "type": "function"
178
+ },
179
+ {
180
+ "inputs": [
181
+ {
182
+ "internalType": "address",
183
+ "name": "user",
184
+ "type": "address"
185
+ }
186
+ ],
187
+ "name": "blacklist",
188
+ "outputs": [],
189
+ "stateMutability": "nonpayable",
190
+ "type": "function"
191
+ },
192
+ {
193
+ "inputs": [
194
+ {
195
+ "internalType": "address[]",
196
+ "name": "users",
197
+ "type": "address[]"
198
+ }
199
+ ],
200
+ "name": "blacklistBatch",
201
+ "outputs": [],
202
+ "stateMutability": "nonpayable",
203
+ "type": "function"
204
+ },
205
+ {
206
+ "inputs": [
207
+ {
208
+ "internalType": "bytes32",
209
+ "name": "role",
210
+ "type": "bytes32"
211
+ }
212
+ ],
213
+ "name": "getRoleAdmin",
214
+ "outputs": [
215
+ {
216
+ "internalType": "bytes32",
217
+ "name": "",
218
+ "type": "bytes32"
219
+ }
220
+ ],
221
+ "stateMutability": "view",
222
+ "type": "function"
223
+ },
224
+ {
225
+ "inputs": [
226
+ {
227
+ "internalType": "bytes32",
228
+ "name": "role",
229
+ "type": "bytes32"
230
+ },
231
+ {
232
+ "internalType": "address",
233
+ "name": "account",
234
+ "type": "address"
235
+ }
236
+ ],
237
+ "name": "grantRole",
238
+ "outputs": [],
239
+ "stateMutability": "nonpayable",
240
+ "type": "function"
241
+ },
242
+ {
243
+ "inputs": [
244
+ {
245
+ "internalType": "bytes32",
246
+ "name": "role",
247
+ "type": "bytes32"
248
+ },
249
+ {
250
+ "internalType": "address",
251
+ "name": "account",
252
+ "type": "address"
253
+ }
254
+ ],
255
+ "name": "hasRole",
256
+ "outputs": [
257
+ {
258
+ "internalType": "bool",
259
+ "name": "",
260
+ "type": "bool"
261
+ }
262
+ ],
263
+ "stateMutability": "view",
264
+ "type": "function"
265
+ },
266
+ {
267
+ "inputs": [
268
+ {
269
+ "internalType": "address",
270
+ "name": "user",
271
+ "type": "address"
272
+ }
273
+ ],
274
+ "name": "isBlacklisted",
275
+ "outputs": [
276
+ {
277
+ "internalType": "bool",
278
+ "name": "",
279
+ "type": "bool"
280
+ }
281
+ ],
282
+ "stateMutability": "view",
283
+ "type": "function"
284
+ },
285
+ {
286
+ "inputs": [
287
+ {
288
+ "internalType": "bytes32",
289
+ "name": "role",
290
+ "type": "bytes32"
291
+ },
292
+ {
293
+ "internalType": "address",
294
+ "name": "callerConfirmation",
295
+ "type": "address"
296
+ }
297
+ ],
298
+ "name": "renounceRole",
299
+ "outputs": [],
300
+ "stateMutability": "nonpayable",
301
+ "type": "function"
302
+ },
303
+ {
304
+ "inputs": [
305
+ {
306
+ "internalType": "bytes32",
307
+ "name": "role",
308
+ "type": "bytes32"
309
+ },
310
+ {
311
+ "internalType": "address",
312
+ "name": "account",
313
+ "type": "address"
314
+ }
315
+ ],
316
+ "name": "revokeRole",
317
+ "outputs": [],
318
+ "stateMutability": "nonpayable",
319
+ "type": "function"
320
+ },
321
+ {
322
+ "inputs": [],
323
+ "name": "sanctionsList",
324
+ "outputs": [
325
+ {
326
+ "internalType": "address",
327
+ "name": "",
328
+ "type": "address"
329
+ }
330
+ ],
331
+ "stateMutability": "view",
332
+ "type": "function"
333
+ },
334
+ {
335
+ "inputs": [
336
+ {
337
+ "internalType": "address",
338
+ "name": "_sanctionsList",
339
+ "type": "address"
340
+ }
341
+ ],
342
+ "name": "setSanctionsList",
343
+ "outputs": [],
344
+ "stateMutability": "nonpayable",
345
+ "type": "function"
346
+ },
347
+ {
348
+ "inputs": [
349
+ {
350
+ "internalType": "bytes4",
351
+ "name": "interfaceId",
352
+ "type": "bytes4"
353
+ }
354
+ ],
355
+ "name": "supportsInterface",
356
+ "outputs": [
357
+ {
358
+ "internalType": "bool",
359
+ "name": "",
360
+ "type": "bool"
361
+ }
362
+ ],
363
+ "stateMutability": "view",
364
+ "type": "function"
365
+ },
366
+ {
367
+ "inputs": [
368
+ {
369
+ "internalType": "address",
370
+ "name": "user",
371
+ "type": "address"
372
+ }
373
+ ],
374
+ "name": "unblacklist",
375
+ "outputs": [],
376
+ "stateMutability": "nonpayable",
377
+ "type": "function"
378
+ },
379
+ {
380
+ "inputs": [
381
+ {
382
+ "internalType": "address[]",
383
+ "name": "users",
384
+ "type": "address[]"
385
+ }
386
+ ],
387
+ "name": "unblacklistBatch",
388
+ "outputs": [],
389
+ "stateMutability": "nonpayable",
390
+ "type": "function"
391
+ }
392
+ ],
393
+ "bytecode": "0x6080604052346100915761001233610096565b5061001c33610114565b50600080516020610bcb833981519152600081815260208190527f202d65da986ce0b55240cf1c322e950cf21de6cf93fcf4a814f726e80b9a150f805490829055604051927fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff8380a4610a0890816101a38239f35b600080fd5b6001600160a01b031660008181527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604081205490919060ff1661011057818052816020526040822081835260205260408220600160ff198254161790553391600080516020610bab8339815191528180a4600190565b5090565b6001600160a01b031660008181527f202d65da986ce0b55240cf1c322e950cf21de6cf93fcf4a814f726e80b9a150e6020526040812054909190600080516020610bcb8339815191529060ff1661019d57808352826020526040832082845260205260408320600160ff19825416179055600080516020610bab833981519152339380a4600190565b50509056fe608060408181526004908136101561001657600080fd5b600092833560e01c90816301ffc9a7146106a657508063248a9ca31461067c5780632f2ff15d1461065457806336568abe1461060d57806349dc5e8d1461059357806367ed99f41461056a578063726b57711461049657806375e3661e1461041857806391d14854146103d25780639272cc3a146102fc578063a217fddf146102e1578063d547741f146102a4578063ec571c6a1461027b578063f9f92be4146101ed5763fe575a87146100c957600080fd5b346101e957602092836003193601126101bd576001600160a01b0392836100ee61072f565b16918281526001865260ff8482205416948515610112575b50505050519015158152f35b90919293945060025416858115159485610136575b50505050509038808080610106565b909192939450602486518094819363df592f7d60e01b8352888301525afa9283156101df57829361016f575b5050503880808581610127565b9091925084903d86116101d7575b601f8201601f19168301906001600160401b038211848310176101c45750859183918652810103126101c057519081151582036101bd5750388080610162565b80fd5b5080fd5b634e487b7160e01b855260419052602484fd5b3d915061017d565b84513d84823e3d90fd5b8280fd5b50346101e95760203660031901126101e95761020761072f565b61020f610792565b6001600160a01b031680845260016020528184205490929060ff1661026d57821561025f575081835260016020528220600160ff198254161790556000805160206109b38339815191528280a280f35b905163e6c4247b60e01b8152fd5b905163f53de75f60e01b8152fd5b8382346101c057816003193601126101c05760025490516001600160a01b039091168152602090f35b50346101e957806003193601126101e9576102dd91356102d860016102c7610714565b9383875286602052862001546107fa565b61089e565b5080f35b8382346101c057816003193601126101c05751908152602090f35b50346101e95761030b36610745565b9190610315610792565b845b838110610322578580f35b6001600160a01b038061033e610339848887610938565b61095e565b16156103c257908161037692610358610339848988610938565b1688526001602081815260ff878b20541661037b575b505050610913565b610317565b8261038a610339868b8a610938565b168a5252848820805460ff191690556103a7610339838887610938565b166000805160206109738339815191528880a238808061036e565b835163e6c4247b60e01b81528690fd5b5090346101e957816003193601126101e9578160209360ff926103f3610714565b903582528186528282206001600160a01b039091168252855220549151911615158152f35b50346101e95760203660031901126101e95761043261072f565b61043a610792565b6001600160a01b031680845260016020528184205490929060ff161561048857821561025f575081835260016020528220805460ff191690556000805160206109738339815191528280a280f35b90516314afda6d60e31b8152fd5b50346101e9576104a536610745565b906104ae610792565b845b8281106104bb578580f35b6001600160a01b03806104d2610339848787610938565b161561055a57908161050a926104ec610339848888610938565b1688526001602081815260ff888b2054161561050f57505050610913565b6104b0565b819083610520610339878b8b610938565b168b52528689209060ff1982541617905561053f610339838787610938565b166000805160206109b38339815191528880a238808061036e565b845163e6c4247b60e01b81528690fd5b8382346101c057816003193601126101c057602090516000805160206109938339815191528152f35b5090346101e95760203660031901126101e9576105ae61072f565b918380528360205280842033855260205260ff8185205416156105f0575050600280546001600160a01b0319166001600160a01b039290921691909117905580f35b9083604492519163e2517d3f60e01b835233908301526024820152fd5b508290346101c057806003193601126101c057610628610714565b90336001600160a01b0383160361064557506102dd91923561089e565b5163334bd91960e11b81528390fd5b50346101e957806003193601126101e9576102dd913561067760016102c7610714565b610820565b5090346101e95760203660031901126101e957816020936001923581528085522001549051908152f35b849084346101e95760203660031901126101e9573563ffffffff60e01b81168091036101e9576020925063fe575a8760e01b81149081156106e9575b5015158152f35b637965db0b60e01b811491508115610703575b50836106e2565b6301ffc9a760e01b149050836106fc565b602435906001600160a01b038216820361072a57565b600080fd5b600435906001600160a01b038216820361072a57565b90602060031983011261072a576001600160401b03916004359083821161072a578060238301121561072a57816004013593841161072a5760248460051b8301011161072a576024019190565b3360009081527f202d65da986ce0b55240cf1c322e950cf21de6cf93fcf4a814f726e80b9a150e60205260409020546000805160206109938339815191529060ff16156107dc5750565b6044906040519063e2517d3f60e01b82523360048301526024820152fd5b80600052600060205260406000203360005260205260ff60406000205416156107dc5750565b9060009180835282602052604083209160018060a01b03169182845260205260ff6040842054161560001461089957808352826020526040832082845260205260408320600160ff198254161790557f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d339380a4600190565b505090565b9060009180835282602052604083209160018060a01b03169182845260205260ff6040842054166000146108995780835282602052604083208284526020526040832060ff1981541690557ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b339380a4600190565b60001981146109225760010190565b634e487b7160e01b600052601160045260246000fd5b91908110156109485760051b0190565b634e487b7160e01b600052603260045260246000fd5b356001600160a01b038116810361072a579056fe117e3210bb9aa7d9baff172026820255c6f6c30ba8999d1c2fd88e2848137c4e750555ed2187fef9a15b1b2d80b65634c266437a86c68f049ea8b5da4a2bd96dffa4e6181777692565cf28528fc88fd1516ea86b56da075235fa575af6a4b855a264697066735822122007415759f81a7008f102d8c02cd638f3fec2a3836d32df2f6032ed7af53ac20764736f6c634300081400332f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d750555ed2187fef9a15b1b2d80b65634c266437a86c68f049ea8b5da4a2bd96d",
394
+ "deployedBytecode": "0x608060408181526004908136101561001657600080fd5b600092833560e01c90816301ffc9a7146106a657508063248a9ca31461067c5780632f2ff15d1461065457806336568abe1461060d57806349dc5e8d1461059357806367ed99f41461056a578063726b57711461049657806375e3661e1461041857806391d14854146103d25780639272cc3a146102fc578063a217fddf146102e1578063d547741f146102a4578063ec571c6a1461027b578063f9f92be4146101ed5763fe575a87146100c957600080fd5b346101e957602092836003193601126101bd576001600160a01b0392836100ee61072f565b16918281526001865260ff8482205416948515610112575b50505050519015158152f35b90919293945060025416858115159485610136575b50505050509038808080610106565b909192939450602486518094819363df592f7d60e01b8352888301525afa9283156101df57829361016f575b5050503880808581610127565b9091925084903d86116101d7575b601f8201601f19168301906001600160401b038211848310176101c45750859183918652810103126101c057519081151582036101bd5750388080610162565b80fd5b5080fd5b634e487b7160e01b855260419052602484fd5b3d915061017d565b84513d84823e3d90fd5b8280fd5b50346101e95760203660031901126101e95761020761072f565b61020f610792565b6001600160a01b031680845260016020528184205490929060ff1661026d57821561025f575081835260016020528220600160ff198254161790556000805160206109b38339815191528280a280f35b905163e6c4247b60e01b8152fd5b905163f53de75f60e01b8152fd5b8382346101c057816003193601126101c05760025490516001600160a01b039091168152602090f35b50346101e957806003193601126101e9576102dd91356102d860016102c7610714565b9383875286602052862001546107fa565b61089e565b5080f35b8382346101c057816003193601126101c05751908152602090f35b50346101e95761030b36610745565b9190610315610792565b845b838110610322578580f35b6001600160a01b038061033e610339848887610938565b61095e565b16156103c257908161037692610358610339848988610938565b1688526001602081815260ff878b20541661037b575b505050610913565b610317565b8261038a610339868b8a610938565b168a5252848820805460ff191690556103a7610339838887610938565b166000805160206109738339815191528880a238808061036e565b835163e6c4247b60e01b81528690fd5b5090346101e957816003193601126101e9578160209360ff926103f3610714565b903582528186528282206001600160a01b039091168252855220549151911615158152f35b50346101e95760203660031901126101e95761043261072f565b61043a610792565b6001600160a01b031680845260016020528184205490929060ff161561048857821561025f575081835260016020528220805460ff191690556000805160206109738339815191528280a280f35b90516314afda6d60e31b8152fd5b50346101e9576104a536610745565b906104ae610792565b845b8281106104bb578580f35b6001600160a01b03806104d2610339848787610938565b161561055a57908161050a926104ec610339848888610938565b1688526001602081815260ff888b2054161561050f57505050610913565b6104b0565b819083610520610339878b8b610938565b168b52528689209060ff1982541617905561053f610339838787610938565b166000805160206109b38339815191528880a238808061036e565b845163e6c4247b60e01b81528690fd5b8382346101c057816003193601126101c057602090516000805160206109938339815191528152f35b5090346101e95760203660031901126101e9576105ae61072f565b918380528360205280842033855260205260ff8185205416156105f0575050600280546001600160a01b0319166001600160a01b039290921691909117905580f35b9083604492519163e2517d3f60e01b835233908301526024820152fd5b508290346101c057806003193601126101c057610628610714565b90336001600160a01b0383160361064557506102dd91923561089e565b5163334bd91960e11b81528390fd5b50346101e957806003193601126101e9576102dd913561067760016102c7610714565b610820565b5090346101e95760203660031901126101e957816020936001923581528085522001549051908152f35b849084346101e95760203660031901126101e9573563ffffffff60e01b81168091036101e9576020925063fe575a8760e01b81149081156106e9575b5015158152f35b637965db0b60e01b811491508115610703575b50836106e2565b6301ffc9a760e01b149050836106fc565b602435906001600160a01b038216820361072a57565b600080fd5b600435906001600160a01b038216820361072a57565b90602060031983011261072a576001600160401b03916004359083821161072a578060238301121561072a57816004013593841161072a5760248460051b8301011161072a576024019190565b3360009081527f202d65da986ce0b55240cf1c322e950cf21de6cf93fcf4a814f726e80b9a150e60205260409020546000805160206109938339815191529060ff16156107dc5750565b6044906040519063e2517d3f60e01b82523360048301526024820152fd5b80600052600060205260406000203360005260205260ff60406000205416156107dc5750565b9060009180835282602052604083209160018060a01b03169182845260205260ff6040842054161560001461089957808352826020526040832082845260205260408320600160ff198254161790557f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d339380a4600190565b505090565b9060009180835282602052604083209160018060a01b03169182845260205260ff6040842054166000146108995780835282602052604083208284526020526040832060ff1981541690557ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b339380a4600190565b60001981146109225760010190565b634e487b7160e01b600052601160045260246000fd5b91908110156109485760051b0190565b634e487b7160e01b600052603260045260246000fd5b356001600160a01b038116810361072a579056fe117e3210bb9aa7d9baff172026820255c6f6c30ba8999d1c2fd88e2848137c4e750555ed2187fef9a15b1b2d80b65634c266437a86c68f049ea8b5da4a2bd96dffa4e6181777692565cf28528fc88fd1516ea86b56da075235fa575af6a4b855a264697066735822122007415759f81a7008f102d8c02cd638f3fec2a3836d32df2f6032ed7af53ac20764736f6c63430008140033",
395
+ "linkReferences": {},
396
+ "deployedLinkReferences": {}
397
+ }
@@ -58,6 +58,11 @@
58
58
  "id": "rwavault",
59
59
  "name": "RWA Vault",
60
60
  "contract": "0xc325841d6f4C0ff71EEB00Eb16B7eD1d2990e07f"
61
+ },
62
+ "complianceregistry": {
63
+ "id": "complianceregistry",
64
+ "name": "Compliance Registry",
65
+ "contract": "0xC367bd7633e52ef3cf0aEE13CEAfCA073d25be92"
61
66
  }
62
67
  },
63
68
  "pools": {
@@ -58,6 +58,11 @@
58
58
  "id": "rwavault",
59
59
  "name": "RWA Vault",
60
60
  "contract": "0x0165878A594ca255338adfa4d48449f69242Eb8F"
61
+ },
62
+ "complianceregistry": {
63
+ "id": "complianceregistry",
64
+ "name": "Compliance Registry",
65
+ "contract": "0x0000000000000000000000000000000000000000"
61
66
  }
62
67
  },
63
68
  "pools": {
@@ -58,6 +58,11 @@
58
58
  "id": "rwavault",
59
59
  "name": "RWA Vault",
60
60
  "contract": "0xE6E340D132b5f46d1e472DebcD681B2aBc16e57E"
61
+ },
62
+ "complianceregistry": {
63
+ "id": "complianceregistry",
64
+ "name": "Compliance Registry",
65
+ "contract": "0x0000000000000000000000000000000000000000"
61
66
  }
62
67
  },
63
68
  "pools": {
@@ -58,6 +58,11 @@
58
58
  "id": "rwavault",
59
59
  "name": "RWA Vault",
60
60
  "contract": "0x4A679253410272dd5232B3Ff7cF5dbB88f295319"
61
+ },
62
+ "complianceregistry": {
63
+ "id": "complianceregistry",
64
+ "name": "Compliance Registry",
65
+ "contract": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9"
61
66
  }
62
67
  },
63
68
  "pools": {
@@ -127,6 +132,12 @@
127
132
  "name": "Index Token",
128
133
  "decimals": 18,
129
134
  "contract": "0xa85233C63b9Ee964Add6F2cffe00Fd84eb32338f"
135
+ },
136
+ "complianceregistry": {
137
+ "id": "complianceregistry",
138
+ "name": "Compliance Registry",
139
+ "decimals": 18,
140
+ "contract": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9"
130
141
  }
131
142
  },
132
143
  "adapters": {
@@ -42,16 +42,15 @@ async function getLendingPoolInfo(chainId, userAddress, provider) {
42
42
  // Compute APY
43
43
  let apy;
44
44
  if (utilization <= optimalUtilizationRate && optimalUtilizationRate > 0) {
45
- const rateSlope = primeRate - baseRate;
46
- const rateIncrease = (utilization * rateSlope) / optimalUtilizationRate;
47
- apy = baseRate + rateIncrease;
45
+ apy = optimalRate;
48
46
  }
49
47
  else {
50
48
  const excessUtilization = utilization - optimalUtilizationRate;
51
49
  const maxExcessUtilization = BigInt(1e27) - optimalUtilizationRate;
52
- const rateSlope = maxRate - primeRate;
50
+ const rateSlope = maxRate - optimalRate;
53
51
  const rateIncrease = (excessUtilization * rateSlope) / maxExcessUtilization;
54
52
  apy = primeRate + rateIncrease;
53
+ apy = apy > maxRate ? maxRate : apy;
55
54
  }
56
55
  let userRedeemable = 0n;
57
56
  if (userAddress) {
@@ -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 = 8453;
13
+ const chainId = 11155111;
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;
@@ -39,12 +39,39 @@ async function setup() {
39
39
  rpc.address = signer.address;
40
40
  rpc.provider = provider;
41
41
  rpc.chainId = chainId;
42
- const FeeCollectorAddress = (0, contracts_1.getContractAddress)(chainId, "feecollector");
43
- const FeeCollectorABI = (0, artifacts_1.getABI)("feecollector");
44
- const FeeCollectorContract = new ethers_1.ethers.Contract(FeeCollectorAddress, FeeCollectorABI, signer);
45
42
  const LendingPoolAddress = (0, contracts_1.getContractAddress)(chainId, "lendingpool");
46
43
  const LendingPoolABI = (0, artifacts_1.getABI)("lendingpool");
47
44
  const LendingPoolContract = new ethers_1.ethers.Contract(LendingPoolAddress, LendingPoolABI, signer);
45
+ console.log(await LendingPoolContract.rateData());
46
+ return;
47
+ // Add funds in the Mock Liquidity Pool
48
+ const CURVE_POOL_ADDRESSES = {
49
+ 11155111: '0xAf9FBBbFCf124b4BeB787851017C9b1740E3d6e9', // Sepolia
50
+ 8453: '0x5eb3Bc0a489C5A8288765d2336659EbCA68FCd00', // Base
51
+ };
52
+ const MockLiquidityPoolAddress = CURVE_POOL_ADDRESSES[chainId];
53
+ const MockLiquidityPoolABI = ["function add_liquidity(uint256[2] memory amounts, uint256) external returns (uint256)", "function getTotalLiquidity(address _pairedToken) external view returns (uint256 raacLiquidity, uint256 pairedLiquidity)"];
54
+ const MockLiquidityPoolContract = new ethers_1.ethers.Contract(MockLiquidityPoolAddress, MockLiquidityPoolABI, signer);
55
+ // mint 10 million in crvusd
56
+ console.log("Minting 10 million in crvusd");
57
+ await rpc.wallet.assets.mintAsset(chainId, "crvusd", 10000000n, signer.address, signer);
58
+ // deposit 5 million in the RWA Vault
59
+ console.log("Depositing 5 million in the RWA Vault");
60
+ await rpc.wallet.assets.approveAsset(chainId, "crvusd", await rpc.pools.rwaVault.getAdapterAddress(chainId, "crvusdadapter").address, "5000000", signer);
61
+ const data = new ethers_1.ethers.AbiCoder().encode(["uint256"], [ethers_1.ethers.parseEther("5000000")]);
62
+ await rpc.pools.rwaVault.depositToRWAVault(chainId, "crvusdadapter", data, signer.address, signer);
63
+ // deposit 5 million in the Mock Liquidity Pool
64
+ console.log("Depositing 5 million in the Mock Liquidity Pool");
65
+ await rpc.wallet.assets.approveAsset(chainId, "crvusd", MockLiquidityPoolAddress, "5000000", signer);
66
+ const indextokenBalance = (await rpc.wallet.assets.getBalance(chainId, "rwaindextoken", signer.address, provider)).balance;
67
+ await rpc.wallet.assets.approveAsset(chainId, "rwaindextoken", MockLiquidityPoolAddress, indextokenBalance, signer);
68
+ await (await MockLiquidityPoolContract.add_liquidity([ethers_1.ethers.parseEther("5000000"), ethers_1.ethers.parseEther(indextokenBalance.toString())], 0)).wait();
69
+ // check the liquidity in the pools
70
+ console.log("Checking the liquidity in the pools");
71
+ const liquidity = await MockLiquidityPoolContract.getTotalLiquidity(await rpc.contracts.getContractAddress(chainId, "rwaindextoken"));
72
+ console.log("Liquidity in the Mock Liquidity Pool", liquidity);
73
+ return;
74
+ /// END OF ADD FUNDS IN THE MOCK LIQUIDITY POOL
48
75
  // // // send myself some CRVUSD
49
76
  // await rpc.wallet.assets.mintAsset(
50
77
  // chainId,
@@ -94,6 +94,7 @@ import approveNFT from "./nfts/approveNFT";
94
94
  import vaultOpened from "./pools/lendingPool/vaultOpened";
95
95
  import { getWithdrawRequestInfo as getStabilityPoolWithdrawRequestInfo } from "./pools/stabilityPool/getWithdrawRequestInfo";
96
96
  import { requestWithdraw as requestStabilityPoolWithdraw } from "./pools/stabilityPool/requestWithdraw";
97
+ import { getABI } from "./utils/artifacts";
97
98
  declare class RPCLibrary {
98
99
  signer: Signer | null;
99
100
  isConnected: boolean;
@@ -151,6 +152,7 @@ declare class RPCLibrary {
151
152
  feeCollector: {
152
153
  claimRewardFromPool: typeof claimRewardFromPool;
153
154
  };
155
+ getABI: typeof getABI;
154
156
  };
155
157
  pools: {
156
158
  stabilityPool: {
@@ -1522,6 +1522,52 @@ declare const ABIS: {
1522
1522
  type: string;
1523
1523
  anonymous?: undefined;
1524
1524
  })[];
1525
+ complianceregistry: ({
1526
+ inputs: any[];
1527
+ stateMutability: string;
1528
+ type: string;
1529
+ name?: undefined;
1530
+ anonymous?: undefined;
1531
+ outputs?: undefined;
1532
+ } | {
1533
+ inputs: {
1534
+ internalType: string;
1535
+ name: string;
1536
+ type: string;
1537
+ }[];
1538
+ name: string;
1539
+ type: string;
1540
+ stateMutability?: undefined;
1541
+ anonymous?: undefined;
1542
+ outputs?: undefined;
1543
+ } | {
1544
+ anonymous: boolean;
1545
+ inputs: {
1546
+ indexed: boolean;
1547
+ internalType: string;
1548
+ name: string;
1549
+ type: string;
1550
+ }[];
1551
+ name: string;
1552
+ type: string;
1553
+ stateMutability?: undefined;
1554
+ outputs?: undefined;
1555
+ } | {
1556
+ inputs: {
1557
+ internalType: string;
1558
+ name: string;
1559
+ type: string;
1560
+ }[];
1561
+ name: string;
1562
+ outputs: {
1563
+ internalType: string;
1564
+ name: string;
1565
+ type: string;
1566
+ }[];
1567
+ stateMutability: string;
1568
+ type: string;
1569
+ anonymous?: undefined;
1570
+ })[];
1525
1571
  };
1526
1572
  export type AssetType = keyof typeof ABIS | string;
1527
1573
  export type ContractType = keyof typeof ABIS;
@@ -2973,5 +3019,50 @@ declare const getABI: (name: keyof typeof ABIS) => ({
2973
3019
  stateMutability: string;
2974
3020
  type: string;
2975
3021
  anonymous?: undefined;
3022
+ })[] | ({
3023
+ inputs: any[];
3024
+ stateMutability: string;
3025
+ type: string;
3026
+ name?: undefined;
3027
+ anonymous?: undefined;
3028
+ outputs?: undefined;
3029
+ } | {
3030
+ inputs: {
3031
+ internalType: string;
3032
+ name: string;
3033
+ type: string;
3034
+ }[];
3035
+ name: string;
3036
+ type: string;
3037
+ stateMutability?: undefined;
3038
+ anonymous?: undefined;
3039
+ outputs?: undefined;
3040
+ } | {
3041
+ anonymous: boolean;
3042
+ inputs: {
3043
+ indexed: boolean;
3044
+ internalType: string;
3045
+ name: string;
3046
+ type: string;
3047
+ }[];
3048
+ name: string;
3049
+ type: string;
3050
+ stateMutability?: undefined;
3051
+ outputs?: undefined;
3052
+ } | {
3053
+ inputs: {
3054
+ internalType: string;
3055
+ name: string;
3056
+ type: string;
3057
+ }[];
3058
+ name: string;
3059
+ outputs: {
3060
+ internalType: string;
3061
+ name: string;
3062
+ type: string;
3063
+ }[];
3064
+ stateMutability: string;
3065
+ type: string;
3066
+ anonymous?: undefined;
2976
3067
  })[];
2977
3068
  export { getABI, ABIS };
@@ -30,6 +30,7 @@ const ERC20VaultAdapter_json_1 = __importDefault(require("../artifacts/core/vaul
30
30
  const ERC721VaultAdapter_json_1 = __importDefault(require("../artifacts/core/vaults/ERC721VaultAdapter.sol/ERC721VaultAdapter.json"));
31
31
  const RWAIndexToken_json_1 = __importDefault(require("../artifacts/core/tokens/RWAIndexToken.sol/RWAIndexToken.json"));
32
32
  const RAACHousePriceOracle_json_1 = __importDefault(require("../artifacts/core/oracles/RAACHousePriceOracle.sol/RAACHousePriceOracle.json"));
33
+ const ComplianceRegistry_json_1 = __importDefault(require("../artifacts/core/primitives/ComplianceRegistry.sol/ComplianceRegistry.json"));
33
34
  const CRVUSD_ABI = crvUSDToken_json_1.default.abi;
34
35
  const RToken_json_2 = __importDefault(require("../artifacts/core/tokens/RToken.sol/RToken.json")); // assert { type: "json" }; // TODO: Isnt this same as rcrvusd?
35
36
  const RTOKEN_ABI = RToken_json_2.default.abi;
@@ -84,6 +85,7 @@ const ABIS = {
84
85
  erc20vaultadapter: ERC20VaultAdapter_json_1.default.abi,
85
86
  erc721vaultadapter: ERC721VaultAdapter_json_1.default.abi,
86
87
  rwaindextoken: RWAINDEXTOKEN_ABI,
88
+ complianceregistry: ComplianceRegistry_json_1.default.abi,
87
89
  };
88
90
  exports.ABIS = ABIS;
89
91
  const getABI = (name) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raac/rpc",
3
- "version": "1.1.0-beta.45",
3
+ "version": "1.1.0-beta.47",
4
4
  "description": "RPC Library for RAAC ",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/types/index.d.ts",