@mistcash/config 0.2.1 → 0.5.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/src/contracts.ts CHANGED
@@ -1,740 +1,819 @@
1
- import { Abi, TypedContractV2 } from "starknet";
1
+ import { Abi, TypedContractV2 } from 'starknet';
2
2
 
3
- export const CHAMBER_ADDR_MAINNET = '0x06a6ed89c1955ce25c5e51cf053e5db79de51a840344421a75884b0c679368a6';
3
+ export const CHAMBER_ADDR_MAINNET = (process.env.CHAMBER_ADDR_MAINNET ||
4
+ '0x03a889eb7aecedcb76b987fc981ad3b92689cf45bffec8c1c409a4b0b79c3f31') as `0x${string}`;
4
5
 
5
6
  export const CHAMBER_ABI = [
6
- {
7
- "type": "impl",
8
- "name": "UpgradeableImpl",
9
- "interface_name": "openzeppelin_upgrades::interface::IUpgradeable"
10
- },
11
- {
12
- "type": "interface",
13
- "name": "openzeppelin_upgrades::interface::IUpgradeable",
14
- "items": [
15
- {
16
- "type": "function",
17
- "name": "upgrade",
18
- "inputs": [
19
- {
20
- "name": "new_class_hash",
21
- "type": "core::starknet::class_hash::ClassHash"
22
- }
23
- ],
24
- "outputs": [],
25
- "state_mutability": "external"
26
- }
27
- ]
28
- },
29
- {
30
- "type": "impl",
31
- "name": "IChamberImpl",
32
- "interface_name": "contracts::multi_asset::IChamber"
33
- },
34
- {
35
- "type": "struct",
36
- "name": "core::integer::u256",
37
- "members": [
38
- {
39
- "name": "low",
40
- "type": "core::integer::u128"
41
- },
42
- {
43
- "name": "high",
44
- "type": "core::integer::u128"
45
- }
46
- ]
47
- },
48
- {
49
- "type": "struct",
50
- "name": "contracts::multi_asset::Asset",
51
- "members": [
52
- {
53
- "name": "amount",
54
- "type": "core::integer::u256"
55
- },
56
- {
57
- "name": "addr",
58
- "type": "core::starknet::contract_address::ContractAddress"
59
- }
60
- ]
61
- },
62
- {
63
- "type": "struct",
64
- "name": "core::array::Span::<core::integer::u256>",
65
- "members": [
66
- {
67
- "name": "snapshot",
68
- "type": "@core::array::Array::<core::integer::u256>"
69
- }
70
- ]
71
- },
72
- {
73
- "type": "struct",
74
- "name": "core::array::Span::<core::felt252>",
75
- "members": [
76
- {
77
- "name": "snapshot",
78
- "type": "@core::array::Array::<core::felt252>"
79
- }
80
- ]
81
- },
82
- {
83
- "type": "interface",
84
- "name": "contracts::multi_asset::IChamber",
85
- "items": [
86
- {
87
- "type": "function",
88
- "name": "deposit",
89
- "inputs": [
90
- {
91
- "name": "hash",
92
- "type": "core::integer::u256"
93
- },
94
- {
95
- "name": "asset",
96
- "type": "contracts::multi_asset::Asset"
97
- }
98
- ],
99
- "outputs": [],
100
- "state_mutability": "external"
101
- },
102
- {
103
- "type": "function",
104
- "name": "withdraw_no_zk",
105
- "inputs": [
106
- {
107
- "name": "claiming_key",
108
- "type": "core::integer::u256"
109
- },
110
- {
111
- "name": "recipient",
112
- "type": "core::starknet::contract_address::ContractAddress"
113
- },
114
- {
115
- "name": "asset",
116
- "type": "contracts::multi_asset::Asset"
117
- },
118
- {
119
- "name": "proof",
120
- "type": "core::array::Span::<core::integer::u256>"
121
- }
122
- ],
123
- "outputs": [],
124
- "state_mutability": "external"
125
- },
126
- {
127
- "type": "function",
128
- "name": "seek_and_hide_no_zk",
129
- "inputs": [
130
- {
131
- "name": "claiming_key",
132
- "type": "core::integer::u256"
133
- },
134
- {
135
- "name": "recipient",
136
- "type": "core::starknet::contract_address::ContractAddress"
137
- },
138
- {
139
- "name": "asset",
140
- "type": "contracts::multi_asset::Asset"
141
- },
142
- {
143
- "name": "proof",
144
- "type": "core::array::Span::<core::integer::u256>"
145
- },
146
- {
147
- "name": "new_tx_secret",
148
- "type": "core::integer::u256"
149
- },
150
- {
151
- "name": "new_tx_amount",
152
- "type": "core::integer::u256"
153
- }
154
- ],
155
- "outputs": [],
156
- "state_mutability": "external"
157
- },
158
- {
159
- "type": "function",
160
- "name": "handle_zkp",
161
- "inputs": [
162
- {
163
- "name": "proof",
164
- "type": "core::array::Span::<core::felt252>"
165
- }
166
- ],
167
- "outputs": [],
168
- "state_mutability": "external"
169
- },
170
- {
171
- "type": "function",
172
- "name": "tx_array",
173
- "inputs": [],
174
- "outputs": [
175
- {
176
- "type": "core::array::Array::<core::integer::u256>"
177
- }
178
- ],
179
- "state_mutability": "view"
180
- },
181
- {
182
- "type": "function",
183
- "name": "merkle_root",
184
- "inputs": [],
185
- "outputs": [
186
- {
187
- "type": "core::integer::u256"
188
- }
189
- ],
190
- "state_mutability": "view"
191
- }
192
- ]
193
- },
194
- {
195
- "type": "impl",
196
- "name": "OwnableMixinImpl",
197
- "interface_name": "openzeppelin_access::ownable::interface::OwnableABI"
198
- },
199
- {
200
- "type": "interface",
201
- "name": "openzeppelin_access::ownable::interface::OwnableABI",
202
- "items": [
203
- {
204
- "type": "function",
205
- "name": "owner",
206
- "inputs": [],
207
- "outputs": [
208
- {
209
- "type": "core::starknet::contract_address::ContractAddress"
210
- }
211
- ],
212
- "state_mutability": "view"
213
- },
214
- {
215
- "type": "function",
216
- "name": "transfer_ownership",
217
- "inputs": [
218
- {
219
- "name": "new_owner",
220
- "type": "core::starknet::contract_address::ContractAddress"
221
- }
222
- ],
223
- "outputs": [],
224
- "state_mutability": "external"
225
- },
226
- {
227
- "type": "function",
228
- "name": "renounce_ownership",
229
- "inputs": [],
230
- "outputs": [],
231
- "state_mutability": "external"
232
- },
233
- {
234
- "type": "function",
235
- "name": "transferOwnership",
236
- "inputs": [
237
- {
238
- "name": "newOwner",
239
- "type": "core::starknet::contract_address::ContractAddress"
240
- }
241
- ],
242
- "outputs": [],
243
- "state_mutability": "external"
244
- },
245
- {
246
- "type": "function",
247
- "name": "renounceOwnership",
248
- "inputs": [],
249
- "outputs": [],
250
- "state_mutability": "external"
251
- }
252
- ]
253
- },
254
- {
255
- "type": "struct",
256
- "name": "verifier_contracts::honk_verifier::IUltraStarknetZKHonkVerifierDispatcher",
257
- "members": [
258
- {
259
- "name": "contract_address",
260
- "type": "core::starknet::contract_address::ContractAddress"
261
- }
262
- ]
263
- },
264
- {
265
- "type": "constructor",
266
- "name": "constructor",
267
- "inputs": [
268
- {
269
- "name": "owner",
270
- "type": "core::starknet::contract_address::ContractAddress"
271
- },
272
- {
273
- "name": "verifier",
274
- "type": "verifier_contracts::honk_verifier::IUltraStarknetZKHonkVerifierDispatcher"
275
- }
276
- ]
277
- },
278
- {
279
- "type": "function",
280
- "name": "read_tx",
281
- "inputs": [
282
- {
283
- "name": "tx_hash",
284
- "type": "core::integer::u256"
285
- }
286
- ],
287
- "outputs": [
288
- {
289
- "type": "contracts::multi_asset::Asset"
290
- }
291
- ],
292
- "state_mutability": "view"
293
- },
294
- {
295
- "type": "function",
296
- "name": "setVerifierAddress",
297
- "inputs": [
298
- {
299
- "name": "verifier",
300
- "type": "verifier_contracts::honk_verifier::IUltraStarknetZKHonkVerifierDispatcher"
301
- }
302
- ],
303
- "outputs": [],
304
- "state_mutability": "external"
305
- },
306
- {
307
- "type": "function",
308
- "name": "recalculate_merkle_root",
309
- "inputs": [],
310
- "outputs": [],
311
- "state_mutability": "external"
312
- },
313
- {
314
- "type": "event",
315
- "name": "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferred",
316
- "kind": "struct",
317
- "members": [
318
- {
319
- "name": "previous_owner",
320
- "type": "core::starknet::contract_address::ContractAddress",
321
- "kind": "key"
322
- },
323
- {
324
- "name": "new_owner",
325
- "type": "core::starknet::contract_address::ContractAddress",
326
- "kind": "key"
327
- }
328
- ]
329
- },
330
- {
331
- "type": "event",
332
- "name": "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferStarted",
333
- "kind": "struct",
334
- "members": [
335
- {
336
- "name": "previous_owner",
337
- "type": "core::starknet::contract_address::ContractAddress",
338
- "kind": "key"
339
- },
340
- {
341
- "name": "new_owner",
342
- "type": "core::starknet::contract_address::ContractAddress",
343
- "kind": "key"
344
- }
345
- ]
346
- },
347
- {
348
- "type": "event",
349
- "name": "openzeppelin_access::ownable::ownable::OwnableComponent::Event",
350
- "kind": "enum",
351
- "variants": [
352
- {
353
- "name": "OwnershipTransferred",
354
- "type": "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferred",
355
- "kind": "nested"
356
- },
357
- {
358
- "name": "OwnershipTransferStarted",
359
- "type": "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferStarted",
360
- "kind": "nested"
361
- }
362
- ]
363
- },
364
- {
365
- "type": "event",
366
- "name": "openzeppelin_upgrades::upgradeable::UpgradeableComponent::Upgraded",
367
- "kind": "struct",
368
- "members": [
369
- {
370
- "name": "class_hash",
371
- "type": "core::starknet::class_hash::ClassHash",
372
- "kind": "data"
373
- }
374
- ]
375
- },
376
- {
377
- "type": "event",
378
- "name": "openzeppelin_upgrades::upgradeable::UpgradeableComponent::Event",
379
- "kind": "enum",
380
- "variants": [
381
- {
382
- "name": "Upgraded",
383
- "type": "openzeppelin_upgrades::upgradeable::UpgradeableComponent::Upgraded",
384
- "kind": "nested"
385
- }
386
- ]
387
- },
388
- {
389
- "type": "event",
390
- "name": "contracts::multi_asset::Chamber::Event",
391
- "kind": "enum",
392
- "variants": [
393
- {
394
- "name": "OwnableEvent",
395
- "type": "openzeppelin_access::ownable::ownable::OwnableComponent::Event",
396
- "kind": "flat"
397
- },
398
- {
399
- "name": "UpgradeableEvent",
400
- "type": "openzeppelin_upgrades::upgradeable::UpgradeableComponent::Event",
401
- "kind": "flat"
402
- }
403
- ]
404
- }
7
+ {
8
+ "type": "impl",
9
+ "name": "UpgradeableImpl",
10
+ "interface_name": "openzeppelin_upgrades::interface::IUpgradeable"
11
+ },
12
+ {
13
+ "type": "interface",
14
+ "name": "openzeppelin_upgrades::interface::IUpgradeable",
15
+ "items": [
16
+ {
17
+ "type": "function",
18
+ "name": "upgrade",
19
+ "inputs": [
20
+ {
21
+ "name": "new_class_hash",
22
+ "type": "core::starknet::class_hash::ClassHash"
23
+ }
24
+ ],
25
+ "outputs": [],
26
+ "state_mutability": "external"
27
+ }
28
+ ]
29
+ },
30
+ {
31
+ "type": "impl",
32
+ "name": "IChamberImpl",
33
+ "interface_name": "contracts::chamber::IChamber"
34
+ },
35
+ {
36
+ "type": "struct",
37
+ "name": "core::integer::u256",
38
+ "members": [
39
+ {
40
+ "name": "low",
41
+ "type": "core::integer::u128"
42
+ },
43
+ {
44
+ "name": "high",
45
+ "type": "core::integer::u128"
46
+ }
47
+ ]
48
+ },
49
+ {
50
+ "type": "struct",
51
+ "name": "contracts::chamber::Asset",
52
+ "members": [
53
+ {
54
+ "name": "amount",
55
+ "type": "core::integer::u256"
56
+ },
57
+ {
58
+ "name": "addr",
59
+ "type": "core::starknet::contract_address::ContractAddress"
60
+ }
61
+ ]
62
+ },
63
+ {
64
+ "type": "struct",
65
+ "name": "core::array::Span::<core::integer::u256>",
66
+ "members": [
67
+ {
68
+ "name": "snapshot",
69
+ "type": "@core::array::Array::<core::integer::u256>"
70
+ }
71
+ ]
72
+ },
73
+ {
74
+ "type": "struct",
75
+ "name": "core::array::Span::<core::felt252>",
76
+ "members": [
77
+ {
78
+ "name": "snapshot",
79
+ "type": "@core::array::Array::<core::felt252>"
80
+ }
81
+ ]
82
+ },
83
+ {
84
+ "type": "enum",
85
+ "name": "core::bool",
86
+ "variants": [
87
+ {
88
+ "name": "False",
89
+ "type": "()"
90
+ },
91
+ {
92
+ "name": "True",
93
+ "type": "()"
94
+ }
95
+ ]
96
+ },
97
+ {
98
+ "type": "struct",
99
+ "name": "verifier_contracts::groth16_verifier::IGroth16VerifierBN254Dispatcher",
100
+ "members": [
101
+ {
102
+ "name": "contract_address",
103
+ "type": "core::starknet::contract_address::ContractAddress"
104
+ }
105
+ ]
106
+ },
107
+ {
108
+ "type": "interface",
109
+ "name": "contracts::chamber::IChamber",
110
+ "items": [
111
+ {
112
+ "type": "function",
113
+ "name": "deposit",
114
+ "inputs": [
115
+ {
116
+ "name": "hash",
117
+ "type": "core::integer::u256"
118
+ },
119
+ {
120
+ "name": "asset",
121
+ "type": "contracts::chamber::Asset"
122
+ }
123
+ ],
124
+ "outputs": [],
125
+ "state_mutability": "external"
126
+ },
127
+ {
128
+ "type": "function",
129
+ "name": "withdraw_no_zk",
130
+ "inputs": [
131
+ {
132
+ "name": "claiming_key",
133
+ "type": "core::integer::u256"
134
+ },
135
+ {
136
+ "name": "recipient",
137
+ "type": "core::starknet::contract_address::ContractAddress"
138
+ },
139
+ {
140
+ "name": "asset",
141
+ "type": "contracts::chamber::Asset"
142
+ },
143
+ {
144
+ "name": "proof",
145
+ "type": "core::array::Span::<core::integer::u256>"
146
+ }
147
+ ],
148
+ "outputs": [],
149
+ "state_mutability": "external"
150
+ },
151
+ {
152
+ "type": "function",
153
+ "name": "seek_and_hide_no_zk",
154
+ "inputs": [
155
+ {
156
+ "name": "claiming_key",
157
+ "type": "core::integer::u256"
158
+ },
159
+ {
160
+ "name": "recipient",
161
+ "type": "core::starknet::contract_address::ContractAddress"
162
+ },
163
+ {
164
+ "name": "asset",
165
+ "type": "contracts::chamber::Asset"
166
+ },
167
+ {
168
+ "name": "proof",
169
+ "type": "core::array::Span::<core::integer::u256>"
170
+ },
171
+ {
172
+ "name": "new_tx_secret",
173
+ "type": "core::integer::u256"
174
+ },
175
+ {
176
+ "name": "new_tx_amount",
177
+ "type": "core::integer::u256"
178
+ }
179
+ ],
180
+ "outputs": [],
181
+ "state_mutability": "external"
182
+ },
183
+ {
184
+ "type": "function",
185
+ "name": "handle_zkp",
186
+ "inputs": [
187
+ {
188
+ "name": "proof",
189
+ "type": "core::array::Span::<core::felt252>"
190
+ }
191
+ ],
192
+ "outputs": [],
193
+ "state_mutability": "external"
194
+ },
195
+ {
196
+ "type": "function",
197
+ "name": "tx_array",
198
+ "inputs": [],
199
+ "outputs": [
200
+ {
201
+ "type": "core::array::Array::<core::integer::u256>"
202
+ }
203
+ ],
204
+ "state_mutability": "view"
205
+ },
206
+ {
207
+ "type": "function",
208
+ "name": "merkle_root",
209
+ "inputs": [],
210
+ "outputs": [
211
+ {
212
+ "type": "core::integer::u256"
213
+ }
214
+ ],
215
+ "state_mutability": "view"
216
+ },
217
+ {
218
+ "type": "function",
219
+ "name": "merkle_proof",
220
+ "inputs": [
221
+ {
222
+ "name": "index",
223
+ "type": "core::integer::u32"
224
+ }
225
+ ],
226
+ "outputs": [
227
+ {
228
+ "type": "core::array::Span::<core::integer::u256>"
229
+ }
230
+ ],
231
+ "state_mutability": "external"
232
+ },
233
+ {
234
+ "type": "function",
235
+ "name": "merkle_leaves",
236
+ "inputs": [
237
+ {
238
+ "name": "height",
239
+ "type": "core::integer::u32"
240
+ }
241
+ ],
242
+ "outputs": [
243
+ {
244
+ "type": "core::array::Array::<core::integer::u256>"
245
+ }
246
+ ],
247
+ "state_mutability": "external"
248
+ },
249
+ {
250
+ "type": "function",
251
+ "name": "assets_from_secret",
252
+ "inputs": [
253
+ {
254
+ "name": "tx_secret",
255
+ "type": "core::integer::u256"
256
+ }
257
+ ],
258
+ "outputs": [
259
+ {
260
+ "type": "contracts::chamber::Asset"
261
+ }
262
+ ],
263
+ "state_mutability": "view"
264
+ },
265
+ {
266
+ "type": "function",
267
+ "name": "nullifiers_spent",
268
+ "inputs": [
269
+ {
270
+ "name": "nullifiers",
271
+ "type": "core::array::Array::<core::integer::u256>"
272
+ }
273
+ ],
274
+ "outputs": [
275
+ {
276
+ "type": "core::array::Array::<core::bool>"
277
+ }
278
+ ],
279
+ "state_mutability": "view"
280
+ },
281
+ {
282
+ "type": "function",
283
+ "name": "transactions_exist",
284
+ "inputs": [
285
+ {
286
+ "name": "transactions",
287
+ "type": "core::array::Array::<core::integer::u256>"
288
+ }
289
+ ],
290
+ "outputs": [
291
+ {
292
+ "type": "core::array::Array::<core::bool>"
293
+ }
294
+ ],
295
+ "state_mutability": "view"
296
+ },
297
+ {
298
+ "type": "function",
299
+ "name": "setVerifierAddress",
300
+ "inputs": [
301
+ {
302
+ "name": "verifier",
303
+ "type": "verifier_contracts::groth16_verifier::IGroth16VerifierBN254Dispatcher"
304
+ }
305
+ ],
306
+ "outputs": [],
307
+ "state_mutability": "external"
308
+ },
309
+ {
310
+ "type": "function",
311
+ "name": "recalculate_merkle_root",
312
+ "inputs": [],
313
+ "outputs": [],
314
+ "state_mutability": "external"
315
+ }
316
+ ]
317
+ },
318
+ {
319
+ "type": "impl",
320
+ "name": "OwnableMixinImpl",
321
+ "interface_name": "openzeppelin_access::ownable::interface::OwnableABI"
322
+ },
323
+ {
324
+ "type": "interface",
325
+ "name": "openzeppelin_access::ownable::interface::OwnableABI",
326
+ "items": [
327
+ {
328
+ "type": "function",
329
+ "name": "owner",
330
+ "inputs": [],
331
+ "outputs": [
332
+ {
333
+ "type": "core::starknet::contract_address::ContractAddress"
334
+ }
335
+ ],
336
+ "state_mutability": "view"
337
+ },
338
+ {
339
+ "type": "function",
340
+ "name": "transfer_ownership",
341
+ "inputs": [
342
+ {
343
+ "name": "new_owner",
344
+ "type": "core::starknet::contract_address::ContractAddress"
345
+ }
346
+ ],
347
+ "outputs": [],
348
+ "state_mutability": "external"
349
+ },
350
+ {
351
+ "type": "function",
352
+ "name": "renounce_ownership",
353
+ "inputs": [],
354
+ "outputs": [],
355
+ "state_mutability": "external"
356
+ },
357
+ {
358
+ "type": "function",
359
+ "name": "transferOwnership",
360
+ "inputs": [
361
+ {
362
+ "name": "newOwner",
363
+ "type": "core::starknet::contract_address::ContractAddress"
364
+ }
365
+ ],
366
+ "outputs": [],
367
+ "state_mutability": "external"
368
+ },
369
+ {
370
+ "type": "function",
371
+ "name": "renounceOwnership",
372
+ "inputs": [],
373
+ "outputs": [],
374
+ "state_mutability": "external"
375
+ }
376
+ ]
377
+ },
378
+ {
379
+ "type": "constructor",
380
+ "name": "constructor",
381
+ "inputs": [
382
+ {
383
+ "name": "owner",
384
+ "type": "core::starknet::contract_address::ContractAddress"
385
+ },
386
+ {
387
+ "name": "verifier",
388
+ "type": "verifier_contracts::groth16_verifier::IGroth16VerifierBN254Dispatcher"
389
+ }
390
+ ]
391
+ },
392
+ {
393
+ "type": "event",
394
+ "name": "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferred",
395
+ "kind": "struct",
396
+ "members": [
397
+ {
398
+ "name": "previous_owner",
399
+ "type": "core::starknet::contract_address::ContractAddress",
400
+ "kind": "key"
401
+ },
402
+ {
403
+ "name": "new_owner",
404
+ "type": "core::starknet::contract_address::ContractAddress",
405
+ "kind": "key"
406
+ }
407
+ ]
408
+ },
409
+ {
410
+ "type": "event",
411
+ "name": "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferStarted",
412
+ "kind": "struct",
413
+ "members": [
414
+ {
415
+ "name": "previous_owner",
416
+ "type": "core::starknet::contract_address::ContractAddress",
417
+ "kind": "key"
418
+ },
419
+ {
420
+ "name": "new_owner",
421
+ "type": "core::starknet::contract_address::ContractAddress",
422
+ "kind": "key"
423
+ }
424
+ ]
425
+ },
426
+ {
427
+ "type": "event",
428
+ "name": "openzeppelin_access::ownable::ownable::OwnableComponent::Event",
429
+ "kind": "enum",
430
+ "variants": [
431
+ {
432
+ "name": "OwnershipTransferred",
433
+ "type": "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferred",
434
+ "kind": "nested"
435
+ },
436
+ {
437
+ "name": "OwnershipTransferStarted",
438
+ "type": "openzeppelin_access::ownable::ownable::OwnableComponent::OwnershipTransferStarted",
439
+ "kind": "nested"
440
+ }
441
+ ]
442
+ },
443
+ {
444
+ "type": "event",
445
+ "name": "openzeppelin_upgrades::upgradeable::UpgradeableComponent::Upgraded",
446
+ "kind": "struct",
447
+ "members": [
448
+ {
449
+ "name": "class_hash",
450
+ "type": "core::starknet::class_hash::ClassHash",
451
+ "kind": "data"
452
+ }
453
+ ]
454
+ },
455
+ {
456
+ "type": "event",
457
+ "name": "openzeppelin_upgrades::upgradeable::UpgradeableComponent::Event",
458
+ "kind": "enum",
459
+ "variants": [
460
+ {
461
+ "name": "Upgraded",
462
+ "type": "openzeppelin_upgrades::upgradeable::UpgradeableComponent::Upgraded",
463
+ "kind": "nested"
464
+ }
465
+ ]
466
+ },
467
+ {
468
+ "type": "event",
469
+ "name": "contracts::chamber::Chamber::Event",
470
+ "kind": "enum",
471
+ "variants": [
472
+ {
473
+ "name": "OwnableEvent",
474
+ "type": "openzeppelin_access::ownable::ownable::OwnableComponent::Event",
475
+ "kind": "flat"
476
+ },
477
+ {
478
+ "name": "UpgradeableEvent",
479
+ "type": "openzeppelin_upgrades::upgradeable::UpgradeableComponent::Event",
480
+ "kind": "flat"
481
+ }
482
+ ]
483
+ }
405
484
  ] as const satisfies Abi;
