viem 2.33.0 → 2.33.1
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/CHANGELOG.md +12 -0
- package/_cjs/chains/definitions/arbitrum.js +1 -0
- package/_cjs/chains/definitions/arbitrum.js.map +1 -1
- package/_cjs/chains/definitions/arbitrumSepolia.js +1 -0
- package/_cjs/chains/definitions/arbitrumSepolia.js.map +1 -1
- package/_cjs/chains/definitions/areum.js +29 -0
- package/_cjs/chains/definitions/areum.js.map +1 -0
- package/_cjs/chains/definitions/reddio.js +29 -0
- package/_cjs/chains/definitions/reddio.js.map +1 -0
- package/_cjs/chains/index.js +17 -13
- package/_cjs/chains/index.js.map +1 -1
- package/_cjs/errors/version.js +1 -1
- package/_cjs/op-stack/abis.js +62 -1
- package/_cjs/op-stack/abis.js.map +1 -1
- package/_cjs/op-stack/actions/getWithdrawalStatus.js +59 -1
- package/_cjs/op-stack/actions/getWithdrawalStatus.js.map +1 -1
- package/_esm/chains/definitions/arbitrum.js +1 -0
- package/_esm/chains/definitions/arbitrum.js.map +1 -1
- package/_esm/chains/definitions/arbitrumSepolia.js +1 -0
- package/_esm/chains/definitions/arbitrumSepolia.js.map +1 -1
- package/_esm/chains/definitions/areum.js +26 -0
- package/_esm/chains/definitions/areum.js.map +1 -0
- package/_esm/chains/definitions/reddio.js +26 -0
- package/_esm/chains/definitions/reddio.js.map +1 -0
- package/_esm/chains/index.js +2 -0
- package/_esm/chains/index.js.map +1 -1
- package/_esm/errors/version.js +1 -1
- package/_esm/op-stack/abis.js +61 -0
- package/_esm/op-stack/abis.js.map +1 -1
- package/_esm/op-stack/actions/getWithdrawalStatus.js +78 -2
- package/_esm/op-stack/actions/getWithdrawalStatus.js.map +1 -1
- package/_types/chains/definitions/arbitrum.d.ts +1 -1
- package/_types/chains/definitions/arbitrum.d.ts.map +1 -1
- package/_types/chains/definitions/arbitrumSepolia.d.ts +1 -1
- package/_types/chains/definitions/arbitrumSepolia.d.ts.map +1 -1
- package/_types/chains/definitions/areum.d.ts +37 -0
- package/_types/chains/definitions/areum.d.ts.map +1 -0
- package/_types/chains/definitions/reddio.d.ts +37 -0
- package/_types/chains/definitions/reddio.d.ts.map +1 -0
- package/_types/chains/index.d.ts +2 -0
- package/_types/chains/index.d.ts.map +1 -1
- package/_types/errors/version.d.ts +1 -1
- package/_types/op-stack/abis.d.ts +45 -0
- package/_types/op-stack/abis.d.ts.map +1 -1
- package/_types/op-stack/actions/getWithdrawalStatus.d.ts.map +1 -1
- package/chains/definitions/arbitrum.ts +1 -0
- package/chains/definitions/arbitrumSepolia.ts +1 -0
- package/chains/definitions/areum.ts +26 -0
- package/chains/definitions/reddio.ts +26 -0
- package/chains/index.ts +2 -0
- package/errors/version.ts +1 -1
- package/op-stack/abis.ts +62 -0
- package/op-stack/actions/getWithdrawalStatus.ts +117 -21
- package/package.json +8 -2
@@ -1374,6 +1374,16 @@ export declare const portal2Abi: readonly [{
|
|
1374
1374
|
}];
|
1375
1375
|
readonly stateMutability: "view";
|
1376
1376
|
readonly type: "function";
|
1377
|
+
}, {
|
1378
|
+
readonly inputs: readonly [];
|
1379
|
+
readonly name: "anchorStateRegistry";
|
1380
|
+
readonly outputs: readonly [{
|
1381
|
+
readonly internalType: "contract IAnchorStateRegistry";
|
1382
|
+
readonly name: "";
|
1383
|
+
readonly type: "address";
|
1384
|
+
}];
|
1385
|
+
readonly stateMutability: "view";
|
1386
|
+
readonly type: "function";
|
1377
1387
|
}, {
|
1378
1388
|
readonly inputs: readonly [];
|
1379
1389
|
readonly name: "version";
|
@@ -1586,6 +1596,26 @@ export declare const portal2Abi: readonly [{
|
|
1586
1596
|
readonly inputs: readonly [];
|
1587
1597
|
readonly name: "Unproven";
|
1588
1598
|
readonly type: "error";
|
1599
|
+
}, {
|
1600
|
+
readonly inputs: readonly [];
|
1601
|
+
readonly name: "OptimismPortal_AlreadyFinalized";
|
1602
|
+
readonly type: "error";
|
1603
|
+
}, {
|
1604
|
+
readonly inputs: readonly [];
|
1605
|
+
readonly name: "OptimismPortal_Unproven";
|
1606
|
+
readonly type: "error";
|
1607
|
+
}, {
|
1608
|
+
readonly inputs: readonly [];
|
1609
|
+
readonly name: "OptimismPortal_InvalidProofTimestamp";
|
1610
|
+
readonly type: "error";
|
1611
|
+
}, {
|
1612
|
+
readonly inputs: readonly [];
|
1613
|
+
readonly name: "OptimismPortal_ProofNotOldEnough";
|
1614
|
+
readonly type: "error";
|
1615
|
+
}, {
|
1616
|
+
readonly inputs: readonly [];
|
1617
|
+
readonly name: "OptimismPortal_InvalidRootClaim";
|
1618
|
+
readonly type: "error";
|
1589
1619
|
}];
|
1590
1620
|
export declare const portalAbi: readonly [{
|
1591
1621
|
readonly stateMutability: "nonpayable";
|
@@ -2022,4 +2052,19 @@ export declare const portalAbi: readonly [{
|
|
2022
2052
|
readonly stateMutability: "payable";
|
2023
2053
|
readonly type: "receive";
|
2024
2054
|
}];
|
2055
|
+
export declare const anchorStateRegistryAbi: {
|
2056
|
+
stateMutability: string;
|
2057
|
+
type: string;
|
2058
|
+
inputs: {
|
2059
|
+
name: string;
|
2060
|
+
internalType: string;
|
2061
|
+
type: string;
|
2062
|
+
}[];
|
2063
|
+
name: string;
|
2064
|
+
outputs: {
|
2065
|
+
name: string;
|
2066
|
+
internalType: string;
|
2067
|
+
type: string;
|
2068
|
+
}[];
|
2069
|
+
}[];
|
2025
2070
|
//# sourceMappingURL=abis.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"abis.d.ts","sourceRoot":"","sources":["../../op-stack/abis.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwEpB,CAAA;AAEV,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;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URE__*/ defineChain({
|
4
|
+
id: 463,
|
5
|
+
name: 'Areum',
|
6
|
+
nativeCurrency: { decimals: 18, name: 'AREA', symbol: 'AREA' },
|
7
|
+
rpcUrls: {
|
8
|
+
default: {
|
9
|
+
http: ['https://mainnet-rpc.areum.network'],
|
10
|
+
webSocket: ['wss://mainnet-ws.areum.network'],
|
11
|
+
},
|
12
|
+
},
|
13
|
+
blockExplorers: {
|
14
|
+
default: {
|
15
|
+
name: 'Areum Explorer',
|
16
|
+
url: 'https://explorer.areum.network',
|
17
|
+
},
|
18
|
+
},
|
19
|
+
contracts: {
|
20
|
+
multicall3: {
|
21
|
+
address: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
22
|
+
blockCreated: 353286,
|
23
|
+
},
|
24
|
+
},
|
25
|
+
testnet: false,
|
26
|
+
})
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { defineChain } from '../../utils/chain/defineChain.js'
|
2
|
+
|
3
|
+
export const reddio = /*#__PURE__*/ defineChain({
|
4
|
+
id: 50342,
|
5
|
+
name: 'Reddio',
|
6
|
+
nativeCurrency: { name: 'Reddio', symbol: 'RED', decimals: 18 },
|
7
|
+
rpcUrls: {
|
8
|
+
default: {
|
9
|
+
http: ['https://mainnet.reddio.com/rpc'],
|
10
|
+
},
|
11
|
+
},
|
12
|
+
blockExplorers: {
|
13
|
+
default: {
|
14
|
+
name: 'Blockscout',
|
15
|
+
url: 'https://reddio.cloud.blockscout.com',
|
16
|
+
apiUrl: 'https://reddio.cloud.blockscout.com/api',
|
17
|
+
},
|
18
|
+
},
|
19
|
+
contracts: {
|
20
|
+
multicall3: {
|
21
|
+
address: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
22
|
+
blockCreated: 848_849,
|
23
|
+
},
|
24
|
+
},
|
25
|
+
testnet: false,
|
26
|
+
})
|
package/chains/index.ts
CHANGED
@@ -22,6 +22,7 @@ export { arbitrumGoerli } from './definitions/arbitrumGoerli.js'
|
|
22
22
|
export { arbitrumNova } from './definitions/arbitrumNova.js'
|
23
23
|
export { arbitrumSepolia } from './definitions/arbitrumSepolia.js'
|
24
24
|
export { arenaz } from './definitions/arenaz.js'
|
25
|
+
export { areum } from './definitions/areum.js'
|
25
26
|
export { areonNetwork } from './definitions/areonNetwork.js'
|
26
27
|
export { areonNetworkTestnet } from './definitions/areonNetworkTestnet.js'
|
27
28
|
export { artelaTestnet } from './definitions/artelaTestnet.js'
|
@@ -433,6 +434,7 @@ export { redbellyTestnet } from './definitions/redbellyTestnet.js'
|
|
433
434
|
export { redstone } from './definitions/redstone.js'
|
434
435
|
export { rei } from './definitions/rei.js'
|
435
436
|
export { reyaNetwork } from './definitions/reyaNetwork.js'
|
437
|
+
export { reddio } from './definitions/reddio.js'
|
436
438
|
export { reddioSepolia } from './definitions/reddioSepolia.js'
|
437
439
|
export { riseTestnet } from './definitions/riseTestnet.js'
|
438
440
|
export { rivalz } from './definitions/rivalz.js'
|
package/errors/version.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const version = '2.33.
|
1
|
+
export const version = '2.33.1'
|
package/op-stack/abis.ts
CHANGED
@@ -1488,6 +1488,19 @@ export const portal2Abi = [
|
|
1488
1488
|
stateMutability: 'view',
|
1489
1489
|
type: 'function',
|
1490
1490
|
},
|
1491
|
+
{
|
1492
|
+
inputs: [],
|
1493
|
+
name: 'anchorStateRegistry',
|
1494
|
+
outputs: [
|
1495
|
+
{
|
1496
|
+
internalType: 'contract IAnchorStateRegistry',
|
1497
|
+
name: '',
|
1498
|
+
type: 'address',
|
1499
|
+
},
|
1500
|
+
],
|
1501
|
+
stateMutability: 'view',
|
1502
|
+
type: 'function',
|
1503
|
+
},
|
1491
1504
|
{
|
1492
1505
|
inputs: [],
|
1493
1506
|
name: 'version',
|
@@ -1755,6 +1768,31 @@ export const portal2Abi = [
|
|
1755
1768
|
name: 'Unproven',
|
1756
1769
|
type: 'error',
|
1757
1770
|
},
|
1771
|
+
{
|
1772
|
+
inputs: [],
|
1773
|
+
name: 'OptimismPortal_AlreadyFinalized',
|
1774
|
+
type: 'error',
|
1775
|
+
},
|
1776
|
+
{
|
1777
|
+
inputs: [],
|
1778
|
+
name: 'OptimismPortal_Unproven',
|
1779
|
+
type: 'error',
|
1780
|
+
},
|
1781
|
+
{
|
1782
|
+
inputs: [],
|
1783
|
+
name: 'OptimismPortal_InvalidProofTimestamp',
|
1784
|
+
type: 'error',
|
1785
|
+
},
|
1786
|
+
{
|
1787
|
+
inputs: [],
|
1788
|
+
name: 'OptimismPortal_ProofNotOldEnough',
|
1789
|
+
type: 'error',
|
1790
|
+
},
|
1791
|
+
{
|
1792
|
+
inputs: [],
|
1793
|
+
name: 'OptimismPortal_InvalidRootClaim',
|
1794
|
+
type: 'error',
|
1795
|
+
},
|
1758
1796
|
] as const
|
1759
1797
|
|
1760
1798
|
export const portalAbi = [
|
@@ -2074,3 +2112,27 @@ export const portalAbi = [
|
|
2074
2112
|
},
|
2075
2113
|
{ stateMutability: 'payable', type: 'receive' },
|
2076
2114
|
] as const
|
2115
|
+
|
2116
|
+
export const anchorStateRegistryAbi = [
|
2117
|
+
{
|
2118
|
+
stateMutability: 'view',
|
2119
|
+
type: 'function',
|
2120
|
+
inputs: [{ name: '_game', internalType: 'address', type: 'address' }],
|
2121
|
+
name: 'isGameProper',
|
2122
|
+
outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
|
2123
|
+
},
|
2124
|
+
{
|
2125
|
+
stateMutability: 'view',
|
2126
|
+
type: 'function',
|
2127
|
+
inputs: [{ name: '_game', internalType: 'address', type: 'address' }],
|
2128
|
+
name: 'isGameRespected',
|
2129
|
+
outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
|
2130
|
+
},
|
2131
|
+
{
|
2132
|
+
stateMutability: 'view',
|
2133
|
+
type: 'function',
|
2134
|
+
inputs: [{ name: '_game', internalType: 'address', type: 'address' }],
|
2135
|
+
name: 'isGameFinalized',
|
2136
|
+
outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
|
2137
|
+
},
|
2138
|
+
]
|
@@ -16,7 +16,7 @@ import type {
|
|
16
16
|
import type { Hash } from '../../types/misc.js'
|
17
17
|
import type { TransactionReceipt } from '../../types/transaction.js'
|
18
18
|
import type { OneOf } from '../../types/utils.js'
|
19
|
-
import { portal2Abi, portalAbi } from '../abis.js'
|
19
|
+
import { anchorStateRegistryAbi, portal2Abi, portalAbi } from '../abis.js'
|
20
20
|
import {
|
21
21
|
ReceiptContainsNoWithdrawalsError,
|
22
22
|
type ReceiptContainsNoWithdrawalsErrorType,
|
@@ -249,35 +249,49 @@ export async function getWithdrawalStatus<
|
|
249
249
|
args: [withdrawal.withdrawalHash, numProofSubmitters - 1n],
|
250
250
|
}).catch(() => withdrawal.sender)
|
251
251
|
|
252
|
-
const [
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
252
|
+
const [
|
253
|
+
disputeGameResult,
|
254
|
+
provenWithdrawalsResult,
|
255
|
+
checkWithdrawalResult,
|
256
|
+
finalizedResult,
|
257
|
+
] = await Promise.allSettled([
|
258
|
+
getGame(client, {
|
259
|
+
...parameters,
|
260
|
+
l2BlockNumber,
|
261
|
+
limit: gameLimit,
|
262
|
+
} as GetGameParameters),
|
263
|
+
readContract(client, {
|
264
|
+
abi: portal2Abi,
|
265
|
+
address: portalAddress,
|
266
|
+
functionName: 'provenWithdrawals',
|
267
|
+
args: [withdrawal.withdrawalHash, proofSubmitter],
|
268
|
+
}),
|
269
|
+
readContract(client, {
|
270
|
+
abi: portal2Abi,
|
271
|
+
address: portalAddress,
|
272
|
+
functionName: 'checkWithdrawal',
|
273
|
+
args: [withdrawal.withdrawalHash, proofSubmitter],
|
274
|
+
}),
|
275
|
+
readContract(client, {
|
276
|
+
abi: portal2Abi,
|
277
|
+
address: portalAddress,
|
278
|
+
functionName: 'finalizedWithdrawals',
|
279
|
+
args: [withdrawal.withdrawalHash],
|
280
|
+
}),
|
281
|
+
])
|
272
282
|
|
273
283
|
if (finalizedResult.status === 'fulfilled' && finalizedResult.value)
|
274
284
|
return 'finalized'
|
275
285
|
|
286
|
+
if (provenWithdrawalsResult.status === 'rejected')
|
287
|
+
throw provenWithdrawalsResult.reason
|
288
|
+
|
276
289
|
if (disputeGameResult.status === 'rejected') {
|
277
290
|
const error = disputeGameResult.reason as GetGameErrorType
|
278
291
|
if (error.name === 'GameNotFoundError') return 'waiting-to-prove'
|
279
292
|
throw disputeGameResult.reason
|
280
293
|
}
|
294
|
+
|
281
295
|
if (checkWithdrawalResult.status === 'rejected') {
|
282
296
|
const error = checkWithdrawalResult.reason as ReadContractErrorType
|
283
297
|
if (error.cause instanceof ContractFunctionRevertedError) {
|
@@ -292,6 +306,9 @@ export async function getWithdrawalStatus<
|
|
292
306
|
'InvalidGameType',
|
293
307
|
'LegacyGame',
|
294
308
|
'Unproven',
|
309
|
+
// After U16
|
310
|
+
'OptimismPortal_Unproven',
|
311
|
+
'OptimismPortal_InvalidProofTimestamp',
|
295
312
|
],
|
296
313
|
'waiting-to-finalize': [
|
297
314
|
'OptimismPortal: proven withdrawal has not matured yet',
|
@@ -306,6 +323,85 @@ export async function getWithdrawalStatus<
|
|
306
323
|
error.cause.data?.errorName,
|
307
324
|
error.cause.data?.args?.[0] as string,
|
308
325
|
]
|
326
|
+
|
327
|
+
// After U16 we get a generic error message (OptimismPortal_InvalidRootClaim) because the
|
328
|
+
// OptimismPortal will call AnchorStateRegistry.isGameClaimValid which simply returns
|
329
|
+
// true/false. If we get this generic error, we need to figure out why the function returned
|
330
|
+
// false and return a proper status accordingly. We can also check these conditions when we
|
331
|
+
// get ProofNotOldEnough so users can be notified when their pending proof becomes invalid
|
332
|
+
// before it can be finalized.
|
333
|
+
if (
|
334
|
+
errors.includes('OptimismPortal_InvalidRootClaim') ||
|
335
|
+
errors.includes('OptimismPortal_ProofNotOldEnough')
|
336
|
+
) {
|
337
|
+
// Get the dispute game address from the proven withdrawal.
|
338
|
+
const disputeGameAddress = provenWithdrawalsResult.value[0] as Address
|
339
|
+
|
340
|
+
// Get the AnchorStateRegistry address from the portal.
|
341
|
+
const anchorStateRegistry = await readContract(client, {
|
342
|
+
abi: portal2Abi,
|
343
|
+
address: portalAddress,
|
344
|
+
functionName: 'anchorStateRegistry',
|
345
|
+
})
|
346
|
+
|
347
|
+
// Check if the game is proper, respected, and finalized.
|
348
|
+
const [
|
349
|
+
isGameProperResult,
|
350
|
+
isGameRespectedResult,
|
351
|
+
isGameFinalizedResult,
|
352
|
+
] = await Promise.allSettled([
|
353
|
+
readContract(client, {
|
354
|
+
abi: anchorStateRegistryAbi,
|
355
|
+
address: anchorStateRegistry,
|
356
|
+
functionName: 'isGameProper',
|
357
|
+
args: [disputeGameAddress],
|
358
|
+
}),
|
359
|
+
readContract(client, {
|
360
|
+
abi: anchorStateRegistryAbi,
|
361
|
+
address: anchorStateRegistry,
|
362
|
+
functionName: 'isGameRespected',
|
363
|
+
args: [disputeGameAddress],
|
364
|
+
}),
|
365
|
+
readContract(client, {
|
366
|
+
abi: anchorStateRegistryAbi,
|
367
|
+
address: anchorStateRegistry,
|
368
|
+
functionName: 'isGameFinalized',
|
369
|
+
args: [disputeGameAddress],
|
370
|
+
}),
|
371
|
+
])
|
372
|
+
|
373
|
+
// If any of the calls failed, throw the error.
|
374
|
+
if (isGameProperResult.status === 'rejected')
|
375
|
+
throw isGameProperResult.reason
|
376
|
+
if (isGameRespectedResult.status === 'rejected')
|
377
|
+
throw isGameRespectedResult.reason
|
378
|
+
if (isGameFinalizedResult.status === 'rejected')
|
379
|
+
throw isGameFinalizedResult.reason
|
380
|
+
|
381
|
+
// If the game isn't proper, the user needs to re-prove.
|
382
|
+
if (!isGameProperResult.value) {
|
383
|
+
return 'ready-to-prove'
|
384
|
+
}
|
385
|
+
|
386
|
+
// If the game isn't respected, the user needs to re-prove.
|
387
|
+
if (!isGameRespectedResult.value) {
|
388
|
+
return 'ready-to-prove'
|
389
|
+
}
|
390
|
+
|
391
|
+
// If the game isn't finalized, the user needs to wait to finalize.
|
392
|
+
if (!isGameFinalizedResult.value) {
|
393
|
+
return 'waiting-to-finalize'
|
394
|
+
}
|
395
|
+
|
396
|
+
// If the actual error was ProofNotOldEnough, then at this point the game is probably
|
397
|
+
// completely fine but the proof hasn't passed the waiting period. Otherwise, the only
|
398
|
+
// reason we'd be here is if the game resolved in favor of the challenger, which means the
|
399
|
+
// user needs to re-prove the withdrawal.
|
400
|
+
if (errors.includes('OptimismPortal_ProofNotOldEnough')) {
|
401
|
+
return 'waiting-to-finalize'
|
402
|
+
}
|
403
|
+
return 'ready-to-prove'
|
404
|
+
}
|
309
405
|
if (errorCauses['ready-to-prove'].some((cause) => errors.includes(cause)))
|
310
406
|
return 'ready-to-prove'
|
311
407
|
if (
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "viem",
|
3
3
|
"description": "TypeScript Interface for Ethereum",
|
4
|
-
"version": "2.33.
|
4
|
+
"version": "2.33.1",
|
5
5
|
"main": "./_cjs/index.js",
|
6
6
|
"module": "./_esm/index.js",
|
7
7
|
"types": "./_types/index.d.ts",
|
@@ -201,7 +201,13 @@
|
|
201
201
|
},
|
202
202
|
"license": "MIT",
|
203
203
|
"homepage": "https://viem.sh",
|
204
|
-
"repository":
|
204
|
+
"repository": {
|
205
|
+
"type": "git",
|
206
|
+
"url": "https://github.com/wevm/viem.git"
|
207
|
+
},
|
208
|
+
"bugs": {
|
209
|
+
"url": "https://github.com/wevm/viem/issues"
|
210
|
+
},
|
205
211
|
"authors": [
|
206
212
|
"awkweb.eth",
|
207
213
|
"jxom.eth"
|