@veil-cash/sdk 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/src/abi.ts ADDED
@@ -0,0 +1,631 @@
1
+ /**
2
+ * Veil Entry Contract ABI
3
+ */
4
+
5
+ export const ENTRY_ABI = [
6
+ // ============ ERRORS ============
7
+ { inputs: [], name: 'DepositsDisabled', type: 'error' },
8
+ { inputs: [], name: 'FeeTransferFailed', type: 'error' },
9
+ { inputs: [], name: 'InvalidDepositKey', type: 'error' },
10
+ { inputs: [], name: 'InvalidDepositKeyForUser', type: 'error' },
11
+ { inputs: [], name: 'InvalidInitialization', type: 'error' },
12
+ { inputs: [], name: 'MinimumDepositNotMet', type: 'error' },
13
+ { inputs: [], name: 'NotAllowedToDeposit', type: 'error' },
14
+ { inputs: [], name: 'NotInitializing', type: 'error' },
15
+ { inputs: [], name: 'OnlyOperatorAllowed', type: 'error' },
16
+ { inputs: [], name: 'OnlyOwnerCanRegister', type: 'error' },
17
+ { inputs: [], name: 'OnlyQueueContractAllowed', type: 'error' },
18
+ { inputs: [{ name: 'owner', type: 'address' }], name: 'OwnableInvalidOwner', type: 'error' },
19
+ { inputs: [{ name: 'account', type: 'address' }], name: 'OwnableUnauthorizedAccount', type: 'error' },
20
+ { inputs: [], name: 'ReentrancyGuardReentrantCall', type: 'error' },
21
+ { inputs: [], name: 'USDCTransferFailed', type: 'error' },
22
+ { inputs: [], name: 'UserAlreadyRegistered', type: 'error' },
23
+ { inputs: [], name: 'UserNotRegistered', type: 'error' },
24
+
25
+ // ============ EVENTS ============
26
+ {
27
+ anonymous: false,
28
+ inputs: [
29
+ { indexed: true, name: 'owner', type: 'address' },
30
+ { indexed: false, name: 'key', type: 'bytes' },
31
+ ],
32
+ name: 'DepositKey',
33
+ type: 'event',
34
+ },
35
+ {
36
+ anonymous: false,
37
+ inputs: [
38
+ { indexed: true, name: 'depositor', type: 'address' },
39
+ { indexed: false, name: 'amount', type: 'uint256' },
40
+ ],
41
+ name: 'DepositedETH',
42
+ type: 'event',
43
+ },
44
+
45
+ // ============ FUNCTIONS ============
46
+
47
+ // Register deposit key
48
+ {
49
+ inputs: [
50
+ {
51
+ components: [
52
+ { name: 'owner', type: 'address' },
53
+ { name: 'depositKey', type: 'bytes' },
54
+ ],
55
+ name: '_account',
56
+ type: 'tuple',
57
+ },
58
+ ],
59
+ name: 'register',
60
+ outputs: [],
61
+ stateMutability: 'nonpayable',
62
+ type: 'function',
63
+ },
64
+
65
+ // Queue ETH deposit
66
+ {
67
+ inputs: [{ name: '_depositKey', type: 'bytes' }],
68
+ name: 'queueETH',
69
+ outputs: [],
70
+ stateMutability: 'payable',
71
+ type: 'function',
72
+ },
73
+
74
+ // Queue USDC deposit
75
+ {
76
+ inputs: [
77
+ { name: '_amount', type: 'uint256' },
78
+ { name: '_depositKey', type: 'bytes' },
79
+ ],
80
+ name: 'queueUSDC',
81
+ outputs: [],
82
+ stateMutability: 'nonpayable',
83
+ type: 'function',
84
+ },
85
+
86
+ // Read deposit keys
87
+ {
88
+ inputs: [{ name: '', type: 'address' }],
89
+ name: 'depositKeys',
90
+ outputs: [{ name: '', type: 'bytes' }],
91
+ stateMutability: 'view',
92
+ type: 'function',
93
+ },
94
+
95
+ // Check if deposits are enabled
96
+ {
97
+ inputs: [],
98
+ name: 'depositETHEnabled',
99
+ outputs: [{ name: '', type: 'bool' }],
100
+ stateMutability: 'view',
101
+ type: 'function',
102
+ },
103
+
104
+ // Get deposit fee
105
+ {
106
+ inputs: [],
107
+ name: 'depositFee',
108
+ outputs: [{ name: '', type: 'uint256' }],
109
+ stateMutability: 'view',
110
+ type: 'function',
111
+ },
112
+
113
+ // Get minimum deposit
114
+ {
115
+ inputs: [],
116
+ name: 'minimumDeposit',
117
+ outputs: [{ name: '', type: 'uint256' }],
118
+ stateMutability: 'view',
119
+ type: 'function',
120
+ },
121
+
122
+ // Calculate fee and net deposit
123
+ {
124
+ inputs: [{ name: '_totalAmount', type: 'uint256' }],
125
+ name: 'getFeeAndNetDeposit',
126
+ outputs: [
127
+ { name: 'netDeposit', type: 'uint256' },
128
+ { name: 'fee', type: 'uint256' },
129
+ ],
130
+ stateMutability: 'view',
131
+ type: 'function',
132
+ },
133
+
134
+ // Calculate deposit amount with fee
135
+ {
136
+ inputs: [{ name: '_netDepositAmount', type: 'uint256' }],
137
+ name: 'getDepositAmountWithFee',
138
+ outputs: [{ name: '', type: 'uint256' }],
139
+ stateMutability: 'view',
140
+ type: 'function',
141
+ },
142
+
143
+ // Check if user is allowed depositor
144
+ {
145
+ inputs: [{ name: '_depositor', type: 'address' }],
146
+ name: 'isAllowedDepositor',
147
+ outputs: [{ name: '', type: 'bool' }],
148
+ stateMutability: 'view',
149
+ type: 'function',
150
+ },
151
+ ] as const;
152
+
153
+ /**
154
+ * Queue Contract ABI (for balance queries)
155
+ */
156
+ export const QUEUE_ABI = [
157
+ // Get all pending deposit nonces
158
+ {
159
+ inputs: [],
160
+ name: 'getPendingDeposits',
161
+ outputs: [{ name: 'nonces', type: 'uint256[]' }],
162
+ stateMutability: 'view',
163
+ type: 'function',
164
+ },
165
+ // Get deposit details by nonce
166
+ {
167
+ inputs: [{ name: '_nonce', type: 'uint256' }],
168
+ name: 'getDeposit',
169
+ outputs: [
170
+ {
171
+ components: [
172
+ { name: 'fallbackReceiver', type: 'address' },
173
+ { name: 'amountIn', type: 'uint256' },
174
+ { name: 'fee', type: 'uint256' },
175
+ { name: 'shieldAmount', type: 'uint256' },
176
+ { name: 'timestamp', type: 'uint256' },
177
+ { name: 'status', type: 'uint8' },
178
+ { name: 'depositKey', type: 'bytes' },
179
+ ],
180
+ name: 'deposit',
181
+ type: 'tuple',
182
+ },
183
+ ],
184
+ stateMutability: 'view',
185
+ type: 'function',
186
+ },
187
+ // Get current nonce counter
188
+ {
189
+ inputs: [],
190
+ name: 'depositQueueNonce',
191
+ outputs: [{ name: '', type: 'uint256' }],
192
+ stateMutability: 'view',
193
+ type: 'function',
194
+ },
195
+ // Get pending count
196
+ {
197
+ inputs: [],
198
+ name: 'getPendingCount',
199
+ outputs: [{ name: 'count', type: 'uint256' }],
200
+ stateMutability: 'view',
201
+ type: 'function',
202
+ },
203
+ ] as const;
204
+
205
+ /**
206
+ * ETH Pool Contract ABI
207
+ */
208
+ export const POOL_ABI = [
209
+ // ============ ERRORS ============
210
+ { inputs: [], name: 'CannotWithdrawToZeroAddress', type: 'error' },
211
+ { inputs: [], name: 'ETHTransferFailed', type: 'error' },
212
+ { inputs: [], name: 'IncorrectExternalDataHash', type: 'error' },
213
+ { inputs: [], name: 'InputAlreadySpent', type: 'error' },
214
+ { inputs: [], name: 'InvalidExtAmount', type: 'error' },
215
+ { inputs: [], name: 'InvalidFee', type: 'error' },
216
+ { inputs: [], name: 'InvalidMerkleRoot', type: 'error' },
217
+ { inputs: [], name: 'InvalidPublicAmount', type: 'error' },
218
+ { inputs: [], name: 'InvalidRange', type: 'error' },
219
+ { inputs: [], name: 'InvalidTransactionProof', type: 'error' },
220
+ { inputs: [], name: 'OnlyForDeposits', type: 'error' },
221
+ { inputs: [], name: 'OnlyForTransfers', type: 'error' },
222
+ { inputs: [], name: 'OnlyForWithdrawals', type: 'error' },
223
+ { inputs: [], name: 'OnlyValidatorContractAllowed', type: 'error' },
224
+ { inputs: [], name: 'OnlyWETHContractAllowed', type: 'error' },
225
+ { inputs: [{ name: 'owner', type: 'address' }], name: 'OwnableInvalidOwner', type: 'error' },
226
+ { inputs: [{ name: 'account', type: 'address' }], name: 'OwnableUnauthorizedAccount', type: 'error' },
227
+ { inputs: [], name: 'ProofAmountMismatch', type: 'error' },
228
+ { inputs: [], name: 'ReentrancyGuardReentrantCall', type: 'error' },
229
+ { inputs: [], name: 'UnsupportedInputCount', type: 'error' },
230
+ { inputs: [], name: 'WETHDepositFailed', type: 'error' },
231
+ { inputs: [], name: 'WETHUnwrapFailed', type: 'error' },
232
+
233
+ // ============ EVENTS ============
234
+ {
235
+ anonymous: false,
236
+ inputs: [
237
+ { indexed: false, name: 'commitment', type: 'bytes32' },
238
+ { indexed: false, name: 'index', type: 'uint256' },
239
+ { indexed: false, name: 'encryptedOutput', type: 'bytes' },
240
+ ],
241
+ name: 'NewCommitment',
242
+ type: 'event',
243
+ },
244
+ {
245
+ anonymous: false,
246
+ inputs: [{ indexed: false, name: 'nullifier', type: 'bytes32' }],
247
+ name: 'NewNullifier',
248
+ type: 'event',
249
+ },
250
+ {
251
+ anonymous: false,
252
+ inputs: [
253
+ { indexed: true, name: 'previousOwner', type: 'address' },
254
+ { indexed: true, name: 'newOwner', type: 'address' },
255
+ ],
256
+ name: 'OwnershipTransferred',
257
+ type: 'event',
258
+ },
259
+ {
260
+ anonymous: false,
261
+ inputs: [{ indexed: true, name: 'newValidatorContract', type: 'address' }],
262
+ name: 'ValidatorContractUpdated',
263
+ type: 'event',
264
+ },
265
+
266
+ // ============ VIEW FUNCTIONS ============
267
+ {
268
+ inputs: [],
269
+ name: 'FIELD_SIZE',
270
+ outputs: [{ name: '', type: 'uint256' }],
271
+ stateMutability: 'view',
272
+ type: 'function',
273
+ },
274
+ {
275
+ inputs: [],
276
+ name: 'ROOT_HISTORY_SIZE',
277
+ outputs: [{ name: '', type: 'uint32' }],
278
+ stateMutability: 'view',
279
+ type: 'function',
280
+ },
281
+ {
282
+ inputs: [],
283
+ name: 'ZERO_VALUE',
284
+ outputs: [{ name: '', type: 'uint256' }],
285
+ stateMutability: 'view',
286
+ type: 'function',
287
+ },
288
+ {
289
+ inputs: [{ name: '', type: 'uint256' }],
290
+ name: 'commitments',
291
+ outputs: [{ name: '', type: 'bytes32' }],
292
+ stateMutability: 'view',
293
+ type: 'function',
294
+ },
295
+ {
296
+ inputs: [],
297
+ name: 'currentRootIndex',
298
+ outputs: [{ name: '', type: 'uint32' }],
299
+ stateMutability: 'view',
300
+ type: 'function',
301
+ },
302
+ {
303
+ inputs: [{ name: '', type: 'uint256' }],
304
+ name: 'encryptedOutputs',
305
+ outputs: [{ name: '', type: 'bytes' }],
306
+ stateMutability: 'view',
307
+ type: 'function',
308
+ },
309
+ {
310
+ inputs: [{ name: '', type: 'uint256' }],
311
+ name: 'filledSubtrees',
312
+ outputs: [{ name: '', type: 'bytes32' }],
313
+ stateMutability: 'view',
314
+ type: 'function',
315
+ },
316
+ {
317
+ inputs: [
318
+ { name: 'startIndex', type: 'uint256' },
319
+ { name: 'endIndex', type: 'uint256' },
320
+ ],
321
+ name: 'getCommitments',
322
+ outputs: [{ name: '', type: 'bytes32[]' }],
323
+ stateMutability: 'view',
324
+ type: 'function',
325
+ },
326
+ {
327
+ inputs: [
328
+ { name: 'startIndex', type: 'uint256' },
329
+ { name: 'endIndex', type: 'uint256' },
330
+ ],
331
+ name: 'getEncryptedOutputs',
332
+ outputs: [{ name: '', type: 'bytes[]' }],
333
+ stateMutability: 'view',
334
+ type: 'function',
335
+ },
336
+ {
337
+ inputs: [],
338
+ name: 'getLastRoot',
339
+ outputs: [{ name: '', type: 'bytes32' }],
340
+ stateMutability: 'view',
341
+ type: 'function',
342
+ },
343
+ {
344
+ inputs: [
345
+ { name: '_left', type: 'bytes32' },
346
+ { name: '_right', type: 'bytes32' },
347
+ ],
348
+ name: 'hashLeftRight',
349
+ outputs: [{ name: '', type: 'bytes32' }],
350
+ stateMutability: 'view',
351
+ type: 'function',
352
+ },
353
+ {
354
+ inputs: [],
355
+ name: 'hasher',
356
+ outputs: [{ name: '', type: 'address' }],
357
+ stateMutability: 'view',
358
+ type: 'function',
359
+ },
360
+ {
361
+ inputs: [{ name: '_root', type: 'bytes32' }],
362
+ name: 'isKnownRoot',
363
+ outputs: [{ name: '', type: 'bool' }],
364
+ stateMutability: 'view',
365
+ type: 'function',
366
+ },
367
+ {
368
+ inputs: [{ name: '_nullifierHash', type: 'bytes32' }],
369
+ name: 'isSpent',
370
+ outputs: [{ name: '', type: 'bool' }],
371
+ stateMutability: 'view',
372
+ type: 'function',
373
+ },
374
+ {
375
+ inputs: [],
376
+ name: 'levels',
377
+ outputs: [{ name: '', type: 'uint32' }],
378
+ stateMutability: 'view',
379
+ type: 'function',
380
+ },
381
+ {
382
+ inputs: [],
383
+ name: 'nextIndex',
384
+ outputs: [{ name: '', type: 'uint32' }],
385
+ stateMutability: 'view',
386
+ type: 'function',
387
+ },
388
+ {
389
+ inputs: [{ name: '', type: 'bytes32' }],
390
+ name: 'nullifierHashes',
391
+ outputs: [{ name: '', type: 'bool' }],
392
+ stateMutability: 'view',
393
+ type: 'function',
394
+ },
395
+ {
396
+ inputs: [],
397
+ name: 'owner',
398
+ outputs: [{ name: '', type: 'address' }],
399
+ stateMutability: 'view',
400
+ type: 'function',
401
+ },
402
+ {
403
+ inputs: [{ name: '', type: 'uint256' }],
404
+ name: 'roots',
405
+ outputs: [{ name: '', type: 'bytes32' }],
406
+ stateMutability: 'view',
407
+ type: 'function',
408
+ },
409
+ {
410
+ inputs: [],
411
+ name: 'validatorContract',
412
+ outputs: [{ name: '', type: 'address' }],
413
+ stateMutability: 'view',
414
+ type: 'function',
415
+ },
416
+ {
417
+ inputs: [],
418
+ name: 'verifier16',
419
+ outputs: [{ name: '', type: 'address' }],
420
+ stateMutability: 'view',
421
+ type: 'function',
422
+ },
423
+ {
424
+ inputs: [],
425
+ name: 'verifier2',
426
+ outputs: [{ name: '', type: 'address' }],
427
+ stateMutability: 'view',
428
+ type: 'function',
429
+ },
430
+ {
431
+ inputs: [],
432
+ name: 'weth',
433
+ outputs: [{ name: '', type: 'address' }],
434
+ stateMutability: 'view',
435
+ type: 'function',
436
+ },
437
+ {
438
+ inputs: [{ name: 'i', type: 'uint256' }],
439
+ name: 'zeros',
440
+ outputs: [{ name: '', type: 'bytes32' }],
441
+ stateMutability: 'pure',
442
+ type: 'function',
443
+ },
444
+
445
+ // ============ PURE FUNCTIONS ============
446
+ {
447
+ inputs: [
448
+ { name: '_extAmount', type: 'int256' },
449
+ { name: '_fee', type: 'uint256' },
450
+ ],
451
+ name: 'calculatePublicAmount',
452
+ outputs: [{ name: '', type: 'uint256' }],
453
+ stateMutability: 'pure',
454
+ type: 'function',
455
+ },
456
+
457
+ // ============ WRITE FUNCTIONS ============
458
+ {
459
+ inputs: [
460
+ {
461
+ components: [
462
+ { name: 'proof', type: 'bytes' },
463
+ { name: 'root', type: 'bytes32' },
464
+ { name: 'inputNullifiers', type: 'bytes32[]' },
465
+ { name: 'outputCommitments', type: 'bytes32[2]' },
466
+ { name: 'publicAmount', type: 'uint256' },
467
+ { name: 'extDataHash', type: 'bytes32' },
468
+ ],
469
+ name: '_args',
470
+ type: 'tuple',
471
+ },
472
+ {
473
+ components: [
474
+ { name: 'recipient', type: 'address' },
475
+ { name: 'extAmount', type: 'int256' },
476
+ { name: 'relayer', type: 'address' },
477
+ { name: 'fee', type: 'uint256' },
478
+ { name: 'encryptedOutput1', type: 'bytes' },
479
+ { name: 'encryptedOutput2', type: 'bytes' },
480
+ ],
481
+ name: '_extData',
482
+ type: 'tuple',
483
+ },
484
+ ],
485
+ name: 'depositETH',
486
+ outputs: [],
487
+ stateMutability: 'payable',
488
+ type: 'function',
489
+ },
490
+ {
491
+ inputs: [
492
+ {
493
+ components: [
494
+ { name: 'proof', type: 'bytes' },
495
+ { name: 'root', type: 'bytes32' },
496
+ { name: 'inputNullifiers', type: 'bytes32[]' },
497
+ { name: 'outputCommitments', type: 'bytes32[2]' },
498
+ { name: 'publicAmount', type: 'uint256' },
499
+ { name: 'extDataHash', type: 'bytes32' },
500
+ ],
501
+ name: '_args',
502
+ type: 'tuple',
503
+ },
504
+ {
505
+ components: [
506
+ { name: 'recipient', type: 'address' },
507
+ { name: 'extAmount', type: 'int256' },
508
+ { name: 'relayer', type: 'address' },
509
+ { name: 'fee', type: 'uint256' },
510
+ { name: 'encryptedOutput1', type: 'bytes' },
511
+ { name: 'encryptedOutput2', type: 'bytes' },
512
+ ],
513
+ name: '_extData',
514
+ type: 'tuple',
515
+ },
516
+ ],
517
+ name: 'transactETH',
518
+ outputs: [],
519
+ stateMutability: 'nonpayable',
520
+ type: 'function',
521
+ },
522
+ {
523
+ inputs: [
524
+ {
525
+ components: [
526
+ { name: 'proof', type: 'bytes' },
527
+ { name: 'root', type: 'bytes32' },
528
+ { name: 'inputNullifiers', type: 'bytes32[]' },
529
+ { name: 'outputCommitments', type: 'bytes32[2]' },
530
+ { name: 'publicAmount', type: 'uint256' },
531
+ { name: 'extDataHash', type: 'bytes32' },
532
+ ],
533
+ name: '_args',
534
+ type: 'tuple',
535
+ },
536
+ {
537
+ components: [
538
+ { name: 'recipient', type: 'address' },
539
+ { name: 'extAmount', type: 'int256' },
540
+ { name: 'relayer', type: 'address' },
541
+ { name: 'fee', type: 'uint256' },
542
+ { name: 'encryptedOutput1', type: 'bytes' },
543
+ { name: 'encryptedOutput2', type: 'bytes' },
544
+ ],
545
+ name: '_extData',
546
+ type: 'tuple',
547
+ },
548
+ ],
549
+ name: 'withdrawETH',
550
+ outputs: [],
551
+ stateMutability: 'nonpayable',
552
+ type: 'function',
553
+ },
554
+ {
555
+ inputs: [
556
+ {
557
+ components: [
558
+ { name: 'proof', type: 'bytes' },
559
+ { name: 'root', type: 'bytes32' },
560
+ { name: 'inputNullifiers', type: 'bytes32[]' },
561
+ { name: 'outputCommitments', type: 'bytes32[2]' },
562
+ { name: 'publicAmount', type: 'uint256' },
563
+ { name: 'extDataHash', type: 'bytes32' },
564
+ ],
565
+ name: '_args',
566
+ type: 'tuple',
567
+ },
568
+ ],
569
+ name: 'verifyProof',
570
+ outputs: [{ name: '', type: 'bool' }],
571
+ stateMutability: 'view',
572
+ type: 'function',
573
+ },
574
+ {
575
+ inputs: [],
576
+ name: 'renounceOwnership',
577
+ outputs: [],
578
+ stateMutability: 'nonpayable',
579
+ type: 'function',
580
+ },
581
+ {
582
+ inputs: [{ name: 'newOwner', type: 'address' }],
583
+ name: 'transferOwnership',
584
+ outputs: [],
585
+ stateMutability: 'nonpayable',
586
+ type: 'function',
587
+ },
588
+ {
589
+ inputs: [{ name: '_newValidator', type: 'address' }],
590
+ name: 'updateValidatorContract',
591
+ outputs: [],
592
+ stateMutability: 'nonpayable',
593
+ type: 'function',
594
+ },
595
+
596
+ // ============ RECEIVE ============
597
+ { stateMutability: 'payable', type: 'receive' },
598
+ ] as const;
599
+
600
+ /**
601
+ * ERC20 ABI (for USDC approval)
602
+ */
603
+ export const ERC20_ABI = [
604
+ {
605
+ inputs: [
606
+ { name: 'spender', type: 'address' },
607
+ { name: 'amount', type: 'uint256' },
608
+ ],
609
+ name: 'approve',
610
+ outputs: [{ name: '', type: 'bool' }],
611
+ stateMutability: 'nonpayable',
612
+ type: 'function',
613
+ },
614
+ {
615
+ inputs: [{ name: 'account', type: 'address' }],
616
+ name: 'balanceOf',
617
+ outputs: [{ name: '', type: 'uint256' }],
618
+ stateMutability: 'view',
619
+ type: 'function',
620
+ },
621
+ {
622
+ inputs: [
623
+ { name: 'owner', type: 'address' },
624
+ { name: 'spender', type: 'address' },
625
+ ],
626
+ name: 'allowance',
627
+ outputs: [{ name: '', type: 'uint256' }],
628
+ stateMutability: 'view',
629
+ type: 'function',
630
+ },
631
+ ] as const;
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Contract addresses for Veil on Base
3
+ */
4
+
5
+ import type { NetworkAddresses } from './types.js';
6
+
7
+ /**
8
+ * Contract addresses for Base mainnet
9
+ */
10
+ export const ADDRESSES: NetworkAddresses = {
11
+ entry: '0xc2535c547B64b997A4BD9202E1663deaF11c78a5',
12
+ ethPool: '0x293dCda114533FF8f477271c5cA517209FFDEEe7',
13
+ ethQueue: '0xA4a926A2E7a22c38e8DFC6744A61a6aA8b06B230',
14
+ usdcPool: '0x5c50d58E49C59d112680c187De2Bf989d2a91242',
15
+ usdcQueue: '0x5530241b24504bF05C9a22e95A1F5458888e6a9B',
16
+ usdcToken: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',
17
+ chainId: 8453,
18
+ relayUrl: 'https://veil-relay.up.railway.app',
19
+ } as const;
20
+
21
+ /**
22
+ * Pool configuration (decimals, symbols, etc.)
23
+ */
24
+ export const POOL_CONFIG = {
25
+ eth: {
26
+ decimals: 18,
27
+ displayDecimals: 4,
28
+ symbol: 'ETH',
29
+ name: 'Ethereum',
30
+ },
31
+ usdc: {
32
+ decimals: 6,
33
+ displayDecimals: 2,
34
+ symbol: 'USDC',
35
+ name: 'USD Coin',
36
+ },
37
+ } as const;
38
+
39
+ /**
40
+ * Get contract addresses
41
+ * @returns Contract addresses for Base mainnet
42
+ */
43
+ export function getAddresses(): NetworkAddresses {
44
+ return ADDRESSES;
45
+ }
46
+
47
+ /**
48
+ * Get Relay URL
49
+ * @returns Relay URL for Base mainnet
50
+ */
51
+ export function getRelayUrl(): string {
52
+ return ADDRESSES.relayUrl;
53
+ }