viem 0.0.0-main.20231026T214025 → 0.0.0-main.20231026T220458

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.
@@ -9,24 +9,26 @@ import type {
9
9
  RpcBlock,
10
10
  RpcLog as RpcLog_,
11
11
  RpcTransactionRequest as RpcTransactionRequest_,
12
- TransactionType,
13
12
  } from '../../types/rpc.js'
14
- import type {
15
- TransactionSerializable,
16
- TransactionSerializableEIP1559,
17
- TransactionSerialized,
18
- } from '../../types/transaction.js'
19
13
  import type {
20
14
  Transaction as Transaction_,
21
15
  TransactionBase,
22
- TransactionEIP2930,
23
- TransactionLegacy,
16
+ TransactionEIP1559 as TransactionEIP1559_,
17
+ TransactionEIP2930 as TransactionEIP2930_,
18
+ TransactionLegacy as TransactionLegacy_,
24
19
  TransactionReceipt,
25
20
  TransactionRequest as TransactionRequest_,
26
21
  TransactionRequestBase,
22
+ TransactionSerializable,
23
+ TransactionSerializableEIP1559,
24
+ TransactionSerialized,
25
+ TransactionType,
27
26
  } from '../../types/transaction.js'
28
27
  import type { UnionOmit } from '../../types/utils.js'
29
28
 
29
+ type EIP712Type = '0x71'
30
+ type PriorityType = '0xff'
31
+
30
32
  // Types
31
33
  // https://era.zksync.io/docs/api/js/types.html
32
34
 
@@ -101,9 +103,6 @@ export type ZkSyncFeeValues<TQuantity = bigint> = {
101
103
  maxPriorityFeePerGas: TQuantity
102
104
  }
103
105
 
104
- type EIP712Type = '0x71'
105
- type PriorityType = '0xff'
106
-
107
106
  // Block
108
107
  // https://era.zksync.io/docs/api/js/types.html#block
109
108
 
@@ -184,23 +183,20 @@ type RpcTransactionOverrides = {
184
183
  }
185
184
 
186
185
  type RpcTransactionLegacy<TPending extends boolean = boolean> =
187
- TransactionLegacy<Quantity, Index, TPending, '0x0'> & RpcTransactionOverrides
186
+ TransactionLegacy_<Hex, Hex, TPending, '0x0'> & RpcTransactionOverrides
188
187
 
189
188
  type RpcTransactionEIP2930<TPending extends boolean = boolean> =
190
- TransactionEIP2930<Quantity, Index, TPending, '0x1'> & RpcTransactionOverrides
189
+ TransactionEIP2930_<Hex, Hex, TPending, '0x1'> & RpcTransactionOverrides
191
190
 
192
- // Cannot use default EIP1559 transaction because the fee `gasPrice` parameter is set to `never`
193
191
  type RpcTransactionEIP1559<TPending extends boolean = boolean> =
194
- TransactionBase<Quantity, Index, TPending> &
195
- ZkSyncFeeValues<Quantity> &
196
- RpcTransactionOverrides & {
197
- type: '0x2'
198
- }
192
+ TransactionEIP1559_<Hex, Hex, TPending, '0x2'> & RpcTransactionOverrides
199
193
 
200
194
  export type ZkSyncRpcTransactionPriority<TPending extends boolean = boolean> =
201
195
  TransactionBase<Quantity, Index, TPending> &
202
196
  ZkSyncFeeValues<Quantity> &
203
197
  RpcTransactionOverrides & {
198
+ accessList?: undefined
199
+ chainId: Hex
204
200
  type: PriorityType
205
201
  }
206
202
 
@@ -208,6 +204,8 @@ export type ZkSyncRpcTransactionEIP712<TPending extends boolean = boolean> =
208
204
  TransactionBase<Quantity, Index, TPending> &
209
205
  ZkSyncFeeValues<Quantity> &
210
206
  RpcTransactionOverrides & {
207
+ accessList?: undefined
208
+ chainId: Hex
211
209
  type: EIP712Type
212
210
  }
213
211
 
@@ -284,7 +282,11 @@ export type ZkSyncTransactionReceiptOverrides = {
284
282
  logs: ZkSyncLog[]
285
283
  l2ToL1Logs: ZkSyncL2ToL1Log[]
286
284
  }
287
- export type ZkSyncTransactionReceipt = Omit<TransactionReceipt, 'logs'> &
285
+
286
+ export type ZkSyncTransactionReceipt<
287
+ TStatus = 'success' | 'reverted',
288
+ TType = ZkSyncTransactionType,
289
+ > = Omit<TransactionReceipt<bigint, number, TStatus, TType>, 'logs'> &
288
290
  ZkSyncTransactionReceiptOverrides
289
291
 
290
292
  // Serializers
package/errors/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '0.0.0-main.20231026T214025'
1
+ export const version = '0.0.0-main.20231026T220458'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "viem",
3
3
  "description": "TypeScript Interface for Ethereum",
4
- "version": "0.0.0-main.20231026T214025",
4
+ "version": "0.0.0-main.20231026T220458",
5
5
  "type": "module",
6
6
  "main": "./_cjs/index.js",
7
7
  "module": "./_esm/index.js",