viem 2.16.4 → 2.16.5
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +9 -0
- package/_cjs/chains/definitions/dogechain.js +8 -2
- package/_cjs/chains/definitions/dogechain.js.map +1 -1
- package/_cjs/chains/definitions/pgn.js +1 -1
- package/_cjs/chains/definitions/pgn.js.map +1 -1
- package/_cjs/chains/definitions/pgnTestnet.js +1 -1
- package/_cjs/chains/definitions/pgnTestnet.js.map +1 -1
- package/_cjs/chains/definitions/shibariumTestnet.js +31 -0
- package/_cjs/chains/definitions/shibariumTestnet.js.map +1 -0
- package/_cjs/chains/definitions/xrSepolia.js +24 -0
- package/_cjs/chains/definitions/xrSepolia.js.map +1 -0
- package/_cjs/chains/index.js +6 -2
- package/_cjs/chains/index.js.map +1 -1
- package/_cjs/errors/version.js +1 -1
- package/_cjs/zksync/errors/token-is-eth.js +1 -1
- package/_cjs/zksync/errors/token-is-eth.js.map +1 -1
- package/_esm/actions/getContract.js +1 -1
- package/_esm/actions/public/watchContractEvent.js +1 -1
- package/_esm/actions/public/watchContractEvent.js.map +1 -1
- package/_esm/actions/public/watchEvent.js +1 -1
- package/_esm/actions/public/watchEvent.js.map +1 -1
- package/_esm/actions/wallet/signTransaction.js +1 -1
- package/_esm/chains/definitions/dogechain.js +8 -2
- package/_esm/chains/definitions/dogechain.js.map +1 -1
- package/_esm/chains/definitions/pgn.js +1 -1
- package/_esm/chains/definitions/pgn.js.map +1 -1
- package/_esm/chains/definitions/pgnTestnet.js +1 -1
- package/_esm/chains/definitions/pgnTestnet.js.map +1 -1
- package/_esm/chains/definitions/shibariumTestnet.js +28 -0
- package/_esm/chains/definitions/shibariumTestnet.js.map +1 -0
- package/_esm/chains/definitions/xrSepolia.js +21 -0
- package/_esm/chains/definitions/xrSepolia.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/zksync/actions/signEip712Transaction.js +1 -1
- package/_esm/zksync/actions/signTransaction.js +1 -1
- package/_esm/zksync/errors/token-is-eth.js +1 -1
- package/_esm/zksync/errors/token-is-eth.js.map +1 -1
- package/_types/actions/getContract.d.ts +1 -1
- package/_types/actions/wallet/sendRawTransaction.d.ts +1 -1
- package/_types/actions/wallet/signTransaction.d.ts +1 -1
- package/_types/chains/definitions/dogechain.d.ts +8 -10
- package/_types/chains/definitions/dogechain.d.ts.map +1 -1
- package/_types/chains/definitions/pgn.d.ts +1 -1
- package/_types/chains/definitions/pgnTestnet.d.ts +1 -1
- package/_types/chains/definitions/shibariumTestnet.d.ts +34 -0
- package/_types/chains/definitions/shibariumTestnet.d.ts.map +1 -0
- package/_types/chains/definitions/xrSepolia.d.ts +35 -0
- package/_types/chains/definitions/xrSepolia.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/index.d.ts +1 -1
- package/_types/index.d.ts.map +1 -1
- package/_types/utils/index.d.ts +1 -1
- package/_types/utils/index.d.ts.map +1 -1
- package/_types/utils/transaction/getTransactionType.d.ts +1 -1
- package/_types/utils/transaction/getTransactionType.d.ts.map +1 -1
- package/_types/utils/transaction/serializeTransaction.d.ts +2 -2
- package/_types/utils/transaction/serializeTransaction.d.ts.map +1 -1
- package/_types/zksync/actions/signEip712Transaction.d.ts +1 -1
- package/_types/zksync/actions/signTransaction.d.ts +1 -1
- package/_types/zksync/decorators/eip712.d.ts +1 -1
- package/_types/zksync/decorators/publicL1.d.ts +1 -1
- package/actions/getContract.ts +1 -1
- package/actions/public/watchContractEvent.ts +1 -1
- package/actions/public/watchEvent.ts +1 -1
- package/actions/wallet/sendRawTransaction.ts +1 -1
- package/actions/wallet/signTransaction.ts +1 -1
- package/chains/definitions/dogechain.ts +8 -2
- package/chains/definitions/pgn.ts +1 -1
- package/chains/definitions/pgnTestnet.ts +1 -1
- package/chains/definitions/shibariumTestnet.ts +28 -0
- package/chains/definitions/xrSepolia.ts +21 -0
- package/chains/index.ts +2 -0
- package/errors/version.ts +1 -1
- package/index.ts +1 -1
- package/package.json +1 -1
- package/utils/index.ts +1 -1
- package/utils/transaction/getTransactionType.ts +1 -1
- package/utils/transaction/serializeTransaction.ts +2 -2
- package/zksync/actions/signEip712Transaction.ts +1 -1
- package/zksync/actions/signTransaction.ts +1 -1
- package/zksync/decorators/eip712.ts +1 -1
- package/zksync/decorators/publicL1.ts +1 -1
- package/zksync/errors/token-is-eth.ts +1 -1
- package/zksync/types/log.ts +1 -1
@@ -254,7 +254,7 @@ export function watchContractEvent<
|
|
254
254
|
else for (const log of logs) emit.onLogs([log] as any)
|
255
255
|
} catch (err) {
|
256
256
|
// If a filter has been set and gets uninstalled, providers will throw an InvalidInput error.
|
257
|
-
//
|
257
|
+
// Reinitialize the filter when this occurs
|
258
258
|
if (filter && err instanceof InvalidInputRpcError)
|
259
259
|
initialized = false
|
260
260
|
emit.onError?.(err as Error)
|
@@ -274,7 +274,7 @@ export function watchEvent<
|
|
274
274
|
else for (const log of logs) emit.onLogs([log] as any)
|
275
275
|
} catch (err) {
|
276
276
|
// If a filter has been set and gets uninstalled, providers will throw an InvalidInput error.
|
277
|
-
//
|
277
|
+
// Reinitialize the filter when this occurs
|
278
278
|
if (filter && err instanceof InvalidInputRpcError)
|
279
279
|
initialized = false
|
280
280
|
emit.onError?.(err as Error)
|
@@ -7,7 +7,7 @@ import type { TransactionSerializedGeneric } from '../../types/transaction.js'
|
|
7
7
|
import type { RequestErrorType } from '../../utils/buildRequest.js'
|
8
8
|
|
9
9
|
export type SendRawTransactionParameters = {
|
10
|
-
/** The signed serialized
|
10
|
+
/** The signed serialized transaction. */
|
11
11
|
serializedTransaction: TransactionSerializedGeneric
|
12
12
|
}
|
13
13
|
|
@@ -81,7 +81,7 @@ export type SignTransactionErrorType =
|
|
81
81
|
* - Local Accounts: Signs locally. No JSON-RPC request.
|
82
82
|
*
|
83
83
|
* @param args - {@link SignTransactionParameters}
|
84
|
-
* @returns The signed serialized
|
84
|
+
* @returns The signed serialized transaction. {@link SignTransactionReturnType}
|
85
85
|
*
|
86
86
|
* @example
|
87
87
|
* import { createWalletClient, custom } from 'viem'
|
@@ -5,8 +5,8 @@ export const dogechain = /*#__PURE__*/ defineChain({
|
|
5
5
|
name: 'Dogechain',
|
6
6
|
nativeCurrency: {
|
7
7
|
decimals: 18,
|
8
|
-
name: '
|
9
|
-
symbol: '
|
8
|
+
name: 'Wrapped Dogecoin',
|
9
|
+
symbol: 'WDOGE',
|
10
10
|
},
|
11
11
|
rpcUrls: {
|
12
12
|
default: { http: ['https://rpc.dogechain.dog'] },
|
@@ -18,4 +18,10 @@ export const dogechain = /*#__PURE__*/ defineChain({
|
|
18
18
|
apiUrl: 'https://explorer.dogechain.dog/api',
|
19
19
|
},
|
20
20
|
},
|
21
|
+
contracts: {
|
22
|
+
multicall3: {
|
23
|
+
address: '0x68a8609a60a008EFA633dfdec592c03B030cC508',
|
24
|
+
blockCreated: 25384031,
|
25
|
+
},
|
26
|
+
},
|
21
27
|
})
|
@@ -19,7 +19,7 @@ export const pgn = /*#__PURE__*/ defineChain({
|
|
19
19
|
url: 'https://explorer.publicgoods.network',
|
20
20
|
apiUrl: 'https://explorer.publicgoods.network/api',
|
21
21
|
},
|
22
|
-
|
22
|
+
blockscout: {
|
23
23
|
name: 'PGN Explorer',
|
24
24
|
url: 'https://explorer.publicgoods.network',
|
25
25
|
apiUrl: 'https://explorer.publicgoods.network/api',
|
@@ -19,7 +19,7 @@ export const pgnTestnet = /*#__PURE__*/ defineChain({
|
|
19
19
|
url: 'https://explorer.sepolia.publicgoods.network',
|
20
20
|
apiUrl: 'https://explorer.sepolia.publicgoods.network/api',
|
21
21
|
},
|
22
|
-
|
22
|
+
blockscout: {
|
23
23
|
name: 'PGN Testnet Explorer',
|
24
24
|
url: 'https://explorer.sepolia.publicgoods.network',
|
25
25
|
apiUrl: 'https://explorer.sepolia.publicgoods.network/api',
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { defineChain } from '../../utils/chain/defineChain.js'
|
2
|
+
|
3
|
+
export const shibariumTestnet = /*#__PURE__*/ defineChain({
|
4
|
+
id: 157,
|
5
|
+
name: 'Puppynet Shibarium',
|
6
|
+
nativeCurrency: {
|
7
|
+
decimals: 18,
|
8
|
+
name: 'Bone',
|
9
|
+
symbol: 'BONE',
|
10
|
+
},
|
11
|
+
rpcUrls: {
|
12
|
+
default: { http: ['https://puppynet.shibrpc.com'] },
|
13
|
+
},
|
14
|
+
blockExplorers: {
|
15
|
+
default: {
|
16
|
+
name: 'Blockscout',
|
17
|
+
url: 'https://puppyscan.shib.io',
|
18
|
+
apiUrl: 'https://puppyscan.shib.io/api',
|
19
|
+
},
|
20
|
+
},
|
21
|
+
contracts: {
|
22
|
+
multicall3: {
|
23
|
+
address: '0xA4029b74FBA366c926eDFA7Dd10B21C621170a4c',
|
24
|
+
blockCreated: 3035769,
|
25
|
+
},
|
26
|
+
},
|
27
|
+
testnet: true,
|
28
|
+
})
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { defineChain } from '../../utils/chain/defineChain.js'
|
2
|
+
|
3
|
+
export const xrSepolia = /*#__PURE__*/ defineChain({
|
4
|
+
id: 2730,
|
5
|
+
name: 'XR Sepolia',
|
6
|
+
nativeCurrency: {
|
7
|
+
decimals: 18,
|
8
|
+
name: 'tXR',
|
9
|
+
symbol: 'tXR',
|
10
|
+
},
|
11
|
+
rpcUrls: {
|
12
|
+
default: { http: ['https://xr-sepolia-testnet.rpc.caldera.xyz/http'] },
|
13
|
+
},
|
14
|
+
blockExplorers: {
|
15
|
+
default: {
|
16
|
+
name: 'Blockscout',
|
17
|
+
url: 'https://xr-sepolia-testnet.explorer.caldera.xyz',
|
18
|
+
},
|
19
|
+
},
|
20
|
+
testnet: true,
|
21
|
+
})
|
package/chains/index.ts
CHANGED
@@ -251,6 +251,7 @@ export { songbirdTestnet } from './definitions/songbirdTestnet.js'
|
|
251
251
|
export { spicy } from './definitions/spicy.js'
|
252
252
|
export { shardeumSphinx } from './definitions/shardeumSphinx.js'
|
253
253
|
export { shibarium } from './definitions/shibarium.js'
|
254
|
+
export { shibariumTestnet } from './definitions/shibariumTestnet.js'
|
254
255
|
export { stratis } from './definitions/stratis.js'
|
255
256
|
export { syscoin } from './definitions/syscoin.js'
|
256
257
|
export { syscoinTestnet } from './definitions/syscoinTestnet.js'
|
@@ -283,6 +284,7 @@ export { xai } from './definitions/xai.js'
|
|
283
284
|
export { xaiTestnet } from './definitions/xaiTestnet.js'
|
284
285
|
export { xdc } from './definitions/xdc.js'
|
285
286
|
export { xdcTestnet } from './definitions/xdcTestnet.js'
|
287
|
+
export { xrSepolia } from './definitions/xrSepolia.js'
|
286
288
|
export { yooldoVerse } from './definitions/yooldoVerse.js'
|
287
289
|
export { yooldoVerseTestnet } from './definitions/yooldoVerseTestnet.js'
|
288
290
|
export { zetachain } from './definitions/zetachain.js'
|
package/errors/version.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const version = '2.16.
|
1
|
+
export const version = '2.16.5'
|
package/index.ts
CHANGED
@@ -1215,7 +1215,7 @@ export {
|
|
1215
1215
|
} from './utils/transaction/getSerializedTransactionType.js'
|
1216
1216
|
export {
|
1217
1217
|
type GetTransactionType,
|
1218
|
-
type
|
1218
|
+
type GetTransactionTypeErrorType,
|
1219
1219
|
getTransactionType,
|
1220
1220
|
} from './utils/transaction/getTransactionType.js'
|
1221
1221
|
export {
|
package/package.json
CHANGED
package/utils/index.ts
CHANGED
@@ -475,7 +475,7 @@ export {
|
|
475
475
|
getSerializedTransactionType,
|
476
476
|
} from './transaction/getSerializedTransactionType.js'
|
477
477
|
export {
|
478
|
-
type
|
478
|
+
type GetTransactionTypeErrorType,
|
479
479
|
type GetTransactionType,
|
480
480
|
getTransactionType,
|
481
481
|
} from './transaction/getTransactionType.js'
|
@@ -109,7 +109,7 @@ export type GetTransactionType<
|
|
109
109
|
| (transaction['type'] extends string ? transaction['type'] : never),
|
110
110
|
> = IsNever<result> extends false ? result : string
|
111
111
|
|
112
|
-
export type
|
112
|
+
export type GetTransactionTypeErrorType =
|
113
113
|
| InvalidSerializableTransactionErrorType
|
114
114
|
| ErrorType
|
115
115
|
|
@@ -57,7 +57,7 @@ import {
|
|
57
57
|
} from './assertTransaction.js'
|
58
58
|
import {
|
59
59
|
type GetTransactionType,
|
60
|
-
type
|
60
|
+
type GetTransactionTypeErrorType,
|
61
61
|
getTransactionType,
|
62
62
|
} from './getTransactionType.js'
|
63
63
|
import {
|
@@ -81,7 +81,7 @@ export type SerializeTransactionFn<
|
|
81
81
|
>
|
82
82
|
|
83
83
|
export type SerializeTransactionErrorType =
|
84
|
-
|
|
84
|
+
| GetTransactionTypeErrorType
|
85
85
|
| SerializeTransactionEIP1559ErrorType
|
86
86
|
| SerializeTransactionEIP2930ErrorType
|
87
87
|
| SerializeTransactionEIP4844ErrorType
|
@@ -54,7 +54,7 @@ export type SignEip712TransactionErrorType = SignTransactionErrorType
|
|
54
54
|
* Signs an EIP712 transaction.
|
55
55
|
*
|
56
56
|
* @param args - {@link SignTransactionParameters}
|
57
|
-
* @returns The signed serialized
|
57
|
+
* @returns The signed serialized transaction. {@link SignTransactionReturnType}
|
58
58
|
*
|
59
59
|
* @example
|
60
60
|
* import { createWalletClient, custom } from 'viem'
|
@@ -48,7 +48,7 @@ export type SignTransactionErrorType = SignTransactionErrorType_
|
|
48
48
|
* - Docs: https://viem.sh/docs/zksync/actions/signTransaction
|
49
49
|
*
|
50
50
|
* @param args - {@link SignTransactionParameters}
|
51
|
-
* @returns The signed serialized
|
51
|
+
* @returns The signed serialized transaction. {@link SignTransactionReturnType}
|
52
52
|
*
|
53
53
|
* @example
|
54
54
|
* import { createWalletClient, custom } from 'viem'
|
@@ -86,7 +86,7 @@ export type Eip712WalletActions<
|
|
86
86
|
* - Local Accounts: Signs locally. No JSON-RPC request.
|
87
87
|
*
|
88
88
|
* @param args - {@link SignTransactionParameters}
|
89
|
-
* @returns The signed serialized
|
89
|
+
* @returns The signed serialized transaction. {@link SignTransactionReturnType}
|
90
90
|
*
|
91
91
|
* @example
|
92
92
|
* import { createWalletClient, custom } from 'viem'
|
@@ -74,7 +74,7 @@ export type PublicActionsL1<
|
|
74
74
|
*
|
75
75
|
* @param client - Client to use
|
76
76
|
* @param parameters - {@link GetL1TokenBalanceParameters}
|
77
|
-
* @returns The amount of the ERC20 token the client has on specific
|
77
|
+
* @returns The amount of the ERC20 token the client has on specific address. {@link GetL1TokenBalanceReturnType}
|
78
78
|
*
|
79
79
|
* @example
|
80
80
|
* import { createPublicClient, custom, parseEther } from 'viem'
|
package/zksync/types/log.ts
CHANGED
@@ -23,7 +23,7 @@ export type ZkSyncLog<
|
|
23
23
|
|
24
24
|
export type ZkSyncRpcLog = RpcLog_ & {
|
25
25
|
l1BatchNumber: Hex | null
|
26
|
-
// These are returned but doesn't
|
26
|
+
// These are returned but doesn't appear in Log structure neither is mentioned in https://era.zksync.io/docs/api/js/types
|
27
27
|
transactionLogIndex: Hex
|
28
28
|
logType: Hex | null
|
29
29
|
}
|