viem 2.21.48 → 2.21.49

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/_cjs/accounts/index.js +2 -1
  3. package/_cjs/accounts/index.js.map +1 -1
  4. package/_cjs/accounts/utils/sign.js +8 -1
  5. package/_cjs/accounts/utils/sign.js.map +1 -1
  6. package/_cjs/actions/public/simulateContract.js.map +1 -1
  7. package/_cjs/chains/definitions/bitgert.js +6 -0
  8. package/_cjs/chains/definitions/bitgert.js.map +1 -1
  9. package/_cjs/chains/definitions/disChain.js +25 -0
  10. package/_cjs/chains/definitions/disChain.js.map +1 -0
  11. package/_cjs/chains/definitions/guruNetwork.js +32 -0
  12. package/_cjs/chains/definitions/guruNetwork.js.map +1 -0
  13. package/_cjs/chains/definitions/guruTestnet.js +2 -2
  14. package/_cjs/chains/definitions/guruTestnet.js.map +1 -1
  15. package/_cjs/chains/definitions/iSunCoin.js +25 -0
  16. package/_cjs/chains/definitions/iSunCoin.js.map +1 -0
  17. package/_cjs/chains/definitions/metadium.js +24 -0
  18. package/_cjs/chains/definitions/metadium.js.map +1 -0
  19. package/_cjs/chains/definitions/sixProtocol.js +26 -0
  20. package/_cjs/chains/definitions/sixProtocol.js.map +1 -0
  21. package/_cjs/chains/index.js +18 -7
  22. package/_cjs/chains/index.js.map +1 -1
  23. package/_cjs/errors/version.js +1 -1
  24. package/_cjs/zksync/formatters.js +3 -1
  25. package/_cjs/zksync/formatters.js.map +1 -1
  26. package/_esm/accounts/index.js +1 -1
  27. package/_esm/accounts/index.js.map +1 -1
  28. package/_esm/accounts/utils/sign.js +10 -1
  29. package/_esm/accounts/utils/sign.js.map +1 -1
  30. package/_esm/actions/public/simulateContract.js.map +1 -1
  31. package/_esm/chains/definitions/bitgert.js +6 -0
  32. package/_esm/chains/definitions/bitgert.js.map +1 -1
  33. package/_esm/chains/definitions/disChain.js +22 -0
  34. package/_esm/chains/definitions/disChain.js.map +1 -0
  35. package/_esm/chains/definitions/guruNetwork.js +29 -0
  36. package/_esm/chains/definitions/guruNetwork.js.map +1 -0
  37. package/_esm/chains/definitions/guruTestnet.js +2 -2
  38. package/_esm/chains/definitions/guruTestnet.js.map +1 -1
  39. package/_esm/chains/definitions/iSunCoin.js +22 -0
  40. package/_esm/chains/definitions/iSunCoin.js.map +1 -0
  41. package/_esm/chains/definitions/metadium.js +21 -0
  42. package/_esm/chains/definitions/metadium.js.map +1 -0
  43. package/_esm/chains/definitions/sixProtocol.js +23 -0
  44. package/_esm/chains/definitions/sixProtocol.js.map +1 -0
  45. package/_esm/chains/index.js +5 -0
  46. package/_esm/chains/index.js.map +1 -1
  47. package/_esm/errors/version.js +1 -1
  48. package/_esm/zksync/formatters.js +3 -1
  49. package/_esm/zksync/formatters.js.map +1 -1
  50. package/_types/accounts/index.d.ts +1 -1
  51. package/_types/accounts/index.d.ts.map +1 -1
  52. package/_types/accounts/utils/sign.d.ts +4 -0
  53. package/_types/accounts/utils/sign.d.ts.map +1 -1
  54. package/_types/actions/public/simulateContract.d.ts +6 -6
  55. package/_types/actions/public/simulateContract.d.ts.map +1 -1
  56. package/_types/chains/definitions/bitgert.d.ts +6 -10
  57. package/_types/chains/definitions/bitgert.d.ts.map +1 -1
  58. package/_types/chains/definitions/disChain.d.ts +37 -0
  59. package/_types/chains/definitions/disChain.d.ts.map +1 -0
  60. package/_types/chains/definitions/guruNetwork.d.ts +33 -0
  61. package/_types/chains/definitions/guruNetwork.d.ts.map +1 -0
  62. package/_types/chains/definitions/guruTestnet.d.ts +2 -2
  63. package/_types/chains/definitions/guruTestnet.d.ts.map +1 -1
  64. package/_types/chains/definitions/iSunCoin.d.ts +37 -0
  65. package/_types/chains/definitions/iSunCoin.d.ts.map +1 -0
  66. package/_types/chains/definitions/metadium.d.ts +37 -0
  67. package/_types/chains/definitions/metadium.d.ts.map +1 -0
  68. package/_types/chains/definitions/sixProtocol.d.ts +37 -0
  69. package/_types/chains/definitions/sixProtocol.d.ts.map +1 -0
  70. package/_types/chains/index.d.ts +5 -0
  71. package/_types/chains/index.d.ts.map +1 -1
  72. package/_types/errors/version.d.ts +1 -1
  73. package/_types/types/account.d.ts +1 -1
  74. package/_types/types/account.d.ts.map +1 -1
  75. package/_types/zksync/formatters.d.ts.map +1 -1
  76. package/_types/zksync/types/log.d.ts +1 -1
  77. package/_types/zksync/types/log.d.ts.map +1 -1
  78. package/accounts/index.ts +1 -0
  79. package/accounts/utils/sign.ts +15 -1
  80. package/actions/public/simulateContract.ts +9 -7
  81. package/chains/definitions/bitgert.ts +6 -0
  82. package/chains/definitions/disChain.ts +22 -0
  83. package/chains/definitions/guruNetwork.ts +29 -0
  84. package/chains/definitions/guruTestnet.ts +2 -2
  85. package/chains/definitions/iSunCoin.ts +22 -0
  86. package/chains/definitions/metadium.ts +21 -0
  87. package/chains/definitions/sixProtocol.ts +23 -0
  88. package/chains/index.ts +5 -0
  89. package/errors/version.ts +1 -1
  90. package/package.json +1 -1
  91. package/types/account.ts +2 -1
  92. package/zksync/formatters.ts +3 -1
  93. package/zksync/types/log.ts +1 -1