406
485
 
407
486
  export const ERC20_ABI = [
408
- {
409
- "type": "impl",
410
- "name": "ERC20MixinImpl",
411
- "interface_name": "openzeppelin_token::erc20::interface::IERC20Mixin"
412
- },
413
- {
414
- "type": "struct",
415
- "name": "core::integer::u256",
416
- "members": [
417
- {
418
- "name": "low",
419
- "type": "core::integer::u128"
420
- },
421
- {
422
- "name": "high",
423
- "type": "core::integer::u128"
424
- }
425
- ]
426
- },
427
- {
428
- "type": "enum",
429
- "name": "core::bool",
430
- "variants": [
431
- {
432
- "name": "False",
433
- "type": "()"
434
- },
435
- {
436
- "name": "True",
437
- "type": "()"
438
- }
439
- ]
440
- },
441
- {
442
- "type": "struct",
443
- "name": "core::byte_array::ByteArray",
444
- "members": [
445
- {
446
- "name": "data",
447
- "type": "core::array::Array::<core::bytes_31::bytes31>"
448
- },
449
- {
450
- "name": "pending_word",
451
- "type": "core::felt252"
452
- },
453
- {
454
- "name": "pending_word_len",
455
- "type": "core::integer::u32"
456
- }
457
- ]
458
- },
459
- {
460
- "type": "interface",
461
- "name": "openzeppelin_token::erc20::interface::IERC20Mixin",
462
- "items": [
463
- {
464
- "type": "function",
465
- "name": "total_supply",
466
- "inputs": [],
467
- "outputs": [
468
- {
469
- "type": "core::integer::u256"
470
- }
471
- ],
472
- "state_mutability": "view"
473
- },
474
- {
475
- "type": "function",
476
- "name": "balance_of",
477
- "inputs": [
478
- {
479
- "name": "account",
480
- "type": "core::starknet::contract_address::ContractAddress"
481
- }
482
- ],
483
- "outputs": [
484
- {
485
- "type": "core::integer::u256"
486
- }
487
- ],
488
- "state_mutability": "view"
489
- },
490
- {
491
- "type": "function",
492
- "name": "allowance",
493
- "inputs": [
494
- {
495
- "name": "owner",
496
- "type": "core::starknet::contract_address::ContractAddress"
497
- },
498
- {
499
- "name": "spender",
500
- "type": "core::starknet::contract_address::ContractAddress"
501
- }
502
- ],
503
- "outputs": [
504
- {
505
- "type": "core::integer::u256"
506
- }
507
- ],
508
- "state_mutability": "view"
509
- },
510
- {
511
- "type": "function",
512
- "name": "transfer",
513
- "inputs": [
514
- {
515
- "name": "recipient",
516
- "type": "core::starknet::contract_address::ContractAddress"
517
- },
518
- {
519
- "name": "amount",
520
- "type": "core::integer::u256"
521
- }
522
- ],
523
- "outputs": [
524
- {
525
- "type": "core::bool"
526
- }
527
- ],
528
- "state_mutability": "external"
529
- },
530
- {
531
- "type": "function",
532
- "name": "transfer_from",
533
- "inputs": [
534
- {
535
- "name": "sender",
536
- "type": "core::starknet::contract_address::ContractAddress"
537
- },
538
- {
539
- "name": "recipient",
540
- "type": "core::starknet::contract_address::ContractAddress"
541
- },
542
- {
543
- "name": "amount",
544
- "type": "core::integer::u256"
545
- }
546
- ],
547
- "outputs": [
548
- {
549
- "type": "core::bool"
550
- }
551
- ],
552
- "state_mutability": "external"
553
- },
554
- {
555
- "type": "function",
556
- "name": "approve",
557
- "inputs": [
558
- {
559
- "name": "spender",
560
- "type": "core::starknet::contract_address::ContractAddress"
561
- },
562
- {
563
- "name": "amount",
564
- "type": "core::integer::u256"
565
- }
566
- ],
567
- "outputs": [
568
- {
569
- "type": "core::bool"
570
- }
571
- ],
572
- "state_mutability": "external"
573
- },
574
- {
575
- "type": "function",
576
- "name": "name",
577
- "inputs": [],
578
- "outputs": [
579
- {
580
- "type": "core::byte_array::ByteArray"
581
- }
582
- ],
583
- "state_mutability": "view"
584
- },
585
- {
586
- "type": "function",
587
- "name": "symbol",
588
- "inputs": [],
589
- "outputs": [
590
- {
591
- "type": "core::byte_array::ByteArray"
592
- }
593
- ],
594
- "state_mutability": "view"
595
- },
596
- {
597
- "type": "function",
598
- "name": "decimals",
599
- "inputs": [],
600
- "outputs": [
601
- {
602
- "type": "core::integer::u8"
603
- }
604
- ],
605
- "state_mutability": "view"
606
- },
607
- {
608
- "type": "function",
609
- "name": "totalSupply",
610
- "inputs": [],
611
- "outputs": [
612
- {
613
- "type": "core::integer::u256"
614
- }
615
- ],
616
- "state_mutability": "view"
617
- },
618
- {
619
- "type": "function",
620
- "name": "balanceOf",
621
- "inputs": [
622
- {
623
- "name": "account",
624
- "type": "core::starknet::contract_address::ContractAddress"
625
- }
626
- ],
627
- "outputs": [
628
- {
629
- "type": "core::integer::u256"
630
- }
631
- ],
632
- "state_mutability": "view"
633
- },
634
- {
635
- "type": "function",
636
- "name": "transferFrom",
637
- "inputs": [
638
- {
639
- "name": "sender",
640
- "type": "core::starknet::contract_address::ContractAddress"
641
- },
642
- {
643
- "name": "recipient",
644
- "type": "core::starknet::contract_address::ContractAddress"
645
- },
646
- {
647
- "name": "amount",
648
- "type": "core::integer::u256"
649
- }
650
- ],
651
- "outputs": [
652
- {
653
- "type": "core::bool"
654
- }
655
- ],
656
- "state_mutability": "external"
657
- }
658
- ]
659
- },
660
- {
661
- "type": "constructor",
662
- "name": "constructor",
663
- "inputs": []
664
- },
665
- {
666
- "type": "event",
667
- "name": "openzeppelin_token::erc20::erc20::ERC20Component::Transfer",
668
- "kind": "struct",
669
- "members": [
670
- {
671
- "name": "from",
672
- "type": "core::starknet::contract_address::ContractAddress",
673
- "kind": "key"
674
- },
675
- {
676
- "name": "to",
677
- "type": "core::starknet::contract_address::ContractAddress",
678
- "kind": "key"
679
- },
680
- {
681
- "name": "value",
682
- "type": "core::integer::u256",
683
- "kind": "data"
684
- }
685
- ]
686
- },
687
- {
688
- "type": "event",
689
- "name": "openzeppelin_token::erc20::erc20::ERC20Component::Approval",
690
- "kind": "struct",
691
- "members": [
692
- {
693
- "name": "owner",
694
- "type": "core::starknet::contract_address::ContractAddress",
695
- "kind": "key"
696
- },
697
- {
698
- "name": "spender",
699
- "type": "core::starknet::contract_address::ContractAddress",
700
- "kind": "key"
701
- },
702
- {
703
- "name": "value",
704
- "type": "core::integer::u256",
705
- "kind": "data"
706
- }
707
- ]
708
- },
709
- {
710
- "type": "event",
711
- "name": "openzeppelin_token::erc20::erc20::ERC20Component::Event",
712
- "kind": "enum",
713
- "variants": [
714
- {
715
- "name": "Transfer",
716
- "type": "openzeppelin_token::erc20::erc20::ERC20Component::Transfer",
717
- "kind": "nested"
718
- },
719
- {
720
- "name": "Approval",
721
- "type": "openzeppelin_token::erc20::erc20::ERC20Component::Approval",
722
- "kind": "nested"
723
- }
724
- ]
725
- },
726
- {
727
- "type": "event",
728
- "name": "contracts::erc20::DummyERC20::Event",
729
- "kind": "enum",
730
- "variants": [
731
- {
732
- "name": "ERC20Event",
733
- "type": "openzeppelin_token::erc20::erc20::ERC20Component::Event",
734
- "kind": "flat"
735
- }
736
- ]
737
- }
487
+ {
488
+ type: 'impl',
489
+ name: 'ERC20MixinImpl',
490
+ interface_name: 'openzeppelin_token::erc20::interface::IERC20Mixin',
491
+ },
492
+ {
493
+ type: 'struct',
494
+ name: 'core::integer::u256',
495
+ members: [
496
+ {
497
+ name: 'low',
498
+ type: 'core::integer::u128',
499
+ },
500
+ {
501
+ name: 'high',
502
+ type: 'core::integer::u128',
503
+ },
504
+ ],
505
+ },
506
+ {
507
+ type: 'enum',
508
+ name: 'core::bool',
509
+ variants: [
510
+ {
511
+ name: 'False',
512
+ type: '()',
513
+ },
514
+ {
515
+ name: 'True',
516
+ type: '()',
517
+ },
518
+ ],
519
+ },
520
+ {
521
+ type: 'struct',
522
+ name: 'core::byte_array::ByteArray',
523
+ members: [
524
+ {
525
+ name: 'data',
526
+ type: 'core::array::Array::<core::bytes_31::bytes31>',
527
+ },
528
+ {
529
+ name: 'pending_word',
530
+ type: 'core::felt252',
531
+ },
532
+ {
533
+ name: 'pending_word_len',
534
+ type: 'core::integer::u32',
535
+ },
536
+ ],
537
+ },
538
+ {
539
+ type: 'interface',
540
+ name: 'openzeppelin_token::erc20::interface::IERC20Mixin',
541
+ items: [
542
+ {
543
+ type: 'function',
544
+ name: 'total_supply',
545
+ inputs: [],
546
+ outputs: [
547
+ {
548
+ type: 'core::integer::u256',
549
+ },
550
+ ],
551
+ state_mutability: 'view',
552
+ },
553
+ {
554
+ type: 'function',
555
+ name: 'balance_of',
556
+ inputs: [
557
+ {
558
+ name: 'account',
559
+ type: 'core::starknet::contract_address::ContractAddress',
560
+ },
561
+ ],
562
+ outputs: [
563
+ {
564
+ type: 'core::integer::u256',
565
+ },
566
+ ],
567
+ state_mutability: 'view',
568
+ },
569
+ {
570
+ type: 'function',
571
+ name: 'allowance',
572
+ inputs: [
573
+ {
574
+ name: 'owner',
575
+ type: 'core::starknet::contract_address::ContractAddress',
576
+ },
577
+ {
578
+ name: 'spender',
579
+ type: 'core::starknet::contract_address::ContractAddress',
580
+ },
581
+ ],
582
+ outputs: [
583
+ {
584
+ type: 'core::integer::u256',
585
+ },
586
+ ],
587
+ state_mutability: 'view',
588
+ },
589
+ {
590
+ type: 'function',
591
+ name: 'transfer',
592
+ inputs: [
593
+ {
594
+ name: 'recipient',
595
+ type: 'core::starknet::contract_address::ContractAddress',
596
+ },
597
+ {
598
+ name: 'amount',
599
+ type: 'core::integer::u256',
600
+ },
601
+ ],
602
+ outputs: [
603
+ {
604
+ type: 'core::bool',
605
+ },
606
+ ],
607
+ state_mutability: 'external',
608
+ },
609
+ {
610
+ type: 'function',
611
+ name: 'transfer_from',
612
+ inputs: [
613
+ {
614
+ name: 'sender',
615
+ type: 'core::starknet::contract_address::ContractAddress',
616
+ },
617
+ {
618
+ name: 'recipient',
619
+ type: 'core::starknet::contract_address::ContractAddress',
620
+ },
621
+ {
622
+ name: 'amount',
623
+ type: 'core::integer::u256',
624
+ },
625
+ ],
626
+ outputs: [
627
+ {
628
+ type: 'core::bool',
629
+ },
630
+ ],
631
+ state_mutability: 'external',
632
+ },
633
+ {
634
+ type: 'function',
635
+ name: 'approve',
636
+ inputs: [
637
+ {
638
+ name: 'spender',
639
+ type: 'core::starknet::contract_address::ContractAddress',
640
+ },
641
+ {
642
+ name: 'amount',
643
+ type: 'core::integer::u256',
644
+ },
645
+ ],
646
+ outputs: [
647
+ {
648
+ type: 'core::bool',
649
+ },
650
+ ],
651
+ state_mutability: 'external',
652
+ },
653
+ {
654
+ type: 'function',
655
+ name: 'name',
656
+ inputs: [],
657
+ outputs: [
658
+ {
659
+ type: 'core::byte_array::ByteArray',
660
+ },
661
+ ],
662
+ state_mutability: 'view',
663
+ },
664
+ {
665
+ type: 'function',
666
+ name: 'symbol',
667
+ inputs: [],
668
+ outputs: [
669
+ {
670
+ type: 'core::byte_array::ByteArray',
671
+ },
672
+ ],
673
+ state_mutability: 'view',
674
+ },
675
+ {
676
+ type: 'function',
677
+ name: 'decimals',
678
+ inputs: [],
679
+ outputs: [
680
+ {
681
+ type: 'core::integer::u8',
682
+ },
683
+ ],
684
+ state_mutability: 'view',
685
+ },
686
+ {
687
+ type: 'function',
688
+ name: 'totalSupply',
689
+ inputs: [],
690
+ outputs: [
691
+ {
692
+ type: 'core::integer::u256',
693
+ },
694
+ ],
695
+ state_mutability: 'view',
696
+ },
697
+ {
698
+ type: 'function',
699
+ name: 'balanceOf',
700
+ inputs: [
701
+ {
702
+ name: 'account',
703
+ type: 'core::starknet::contract_address::ContractAddress',
704
+ },
705
+ ],
706
+ outputs: [
707
+ {
708
+ type: 'core::integer::u256',
709
+ },
710
+ ],
711
+ state_mutability: 'view',
712
+ },
713
+ {
714
+ type: 'function',
715
+ name: 'transferFrom',
716
+ inputs: [
717
+ {
718
+ name: 'sender',
719
+ type: 'core::starknet::contract_address::ContractAddress',
720
+ },
721
+ {
722
+ name: 'recipient',
723
+ type: 'core::starknet::contract_address::ContractAddress',
724
+ },
725
+ {
726
+ name: 'amount',
727
+ type: 'core::integer::u256',
728
+ },
729
+ ],
730
+ outputs: [
731
+ {
732
+ type: 'core::bool',
733
+ },
734
+ ],
735
+ state_mutability: 'external',
736
+ },
737
+ ],
738
+ },
739
+ {
740
+ type: 'constructor',
741
+ name: 'constructor',
742
+ inputs: [],
743
+ },
744
+ {
745
+ type: 'event',
746
+ name: 'openzeppelin_token::erc20::erc20::ERC20Component::Transfer',
747
+ kind: 'struct',
748
+ members: [
749
+ {
750
+ name: 'from',
751
+ type: 'core::starknet::contract_address::ContractAddress',
752
+ kind: 'key',
753
+ },
754
+ {
755
+ name: 'to',
756
+ type: 'core::starknet::contract_address::ContractAddress',
757
+ kind: 'key',
758
+ },
759
+ {
760
+ name: 'value',
761
+ type: 'core::integer::u256',
762
+ kind: 'data',
763
+ },
764
+ ],
765
+ },
766
+ {
767
+ type: 'event',
768
+ name: 'openzeppelin_token::erc20::erc20::ERC20Component::Approval',
769
+ kind: 'struct',
770
+ members: [
771
+ {
772
+ name: 'owner',
773
+ type: 'core::starknet::contract_address::ContractAddress',
774
+ kind: 'key',
775
+ },
776
+ {
777
+ name: 'spender',
778
+ type: 'core::starknet::contract_address::ContractAddress',
779
+ kind: 'key',
780
+ },
781
+ {
782
+ name: 'value',
783
+ type: 'core::integer::u256',
784
+ kind: 'data',
785
+ },
786
+ ],
787
+ },
788
+ {
789
+ type: 'event',
790
+ name: 'openzeppelin_token::erc20::erc20::ERC20Component::Event',
791
+ kind: 'enum',
792
+ variants: [
793
+ {
794
+ name: 'Transfer',
795
+ type: 'openzeppelin_token::erc20::erc20::ERC20Component::Transfer',
796
+ kind: 'nested',
797
+ },
798
+ {
799
+ name: 'Approval',
800
+ type: 'openzeppelin_token::erc20::erc20::ERC20Component::Approval',
801
+ kind: 'nested',
802
+ },
803
+ ],
804
+ },
805
+ {
806
+ type: 'event',
807
+ name: 'contracts::erc20::DummyERC20::Event',
808
+ kind: 'enum',
809
+ variants: [
810
+ {
811
+ name: 'ERC20Event',
812
+ type: 'openzeppelin_token::erc20::erc20::ERC20Component::Event',
813
+ kind: 'flat',
814
+ },
815
+ ],
816
+ },
738
817
  ] as const satisfies Abi;
739
818
 
740
- export type ChamberTypedContract = TypedContractV2<typeof CHAMBER_ABI>;
819
+ export type ChamberTypedContract = TypedContractV2<typeof CHAMBER_ABI>;