@kasarlabs/opus-mcp 0.1.0
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/LICENSE +21 -0
- package/README.md +36 -0
- package/bin/opus-mcp.js +14 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +106 -0
- package/build/index.js.map +1 -0
- package/build/interfaces/index.d.ts +49 -0
- package/build/interfaces/index.js +2 -0
- package/build/interfaces/index.js.map +1 -0
- package/build/lib/abis/abbotAbi.d.ts +283 -0
- package/build/lib/abis/abbotAbi.js +384 -0
- package/build/lib/abis/abbotAbi.js.map +1 -0
- package/build/lib/abis/erc20Abi.d.ts +197 -0
- package/build/lib/abis/erc20Abi.js +273 -0
- package/build/lib/abis/erc20Abi.js.map +1 -0
- package/build/lib/abis/sentinelAbi.d.ts +476 -0
- package/build/lib/abis/sentinelAbi.js +651 -0
- package/build/lib/abis/sentinelAbi.js.map +1 -0
- package/build/lib/abis/shrineAbi.d.ts +1426 -0
- package/build/lib/abis/shrineAbi.js +1937 -0
- package/build/lib/abis/shrineAbi.js.map +1 -0
- package/build/lib/constant/erc20.d.ts +3 -0
- package/build/lib/constant/erc20.js +34 -0
- package/build/lib/constant/erc20.js.map +1 -0
- package/build/lib/constant/index.d.ts +83 -0
- package/build/lib/constant/index.js +38 -0
- package/build/lib/constant/index.js.map +1 -0
- package/build/lib/dependances/types.d.ts +85 -0
- package/build/lib/dependances/types.js +51 -0
- package/build/lib/dependances/types.js.map +1 -0
- package/build/lib/types/index.d.ts +14 -0
- package/build/lib/types/index.js +2 -0
- package/build/lib/types/index.js.map +1 -0
- package/build/lib/utils/contracts.d.ts +2383 -0
- package/build/lib/utils/contracts.js +26 -0
- package/build/lib/utils/contracts.js.map +1 -0
- package/build/lib/utils/format.d.ts +5 -0
- package/build/lib/utils/format.js +11 -0
- package/build/lib/utils/format.js.map +1 -0
- package/build/lib/utils/troveManager.d.ts +27 -0
- package/build/lib/utils/troveManager.js +386 -0
- package/build/lib/utils/troveManager.js.map +1 -0
- package/build/schemas/index.d.ts +332 -0
- package/build/schemas/index.js +73 -0
- package/build/schemas/index.js.map +1 -0
- package/build/tools/borrowTrove.d.ts +11 -0
- package/build/tools/borrowTrove.js +19 -0
- package/build/tools/borrowTrove.js.map +1 -0
- package/build/tools/depositTrove.d.ts +11 -0
- package/build/tools/depositTrove.js +19 -0
- package/build/tools/depositTrove.js.map +1 -0
- package/build/tools/getters.d.ts +29 -0
- package/build/tools/getters.js +53 -0
- package/build/tools/getters.js.map +1 -0
- package/build/tools/openTrove.d.ts +11 -0
- package/build/tools/openTrove.js +19 -0
- package/build/tools/openTrove.js.map +1 -0
- package/build/tools/repayTrove.d.ts +11 -0
- package/build/tools/repayTrove.js +19 -0
- package/build/tools/repayTrove.js.map +1 -0
- package/build/tools/withdrawTrove.d.ts +11 -0
- package/build/tools/withdrawTrove.js +19 -0
- package/build/tools/withdrawTrove.js.map +1 -0
- package/package.json +44 -0
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
export const abbotAbi = [
|
|
2
|
+
{
|
|
3
|
+
type: 'impl',
|
|
4
|
+
name: 'IAbbotImpl',
|
|
5
|
+
interface_name: 'opus::interfaces::IAbbot::IAbbot',
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
type: 'enum',
|
|
9
|
+
name: 'core::option::Option::<core::starknet::contract_address::ContractAddress>',
|
|
10
|
+
variants: [
|
|
11
|
+
{
|
|
12
|
+
name: 'Some',
|
|
13
|
+
type: 'core::starknet::contract_address::ContractAddress',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'None',
|
|
17
|
+
type: '()',
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
type: 'struct',
|
|
23
|
+
name: 'core::array::Span::<core::integer::u64>',
|
|
24
|
+
members: [
|
|
25
|
+
{
|
|
26
|
+
name: 'snapshot',
|
|
27
|
+
type: '@core::array::Array::<core::integer::u64>',
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
type: 'struct',
|
|
33
|
+
name: 'opus::types::AssetBalance',
|
|
34
|
+
members: [
|
|
35
|
+
{
|
|
36
|
+
name: 'address',
|
|
37
|
+
type: 'core::starknet::contract_address::ContractAddress',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'amount',
|
|
41
|
+
type: 'core::integer::u128',
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
type: 'struct',
|
|
47
|
+
name: 'core::array::Span::<opus::types::AssetBalance>',
|
|
48
|
+
members: [
|
|
49
|
+
{
|
|
50
|
+
name: 'snapshot',
|
|
51
|
+
type: '@core::array::Array::<opus::types::AssetBalance>',
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
type: 'struct',
|
|
57
|
+
name: 'wadray::wadray::Wad',
|
|
58
|
+
members: [
|
|
59
|
+
{
|
|
60
|
+
name: 'val',
|
|
61
|
+
type: 'core::integer::u128',
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
type: 'interface',
|
|
67
|
+
name: 'opus::interfaces::IAbbot::IAbbot',
|
|
68
|
+
items: [
|
|
69
|
+
{
|
|
70
|
+
type: 'function',
|
|
71
|
+
name: 'get_trove_owner',
|
|
72
|
+
inputs: [
|
|
73
|
+
{
|
|
74
|
+
name: 'trove_id',
|
|
75
|
+
type: 'core::integer::u64',
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
outputs: [
|
|
79
|
+
{
|
|
80
|
+
type: 'core::option::Option::<core::starknet::contract_address::ContractAddress>',
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
state_mutability: 'view',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
type: 'function',
|
|
87
|
+
name: 'get_user_trove_ids',
|
|
88
|
+
inputs: [
|
|
89
|
+
{
|
|
90
|
+
name: 'user',
|
|
91
|
+
type: 'core::starknet::contract_address::ContractAddress',
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
outputs: [
|
|
95
|
+
{
|
|
96
|
+
type: 'core::array::Span::<core::integer::u64>',
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
state_mutability: 'view',
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
type: 'function',
|
|
103
|
+
name: 'get_troves_count',
|
|
104
|
+
inputs: [],
|
|
105
|
+
outputs: [
|
|
106
|
+
{
|
|
107
|
+
type: 'core::integer::u64',
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
state_mutability: 'view',
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
type: 'function',
|
|
114
|
+
name: 'get_trove_asset_balance',
|
|
115
|
+
inputs: [
|
|
116
|
+
{
|
|
117
|
+
name: 'trove_id',
|
|
118
|
+
type: 'core::integer::u64',
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
name: 'yang',
|
|
122
|
+
type: 'core::starknet::contract_address::ContractAddress',
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
outputs: [
|
|
126
|
+
{
|
|
127
|
+
type: 'core::integer::u128',
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
state_mutability: 'view',
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
type: 'function',
|
|
134
|
+
name: 'open_trove',
|
|
135
|
+
inputs: [
|
|
136
|
+
{
|
|
137
|
+
name: 'yang_assets',
|
|
138
|
+
type: 'core::array::Span::<opus::types::AssetBalance>',
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: 'forge_amount',
|
|
142
|
+
type: 'wadray::wadray::Wad',
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
name: 'max_forge_fee_pct',
|
|
146
|
+
type: 'wadray::wadray::Wad',
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
outputs: [
|
|
150
|
+
{
|
|
151
|
+
type: 'core::integer::u64',
|
|
152
|
+
},
|
|
153
|
+
],
|
|
154
|
+
state_mutability: 'external',
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
type: 'function',
|
|
158
|
+
name: 'close_trove',
|
|
159
|
+
inputs: [
|
|
160
|
+
{
|
|
161
|
+
name: 'trove_id',
|
|
162
|
+
type: 'core::integer::u64',
|
|
163
|
+
},
|
|
164
|
+
],
|
|
165
|
+
outputs: [],
|
|
166
|
+
state_mutability: 'external',
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
type: 'function',
|
|
170
|
+
name: 'deposit',
|
|
171
|
+
inputs: [
|
|
172
|
+
{
|
|
173
|
+
name: 'trove_id',
|
|
174
|
+
type: 'core::integer::u64',
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
name: 'yang_asset',
|
|
178
|
+
type: 'opus::types::AssetBalance',
|
|
179
|
+
},
|
|
180
|
+
],
|
|
181
|
+
outputs: [],
|
|
182
|
+
state_mutability: 'external',
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
type: 'function',
|
|
186
|
+
name: 'withdraw',
|
|
187
|
+
inputs: [
|
|
188
|
+
{
|
|
189
|
+
name: 'trove_id',
|
|
190
|
+
type: 'core::integer::u64',
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
name: 'yang_asset',
|
|
194
|
+
type: 'opus::types::AssetBalance',
|
|
195
|
+
},
|
|
196
|
+
],
|
|
197
|
+
outputs: [],
|
|
198
|
+
state_mutability: 'external',
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
type: 'function',
|
|
202
|
+
name: 'forge',
|
|
203
|
+
inputs: [
|
|
204
|
+
{
|
|
205
|
+
name: 'trove_id',
|
|
206
|
+
type: 'core::integer::u64',
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
name: 'amount',
|
|
210
|
+
type: 'wadray::wadray::Wad',
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
name: 'max_forge_fee_pct',
|
|
214
|
+
type: 'wadray::wadray::Wad',
|
|
215
|
+
},
|
|
216
|
+
],
|
|
217
|
+
outputs: [],
|
|
218
|
+
state_mutability: 'external',
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
type: 'function',
|
|
222
|
+
name: 'melt',
|
|
223
|
+
inputs: [
|
|
224
|
+
{
|
|
225
|
+
name: 'trove_id',
|
|
226
|
+
type: 'core::integer::u64',
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
name: 'amount',
|
|
230
|
+
type: 'wadray::wadray::Wad',
|
|
231
|
+
},
|
|
232
|
+
],
|
|
233
|
+
outputs: [],
|
|
234
|
+
state_mutability: 'external',
|
|
235
|
+
},
|
|
236
|
+
],
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
type: 'constructor',
|
|
240
|
+
name: 'constructor',
|
|
241
|
+
inputs: [
|
|
242
|
+
{
|
|
243
|
+
name: 'shrine',
|
|
244
|
+
type: 'core::starknet::contract_address::ContractAddress',
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
name: 'sentinel',
|
|
248
|
+
type: 'core::starknet::contract_address::ContractAddress',
|
|
249
|
+
},
|
|
250
|
+
],
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
type: 'event',
|
|
254
|
+
name: 'opus::utils::reentrancy_guard::reentrancy_guard_component::Event',
|
|
255
|
+
kind: 'enum',
|
|
256
|
+
variants: [],
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
type: 'event',
|
|
260
|
+
name: 'opus::core::abbot::abbot::Deposit',
|
|
261
|
+
kind: 'struct',
|
|
262
|
+
members: [
|
|
263
|
+
{
|
|
264
|
+
name: 'user',
|
|
265
|
+
type: 'core::starknet::contract_address::ContractAddress',
|
|
266
|
+
kind: 'key',
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
name: 'trove_id',
|
|
270
|
+
type: 'core::integer::u64',
|
|
271
|
+
kind: 'key',
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
name: 'yang',
|
|
275
|
+
type: 'core::starknet::contract_address::ContractAddress',
|
|
276
|
+
kind: 'key',
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
name: 'yang_amt',
|
|
280
|
+
type: 'wadray::wadray::Wad',
|
|
281
|
+
kind: 'data',
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
name: 'asset_amt',
|
|
285
|
+
type: 'core::integer::u128',
|
|
286
|
+
kind: 'data',
|
|
287
|
+
},
|
|
288
|
+
],
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
type: 'event',
|
|
292
|
+
name: 'opus::core::abbot::abbot::Withdraw',
|
|
293
|
+
kind: 'struct',
|
|
294
|
+
members: [
|
|
295
|
+
{
|
|
296
|
+
name: 'user',
|
|
297
|
+
type: 'core::starknet::contract_address::ContractAddress',
|
|
298
|
+
kind: 'key',
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
name: 'trove_id',
|
|
302
|
+
type: 'core::integer::u64',
|
|
303
|
+
kind: 'key',
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
name: 'yang',
|
|
307
|
+
type: 'core::starknet::contract_address::ContractAddress',
|
|
308
|
+
kind: 'key',
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
name: 'yang_amt',
|
|
312
|
+
type: 'wadray::wadray::Wad',
|
|
313
|
+
kind: 'data',
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
name: 'asset_amt',
|
|
317
|
+
type: 'core::integer::u128',
|
|
318
|
+
kind: 'data',
|
|
319
|
+
},
|
|
320
|
+
],
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
type: 'event',
|
|
324
|
+
name: 'opus::core::abbot::abbot::TroveOpened',
|
|
325
|
+
kind: 'struct',
|
|
326
|
+
members: [
|
|
327
|
+
{
|
|
328
|
+
name: 'user',
|
|
329
|
+
type: 'core::starknet::contract_address::ContractAddress',
|
|
330
|
+
kind: 'key',
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
name: 'trove_id',
|
|
334
|
+
type: 'core::integer::u64',
|
|
335
|
+
kind: 'key',
|
|
336
|
+
},
|
|
337
|
+
],
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
type: 'event',
|
|
341
|
+
name: 'opus::core::abbot::abbot::TroveClosed',
|
|
342
|
+
kind: 'struct',
|
|
343
|
+
members: [
|
|
344
|
+
{
|
|
345
|
+
name: 'trove_id',
|
|
346
|
+
type: 'core::integer::u64',
|
|
347
|
+
kind: 'key',
|
|
348
|
+
},
|
|
349
|
+
],
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
type: 'event',
|
|
353
|
+
name: 'opus::core::abbot::abbot::Event',
|
|
354
|
+
kind: 'enum',
|
|
355
|
+
variants: [
|
|
356
|
+
{
|
|
357
|
+
name: 'ReentrancyGuardEvent',
|
|
358
|
+
type: 'opus::utils::reentrancy_guard::reentrancy_guard_component::Event',
|
|
359
|
+
kind: 'nested',
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
name: 'Deposit',
|
|
363
|
+
type: 'opus::core::abbot::abbot::Deposit',
|
|
364
|
+
kind: 'nested',
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
name: 'Withdraw',
|
|
368
|
+
type: 'opus::core::abbot::abbot::Withdraw',
|
|
369
|
+
kind: 'nested',
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
name: 'TroveOpened',
|
|
373
|
+
type: 'opus::core::abbot::abbot::TroveOpened',
|
|
374
|
+
kind: 'nested',
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
name: 'TroveClosed',
|
|
378
|
+
type: 'opus::core::abbot::abbot::TroveClosed',
|
|
379
|
+
kind: 'nested',
|
|
380
|
+
},
|
|
381
|
+
],
|
|
382
|
+
},
|
|
383
|
+
];
|
|
384
|
+
//# sourceMappingURL=abbotAbi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abbotAbi.js","sourceRoot":"","sources":["../../../src/lib/abis/abbotAbi.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB;QACE,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,YAAY;QAClB,cAAc,EAAE,kCAAkC;KACnD;IACD;QACE,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,2EAA2E;QACjF,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,mDAAmD;aAC1D;YACD;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,IAAI;aACX;SACF;KACF;IACD;QACE,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,yCAAyC;QAC/C,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,2CAA2C;aAClD;SACF;KACF;IACD;QACE,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,2BAA2B;QACjC,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,mDAAmD;aAC1D;YACD;gBACE,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,qBAAqB;aAC5B;SACF;KACF;IACD;QACE,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,gDAAgD;QACtD,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,kDAAkD;aACzD;SACF;KACF;IACD;QACE,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,qBAAqB;QAC3B,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,KAAK;gBACX,IAAI,EAAE,qBAAqB;aAC5B;SACF;KACF;IACD;QACE,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,kCAAkC;QACxC,KAAK,EAAE;YACL;gBACE,IAAI,EAAE,UAA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;aACf;YACD;gBACE,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,uCAAuC;gBAC7C,IAAI,EAAE,QAAQ;aACf;YACD;gBACE,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,uCAAuC;gBAC7C,IAAI,EAAE,QAAQ;aACf;SACF;KACF;CACO,CAAC"}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
export declare const erc20Abi: readonly [{
|
|
2
|
+
readonly type: "impl";
|
|
3
|
+
readonly name: "ERC20Impl";
|
|
4
|
+
readonly interface_name: "opus::mock::erc20::IERC20";
|
|
5
|
+
}, {
|
|
6
|
+
readonly type: "struct";
|
|
7
|
+
readonly name: "core::integer::u256";
|
|
8
|
+
readonly members: readonly [{
|
|
9
|
+
readonly name: "low";
|
|
10
|
+
readonly type: "core::integer::u128";
|
|
11
|
+
}, {
|
|
12
|
+
readonly name: "high";
|
|
13
|
+
readonly type: "core::integer::u128";
|
|
14
|
+
}];
|
|
15
|
+
}, {
|
|
16
|
+
readonly type: "enum";
|
|
17
|
+
readonly name: "core::bool";
|
|
18
|
+
readonly variants: readonly [{
|
|
19
|
+
readonly name: "False";
|
|
20
|
+
readonly type: "()";
|
|
21
|
+
}, {
|
|
22
|
+
readonly name: "True";
|
|
23
|
+
readonly type: "()";
|
|
24
|
+
}];
|
|
25
|
+
}, {
|
|
26
|
+
readonly type: "interface";
|
|
27
|
+
readonly name: "opus::mock::erc20::IERC20";
|
|
28
|
+
readonly items: readonly [{
|
|
29
|
+
readonly type: "function";
|
|
30
|
+
readonly name: "name";
|
|
31
|
+
readonly inputs: readonly [];
|
|
32
|
+
readonly outputs: readonly [{
|
|
33
|
+
readonly type: "core::felt252";
|
|
34
|
+
}];
|
|
35
|
+
readonly state_mutability: "view";
|
|
36
|
+
}, {
|
|
37
|
+
readonly type: "function";
|
|
38
|
+
readonly name: "symbol";
|
|
39
|
+
readonly inputs: readonly [];
|
|
40
|
+
readonly outputs: readonly [{
|
|
41
|
+
readonly type: "core::felt252";
|
|
42
|
+
}];
|
|
43
|
+
readonly state_mutability: "view";
|
|
44
|
+
}, {
|
|
45
|
+
readonly type: "function";
|
|
46
|
+
readonly name: "decimals";
|
|
47
|
+
readonly inputs: readonly [];
|
|
48
|
+
readonly outputs: readonly [{
|
|
49
|
+
readonly type: "core::integer::u8";
|
|
50
|
+
}];
|
|
51
|
+
readonly state_mutability: "view";
|
|
52
|
+
}, {
|
|
53
|
+
readonly type: "function";
|
|
54
|
+
readonly name: "total_supply";
|
|
55
|
+
readonly inputs: readonly [];
|
|
56
|
+
readonly outputs: readonly [{
|
|
57
|
+
readonly type: "core::integer::u256";
|
|
58
|
+
}];
|
|
59
|
+
readonly state_mutability: "view";
|
|
60
|
+
}, {
|
|
61
|
+
readonly type: "function";
|
|
62
|
+
readonly name: "balance_of";
|
|
63
|
+
readonly inputs: readonly [{
|
|
64
|
+
readonly name: "account";
|
|
65
|
+
readonly type: "core::starknet::contract_address::ContractAddress";
|
|
66
|
+
}];
|
|
67
|
+
readonly outputs: readonly [{
|
|
68
|
+
readonly type: "core::integer::u256";
|
|
69
|
+
}];
|
|
70
|
+
readonly state_mutability: "view";
|
|
71
|
+
}, {
|
|
72
|
+
readonly type: "function";
|
|
73
|
+
readonly name: "allowance";
|
|
74
|
+
readonly inputs: readonly [{
|
|
75
|
+
readonly name: "owner";
|
|
76
|
+
readonly type: "core::starknet::contract_address::ContractAddress";
|
|
77
|
+
}, {
|
|
78
|
+
readonly name: "spender";
|
|
79
|
+
readonly type: "core::starknet::contract_address::ContractAddress";
|
|
80
|
+
}];
|
|
81
|
+
readonly outputs: readonly [{
|
|
82
|
+
readonly type: "core::integer::u256";
|
|
83
|
+
}];
|
|
84
|
+
readonly state_mutability: "view";
|
|
85
|
+
}, {
|
|
86
|
+
readonly type: "function";
|
|
87
|
+
readonly name: "transfer";
|
|
88
|
+
readonly inputs: readonly [{
|
|
89
|
+
readonly name: "recipient";
|
|
90
|
+
readonly type: "core::starknet::contract_address::ContractAddress";
|
|
91
|
+
}, {
|
|
92
|
+
readonly name: "amount";
|
|
93
|
+
readonly type: "core::integer::u256";
|
|
94
|
+
}];
|
|
95
|
+
readonly outputs: readonly [{
|
|
96
|
+
readonly type: "core::bool";
|
|
97
|
+
}];
|
|
98
|
+
readonly state_mutability: "external";
|
|
99
|
+
}, {
|
|
100
|
+
readonly type: "function";
|
|
101
|
+
readonly name: "transfer_from";
|
|
102
|
+
readonly inputs: readonly [{
|
|
103
|
+
readonly name: "sender";
|
|
104
|
+
readonly type: "core::starknet::contract_address::ContractAddress";
|
|
105
|
+
}, {
|
|
106
|
+
readonly name: "recipient";
|
|
107
|
+
readonly type: "core::starknet::contract_address::ContractAddress";
|
|
108
|
+
}, {
|
|
109
|
+
readonly name: "amount";
|
|
110
|
+
readonly type: "core::integer::u256";
|
|
111
|
+
}];
|
|
112
|
+
readonly outputs: readonly [{
|
|
113
|
+
readonly type: "core::bool";
|
|
114
|
+
}];
|
|
115
|
+
readonly state_mutability: "external";
|
|
116
|
+
}, {
|
|
117
|
+
readonly type: "function";
|
|
118
|
+
readonly name: "approve";
|
|
119
|
+
readonly inputs: readonly [{
|
|
120
|
+
readonly name: "spender";
|
|
121
|
+
readonly type: "core::starknet::contract_address::ContractAddress";
|
|
122
|
+
}, {
|
|
123
|
+
readonly name: "amount";
|
|
124
|
+
readonly type: "core::integer::u256";
|
|
125
|
+
}];
|
|
126
|
+
readonly outputs: readonly [{
|
|
127
|
+
readonly type: "core::bool";
|
|
128
|
+
}];
|
|
129
|
+
readonly state_mutability: "external";
|
|
130
|
+
}];
|
|
131
|
+
}, {
|
|
132
|
+
readonly type: "constructor";
|
|
133
|
+
readonly name: "constructor";
|
|
134
|
+
readonly inputs: readonly [{
|
|
135
|
+
readonly name: "name";
|
|
136
|
+
readonly type: "core::felt252";
|
|
137
|
+
}, {
|
|
138
|
+
readonly name: "symbol";
|
|
139
|
+
readonly type: "core::felt252";
|
|
140
|
+
}, {
|
|
141
|
+
readonly name: "decimals";
|
|
142
|
+
readonly type: "core::integer::u8";
|
|
143
|
+
}, {
|
|
144
|
+
readonly name: "initial_supply";
|
|
145
|
+
readonly type: "core::integer::u256";
|
|
146
|
+
}, {
|
|
147
|
+
readonly name: "recipient";
|
|
148
|
+
readonly type: "core::starknet::contract_address::ContractAddress";
|
|
149
|
+
}];
|
|
150
|
+
}, {
|
|
151
|
+
readonly type: "event";
|
|
152
|
+
readonly name: "opus::mock::erc20::erc20::Transfer";
|
|
153
|
+
readonly kind: "struct";
|
|
154
|
+
readonly members: readonly [{
|
|
155
|
+
readonly name: "from";
|
|
156
|
+
readonly type: "core::starknet::contract_address::ContractAddress";
|
|
157
|
+
readonly kind: "key";
|
|
158
|
+
}, {
|
|
159
|
+
readonly name: "to";
|
|
160
|
+
readonly type: "core::starknet::contract_address::ContractAddress";
|
|
161
|
+
readonly kind: "key";
|
|
162
|
+
}, {
|
|
163
|
+
readonly name: "value";
|
|
164
|
+
readonly type: "core::integer::u256";
|
|
165
|
+
readonly kind: "data";
|
|
166
|
+
}];
|
|
167
|
+
}, {
|
|
168
|
+
readonly type: "event";
|
|
169
|
+
readonly name: "opus::mock::erc20::erc20::Approval";
|
|
170
|
+
readonly kind: "struct";
|
|
171
|
+
readonly members: readonly [{
|
|
172
|
+
readonly name: "owner";
|
|
173
|
+
readonly type: "core::starknet::contract_address::ContractAddress";
|
|
174
|
+
readonly kind: "key";
|
|
175
|
+
}, {
|
|
176
|
+
readonly name: "spender";
|
|
177
|
+
readonly type: "core::starknet::contract_address::ContractAddress";
|
|
178
|
+
readonly kind: "key";
|
|
179
|
+
}, {
|
|
180
|
+
readonly name: "value";
|
|
181
|
+
readonly type: "core::integer::u256";
|
|
182
|
+
readonly kind: "data";
|
|
183
|
+
}];
|
|
184
|
+
}, {
|
|
185
|
+
readonly type: "event";
|
|
186
|
+
readonly name: "opus::mock::erc20::erc20::Event";
|
|
187
|
+
readonly kind: "enum";
|
|
188
|
+
readonly variants: readonly [{
|
|
189
|
+
readonly name: "Transfer";
|
|
190
|
+
readonly type: "opus::mock::erc20::erc20::Transfer";
|
|
191
|
+
readonly kind: "nested";
|
|
192
|
+
}, {
|
|
193
|
+
readonly name: "Approval";
|
|
194
|
+
readonly type: "opus::mock::erc20::erc20::Approval";
|
|
195
|
+
readonly kind: "nested";
|
|
196
|
+
}];
|
|
197
|
+
}];
|