package/types/account.ts CHANGED
@@ -30,9 +30,10 @@ export type GetAccountParameter<
30
30
  >
31
31
 
32
32
  export type ParseAccount<
33
- accountOrAddress extends Account | Address | undefined =
33
+ accountOrAddress extends Account | Address | null | undefined =
34
34
  | Account
35
35
  | Address
36
+ | null
36
37
  | undefined,
37
38
  > = accountOrAddress extends Address
38
39
  ? Prettify<JsonRpcAccount<accountOrAddress>>
@@ -81,7 +81,9 @@ export const formatters = {
81
81
  return {
82
82
  blockNumber: hexToBigInt(l2ToL1Log.blockHash),
83
83
  blockHash: l2ToL1Log.blockHash,
84
- l1BatchNumber: hexToBigInt(l2ToL1Log.l1BatchNumber),
84
+ l1BatchNumber: l2ToL1Log.l1BatchNumber
85
+ ? hexToBigInt(l2ToL1Log.l1BatchNumber)
86
+ : null,
85
87
  transactionIndex: hexToBigInt(l2ToL1Log.transactionIndex),
86
88
  shardId: hexToBigInt(l2ToL1Log.shardId),
87
89
  isService: l2ToL1Log.isService,
@@ -45,7 +45,7 @@ export type ZksyncL2ToL1Log = {
45
45
  export type ZksyncRpcL2ToL1Log = {
46
46
  blockNumber: Hex
47
47
  blockHash: Hex
48
- l1BatchNumber: Hex
48
+ l1BatchNumber: Hex | null
49
49
  transactionIndex: Hex
50
50
  shardId: Hex
51
51
  isService: boolean