viem 2.10.3 → 2.10.8
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 +38 -0
- package/_cjs/chains/definitions/btr.js +31 -0
- package/_cjs/chains/definitions/btr.js.map +1 -0
- package/_cjs/chains/definitions/btrTestnet.js +30 -0
- package/_cjs/chains/definitions/btrTestnet.js.map +1 -0
- package/_cjs/chains/definitions/jbcTestnet.js +33 -0
- package/_cjs/chains/definitions/jbcTestnet.js.map +1 -0
- package/_cjs/chains/definitions/mantle.js +2 -2
- package/_cjs/chains/definitions/mantle.js.map +1 -1
- package/_cjs/chains/definitions/rootstockTestnet.js +24 -0
- package/_cjs/chains/definitions/rootstockTestnet.js.map +1 -0
- package/_cjs/chains/definitions/sapphire.js +6 -2
- package/_cjs/chains/definitions/sapphire.js.map +1 -1
- package/_cjs/chains/definitions/sapphireTestnet.js +6 -2
- package/_cjs/chains/definitions/sapphireTestnet.js.map +1 -1
- package/_cjs/chains/index.js +14 -6
- package/_cjs/chains/index.js.map +1 -1
- package/_cjs/clients/transports/http.js +1 -1
- package/_cjs/clients/transports/http.js.map +1 -1
- package/_cjs/errors/version.js +1 -1
- package/_cjs/utils/abi/decodeAbiParameters.js +2 -2
- package/_cjs/utils/abi/decodeAbiParameters.js.map +1 -1
- package/_cjs/utils/abi/encodeAbiParameters.js +2 -2
- package/_cjs/utils/abi/encodeAbiParameters.js.map +1 -1
- package/_cjs/utils/abi/encodePacked.js +3 -3
- package/_cjs/utils/abi/encodePacked.js.map +1 -1
- package/_cjs/utils/address/getAddress.js +8 -2
- package/_cjs/utils/address/getAddress.js.map +1 -1
- package/_cjs/utils/buildRequest.js +1 -1
- package/_cjs/utils/buildRequest.js.map +1 -1
- package/_cjs/utils/cursor.js +2 -2
- package/_cjs/utils/cursor.js.map +1 -1
- package/_cjs/utils/encoding/fromRlp.js +3 -1
- package/_cjs/utils/encoding/fromRlp.js.map +1 -1
- package/_cjs/utils/ens/avatar/utils.js +1 -1
- package/_cjs/utils/ens/avatar/utils.js.map +1 -1
- package/_cjs/utils/promise/withCache.js +1 -1
- package/_cjs/utils/promise/withCache.js.map +1 -1
- package/_cjs/utils/typedData.js +3 -3
- package/_cjs/utils/typedData.js.map +1 -1
- package/_esm/actions/public/getFilterChanges.js +0 -1
- package/_esm/actions/public/getFilterChanges.js.map +1 -1
- package/_esm/actions/public/getFilterLogs.js +0 -1
- package/_esm/actions/public/getFilterLogs.js.map +1 -1
- package/_esm/actions/public/getLogs.js +0 -1
- package/_esm/actions/public/getLogs.js.map +1 -1
- package/_esm/actions/wallet/prepareTransactionRequest.js +0 -1
- package/_esm/actions/wallet/prepareTransactionRequest.js.map +1 -1
- package/_esm/actions/wallet/signTransaction.js +0 -1
- package/_esm/actions/wallet/signTransaction.js.map +1 -1
- package/_esm/celo/fees.js +0 -1
- package/_esm/celo/fees.js.map +1 -1
- package/_esm/celo/formatters.js +0 -1
- package/_esm/celo/formatters.js.map +1 -1
- package/_esm/chains/definitions/btr.js +28 -0
- package/_esm/chains/definitions/btr.js.map +1 -0
- package/_esm/chains/definitions/btrTestnet.js +27 -0
- package/_esm/chains/definitions/btrTestnet.js.map +1 -0
- package/_esm/chains/definitions/jbcTestnet.js +30 -0
- package/_esm/chains/definitions/jbcTestnet.js.map +1 -0
- package/_esm/chains/definitions/mantle.js +2 -2
- package/_esm/chains/definitions/mantle.js.map +1 -1
- package/_esm/chains/definitions/rootstockTestnet.js +21 -0
- package/_esm/chains/definitions/rootstockTestnet.js.map +1 -0
- package/_esm/chains/definitions/sapphire.js +6 -2
- package/_esm/chains/definitions/sapphire.js.map +1 -1
- package/_esm/chains/definitions/sapphireTestnet.js +6 -2
- package/_esm/chains/definitions/sapphireTestnet.js.map +1 -1
- package/_esm/chains/index.js +4 -0
- package/_esm/chains/index.js.map +1 -1
- package/_esm/clients/decorators/wallet.js +0 -1
- package/_esm/clients/decorators/wallet.js.map +1 -1
- package/_esm/clients/transports/http.js +1 -1
- package/_esm/clients/transports/http.js.map +1 -1
- package/_esm/clients/transports/ipc.js +0 -1
- package/_esm/clients/transports/ipc.js.map +1 -1
- package/_esm/errors/version.js +1 -1
- package/_esm/experimental/eip3074/utils/toAuthMessage.js +0 -1
- package/_esm/experimental/eip3074/utils/toAuthMessage.js.map +1 -1
- package/_esm/op-stack/actions/buildProveWithdrawal.js +0 -2
- package/_esm/op-stack/actions/buildProveWithdrawal.js.map +1 -1
- package/_esm/op-stack/actions/estimateL1Fee.js +0 -2
- package/_esm/op-stack/actions/estimateL1Fee.js.map +1 -1
- package/_esm/op-stack/actions/estimateL1Gas.js +0 -2
- package/_esm/op-stack/actions/estimateL1Gas.js.map +1 -1
- package/_esm/op-stack/actions/estimateTotalFee.js +0 -1
- package/_esm/op-stack/actions/estimateTotalFee.js.map +1 -1
- package/_esm/op-stack/actions/estimateTotalGas.js +0 -1
- package/_esm/op-stack/actions/estimateTotalGas.js.map +1 -1
- package/_esm/op-stack/actions/getL1BaseFee.js +0 -3
- package/_esm/op-stack/actions/getL1BaseFee.js.map +1 -1
- package/_esm/op-stack/formatters.js +0 -2
- package/_esm/op-stack/formatters.js.map +1 -1
- package/_esm/types/contract.js +1 -1
- package/_esm/types/contract.js.map +1 -1
- package/_esm/utils/abi/decodeAbiParameters.js +2 -2
- package/_esm/utils/abi/decodeAbiParameters.js.map +1 -1
- package/_esm/utils/abi/encodeAbiParameters.js +2 -2
- package/_esm/utils/abi/encodeAbiParameters.js.map +1 -1
- package/_esm/utils/abi/encodePacked.js +3 -3
- package/_esm/utils/abi/encodePacked.js.map +1 -1
- package/_esm/utils/abi/getAbiItem.js +0 -1
- package/_esm/utils/abi/getAbiItem.js.map +1 -1
- package/_esm/utils/abi/prepareEncodeFunctionData.js +0 -1
- package/_esm/utils/abi/prepareEncodeFunctionData.js.map +1 -1
- package/_esm/utils/address/getAddress.js +31 -3
- package/_esm/utils/address/getAddress.js.map +1 -1
- package/_esm/utils/buildRequest.js +1 -1
- package/_esm/utils/buildRequest.js.map +1 -1
- package/_esm/utils/ccip.js +0 -1
- package/_esm/utils/ccip.js.map +1 -1
- package/_esm/utils/cursor.js +2 -2
- package/_esm/utils/cursor.js.map +1 -1
- package/_esm/utils/encoding/fromRlp.js +3 -1
- package/_esm/utils/encoding/fromRlp.js.map +1 -1
- package/_esm/utils/ens/avatar/utils.js +1 -1
- package/_esm/utils/ens/avatar/utils.js.map +1 -1
- package/_esm/utils/promise/withCache.js +1 -1
- package/_esm/utils/promise/withCache.js.map +1 -1
- package/_esm/utils/rpc/compat.js +0 -4
- package/_esm/utils/rpc/compat.js.map +1 -1
- package/_esm/utils/transaction/serializeAccessList.js +0 -1
- package/_esm/utils/transaction/serializeAccessList.js.map +1 -1
- package/_esm/utils/typedData.js +3 -3
- package/_esm/utils/typedData.js.map +1 -1
- package/_esm/zksync/actions/sendEip712Transaction.js +0 -2
- package/_esm/zksync/actions/sendEip712Transaction.js.map +1 -1
- package/_esm/zksync/actions/sendTransaction.js +0 -1
- package/_esm/zksync/actions/sendTransaction.js.map +1 -1
- package/_esm/zksync/formatters.js +0 -1
- package/_esm/zksync/formatters.js.map +1 -1
- package/_esm/zksync/utils/abi/encodeDeployData.js +0 -1
- package/_esm/zksync/utils/abi/encodeDeployData.js.map +1 -1
- package/_esm/zksync/utils/paymaster/getApprovalBasedPaymasterInput.js +0 -1
- package/_esm/zksync/utils/paymaster/getApprovalBasedPaymasterInput.js.map +1 -1
- package/_types/actions/public/getFilterChanges.d.ts +1 -1
- package/_types/actions/public/getFilterChanges.d.ts.map +1 -1
- package/_types/actions/public/getFilterLogs.d.ts +1 -1
- package/_types/actions/public/getFilterLogs.d.ts.map +1 -1
- package/_types/actions/public/getLogs.d.ts +1 -1
- package/_types/actions/public/getLogs.d.ts.map +1 -1
- package/_types/actions/wallet/prepareTransactionRequest.d.ts +1 -1
- package/_types/actions/wallet/prepareTransactionRequest.d.ts.map +1 -1
- package/_types/celo/fees.d.ts +1 -1
- package/_types/celo/fees.d.ts.map +1 -1
- package/_types/celo/types.d.ts +2 -2
- package/_types/celo/types.d.ts.map +1 -1
- package/_types/chains/definitions/btr.d.ts +37 -0
- package/_types/chains/definitions/btr.d.ts.map +1 -0
- package/_types/chains/definitions/btrTestnet.d.ts +37 -0
- package/_types/chains/definitions/btrTestnet.d.ts.map +1 -0
- package/_types/chains/definitions/jbcTestnet.d.ts +38 -0
- package/_types/chains/definitions/jbcTestnet.d.ts.map +1 -0
- package/_types/chains/definitions/mantle.d.ts +2 -2
- package/_types/chains/definitions/rootstockTestnet.d.ts +36 -0
- package/_types/chains/definitions/rootstockTestnet.d.ts.map +1 -0
- package/_types/chains/definitions/sapphire.d.ts +6 -2
- package/_types/chains/definitions/sapphire.d.ts.map +1 -1
- package/_types/chains/definitions/sapphireTestnet.d.ts +6 -2
- package/_types/chains/definitions/sapphireTestnet.d.ts.map +1 -1
- package/_types/chains/index.d.ts +4 -0
- package/_types/chains/index.d.ts.map +1 -1
- package/_types/clients/decorators/wallet.d.ts +1 -1
- package/_types/clients/decorators/wallet.d.ts.map +1 -1
- package/_types/clients/transports/ipc.d.ts +1 -1
- package/_types/clients/transports/ipc.d.ts.map +1 -1
- package/_types/errors/version.d.ts +1 -1
- package/_types/experimental/eip3074/utils/toAuthMessage.d.ts +1 -1
- package/_types/experimental/eip3074/utils/toAuthMessage.d.ts.map +1 -1
- package/_types/op-stack/actions/buildProveWithdrawal.d.ts +2 -2
- package/_types/op-stack/actions/buildProveWithdrawal.d.ts.map +1 -1
- package/_types/op-stack/actions/estimateL1Fee.d.ts +2 -2
- package/_types/op-stack/actions/estimateL1Fee.d.ts.map +1 -1
- package/_types/op-stack/actions/estimateL1Gas.d.ts +2 -2
- package/_types/op-stack/actions/estimateL1Gas.d.ts.map +1 -1
- package/_types/op-stack/actions/estimateTotalFee.d.ts +1 -1
- package/_types/op-stack/actions/estimateTotalFee.d.ts.map +1 -1
- package/_types/op-stack/actions/estimateTotalGas.d.ts +1 -1
- package/_types/op-stack/actions/estimateTotalGas.d.ts.map +1 -1
- package/_types/op-stack/actions/getL1BaseFee.d.ts +3 -3
- package/_types/op-stack/actions/getL1BaseFee.d.ts.map +1 -1
- package/_types/op-stack/types/transaction.d.ts +2 -2
- package/_types/op-stack/types/transaction.d.ts.map +1 -1
- package/_types/types/contract.d.ts +1 -1
- package/_types/types/contract.d.ts.map +1 -1
- package/_types/types/eip1193.d.ts +1 -1
- package/_types/types/eip1193.d.ts.map +1 -1
- package/_types/utils/abi/getAbiItem.d.ts +1 -1
- package/_types/utils/abi/getAbiItem.d.ts.map +1 -1
- package/_types/utils/abi/prepareEncodeFunctionData.d.ts +1 -1
- package/_types/utils/abi/prepareEncodeFunctionData.d.ts.map +1 -1
- package/_types/utils/address/getAddress.d.ts +26 -2
- package/_types/utils/address/getAddress.d.ts.map +1 -1
- package/_types/utils/buildRequest.d.ts.map +1 -1
- package/_types/utils/encoding/fromRlp.d.ts.map +1 -1
- package/_types/utils/promise/withCache.d.ts.map +1 -1
- package/_types/utils/rpc/compat.d.ts +3 -3
- package/_types/utils/rpc/compat.d.ts.map +1 -1
- package/_types/utils/transaction/serializeAccessList.d.ts +1 -1
- package/_types/utils/transaction/serializeAccessList.d.ts.map +1 -1
- package/_types/zksync/actions/sendEip712Transaction.d.ts +1 -1
- package/_types/zksync/actions/sendEip712Transaction.d.ts.map +1 -1
- package/_types/zksync/actions/sendTransaction.d.ts +1 -1
- package/_types/zksync/actions/sendTransaction.d.ts.map +1 -1
- package/_types/zksync/types/transaction.d.ts +1 -1
- package/_types/zksync/types/transaction.d.ts.map +1 -1
- package/_types/zksync/utils/abi/encodeDeployData.d.ts +1 -1
- package/_types/zksync/utils/abi/encodeDeployData.d.ts.map +1 -1
- package/_types/zksync/utils/paymaster/getApprovalBasedPaymasterInput.d.ts +1 -1
- package/_types/zksync/utils/paymaster/getApprovalBasedPaymasterInput.d.ts.map +1 -1
- package/actions/public/getFilterChanges.ts +1 -1
- package/actions/public/getFilterLogs.ts +1 -1
- package/actions/public/getLogs.ts +1 -1
- package/actions/wallet/prepareTransactionRequest.ts +1 -1
- package/actions/wallet/signTransaction.ts +1 -1
- package/celo/fees.ts +1 -1
- package/celo/formatters.ts +1 -1
- package/celo/types.ts +3 -3
- package/chains/definitions/btr.ts +28 -0
- package/chains/definitions/btrTestnet.ts +27 -0
- package/chains/definitions/jbcTestnet.ts +30 -0
- package/chains/definitions/mantle.ts +2 -2
- package/chains/definitions/rootstockTestnet.ts +21 -0
- package/chains/definitions/sapphire.ts +6 -2
- package/chains/definitions/sapphireTestnet.ts +6 -2
- package/chains/index.ts +4 -0
- package/clients/decorators/wallet.ts +3 -3
- package/clients/transports/http.ts +1 -1
- package/clients/transports/ipc.ts +1 -1
- package/errors/version.ts +1 -1
- package/experimental/eip3074/utils/toAuthMessage.ts +1 -1
- package/op-stack/actions/buildProveWithdrawal.ts +2 -2
- package/op-stack/actions/estimateL1Fee.ts +2 -2
- package/op-stack/actions/estimateL1Gas.ts +2 -2
- package/op-stack/actions/estimateTotalFee.ts +1 -1
- package/op-stack/actions/estimateTotalGas.ts +1 -1
- package/op-stack/actions/getL1BaseFee.ts +3 -3
- package/op-stack/formatters.ts +2 -2
- package/op-stack/types/transaction.ts +2 -2
- package/package.json +4 -3
- package/types/contract.ts +16 -16
- package/types/eip1193.ts +1 -1
- package/utils/abi/decodeAbiParameters.ts +2 -2
- package/utils/abi/encodeAbiParameters.ts +2 -2
- package/utils/abi/encodePacked.ts +3 -3
- package/utils/abi/getAbiItem.ts +1 -1
- package/utils/abi/prepareEncodeFunctionData.ts +1 -1
- package/utils/address/getAddress.ts +33 -2
- package/utils/buildRequest.ts +2 -1
- package/utils/ccip.ts +1 -1
- package/utils/cursor.ts +2 -2
- package/utils/encoding/fromRlp.ts +3 -1
- package/utils/ens/avatar/utils.ts +1 -1
- package/utils/promise/withCache.ts +1 -1
- package/utils/rpc/compat.ts +4 -4
- package/utils/transaction/serializeAccessList.ts +1 -1
- package/utils/typedData.ts +3 -3
- package/zksync/actions/sendEip712Transaction.ts +2 -2
- package/zksync/actions/sendTransaction.ts +1 -1
- package/zksync/formatters.ts +1 -1
- package/zksync/types/transaction.ts +2 -2
- package/zksync/utils/abi/encodeDeployData.ts +3 -3
- package/zksync/utils/paymaster/getApprovalBasedPaymasterInput.ts +1 -1
@@ -0,0 +1,30 @@
|
|
1
|
+
import { defineChain } from '../../utils/chain/defineChain.js'
|
2
|
+
|
3
|
+
export const jbcTestnet = /*#__PURE__*/ defineChain({
|
4
|
+
id: 88991,
|
5
|
+
name: 'Jibchain Testnet',
|
6
|
+
network: 'jbcTestnet',
|
7
|
+
nativeCurrency: { name: 'tJBC', symbol: 'tJBC', decimals: 18 },
|
8
|
+
rpcUrls: {
|
9
|
+
default: {
|
10
|
+
http: ['https://rpc.testnet.jibchain.net'],
|
11
|
+
},
|
12
|
+
public: {
|
13
|
+
http: ['https://rpc.testnet.jibchain.net'],
|
14
|
+
},
|
15
|
+
},
|
16
|
+
blockExplorers: {
|
17
|
+
default: {
|
18
|
+
name: 'Blockscout',
|
19
|
+
url: 'https://exp.testnet.jibchain.net',
|
20
|
+
apiUrl: 'https://exp.testnet.jibchain.net/api',
|
21
|
+
},
|
22
|
+
},
|
23
|
+
contracts: {
|
24
|
+
multicall3: {
|
25
|
+
address: '0xa1a858ad9041B4741e620355a3F96B3c78e70ecE',
|
26
|
+
blockCreated: 32848,
|
27
|
+
},
|
28
|
+
},
|
29
|
+
testnet: true,
|
30
|
+
})
|
@@ -14,8 +14,8 @@ export const mantle = /*#__PURE__*/ defineChain({
|
|
14
14
|
blockExplorers: {
|
15
15
|
default: {
|
16
16
|
name: 'Mantle Explorer',
|
17
|
-
url: 'https://
|
18
|
-
apiUrl: 'https://
|
17
|
+
url: 'https://mantlescan.xyz/',
|
18
|
+
apiUrl: 'https://api.mantlescan.xyz/api',
|
19
19
|
},
|
20
20
|
},
|
21
21
|
contracts: {
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { defineChain } from '../../utils/chain/defineChain.js'
|
2
|
+
|
3
|
+
export const rootstockTestnet = /*#__PURE__*/ defineChain({
|
4
|
+
id: 31,
|
5
|
+
name: 'Rootstock Testnet',
|
6
|
+
network: 'rootstock',
|
7
|
+
nativeCurrency: {
|
8
|
+
decimals: 18,
|
9
|
+
name: 'Rootstock Bitcoin',
|
10
|
+
symbol: 'tRBTC',
|
11
|
+
},
|
12
|
+
rpcUrls: {
|
13
|
+
default: { http: ['https://public-node.testnet.rsk.co'] },
|
14
|
+
},
|
15
|
+
blockExplorers: {
|
16
|
+
default: {
|
17
|
+
name: 'RSK Explorer',
|
18
|
+
url: 'https://explorer.testnet.rootstock.io',
|
19
|
+
},
|
20
|
+
},
|
21
|
+
})
|
@@ -13,9 +13,13 @@ export const sapphire = /*#__PURE__*/ defineChain({
|
|
13
13
|
},
|
14
14
|
blockExplorers: {
|
15
15
|
default: {
|
16
|
+
name: 'Oasis Explorer',
|
17
|
+
url: 'https://explorer.oasis.io/mainnet/sapphire',
|
18
|
+
},
|
19
|
+
blockscout: {
|
16
20
|
name: 'Oasis Sapphire Explorer',
|
17
|
-
url: 'https://explorer.sapphire.oasis.io',
|
18
|
-
apiUrl: 'https://explorer.sapphire.oasis.io/api',
|
21
|
+
url: 'https://old-explorer.sapphire.oasis.io',
|
22
|
+
apiUrl: 'https://old-explorer.sapphire.oasis.io/api',
|
19
23
|
},
|
20
24
|
},
|
21
25
|
contracts: {
|
@@ -13,9 +13,13 @@ export const sapphireTestnet = /*#__PURE__*/ defineChain({
|
|
13
13
|
},
|
14
14
|
blockExplorers: {
|
15
15
|
default: {
|
16
|
+
name: 'Oasis Explorer',
|
17
|
+
url: 'https://explorer.oasis.io/testnet/sapphire',
|
18
|
+
},
|
19
|
+
blockscout: {
|
16
20
|
name: 'Oasis Sapphire Testnet Explorer',
|
17
|
-
url: 'https://testnet.explorer.sapphire.oasis.dev',
|
18
|
-
apiUrl: 'https://testnet.explorer.sapphire.oasis.dev/api',
|
21
|
+
url: 'https://testnet.old-explorer.sapphire.oasis.dev',
|
22
|
+
apiUrl: 'https://testnet.old-explorer.sapphire.oasis.dev/api',
|
19
23
|
},
|
20
24
|
},
|
21
25
|
testnet: true,
|
package/chains/index.ts
CHANGED
@@ -39,6 +39,8 @@ export { bronosTestnet } from './definitions/bronosTestnet.js'
|
|
39
39
|
export { bsc } from './definitions/bsc.js'
|
40
40
|
export { bscTestnet } from './definitions/bscTestnet.js'
|
41
41
|
export { bscGreenfield } from './definitions/bscGreenfield.js'
|
42
|
+
export { btr } from './definitions/btr.js'
|
43
|
+
export { btrTestnet } from './definitions/btrTestnet.js'
|
42
44
|
export { bxn } from './definitions/bxn.js'
|
43
45
|
export { bxnTestnet } from './definitions/bxnTestnet.js'
|
44
46
|
export { canto } from './definitions/canto.js'
|
@@ -95,6 +97,7 @@ export { fuseSparknet } from './definitions/fuseSparknet.js'
|
|
95
97
|
export { iotex } from './definitions/iotex.js'
|
96
98
|
export { iotexTestnet } from './definitions/iotexTestnet.js'
|
97
99
|
export { jbc } from './definitions/jbc.js'
|
100
|
+
export { jbcTestnet } from './definitions/jbcTestnet.js'
|
98
101
|
export { karura } from './definitions/karura.js'
|
99
102
|
export { gobi } from './definitions/gobi.js'
|
100
103
|
export { goerli } from './definitions/goerli.js'
|
@@ -193,6 +196,7 @@ export { rollux } from './definitions/rollux.js'
|
|
193
196
|
export { rolluxTestnet } from './definitions/rolluxTestnet.js'
|
194
197
|
export { ronin } from './definitions/ronin.js'
|
195
198
|
export { rootstock } from './definitions/rootstock.js'
|
199
|
+
export { rootstockTestnet } from './definitions/rootstockTestnet.js'
|
196
200
|
export { rss3 } from './definitions/rss3.js'
|
197
201
|
export { rss3Sepolia } from './definitions/rss3Sepolia.js'
|
198
202
|
export { saigon } from './definitions/saigon.js'
|
@@ -78,9 +78,9 @@ import {
|
|
78
78
|
writeContract,
|
79
79
|
} from '../../actions/wallet/writeContract.js'
|
80
80
|
import type { Chain } from '../../types/chain.js'
|
81
|
-
import {
|
82
|
-
|
83
|
-
|
81
|
+
import type {
|
82
|
+
ContractFunctionArgs,
|
83
|
+
ContractFunctionName,
|
84
84
|
} from '../../types/contract.js'
|
85
85
|
import type { Client } from '../createClient.js'
|
86
86
|
import type { Transport } from '../transports/createTransport.js'
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { RpcRequestError } from '../../errors/request.js'
|
2
|
-
import {
|
2
|
+
import type { UrlRequiredErrorType } from '../../errors/transport.js'
|
3
3
|
import type { ErrorType } from '../../errors/utils.js'
|
4
4
|
import type { Hash } from '../../types/misc.js'
|
5
5
|
import type { RpcResponse } from '../../types/rpc.js'
|
package/errors/version.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const version = '2.10.
|
1
|
+
export const version = '2.10.8'
|
@@ -10,7 +10,7 @@ import {
|
|
10
10
|
type NumberToHexErrorType,
|
11
11
|
numberToHex,
|
12
12
|
} from '../../../utils/encoding/toHex.js'
|
13
|
-
import {
|
13
|
+
import type { Keccak256ErrorType } from '../../../utils/hash/keccak256.js'
|
14
14
|
|
15
15
|
export type ToAuthMessageParameters = {
|
16
16
|
chainId: number
|
@@ -20,7 +20,7 @@ import type {
|
|
20
20
|
DeriveChain,
|
21
21
|
GetChainParameter,
|
22
22
|
} from '../../types/chain.js'
|
23
|
-
import {
|
23
|
+
import type { Hex } from '../../types/misc.js'
|
24
24
|
import type { OneOf, Prettify } from '../../types/utils.js'
|
25
25
|
import { fromRlp } from '../../utils/encoding/fromRlp.js'
|
26
26
|
import { toRlp } from '../../utils/encoding/toRlp.js'
|
@@ -31,7 +31,7 @@ import {
|
|
31
31
|
type GetWithdrawalHashStorageSlotErrorType,
|
32
32
|
getWithdrawalHashStorageSlot,
|
33
33
|
} from '../utils/getWithdrawalHashStorageSlot.js'
|
34
|
-
import {
|
34
|
+
import type { GetGameReturnType } from './getGame.js'
|
35
35
|
import type { GetL2OutputReturnType } from './getL2Output.js'
|
36
36
|
import type { ProveWithdrawalParameters } from './proveWithdrawal.js'
|
37
37
|
|
@@ -13,14 +13,14 @@ import type { Client } from '../../clients/createClient.js'
|
|
13
13
|
import type { Transport } from '../../clients/transports/createTransport.js'
|
14
14
|
import type { ErrorType } from '../../errors/utils.js'
|
15
15
|
import type { Account, GetAccountParameter } from '../../types/account.js'
|
16
|
-
import {
|
16
|
+
import type { Chain, GetChainParameter } from '../../types/chain.js'
|
17
17
|
import type {
|
18
18
|
TransactionRequestEIP1559,
|
19
19
|
TransactionSerializable,
|
20
20
|
} from '../../types/transaction.js'
|
21
21
|
import type { RequestErrorType } from '../../utils/buildRequest.js'
|
22
22
|
import { getChainContractAddress } from '../../utils/chain/getChainContractAddress.js'
|
23
|
-
import {
|
23
|
+
import type { HexToNumberErrorType } from '../../utils/encoding/fromHex.js'
|
24
24
|
import {
|
25
25
|
type AssertRequestErrorType,
|
26
26
|
type AssertRequestParameters,
|
@@ -13,14 +13,14 @@ import type { Client } from '../../clients/createClient.js'
|
|
13
13
|
import type { Transport } from '../../clients/transports/createTransport.js'
|
14
14
|
import type { ErrorType } from '../../errors/utils.js'
|
15
15
|
import type { Account, GetAccountParameter } from '../../types/account.js'
|
16
|
-
import {
|
16
|
+
import type { Chain, GetChainParameter } from '../../types/chain.js'
|
17
17
|
import type {
|
18
18
|
TransactionRequestEIP1559,
|
19
19
|
TransactionSerializable,
|
20
20
|
} from '../../types/transaction.js'
|
21
21
|
import type { RequestErrorType } from '../../utils/buildRequest.js'
|
22
22
|
import { getChainContractAddress } from '../../utils/chain/getChainContractAddress.js'
|
23
|
-
import {
|
23
|
+
import type { HexToNumberErrorType } from '../../utils/encoding/fromHex.js'
|
24
24
|
import {
|
25
25
|
type AssertRequestErrorType,
|
26
26
|
type AssertRequestParameters,
|
@@ -16,7 +16,7 @@ import type { Client } from '../../clients/createClient.js'
|
|
16
16
|
import type { Transport } from '../../clients/transports/createTransport.js'
|
17
17
|
import type { ErrorType } from '../../errors/utils.js'
|
18
18
|
import type { Account } from '../../types/account.js'
|
19
|
-
import {
|
19
|
+
import type { Chain } from '../../types/chain.js'
|
20
20
|
import type { RequestErrorType } from '../../utils/buildRequest.js'
|
21
21
|
import {
|
22
22
|
type EstimateL1FeeErrorType,
|
@@ -12,7 +12,7 @@ import type { Client } from '../../clients/createClient.js'
|
|
12
12
|
import type { Transport } from '../../clients/transports/createTransport.js'
|
13
13
|
import type { ErrorType } from '../../errors/utils.js'
|
14
14
|
import type { Account } from '../../types/account.js'
|
15
|
-
import {
|
15
|
+
import type { Chain } from '../../types/chain.js'
|
16
16
|
import type { RequestErrorType } from '../../utils/buildRequest.js'
|
17
17
|
import {
|
18
18
|
type EstimateL1GasErrorType,
|
@@ -4,14 +4,14 @@ import {
|
|
4
4
|
type ReadContractErrorType,
|
5
5
|
readContract,
|
6
6
|
} from '../../actions/public/readContract.js'
|
7
|
-
import {
|
7
|
+
import type { PrepareTransactionRequestErrorType } from '../../actions/wallet/prepareTransactionRequest.js'
|
8
8
|
import type { Client } from '../../clients/createClient.js'
|
9
9
|
import type { Transport } from '../../clients/transports/createTransport.js'
|
10
10
|
import type { ErrorType } from '../../errors/utils.js'
|
11
|
-
import {
|
11
|
+
import type { Chain, GetChainParameter } from '../../types/chain.js'
|
12
12
|
import type { RequestErrorType } from '../../utils/buildRequest.js'
|
13
13
|
import { getChainContractAddress } from '../../utils/chain/getChainContractAddress.js'
|
14
|
-
import {
|
14
|
+
import type { HexToNumberErrorType } from '../../utils/encoding/fromHex.js'
|
15
15
|
|
16
16
|
import { gasPriceOracleAbi } from '../abis.js'
|
17
17
|
import { contracts } from '../contracts.js'
|
package/op-stack/formatters.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import {
|
1
|
+
import type { ChainFormatters } from '../types/chain.js'
|
2
2
|
import type { Hash } from '../types/misc.js'
|
3
|
-
import {
|
3
|
+
import type { RpcTransaction } from '../types/rpc.js'
|
4
4
|
import { hexToBigInt } from '../utils/encoding/fromHex.js'
|
5
5
|
import { defineBlock } from '../utils/formatters/block.js'
|
6
6
|
import {
|
@@ -3,17 +3,17 @@ import type { Hex } from '../../types/misc.js'
|
|
3
3
|
import type {
|
4
4
|
Index,
|
5
5
|
Quantity,
|
6
|
-
RpcTransaction as RpcTransaction_,
|
7
6
|
RpcTransactionReceipt,
|
7
|
+
RpcTransaction as RpcTransaction_,
|
8
8
|
} from '../../types/rpc.js'
|
9
9
|
import type {
|
10
|
-
Transaction as Transaction_,
|
11
10
|
TransactionBase,
|
12
11
|
TransactionReceipt,
|
13
12
|
TransactionSerializable,
|
14
13
|
TransactionSerializableBase,
|
15
14
|
TransactionSerialized,
|
16
15
|
TransactionType,
|
16
|
+
Transaction as Transaction_,
|
17
17
|
} from '../../types/transaction.js'
|
18
18
|
import type { OneOf } from '../../types/utils.js'
|
19
19
|
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "viem",
|
3
3
|
"description": "TypeScript Interface for Ethereum",
|
4
|
-
"version": "2.10.
|
4
|
+
"version": "2.10.8",
|
5
5
|
"main": "./_cjs/index.js",
|
6
6
|
"module": "./_esm/index.js",
|
7
7
|
"types": "./_types/index.d.ts",
|
@@ -14,7 +14,8 @@
|
|
14
14
|
"!**/*.test.ts.snap",
|
15
15
|
"!**/*.test-d.ts",
|
16
16
|
"!**/*.bench.ts",
|
17
|
-
"!tsconfig.build.json"
|
17
|
+
"!tsconfig.build.json",
|
18
|
+
"!jsr.json"
|
18
19
|
],
|
19
20
|
"exports": {
|
20
21
|
".": {
|
@@ -139,7 +140,7 @@
|
|
139
140
|
"@scure/bip32": "1.3.2",
|
140
141
|
"@scure/bip39": "1.2.1",
|
141
142
|
"abitype": "1.0.0",
|
142
|
-
"isows": "1.0.
|
143
|
+
"isows": "1.0.4",
|
143
144
|
"ws": "8.13.0"
|
144
145
|
},
|
145
146
|
"license": "MIT",
|
package/types/contract.ts
CHANGED
@@ -1,19 +1,19 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
1
|
+
import type {
|
2
|
+
Abi,
|
3
|
+
AbiEvent,
|
4
|
+
AbiFunction,
|
5
|
+
AbiParameter,
|
6
|
+
AbiParameterToPrimitiveType,
|
7
|
+
AbiParametersToPrimitiveTypes,
|
8
|
+
AbiStateMutability,
|
9
|
+
Address,
|
10
|
+
ExtractAbiError,
|
11
|
+
ExtractAbiErrorNames,
|
12
|
+
ExtractAbiEvent,
|
13
|
+
ExtractAbiEventNames,
|
14
|
+
ExtractAbiFunction,
|
15
|
+
ExtractAbiFunctionNames,
|
16
|
+
ResolvedRegister,
|
17
17
|
} from 'abitype'
|
18
18
|
|
19
19
|
import type { Hex, LogTopic } from './misc.js'
|
package/types/eip1193.ts
CHANGED
@@ -4,13 +4,13 @@ import type { BlockTag } from './block.js'
|
|
4
4
|
import type { Hash, Hex, LogTopic } from './misc.js'
|
5
5
|
import type { RpcStateOverride } from './rpc.js'
|
6
6
|
import type {
|
7
|
-
Quantity,
|
8
7
|
RpcBlock as Block,
|
9
8
|
RpcBlockIdentifier as BlockIdentifier,
|
10
9
|
RpcBlockNumber as BlockNumber,
|
11
10
|
RpcFeeHistory as FeeHistory,
|
12
11
|
RpcLog as Log,
|
13
12
|
RpcProof as Proof,
|
13
|
+
Quantity,
|
14
14
|
RpcTransaction as Transaction,
|
15
15
|
RpcTransactionReceipt as TransactionReceipt,
|
16
16
|
RpcTransactionRequest as TransactionRequest,
|
@@ -249,7 +249,7 @@ function decodeBytes(
|
|
249
249
|
return [bytesToHex(data), 32]
|
250
250
|
}
|
251
251
|
|
252
|
-
const value = bytesToHex(cursor.readBytes(parseInt(size), 32))
|
252
|
+
const value = bytesToHex(cursor.readBytes(Number.parseInt(size), 32))
|
253
253
|
return [value, 32]
|
254
254
|
}
|
255
255
|
|
@@ -260,7 +260,7 @@ type DecodeNumberErrorType =
|
|
260
260
|
|
261
261
|
function decodeNumber(cursor: Cursor, param: AbiParameter) {
|
262
262
|
const signed = param.type.startsWith('int')
|
263
|
-
const size = parseInt(param.type.split('int')[1] || '256')
|
263
|
+
const size = Number.parseInt(param.type.split('int')[1] || '256')
|
264
264
|
const value = cursor.readBytes(32)
|
265
265
|
return [
|
266
266
|
size > 48
|
@@ -298,9 +298,9 @@ function encodeBytes<const TParam extends AbiParameter>(
|
|
298
298
|
encoded: concat([padHex(numberToHex(bytesSize, { size: 32 })), value_]),
|
299
299
|
}
|
300
300
|
}
|
301
|
-
if (bytesSize !== parseInt(paramSize))
|
301
|
+
if (bytesSize !== Number.parseInt(paramSize))
|
302
302
|
throw new AbiEncodingBytesSizeMismatchError({
|
303
|
-
expectedSize: parseInt(paramSize),
|
303
|
+
expectedSize: Number.parseInt(paramSize),
|
304
304
|
value,
|
305
305
|
})
|
306
306
|
return { dynamic: false, encoded: padHex(value, { dir: 'right' }) }
|
@@ -107,7 +107,7 @@ function encode<const TPackedAbiType extends PackedAbiType | unknown>(
|
|
107
107
|
const intMatch = (type as string).match(integerRegex)
|
108
108
|
if (intMatch) {
|
109
109
|
const [_type, baseType, bits = '256'] = intMatch
|
110
|
-
const size = parseInt(bits) / 8
|
110
|
+
const size = Number.parseInt(bits) / 8
|
111
111
|
return numberToHex(value as number, {
|
112
112
|
size: isArray ? 32 : size,
|
113
113
|
signed: baseType === 'int',
|
@@ -117,9 +117,9 @@ function encode<const TPackedAbiType extends PackedAbiType | unknown>(
|
|
117
117
|
const bytesMatch = (type as string).match(bytesRegex)
|
118
118
|
if (bytesMatch) {
|
119
119
|
const [_type, size] = bytesMatch
|
120
|
-
if (parseInt(size) !== ((value as Hex).length - 2) / 2)
|
120
|
+
if (Number.parseInt(size) !== ((value as Hex).length - 2) / 2)
|
121
121
|
throw new BytesSizeMismatchError({
|
122
|
-
expectedSize: parseInt(size),
|
122
|
+
expectedSize: Number.parseInt(size),
|
123
123
|
givenSize: ((value as Hex).length - 2) / 2,
|
124
124
|
})
|
125
125
|
return pad(value as Hex, { dir: 'right', size: isArray ? 32 : null }) as Hex
|
package/utils/abi/getAbiItem.ts
CHANGED
@@ -13,7 +13,7 @@ import type {
|
|
13
13
|
ContractFunctionArgs,
|
14
14
|
ContractFunctionName,
|
15
15
|
} from '../../types/contract.js'
|
16
|
-
import {
|
16
|
+
import type { ConcatHexErrorType } from '../data/concat.js'
|
17
17
|
import {
|
18
18
|
type ToFunctionSelectorErrorType,
|
19
19
|
toFunctionSelector,
|
@@ -7,8 +7,11 @@ import {
|
|
7
7
|
stringToBytes,
|
8
8
|
} from '../encoding/toBytes.js'
|
9
9
|
import { type Keccak256ErrorType, keccak256 } from '../hash/keccak256.js'
|
10
|
+
import { LruMap } from '../lru.js'
|
10
11
|
import { type IsAddressErrorType, isAddress } from './isAddress.js'
|
11
12
|
|
13
|
+
export const checksumAddressCache = /*#__PURE__*/ new LruMap<Address>(8192)
|
14
|
+
|
12
15
|
export type ChecksumAddressErrorType =
|
13
16
|
| Keccak256ErrorType
|
14
17
|
| StringToBytesErrorType
|
@@ -16,8 +19,21 @@ export type ChecksumAddressErrorType =
|
|
16
19
|
|
17
20
|
export function checksumAddress(
|
18
21
|
address_: Address,
|
22
|
+
/**
|
23
|
+
* Warning: EIP-1191 checksum addresses are generally not backwards compatible with the
|
24
|
+
* wider Ethereum ecosystem, meaning it will break when validated against an application/tool
|
25
|
+
* that relies on EIP-55 checksum encoding (checksum without chainId).
|
26
|
+
*
|
27
|
+
* It is highly recommended to not use this feature unless you
|
28
|
+
* know what you are doing.
|
29
|
+
*
|
30
|
+
* See more: https://github.com/ethereum/EIPs/issues/1121
|
31
|
+
*/
|
19
32
|
chainId?: number | undefined,
|
20
33
|
): Address {
|
34
|
+
if (checksumAddressCache.has(`${address_}.${chainId}`))
|
35
|
+
return checksumAddressCache.get(`${address_}.${chainId}`)!
|
36
|
+
|
21
37
|
const hexAddress = chainId
|
22
38
|
? `${chainId}${address_.toLowerCase()}`
|
23
39
|
: address_.substring(2).toLowerCase()
|
@@ -35,7 +51,9 @@ export function checksumAddress(
|
|
35
51
|
}
|
36
52
|
}
|
37
53
|
|
38
|
-
|
54
|
+
const result = `0x${address.join('')}` as const
|
55
|
+
checksumAddressCache.set(`${address_}.${chainId}`, result)
|
56
|
+
return result
|
39
57
|
}
|
40
58
|
|
41
59
|
export type GetAddressErrorType =
|
@@ -43,7 +61,20 @@ export type GetAddressErrorType =
|
|
43
61
|
| IsAddressErrorType
|
44
62
|
| ErrorType
|
45
63
|
|
46
|
-
export function getAddress(
|
64
|
+
export function getAddress(
|
65
|
+
address: string,
|
66
|
+
/**
|
67
|
+
* Warning: EIP-1191 checksum addresses are generally not backwards compatible with the
|
68
|
+
* wider Ethereum ecosystem, meaning it will break when validated against an application/tool
|
69
|
+
* that relies on EIP-55 checksum encoding (checksum without chainId).
|
70
|
+
*
|
71
|
+
* It is highly recommended to not use this feature unless you
|
72
|
+
* know what you are doing.
|
73
|
+
*
|
74
|
+
* See more: https://github.com/ethereum/EIPs/issues/1121
|
75
|
+
*/
|
76
|
+
chainId?: number,
|
77
|
+
): Address {
|
47
78
|
if (!isAddress(address, { strict: false }))
|
48
79
|
throw new InvalidAddressError({ address })
|
49
80
|
return checksumAddress(address, chainId)
|
package/utils/buildRequest.ts
CHANGED
@@ -176,7 +176,8 @@ export function buildRequest<request extends (args: any) => Promise<any>>(
|
|
176
176
|
// If we find a Retry-After header, let's retry after the given time.
|
177
177
|
if (error && error instanceof HttpRequestError) {
|
178
178
|
const retryAfter = error?.headers?.get('Retry-After')
|
179
|
-
if (retryAfter?.match(/\d/))
|
179
|
+
if (retryAfter?.match(/\d/))
|
180
|
+
return Number.parseInt(retryAfter) * 1000
|
180
181
|
}
|
181
182
|
|
182
183
|
// Otherwise, let's retry with an exponential backoff.
|
package/utils/ccip.ts
CHANGED
@@ -2,7 +2,7 @@ import type { Abi, Address } from 'abitype'
|
|
2
2
|
|
3
3
|
import { type CallParameters, call } from '../actions/public/call.js'
|
4
4
|
import type { Transport } from '../clients/transports/createTransport.js'
|
5
|
-
import {
|
5
|
+
import type { BaseError } from '../errors/base.js'
|
6
6
|
import {
|
7
7
|
OffchainLookupError,
|
8
8
|
OffchainLookupResponseMalformedError,
|
package/utils/cursor.ts
CHANGED
@@ -61,7 +61,7 @@ const staticCursor: Cursor = {
|
|
61
61
|
position: 0,
|
62
62
|
positionReadCount: new Map(),
|
63
63
|
recursiveReadCount: 0,
|
64
|
-
recursiveReadLimit:
|
64
|
+
recursiveReadLimit: Number.POSITIVE_INFINITY,
|
65
65
|
assertReadLimit() {
|
66
66
|
if (this.recursiveReadCount >= this.recursiveReadLimit)
|
67
67
|
throw new RecursiveReadLimitExceededError({
|
@@ -207,7 +207,7 @@ const staticCursor: Cursor = {
|
|
207
207
|
return () => (this.position = oldPosition)
|
208
208
|
},
|
209
209
|
_touch() {
|
210
|
-
if (this.recursiveReadLimit ===
|
210
|
+
if (this.recursiveReadLimit === Number.POSITIVE_INFINITY) return
|
211
211
|
const count = this.getReadCount()
|
212
212
|
this.positionReadCount.set(this.position, count + 1)
|
213
213
|
if (count > 0) this.recursiveReadCount++
|
@@ -41,7 +41,9 @@ export function fromRlp<to extends To = 'hex'>(
|
|
41
41
|
return value
|
42
42
|
})()
|
43
43
|
|
44
|
-
const cursor = createCursor(bytes, {
|
44
|
+
const cursor = createCursor(bytes, {
|
45
|
+
recursiveReadLimit: Number.POSITIVE_INFINITY,
|
46
|
+
})
|
45
47
|
const result = fromRlpCursor(cursor, to)
|
46
48
|
|
47
49
|
return result as FromRlpReturnType<to>
|
@@ -244,7 +244,7 @@ export function parseNftUri(uri_: string): ParsedNft {
|
|
244
244
|
throw new EnsAvatarInvalidNftUriError({ reason: 'ERC namespace not found' })
|
245
245
|
|
246
246
|
return {
|
247
|
-
chainID: parseInt(chainID),
|
247
|
+
chainID: Number.parseInt(chainID),
|
248
248
|
namespace: erc_namespace.toLowerCase(),
|
249
249
|
contractAddress: contractAddress as Address,
|
250
250
|
tokenID,
|
@@ -41,7 +41,7 @@ export type WithCacheParameters = {
|
|
41
41
|
*/
|
42
42
|
export async function withCache<TData>(
|
43
43
|
fn: () => Promise<TData>,
|
44
|
-
{ cacheKey, cacheTime =
|
44
|
+
{ cacheKey, cacheTime = Number.POSITIVE_INFINITY }: WithCacheParameters,
|
45
45
|
) {
|
46
46
|
const cache = getCache<TData>(cacheKey)
|
47
47
|
|
package/utils/rpc/compat.ts
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
// These APIs will be removed in v3.
|
3
3
|
|
4
4
|
/* c8 ignore start */
|
5
|
-
import {
|
6
|
-
|
5
|
+
import type {
|
6
|
+
TimeoutErrorType,
|
7
7
|
WebSocketRequestError,
|
8
8
|
} from '../../errors/request.js'
|
9
9
|
import type { ErrorType } from '../../errors/utils.js'
|
10
10
|
import type { RpcResponse } from '../../types/rpc.js'
|
11
|
-
import {
|
11
|
+
import type { WithTimeoutErrorType } from '../promise/withTimeout.js'
|
12
12
|
import { type HttpRequestParameters, getHttpRpcClient } from './http.js'
|
13
|
-
import {
|
13
|
+
import type { SocketRpcClient } from './socket.js'
|
14
14
|
import { getWebSocketRpcClient } from './webSocket.js'
|
15
15
|
|
16
16
|
export type WebSocketOptions = Parameters<
|
@@ -10,7 +10,7 @@ import type { ErrorType } from '../../errors/utils.js'
|
|
10
10
|
import type { Hex } from '../../types/misc.js'
|
11
11
|
import type { AccessList } from '../../types/transaction.js'
|
12
12
|
import { type IsAddressErrorType, isAddress } from '../address/isAddress.js'
|
13
|
-
import {
|
13
|
+
import type { RecursiveArray } from '../encoding/toRlp.js'
|
14
14
|
|
15
15
|
export type SerializeAccessListErrorType =
|
16
16
|
| InvalidStorageKeySizeErrorType
|
package/utils/typedData.ts
CHANGED
@@ -47,7 +47,7 @@ export function validateTypedData<
|
|
47
47
|
// and will throw.
|
48
48
|
numberToHex(value, {
|
49
49
|
signed: base === 'int',
|
50
|
-
size: parseInt(size_) / 8,
|
50
|
+
size: Number.parseInt(size_) / 8,
|
51
51
|
})
|
52
52
|
}
|
53
53
|
|
@@ -57,9 +57,9 @@ export function validateTypedData<
|
|
57
57
|
const bytesMatch = type.match(bytesRegex)
|
58
58
|
if (bytesMatch) {
|
59
59
|
const [_type, size_] = bytesMatch
|
60
|
-
if (size_ && size(value as Hex) !== parseInt(size_))
|
60
|
+
if (size_ && size(value as Hex) !== Number.parseInt(size_))
|
61
61
|
throw new BytesSizeMismatchError({
|
62
|
-
expectedSize: parseInt(size_),
|
62
|
+
expectedSize: Number.parseInt(size_),
|
63
63
|
givenSize: size(value as Hex),
|
64
64
|
})
|
65
65
|
}
|