@circle-fin/usdckit 0.22.0 → 0.23.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/dist/cjs/abis/EIP2612.d.ts +197 -0
- package/dist/cjs/abis/EIP2612.js +78 -0
- package/dist/cjs/actions/index.d.ts +66 -0
- package/dist/cjs/actions/index.js +7 -0
- package/dist/cjs/actions/index.test.js +4 -0
- package/dist/cjs/actions/permit.d.ts +19 -0
- package/dist/cjs/actions/permit.js +50 -0
- package/dist/cjs/actions/permit.test.d.ts +1 -0
- package/dist/cjs/actions/permit.test.js +652 -0
- package/dist/cjs/actions/signEIP2612Permit.d.ts +130 -0
- package/dist/cjs/actions/signEIP2612Permit.js +128 -0
- package/dist/cjs/actions/signEIP2612Permit.test.d.ts +1 -0
- package/dist/cjs/actions/signEIP2612Permit.test.js +434 -0
- package/dist/cjs/chains/ARC_TESTNET.d.ts +180 -0
- package/dist/cjs/chains/ARC_TESTNET.js +57 -0
- package/dist/cjs/chains/index.d.ts +1 -0
- package/dist/cjs/chains/index.js +3 -1
- package/dist/cjs/chains/index.test.js +1 -0
- package/dist/cjs/extractChain.d.ts +179 -0
- package/dist/cjs/extractChain.test.js +1 -0
- package/dist/cjs/metadata.js +1 -1
- package/dist/cjs/providers/circle-wallets/actions/createAccount.d.ts +179 -0
- package/dist/cjs/providers/circle-wallets/actions/createAccount.js +3 -0
- package/dist/cjs/providers/circle-wallets/actions/estimateContractExecutionFee.d.ts +6 -0
- package/dist/cjs/providers/circle-wallets/actions/estimateTransferFee.d.ts +6 -0
- package/dist/cjs/providers/circle-wallets/actions/getAccounts.d.ts +179 -0
- package/dist/cjs/providers/circle-wallets/index.d.ts +358 -0
- package/dist/cjs/providers/circle-wallets/index.js +2 -0
- package/dist/cjs/providers/circle-wallets/transports/index.d.ts +12 -0
- package/dist/esm/abis/EIP2612.d.ts +197 -0
- package/dist/esm/abis/EIP2612.js +76 -0
- package/dist/esm/actions/index.d.ts +66 -0
- package/dist/esm/actions/index.js +7 -0
- package/dist/esm/actions/index.test.js +4 -0
- package/dist/esm/actions/permit.d.ts +19 -0
- package/dist/esm/actions/permit.js +44 -0
- package/dist/esm/actions/permit.test.d.ts +1 -0
- package/dist/esm/actions/permit.test.js +650 -0
- package/dist/esm/actions/signEIP2612Permit.d.ts +130 -0
- package/dist/esm/actions/signEIP2612Permit.js +122 -0
- package/dist/esm/actions/signEIP2612Permit.test.d.ts +1 -0
- package/dist/esm/actions/signEIP2612Permit.test.js +432 -0
- package/dist/esm/chains/ARC_TESTNET.d.ts +180 -0
- package/dist/esm/chains/ARC_TESTNET.js +54 -0
- package/dist/esm/chains/index.d.ts +1 -0
- package/dist/esm/chains/index.js +1 -0
- package/dist/esm/chains/index.test.js +1 -0
- package/dist/esm/extractChain.d.ts +179 -0
- package/dist/esm/extractChain.test.js +2 -1
- package/dist/esm/metadata.js +1 -1
- package/dist/esm/providers/circle-wallets/actions/createAccount.d.ts +179 -0
- package/dist/esm/providers/circle-wallets/actions/createAccount.js +3 -0
- package/dist/esm/providers/circle-wallets/actions/estimateContractExecutionFee.d.ts +6 -0
- package/dist/esm/providers/circle-wallets/actions/estimateTransferFee.d.ts +6 -0
- package/dist/esm/providers/circle-wallets/actions/getAccounts.d.ts +179 -0
- package/dist/esm/providers/circle-wallets/index.d.ts +358 -0
- package/dist/esm/providers/circle-wallets/index.js +3 -1
- package/dist/esm/providers/circle-wallets/transports/index.d.ts +12 -0
- package/package.json +5 -4
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
export declare const chain: {
|
|
2
|
+
blockExplorers: {
|
|
3
|
+
readonly default: {
|
|
4
|
+
readonly name: "ArcScan";
|
|
5
|
+
readonly url: "https://testnet.arcscan.app";
|
|
6
|
+
readonly apiUrl: "https://testnet.arcscan.app/api";
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
blockTime?: number | undefined | undefined;
|
|
10
|
+
contracts: {
|
|
11
|
+
readonly USDC: {
|
|
12
|
+
readonly address: "0x3600000000000000000000000000000000000000";
|
|
13
|
+
readonly abi: readonly [{
|
|
14
|
+
readonly type: "event";
|
|
15
|
+
readonly name: "Approval";
|
|
16
|
+
readonly inputs: readonly [{
|
|
17
|
+
readonly indexed: true;
|
|
18
|
+
readonly name: "owner";
|
|
19
|
+
readonly type: "address";
|
|
20
|
+
}, {
|
|
21
|
+
readonly indexed: true;
|
|
22
|
+
readonly name: "spender";
|
|
23
|
+
readonly type: "address";
|
|
24
|
+
}, {
|
|
25
|
+
readonly indexed: false;
|
|
26
|
+
readonly name: "value";
|
|
27
|
+
readonly type: "uint256";
|
|
28
|
+
}];
|
|
29
|
+
}, {
|
|
30
|
+
readonly type: "event";
|
|
31
|
+
readonly name: "Transfer";
|
|
32
|
+
readonly inputs: readonly [{
|
|
33
|
+
readonly indexed: true;
|
|
34
|
+
readonly name: "from";
|
|
35
|
+
readonly type: "address";
|
|
36
|
+
}, {
|
|
37
|
+
readonly indexed: true;
|
|
38
|
+
readonly name: "to";
|
|
39
|
+
readonly type: "address";
|
|
40
|
+
}, {
|
|
41
|
+
readonly indexed: false;
|
|
42
|
+
readonly name: "value";
|
|
43
|
+
readonly type: "uint256";
|
|
44
|
+
}];
|
|
45
|
+
}, {
|
|
46
|
+
readonly type: "function";
|
|
47
|
+
readonly name: "allowance";
|
|
48
|
+
readonly stateMutability: "view";
|
|
49
|
+
readonly inputs: readonly [{
|
|
50
|
+
readonly name: "owner";
|
|
51
|
+
readonly type: "address";
|
|
52
|
+
}, {
|
|
53
|
+
readonly name: "spender";
|
|
54
|
+
readonly type: "address";
|
|
55
|
+
}];
|
|
56
|
+
readonly outputs: readonly [{
|
|
57
|
+
readonly type: "uint256";
|
|
58
|
+
}];
|
|
59
|
+
}, {
|
|
60
|
+
readonly type: "function";
|
|
61
|
+
readonly name: "approve";
|
|
62
|
+
readonly stateMutability: "nonpayable";
|
|
63
|
+
readonly inputs: readonly [{
|
|
64
|
+
readonly name: "spender";
|
|
65
|
+
readonly type: "address";
|
|
66
|
+
}, {
|
|
67
|
+
readonly name: "amount";
|
|
68
|
+
readonly type: "uint256";
|
|
69
|
+
}];
|
|
70
|
+
readonly outputs: readonly [{
|
|
71
|
+
readonly type: "bool";
|
|
72
|
+
}];
|
|
73
|
+
}, {
|
|
74
|
+
readonly type: "function";
|
|
75
|
+
readonly name: "balanceOf";
|
|
76
|
+
readonly stateMutability: "view";
|
|
77
|
+
readonly inputs: readonly [{
|
|
78
|
+
readonly name: "account";
|
|
79
|
+
readonly type: "address";
|
|
80
|
+
}];
|
|
81
|
+
readonly outputs: readonly [{
|
|
82
|
+
readonly type: "uint256";
|
|
83
|
+
}];
|
|
84
|
+
}, {
|
|
85
|
+
readonly type: "function";
|
|
86
|
+
readonly name: "decimals";
|
|
87
|
+
readonly stateMutability: "view";
|
|
88
|
+
readonly inputs: readonly [];
|
|
89
|
+
readonly outputs: readonly [{
|
|
90
|
+
readonly type: "uint8";
|
|
91
|
+
}];
|
|
92
|
+
}, {
|
|
93
|
+
readonly type: "function";
|
|
94
|
+
readonly name: "name";
|
|
95
|
+
readonly stateMutability: "view";
|
|
96
|
+
readonly inputs: readonly [];
|
|
97
|
+
readonly outputs: readonly [{
|
|
98
|
+
readonly type: "string";
|
|
99
|
+
}];
|
|
100
|
+
}, {
|
|
101
|
+
readonly type: "function";
|
|
102
|
+
readonly name: "symbol";
|
|
103
|
+
readonly stateMutability: "view";
|
|
104
|
+
readonly inputs: readonly [];
|
|
105
|
+
readonly outputs: readonly [{
|
|
106
|
+
readonly type: "string";
|
|
107
|
+
}];
|
|
108
|
+
}, {
|
|
109
|
+
readonly type: "function";
|
|
110
|
+
readonly name: "totalSupply";
|
|
111
|
+
readonly stateMutability: "view";
|
|
112
|
+
readonly inputs: readonly [];
|
|
113
|
+
readonly outputs: readonly [{
|
|
114
|
+
readonly type: "uint256";
|
|
115
|
+
}];
|
|
116
|
+
}, {
|
|
117
|
+
readonly type: "function";
|
|
118
|
+
readonly name: "transfer";
|
|
119
|
+
readonly stateMutability: "nonpayable";
|
|
120
|
+
readonly inputs: readonly [{
|
|
121
|
+
readonly name: "recipient";
|
|
122
|
+
readonly type: "address";
|
|
123
|
+
}, {
|
|
124
|
+
readonly name: "amount";
|
|
125
|
+
readonly type: "uint256";
|
|
126
|
+
}];
|
|
127
|
+
readonly outputs: readonly [{
|
|
128
|
+
readonly type: "bool";
|
|
129
|
+
}];
|
|
130
|
+
}, {
|
|
131
|
+
readonly type: "function";
|
|
132
|
+
readonly name: "transferFrom";
|
|
133
|
+
readonly stateMutability: "nonpayable";
|
|
134
|
+
readonly inputs: readonly [{
|
|
135
|
+
readonly name: "sender";
|
|
136
|
+
readonly type: "address";
|
|
137
|
+
}, {
|
|
138
|
+
readonly name: "recipient";
|
|
139
|
+
readonly type: "address";
|
|
140
|
+
}, {
|
|
141
|
+
readonly name: "amount";
|
|
142
|
+
readonly type: "uint256";
|
|
143
|
+
}];
|
|
144
|
+
readonly outputs: readonly [{
|
|
145
|
+
readonly type: "bool";
|
|
146
|
+
}];
|
|
147
|
+
}];
|
|
148
|
+
readonly read: {
|
|
149
|
+
readonly decimals: () => 6;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
readonly multicall3: {
|
|
153
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
154
|
+
readonly blockCreated: 0;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
ensTlds?: readonly string[] | undefined;
|
|
158
|
+
id: 5042002;
|
|
159
|
+
name: "Arc Testnet";
|
|
160
|
+
nativeCurrency: {
|
|
161
|
+
readonly name: "USDC";
|
|
162
|
+
readonly symbol: "USDC";
|
|
163
|
+
readonly decimals: 18;
|
|
164
|
+
};
|
|
165
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
166
|
+
rpcUrls: {
|
|
167
|
+
readonly default: {
|
|
168
|
+
readonly http: readonly ["https://rpc.testnet.arc.network", "https://rpc.quicknode.testnet.arc.network", "https://rpc.blockdaemon.testnet.arc.network"];
|
|
169
|
+
readonly webSocket: readonly ["wss://rpc.testnet.arc.network", "wss://rpc.quicknode.testnet.arc.network"];
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
sourceId?: number | undefined | undefined;
|
|
173
|
+
testnet: true;
|
|
174
|
+
custom?: Record<string, unknown> | undefined;
|
|
175
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
176
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
177
|
+
readonly blockchainId: "ARC-TESTNET";
|
|
178
|
+
readonly blockchainVm: "EVM";
|
|
179
|
+
readonly formatters?: undefined;
|
|
180
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// Copyright (c) 2025, Circle Internet Group, Inc.
|
|
2
|
+
// All rights reserved.
|
|
3
|
+
//
|
|
4
|
+
// Circle Internet Group, Inc. CONFIDENTIAL
|
|
5
|
+
//
|
|
6
|
+
// This file includes unpublished proprietary source code of Circle Internet
|
|
7
|
+
// Group, Inc. The copyright notice above does not
|
|
8
|
+
// evidence any actual or intended publication of such source code. Disclosure
|
|
9
|
+
// of this source code or any related proprietary information is strictly
|
|
10
|
+
// prohibited without the express written permission of Circle Internet Group, Inc.
|
|
11
|
+
import { defineChain, erc20Abi } from 'viem';
|
|
12
|
+
// REF: https://github.com/wevm/viem/blob/00dd2e80646f6253c6d09be6acb7f57b7373737f/src/chains/definitions/arcTestnet.ts#L5
|
|
13
|
+
const arcTestnet = /*#__PURE__*/ defineChain({
|
|
14
|
+
id: 5042002,
|
|
15
|
+
name: 'Arc Testnet',
|
|
16
|
+
nativeCurrency: {
|
|
17
|
+
name: 'USDC',
|
|
18
|
+
symbol: 'USDC',
|
|
19
|
+
decimals: 18,
|
|
20
|
+
},
|
|
21
|
+
rpcUrls: {
|
|
22
|
+
default: {
|
|
23
|
+
http: [
|
|
24
|
+
'https://rpc.testnet.arc.network',
|
|
25
|
+
'https://rpc.quicknode.testnet.arc.network',
|
|
26
|
+
'https://rpc.blockdaemon.testnet.arc.network',
|
|
27
|
+
],
|
|
28
|
+
webSocket: ['wss://rpc.testnet.arc.network', 'wss://rpc.quicknode.testnet.arc.network'],
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
blockExplorers: {
|
|
32
|
+
default: {
|
|
33
|
+
name: 'ArcScan',
|
|
34
|
+
url: 'https://testnet.arcscan.app',
|
|
35
|
+
apiUrl: 'https://testnet.arcscan.app/api',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
contracts: {
|
|
39
|
+
multicall3: {
|
|
40
|
+
address: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
41
|
+
blockCreated: 0,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
testnet: true,
|
|
45
|
+
});
|
|
46
|
+
export const chain = defineChain({
|
|
47
|
+
...arcTestnet,
|
|
48
|
+
blockchainId: 'ARC-TESTNET',
|
|
49
|
+
blockchainVm: 'EVM',
|
|
50
|
+
contracts: {
|
|
51
|
+
...arcTestnet.contracts,
|
|
52
|
+
USDC: { address: '0x3600000000000000000000000000000000000000', abi: erc20Abi, read: { decimals: () => 6 } },
|
|
53
|
+
},
|
|
54
|
+
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { chain as ARB } from './ARB.js';
|
|
2
2
|
export { chain as ARB_SEPOLIA } from './ARB_SEPOLIA.js';
|
|
3
|
+
export { chain as ARC_TESTNET } from './ARC_TESTNET.js';
|
|
3
4
|
export { chain as AVAX } from './AVAX.js';
|
|
4
5
|
export { chain as AVAX_FUJI } from './AVAX_FUJI.js';
|
|
5
6
|
export { chain as ETH } from './ETH.js';
|
package/dist/esm/chains/index.js
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
// prohibited without the express written permission of Circle Internet Group, Inc.
|
|
11
11
|
export { chain as ARB } from './ARB.js';
|
|
12
12
|
export { chain as ARB_SEPOLIA } from './ARB_SEPOLIA.js';
|
|
13
|
+
export { chain as ARC_TESTNET } from './ARC_TESTNET.js';
|
|
13
14
|
export { chain as AVAX } from './AVAX.js';
|
|
14
15
|
export { chain as AVAX_FUJI } from './AVAX_FUJI.js';
|
|
15
16
|
export { chain as ETH } from './ETH.js';
|
|
@@ -355,6 +355,185 @@ declare const SUPPORTED_CHAINS: ({
|
|
|
355
355
|
readonly blockchainId: "ARB-SEPOLIA";
|
|
356
356
|
readonly blockchainVm: "EVM";
|
|
357
357
|
readonly formatters?: undefined | undefined;
|
|
358
|
+
} | {
|
|
359
|
+
blockExplorers: {
|
|
360
|
+
readonly default: {
|
|
361
|
+
readonly name: "ArcScan";
|
|
362
|
+
readonly url: "https://testnet.arcscan.app";
|
|
363
|
+
readonly apiUrl: "https://testnet.arcscan.app/api";
|
|
364
|
+
};
|
|
365
|
+
};
|
|
366
|
+
blockTime?: number | undefined | undefined;
|
|
367
|
+
contracts: {
|
|
368
|
+
readonly USDC: {
|
|
369
|
+
readonly address: "0x3600000000000000000000000000000000000000";
|
|
370
|
+
readonly abi: readonly [{
|
|
371
|
+
readonly type: "event";
|
|
372
|
+
readonly name: "Approval";
|
|
373
|
+
readonly inputs: readonly [{
|
|
374
|
+
readonly indexed: true;
|
|
375
|
+
readonly name: "owner";
|
|
376
|
+
readonly type: "address";
|
|
377
|
+
}, {
|
|
378
|
+
readonly indexed: true;
|
|
379
|
+
readonly name: "spender";
|
|
380
|
+
readonly type: "address";
|
|
381
|
+
}, {
|
|
382
|
+
readonly indexed: false;
|
|
383
|
+
readonly name: "value";
|
|
384
|
+
readonly type: "uint256";
|
|
385
|
+
}];
|
|
386
|
+
}, {
|
|
387
|
+
readonly type: "event";
|
|
388
|
+
readonly name: "Transfer";
|
|
389
|
+
readonly inputs: readonly [{
|
|
390
|
+
readonly indexed: true;
|
|
391
|
+
readonly name: "from";
|
|
392
|
+
readonly type: "address";
|
|
393
|
+
}, {
|
|
394
|
+
readonly indexed: true;
|
|
395
|
+
readonly name: "to";
|
|
396
|
+
readonly type: "address";
|
|
397
|
+
}, {
|
|
398
|
+
readonly indexed: false;
|
|
399
|
+
readonly name: "value";
|
|
400
|
+
readonly type: "uint256";
|
|
401
|
+
}];
|
|
402
|
+
}, {
|
|
403
|
+
readonly type: "function";
|
|
404
|
+
readonly name: "allowance";
|
|
405
|
+
readonly stateMutability: "view";
|
|
406
|
+
readonly inputs: readonly [{
|
|
407
|
+
readonly name: "owner";
|
|
408
|
+
readonly type: "address";
|
|
409
|
+
}, {
|
|
410
|
+
readonly name: "spender";
|
|
411
|
+
readonly type: "address";
|
|
412
|
+
}];
|
|
413
|
+
readonly outputs: readonly [{
|
|
414
|
+
readonly type: "uint256";
|
|
415
|
+
}];
|
|
416
|
+
}, {
|
|
417
|
+
readonly type: "function";
|
|
418
|
+
readonly name: "approve";
|
|
419
|
+
readonly stateMutability: "nonpayable";
|
|
420
|
+
readonly inputs: readonly [{
|
|
421
|
+
readonly name: "spender";
|
|
422
|
+
readonly type: "address";
|
|
423
|
+
}, {
|
|
424
|
+
readonly name: "amount";
|
|
425
|
+
readonly type: "uint256";
|
|
426
|
+
}];
|
|
427
|
+
readonly outputs: readonly [{
|
|
428
|
+
readonly type: "bool";
|
|
429
|
+
}];
|
|
430
|
+
}, {
|
|
431
|
+
readonly type: "function";
|
|
432
|
+
readonly name: "balanceOf";
|
|
433
|
+
readonly stateMutability: "view";
|
|
434
|
+
readonly inputs: readonly [{
|
|
435
|
+
readonly name: "account";
|
|
436
|
+
readonly type: "address";
|
|
437
|
+
}];
|
|
438
|
+
readonly outputs: readonly [{
|
|
439
|
+
readonly type: "uint256";
|
|
440
|
+
}];
|
|
441
|
+
}, {
|
|
442
|
+
readonly type: "function";
|
|
443
|
+
readonly name: "decimals";
|
|
444
|
+
readonly stateMutability: "view";
|
|
445
|
+
readonly inputs: readonly [];
|
|
446
|
+
readonly outputs: readonly [{
|
|
447
|
+
readonly type: "uint8";
|
|
448
|
+
}];
|
|
449
|
+
}, {
|
|
450
|
+
readonly type: "function";
|
|
451
|
+
readonly name: "name";
|
|
452
|
+
readonly stateMutability: "view";
|
|
453
|
+
readonly inputs: readonly [];
|
|
454
|
+
readonly outputs: readonly [{
|
|
455
|
+
readonly type: "string";
|
|
456
|
+
}];
|
|
457
|
+
}, {
|
|
458
|
+
readonly type: "function";
|
|
459
|
+
readonly name: "symbol";
|
|
460
|
+
readonly stateMutability: "view";
|
|
461
|
+
readonly inputs: readonly [];
|
|
462
|
+
readonly outputs: readonly [{
|
|
463
|
+
readonly type: "string";
|
|
464
|
+
}];
|
|
465
|
+
}, {
|
|
466
|
+
readonly type: "function";
|
|
467
|
+
readonly name: "totalSupply";
|
|
468
|
+
readonly stateMutability: "view";
|
|
469
|
+
readonly inputs: readonly [];
|
|
470
|
+
readonly outputs: readonly [{
|
|
471
|
+
readonly type: "uint256";
|
|
472
|
+
}];
|
|
473
|
+
}, {
|
|
474
|
+
readonly type: "function";
|
|
475
|
+
readonly name: "transfer";
|
|
476
|
+
readonly stateMutability: "nonpayable";
|
|
477
|
+
readonly inputs: readonly [{
|
|
478
|
+
readonly name: "recipient";
|
|
479
|
+
readonly type: "address";
|
|
480
|
+
}, {
|
|
481
|
+
readonly name: "amount";
|
|
482
|
+
readonly type: "uint256";
|
|
483
|
+
}];
|
|
484
|
+
readonly outputs: readonly [{
|
|
485
|
+
readonly type: "bool";
|
|
486
|
+
}];
|
|
487
|
+
}, {
|
|
488
|
+
readonly type: "function";
|
|
489
|
+
readonly name: "transferFrom";
|
|
490
|
+
readonly stateMutability: "nonpayable";
|
|
491
|
+
readonly inputs: readonly [{
|
|
492
|
+
readonly name: "sender";
|
|
493
|
+
readonly type: "address";
|
|
494
|
+
}, {
|
|
495
|
+
readonly name: "recipient";
|
|
496
|
+
readonly type: "address";
|
|
497
|
+
}, {
|
|
498
|
+
readonly name: "amount";
|
|
499
|
+
readonly type: "uint256";
|
|
500
|
+
}];
|
|
501
|
+
readonly outputs: readonly [{
|
|
502
|
+
readonly type: "bool";
|
|
503
|
+
}];
|
|
504
|
+
}];
|
|
505
|
+
readonly read: {
|
|
506
|
+
readonly decimals: () => 6;
|
|
507
|
+
};
|
|
508
|
+
};
|
|
509
|
+
readonly multicall3: {
|
|
510
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
511
|
+
readonly blockCreated: 0;
|
|
512
|
+
};
|
|
513
|
+
};
|
|
514
|
+
ensTlds?: readonly string[] | undefined;
|
|
515
|
+
id: 5042002;
|
|
516
|
+
name: "Arc Testnet";
|
|
517
|
+
nativeCurrency: {
|
|
518
|
+
readonly name: "USDC";
|
|
519
|
+
readonly symbol: "USDC";
|
|
520
|
+
readonly decimals: 18;
|
|
521
|
+
};
|
|
522
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
523
|
+
rpcUrls: {
|
|
524
|
+
readonly default: {
|
|
525
|
+
readonly http: readonly ["https://rpc.testnet.arc.network", "https://rpc.quicknode.testnet.arc.network", "https://rpc.blockdaemon.testnet.arc.network"];
|
|
526
|
+
readonly webSocket: readonly ["wss://rpc.testnet.arc.network", "wss://rpc.quicknode.testnet.arc.network"];
|
|
527
|
+
};
|
|
528
|
+
};
|
|
529
|
+
sourceId?: number | undefined | undefined;
|
|
530
|
+
testnet: true;
|
|
531
|
+
custom?: Record<string, unknown> | undefined;
|
|
532
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
533
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
534
|
+
readonly blockchainId: "ARC-TESTNET";
|
|
535
|
+
readonly blockchainVm: "EVM";
|
|
536
|
+
readonly formatters?: undefined;
|
|
358
537
|
} | {
|
|
359
538
|
blockExplorers: {
|
|
360
539
|
readonly default: {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
// prohibited without the express written permission of Circle Internet Group, Inc.
|
|
11
11
|
import { arbitrumSepolia, avalancheFuji, sepolia, polygonAmoy, unichainSepolia, mainnet, arbitrum, avalanche, polygon, unichain, base, baseSepolia, nearTestnet, near, optimismSepolia, optimism, } from 'viem/chains';
|
|
12
12
|
import { describe, test, expect } from 'vitest';
|
|
13
|
-
import { ARB, ARB_SEPOLIA, AVAX, AVAX_FUJI, BASE_SEPOLIA, BASE, ETH, ETH_SEPOLIA, MATIC, MATIC_AMOY, NEAR_TESTNET, NEAR, OP_SEPOLIA, OP, UNI, UNI_SEPOLIA, } from './chains/index.js';
|
|
13
|
+
import { ARB, ARB_SEPOLIA, ARC_TESTNET, AVAX, AVAX_FUJI, BASE_SEPOLIA, BASE, ETH, ETH_SEPOLIA, MATIC, MATIC_AMOY, NEAR_TESTNET, NEAR, OP_SEPOLIA, OP, UNI, UNI_SEPOLIA, } from './chains/index.js';
|
|
14
14
|
import { extractChain } from './extractChain.js';
|
|
15
15
|
describe.concurrent('extractChain', () => {
|
|
16
16
|
test.each([
|
|
@@ -18,6 +18,7 @@ describe.concurrent('extractChain', () => {
|
|
|
18
18
|
[arbitrumSepolia, ARB_SEPOLIA],
|
|
19
19
|
[ARB, ARB],
|
|
20
20
|
[arbitrum, ARB],
|
|
21
|
+
[ARC_TESTNET, ARC_TESTNET],
|
|
21
22
|
[AVAX_FUJI, AVAX_FUJI],
|
|
22
23
|
[avalancheFuji, AVAX_FUJI],
|
|
23
24
|
[AVAX, AVAX],
|
package/dist/esm/metadata.js
CHANGED
|
@@ -427,6 +427,185 @@ export declare function createAccount(client: ExtendedViemClient, params?: Creat
|
|
|
427
427
|
readonly blockchainId: "ARB-SEPOLIA";
|
|
428
428
|
readonly blockchainVm: "EVM";
|
|
429
429
|
readonly formatters?: undefined | undefined;
|
|
430
|
+
} | {
|
|
431
|
+
blockExplorers: {
|
|
432
|
+
readonly default: {
|
|
433
|
+
readonly name: "ArcScan";
|
|
434
|
+
readonly url: "https://testnet.arcscan.app";
|
|
435
|
+
readonly apiUrl: "https://testnet.arcscan.app/api";
|
|
436
|
+
};
|
|
437
|
+
};
|
|
438
|
+
blockTime?: number | undefined | undefined;
|
|
439
|
+
contracts: {
|
|
440
|
+
readonly USDC: {
|
|
441
|
+
readonly address: "0x3600000000000000000000000000000000000000";
|
|
442
|
+
readonly abi: readonly [{
|
|
443
|
+
readonly type: "event";
|
|
444
|
+
readonly name: "Approval";
|
|
445
|
+
readonly inputs: readonly [{
|
|
446
|
+
readonly indexed: true;
|
|
447
|
+
readonly name: "owner";
|
|
448
|
+
readonly type: "address";
|
|
449
|
+
}, {
|
|
450
|
+
readonly indexed: true;
|
|
451
|
+
readonly name: "spender";
|
|
452
|
+
readonly type: "address";
|
|
453
|
+
}, {
|
|
454
|
+
readonly indexed: false;
|
|
455
|
+
readonly name: "value";
|
|
456
|
+
readonly type: "uint256";
|
|
457
|
+
}];
|
|
458
|
+
}, {
|
|
459
|
+
readonly type: "event";
|
|
460
|
+
readonly name: "Transfer";
|
|
461
|
+
readonly inputs: readonly [{
|
|
462
|
+
readonly indexed: true;
|
|
463
|
+
readonly name: "from";
|
|
464
|
+
readonly type: "address";
|
|
465
|
+
}, {
|
|
466
|
+
readonly indexed: true;
|
|
467
|
+
readonly name: "to";
|
|
468
|
+
readonly type: "address";
|
|
469
|
+
}, {
|
|
470
|
+
readonly indexed: false;
|
|
471
|
+
readonly name: "value";
|
|
472
|
+
readonly type: "uint256";
|
|
473
|
+
}];
|
|
474
|
+
}, {
|
|
475
|
+
readonly type: "function";
|
|
476
|
+
readonly name: "allowance";
|
|
477
|
+
readonly stateMutability: "view";
|
|
478
|
+
readonly inputs: readonly [{
|
|
479
|
+
readonly name: "owner";
|
|
480
|
+
readonly type: "address";
|
|
481
|
+
}, {
|
|
482
|
+
readonly name: "spender";
|
|
483
|
+
readonly type: "address";
|
|
484
|
+
}];
|
|
485
|
+
readonly outputs: readonly [{
|
|
486
|
+
readonly type: "uint256";
|
|
487
|
+
}];
|
|
488
|
+
}, {
|
|
489
|
+
readonly type: "function";
|
|
490
|
+
readonly name: "approve";
|
|
491
|
+
readonly stateMutability: "nonpayable";
|
|
492
|
+
readonly inputs: readonly [{
|
|
493
|
+
readonly name: "spender";
|
|
494
|
+
readonly type: "address";
|
|
495
|
+
}, {
|
|
496
|
+
readonly name: "amount";
|
|
497
|
+
readonly type: "uint256";
|
|
498
|
+
}];
|
|
499
|
+
readonly outputs: readonly [{
|
|
500
|
+
readonly type: "bool";
|
|
501
|
+
}];
|
|
502
|
+
}, {
|
|
503
|
+
readonly type: "function";
|
|
504
|
+
readonly name: "balanceOf";
|
|
505
|
+
readonly stateMutability: "view";
|
|
506
|
+
readonly inputs: readonly [{
|
|
507
|
+
readonly name: "account";
|
|
508
|
+
readonly type: "address";
|
|
509
|
+
}];
|
|
510
|
+
readonly outputs: readonly [{
|
|
511
|
+
readonly type: "uint256";
|
|
512
|
+
}];
|
|
513
|
+
}, {
|
|
514
|
+
readonly type: "function";
|
|
515
|
+
readonly name: "decimals";
|
|
516
|
+
readonly stateMutability: "view";
|
|
517
|
+
readonly inputs: readonly [];
|
|
518
|
+
readonly outputs: readonly [{
|
|
519
|
+
readonly type: "uint8";
|
|
520
|
+
}];
|
|
521
|
+
}, {
|
|
522
|
+
readonly type: "function";
|
|
523
|
+
readonly name: "name";
|
|
524
|
+
readonly stateMutability: "view";
|
|
525
|
+
readonly inputs: readonly [];
|
|
526
|
+
readonly outputs: readonly [{
|
|
527
|
+
readonly type: "string";
|
|
528
|
+
}];
|
|
529
|
+
}, {
|
|
530
|
+
readonly type: "function";
|
|
531
|
+
readonly name: "symbol";
|
|
532
|
+
readonly stateMutability: "view";
|
|
533
|
+
readonly inputs: readonly [];
|
|
534
|
+
readonly outputs: readonly [{
|
|
535
|
+
readonly type: "string";
|
|
536
|
+
}];
|
|
537
|
+
}, {
|
|
538
|
+
readonly type: "function";
|
|
539
|
+
readonly name: "totalSupply";
|
|
540
|
+
readonly stateMutability: "view";
|
|
541
|
+
readonly inputs: readonly [];
|
|
542
|
+
readonly outputs: readonly [{
|
|
543
|
+
readonly type: "uint256";
|
|
544
|
+
}];
|
|
545
|
+
}, {
|
|
546
|
+
readonly type: "function";
|
|
547
|
+
readonly name: "transfer";
|
|
548
|
+
readonly stateMutability: "nonpayable";
|
|
549
|
+
readonly inputs: readonly [{
|
|
550
|
+
readonly name: "recipient";
|
|
551
|
+
readonly type: "address";
|
|
552
|
+
}, {
|
|
553
|
+
readonly name: "amount";
|
|
554
|
+
readonly type: "uint256";
|
|
555
|
+
}];
|
|
556
|
+
readonly outputs: readonly [{
|
|
557
|
+
readonly type: "bool";
|
|
558
|
+
}];
|
|
559
|
+
}, {
|
|
560
|
+
readonly type: "function";
|
|
561
|
+
readonly name: "transferFrom";
|
|
562
|
+
readonly stateMutability: "nonpayable";
|
|
563
|
+
readonly inputs: readonly [{
|
|
564
|
+
readonly name: "sender";
|
|
565
|
+
readonly type: "address";
|
|
566
|
+
}, {
|
|
567
|
+
readonly name: "recipient";
|
|
568
|
+
readonly type: "address";
|
|
569
|
+
}, {
|
|
570
|
+
readonly name: "amount";
|
|
571
|
+
readonly type: "uint256";
|
|
572
|
+
}];
|
|
573
|
+
readonly outputs: readonly [{
|
|
574
|
+
readonly type: "bool";
|
|
575
|
+
}];
|
|
576
|
+
}];
|
|
577
|
+
readonly read: {
|
|
578
|
+
readonly decimals: () => 6;
|
|
579
|
+
};
|
|
580
|
+
};
|
|
581
|
+
readonly multicall3: {
|
|
582
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
583
|
+
readonly blockCreated: 0;
|
|
584
|
+
};
|
|
585
|
+
};
|
|
586
|
+
ensTlds?: readonly string[] | undefined;
|
|
587
|
+
id: 5042002;
|
|
588
|
+
name: "Arc Testnet";
|
|
589
|
+
nativeCurrency: {
|
|
590
|
+
readonly name: "USDC";
|
|
591
|
+
readonly symbol: "USDC";
|
|
592
|
+
readonly decimals: 18;
|
|
593
|
+
};
|
|
594
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
595
|
+
rpcUrls: {
|
|
596
|
+
readonly default: {
|
|
597
|
+
readonly http: readonly ["https://rpc.testnet.arc.network", "https://rpc.quicknode.testnet.arc.network", "https://rpc.blockdaemon.testnet.arc.network"];
|
|
598
|
+
readonly webSocket: readonly ["wss://rpc.testnet.arc.network", "wss://rpc.quicknode.testnet.arc.network"];
|
|
599
|
+
};
|
|
600
|
+
};
|
|
601
|
+
sourceId?: number | undefined | undefined;
|
|
602
|
+
testnet: true;
|
|
603
|
+
custom?: Record<string, unknown> | undefined;
|
|
604
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
605
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
606
|
+
readonly blockchainId: "ARC-TESTNET";
|
|
607
|
+
readonly blockchainVm: "EVM";
|
|
608
|
+
readonly formatters?: undefined;
|
|
430
609
|
} | {
|
|
431
610
|
blockExplorers: {
|
|
432
611
|
readonly default: {
|
|
@@ -60,6 +60,9 @@ export async function createAccount(client, params = {}) {
|
|
|
60
60
|
let wallet;
|
|
61
61
|
if (account !== undefined) {
|
|
62
62
|
const accountChain = extractChain(account.chain) ?? raise(new UnsupportedChainError());
|
|
63
|
+
if (chain.blockchainId === 'ARC-TESTNET') {
|
|
64
|
+
raise(new UnsupportedChainError());
|
|
65
|
+
}
|
|
63
66
|
const [sourceWallet] = await listWallets({
|
|
64
67
|
address: account.address,
|
|
65
68
|
blockchain: accountChain.blockchainId,
|