tempo.ts 0.10.5 → 0.11.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.
Files changed (203) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.md +0 -41
  3. package/dist/viem/Account.d.ts +8 -3
  4. package/dist/viem/Account.d.ts.map +1 -1
  5. package/dist/viem/Account.js +9 -2
  6. package/dist/viem/Account.js.map +1 -1
  7. package/dist/viem/Actions/account.d.ts.map +1 -1
  8. package/dist/viem/Actions/account.js +1 -1
  9. package/dist/viem/Actions/account.js.map +1 -1
  10. package/dist/viem/Actions/amm.d.ts +1 -1
  11. package/dist/viem/Actions/amm.d.ts.map +1 -1
  12. package/dist/viem/Actions/amm.js +1 -2
  13. package/dist/viem/Actions/amm.js.map +1 -1
  14. package/dist/viem/Actions/dex.d.ts +0 -35
  15. package/dist/viem/Actions/dex.d.ts.map +1 -1
  16. package/dist/viem/Actions/dex.js +0 -43
  17. package/dist/viem/Actions/dex.js.map +1 -1
  18. package/dist/viem/Actions/fee.d.ts +1 -1
  19. package/dist/viem/Actions/fee.d.ts.map +1 -1
  20. package/dist/viem/Actions/fee.js +1 -1
  21. package/dist/viem/Actions/fee.js.map +1 -1
  22. package/dist/viem/Actions/nonce.d.ts.map +1 -1
  23. package/dist/viem/Actions/nonce.js +6 -4
  24. package/dist/viem/Actions/nonce.js.map +1 -1
  25. package/dist/viem/Actions/token.d.ts +1 -2
  26. package/dist/viem/Actions/token.d.ts.map +1 -1
  27. package/dist/viem/Actions/token.js +1 -2
  28. package/dist/viem/Actions/token.js.map +1 -1
  29. package/dist/viem/Chain.d.ts +34 -34
  30. package/dist/viem/Chain.d.ts.map +1 -1
  31. package/dist/viem/Chain.js +2 -0
  32. package/dist/viem/Chain.js.map +1 -1
  33. package/dist/viem/Decorator.d.ts +0 -27
  34. package/dist/viem/Decorator.d.ts.map +1 -1
  35. package/dist/viem/Decorator.js +0 -1
  36. package/dist/viem/Decorator.js.map +1 -1
  37. package/dist/viem/Formatters.d.ts.map +1 -1
  38. package/dist/viem/Formatters.js +5 -3
  39. package/dist/viem/Formatters.js.map +1 -1
  40. package/dist/viem/Transaction.d.ts +8 -5
  41. package/dist/viem/Transaction.d.ts.map +1 -1
  42. package/dist/viem/Transaction.js +13 -3
  43. package/dist/viem/Transaction.js.map +1 -1
  44. package/dist/viem/index.d.ts +10 -1
  45. package/dist/viem/index.d.ts.map +1 -1
  46. package/dist/viem/index.js +1 -1
  47. package/dist/viem/index.js.map +1 -1
  48. package/dist/viem/internal/types.d.ts +1 -1
  49. package/dist/viem/internal/types.d.ts.map +1 -1
  50. package/dist/wagmi/Actions/dex.d.ts +1 -45
  51. package/dist/wagmi/Actions/dex.d.ts.map +1 -1
  52. package/dist/wagmi/Actions/dex.js +0 -55
  53. package/dist/wagmi/Actions/dex.js.map +1 -1
  54. package/dist/wagmi/Connector.d.ts +1 -1
  55. package/dist/wagmi/Connector.d.ts.map +1 -1
  56. package/dist/wagmi/Connector.js +1 -2
  57. package/dist/wagmi/Connector.js.map +1 -1
  58. package/dist/wagmi/Hooks/dex.d.ts +3 -46
  59. package/dist/wagmi/Hooks/dex.d.ts.map +1 -1
  60. package/dist/wagmi/Hooks/dex.js +2 -54
  61. package/dist/wagmi/Hooks/dex.js.map +1 -1
  62. package/dist/wagmi/index.d.ts +1 -1
  63. package/dist/wagmi/index.d.ts.map +1 -1
  64. package/dist/wagmi/index.js +1 -1
  65. package/dist/wagmi/index.js.map +1 -1
  66. package/package.json +5 -13
  67. package/src/viem/Account.test.ts +1 -1
  68. package/src/viem/Account.ts +11 -2
  69. package/src/viem/Actions/account.ts +1 -1
  70. package/src/viem/Actions/amm.ts +1 -2
  71. package/src/viem/Actions/dex.test.ts +1 -195
  72. package/src/viem/Actions/dex.ts +0 -53
  73. package/src/viem/Actions/fee.test.ts +2 -2
  74. package/src/viem/Actions/fee.ts +1 -1
  75. package/src/viem/Actions/nonce.test.ts +27 -14
  76. package/src/viem/Actions/nonce.ts +6 -4
  77. package/src/viem/Actions/token.test.ts +18 -52
  78. package/src/viem/Actions/token.ts +1 -2
  79. package/src/viem/Chain.ts +3 -1
  80. package/src/viem/Decorator.ts +0 -30
  81. package/src/viem/Formatters.ts +9 -3
  82. package/src/viem/Transaction.ts +23 -7
  83. package/src/viem/e2e.test.ts +19 -0
  84. package/src/viem/index.ts +12 -1
  85. package/src/viem/internal/types.ts +1 -1
  86. package/src/wagmi/Actions/dex.test.ts +0 -26
  87. package/src/wagmi/Actions/dex.ts +1 -111
  88. package/src/wagmi/Actions/nonce.test.ts +8 -4
  89. package/src/wagmi/Actions/token.test.ts +2 -2
  90. package/src/wagmi/Connector.ts +1 -2
  91. package/src/wagmi/Hooks/dex.test.ts +0 -26
  92. package/src/wagmi/Hooks/dex.ts +1 -88
  93. package/src/wagmi/Hooks/nonce.test.ts +3 -3
  94. package/src/wagmi/index.ts +4 -1
  95. package/dist/ox/AuthorizationTempo.d.ts +0 -450
  96. package/dist/ox/AuthorizationTempo.d.ts.map +0 -1
  97. package/dist/ox/AuthorizationTempo.js +0 -433
  98. package/dist/ox/AuthorizationTempo.js.map +0 -1
  99. package/dist/ox/KeyAuthorization.d.ts +0 -356
  100. package/dist/ox/KeyAuthorization.d.ts.map +0 -1
  101. package/dist/ox/KeyAuthorization.js +0 -359
  102. package/dist/ox/KeyAuthorization.js.map +0 -1
  103. package/dist/ox/Order.d.ts +0 -92
  104. package/dist/ox/Order.d.ts.map +0 -1
  105. package/dist/ox/Order.js +0 -88
  106. package/dist/ox/Order.js.map +0 -1
  107. package/dist/ox/OrdersFilters.d.ts +0 -72
  108. package/dist/ox/OrdersFilters.d.ts.map +0 -1
  109. package/dist/ox/OrdersFilters.js +0 -100
  110. package/dist/ox/OrdersFilters.js.map +0 -1
  111. package/dist/ox/Pagination.d.ts +0 -128
  112. package/dist/ox/Pagination.d.ts.map +0 -1
  113. package/dist/ox/Pagination.js +0 -78
  114. package/dist/ox/Pagination.js.map +0 -1
  115. package/dist/ox/PoolId.d.ts +0 -18
  116. package/dist/ox/PoolId.d.ts.map +0 -1
  117. package/dist/ox/PoolId.js +0 -13
  118. package/dist/ox/PoolId.js.map +0 -1
  119. package/dist/ox/RpcSchema.d.ts +0 -32
  120. package/dist/ox/RpcSchema.d.ts.map +0 -1
  121. package/dist/ox/RpcSchema.js +0 -2
  122. package/dist/ox/RpcSchema.js.map +0 -1
  123. package/dist/ox/SignatureEnvelope.d.ts +0 -260
  124. package/dist/ox/SignatureEnvelope.d.ts.map +0 -1
  125. package/dist/ox/SignatureEnvelope.js +0 -477
  126. package/dist/ox/SignatureEnvelope.js.map +0 -1
  127. package/dist/ox/Tick.d.ts +0 -115
  128. package/dist/ox/Tick.d.ts.map +0 -1
  129. package/dist/ox/Tick.js +0 -127
  130. package/dist/ox/Tick.js.map +0 -1
  131. package/dist/ox/TokenId.d.ts +0 -25
  132. package/dist/ox/TokenId.d.ts.map +0 -1
  133. package/dist/ox/TokenId.js +0 -41
  134. package/dist/ox/TokenId.js.map +0 -1
  135. package/dist/ox/TokenRole.d.ts +0 -11
  136. package/dist/ox/TokenRole.d.ts.map +0 -1
  137. package/dist/ox/TokenRole.js +0 -22
  138. package/dist/ox/TokenRole.js.map +0 -1
  139. package/dist/ox/Transaction.d.ts +0 -201
  140. package/dist/ox/Transaction.d.ts.map +0 -1
  141. package/dist/ox/Transaction.js +0 -167
  142. package/dist/ox/Transaction.js.map +0 -1
  143. package/dist/ox/TransactionEnvelopeTempo.d.ts +0 -470
  144. package/dist/ox/TransactionEnvelopeTempo.d.ts.map +0 -1
  145. package/dist/ox/TransactionEnvelopeTempo.js +0 -547
  146. package/dist/ox/TransactionEnvelopeTempo.js.map +0 -1
  147. package/dist/ox/TransactionReceipt.d.ts +0 -155
  148. package/dist/ox/TransactionReceipt.d.ts.map +0 -1
  149. package/dist/ox/TransactionReceipt.js +0 -136
  150. package/dist/ox/TransactionReceipt.js.map +0 -1
  151. package/dist/ox/TransactionRequest.d.ts +0 -76
  152. package/dist/ox/TransactionRequest.d.ts.map +0 -1
  153. package/dist/ox/TransactionRequest.js +0 -93
  154. package/dist/ox/TransactionRequest.js.map +0 -1
  155. package/dist/ox/index.d.ts +0 -14
  156. package/dist/ox/index.d.ts.map +0 -1
  157. package/dist/ox/index.js +0 -14
  158. package/dist/ox/index.js.map +0 -1
  159. package/dist/prool/Instance.d.ts +0 -101
  160. package/dist/prool/Instance.d.ts.map +0 -1
  161. package/dist/prool/Instance.js +0 -136
  162. package/dist/prool/Instance.js.map +0 -1
  163. package/dist/prool/chain.json +0 -238
  164. package/dist/prool/index.d.ts +0 -2
  165. package/dist/prool/index.d.ts.map +0 -1
  166. package/dist/prool/index.js +0 -2
  167. package/dist/prool/index.js.map +0 -1
  168. package/src/ox/AuthorizationTempo.test.ts +0 -1256
  169. package/src/ox/AuthorizationTempo.ts +0 -648
  170. package/src/ox/KeyAuthorization.test.ts +0 -1332
  171. package/src/ox/KeyAuthorization.ts +0 -540
  172. package/src/ox/Order.test.ts +0 -78
  173. package/src/ox/Order.ts +0 -125
  174. package/src/ox/OrdersFilters.test.ts +0 -182
  175. package/src/ox/OrdersFilters.ts +0 -125
  176. package/src/ox/Pagination.test.ts +0 -162
  177. package/src/ox/Pagination.ts +0 -164
  178. package/src/ox/PoolId.test.ts +0 -33
  179. package/src/ox/PoolId.ts +0 -27
  180. package/src/ox/RpcSchema.ts +0 -35
  181. package/src/ox/SignatureEnvelope.test.ts +0 -1876
  182. package/src/ox/SignatureEnvelope.ts +0 -791
  183. package/src/ox/Tick.test.ts +0 -281
  184. package/src/ox/Tick.ts +0 -181
  185. package/src/ox/TokenId.test.ts +0 -40
  186. package/src/ox/TokenId.ts +0 -50
  187. package/src/ox/TokenRole.test.ts +0 -16
  188. package/src/ox/TokenRole.ts +0 -27
  189. package/src/ox/Transaction.test.ts +0 -523
  190. package/src/ox/Transaction.ts +0 -332
  191. package/src/ox/TransactionEnvelopeTempo.test.ts +0 -1352
  192. package/src/ox/TransactionEnvelopeTempo.ts +0 -905
  193. package/src/ox/TransactionReceipt.ts +0 -190
  194. package/src/ox/TransactionRequest.ts +0 -147
  195. package/src/ox/e2e.test.ts +0 -1393
  196. package/src/ox/index.ts +0 -13
  197. package/src/prool/Instance.test.ts +0 -43
  198. package/src/prool/Instance.ts +0 -247
  199. package/src/prool/chain.json +0 -238
  200. package/src/prool/index.ts +0 -1
  201. package/src/viem/Actions/__snapshots__/dex.test.ts.snap +0 -850
  202. package/src/wagmi/Actions/__snapshots__/dex.test.ts.snap +0 -310
  203. package/src/wagmi/Hooks/__snapshots__/dex.test.ts.snap +0 -457
@@ -25,9 +25,6 @@ import {
25
25
  writeContractSync,
26
26
  } from 'viem/actions'
27
27
  import type { Compute, UnionOmit } from '../../internal/types.js'
28
- import * as Order from '../../ox/Order.js'
29
- import * as OrdersFilters from '../../ox/OrdersFilters.js'
30
- import * as Pagination from '../../ox/Pagination.js'
31
28
  import * as Abis from '../Abis.js'
32
29
  import * as Addresses from '../Addresses.js'
33
30
  import type {
@@ -826,56 +823,6 @@ export namespace getOrder {
826
823
  }
827
824
  }
828
825
 
829
- /**
830
- * Gets paginated orders from the orderbook.
831
- *
832
- * @example
833
- * ```ts
834
- * import { createClient, http } from 'viem'
835
- * import { tempo } from 'tempo.ts/chains'
836
- * import { Actions } from 'tempo.ts/viem'
837
- *
838
- * const client = createClient({
839
- * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
840
- * transport: http(),
841
- * })
842
- *
843
- * const { items, nextCursor } = await Actions.dex.getOrders(client, {
844
- * limit: 100,
845
- * filters: {
846
- * baseToken: '0x20c0...',
847
- * isBid: true,
848
- * }
849
- * })
850
- * ```
851
- *
852
- * @param client - Client.
853
- * @param parameters - Parameters.
854
- * @returns Paginated orders and next cursor.
855
- */
856
- export async function getOrders<chain extends Chain | undefined>(
857
- client: Client<Transport, chain>,
858
- parameters: getOrders.Parameters = {},
859
- ): Promise<getOrders.ReturnValue> {
860
- const params = Pagination.toRpcParameters(parameters, {
861
- toRpcFilters: OrdersFilters.toRpc,
862
- })
863
- const response = await client.request<any>({
864
- method: 'dex_getOrders',
865
- params: [params],
866
- })
867
- return Pagination.fromRpcResponse(response, {
868
- key: 'orders',
869
- fromRpc: Order.fromRpc,
870
- })
871
- }
872
-
873
- export namespace getOrders {
874
- export type Parameters = Pagination.Params<OrdersFilters.OrdersFilters>
875
-
876
- export type ReturnValue = Pagination.Response<'orders', Order.Order>
877
- }
878
-
879
826
  /**
880
827
  * Gets orderbook information for a trading pair.
881
828
  *
@@ -158,7 +158,7 @@ describe('watchSetUserToken', async () => {
158
158
  token: '0x20c0000000000000000000000000000000000002',
159
159
  })
160
160
 
161
- await setTimeout(100)
161
+ await setTimeout(500)
162
162
 
163
163
  expect(receivedSets).toHaveLength(2)
164
164
 
@@ -230,7 +230,7 @@ describe('watchSetUserToken', async () => {
230
230
  token: 2n,
231
231
  })
232
232
 
233
- await setTimeout(100)
233
+ await setTimeout(500)
234
234
 
235
235
  // Should only receive 2 events (for account2)
236
236
  expect(receivedSets).toHaveLength(2)
@@ -1,3 +1,4 @@
1
+ import { TokenId } from 'ox/tempo'
1
2
  import {
2
3
  type Account,
3
4
  type Address,
@@ -23,7 +24,6 @@ import {
23
24
  writeContractSync,
24
25
  } from 'viem/actions'
25
26
  import type { Compute, UnionOmit } from '../../internal/types.js'
26
- import * as TokenId from '../../ox/TokenId.js'
27
27
  import * as Abis from '../Abis.js'
28
28
  import * as Addresses from '../Addresses.js'
29
29
  import type {
@@ -1,5 +1,5 @@
1
1
  import { setTimeout } from 'node:timers/promises'
2
- import { afterEach, describe, expect, test } from 'vitest'
2
+ import { beforeEach, describe, expect, test } from 'vitest'
3
3
  import { rpcUrl } from '../../../test/config.js'
4
4
  import { accounts, clientWithAccount } from '../../../test/viem/config.js'
5
5
  import * as actions from './index.js'
@@ -7,7 +7,7 @@ import * as actions from './index.js'
7
7
  const account = accounts[0]
8
8
  const account2 = accounts[1]
9
9
 
10
- afterEach(async () => {
10
+ beforeEach(async () => {
11
11
  await fetch(`${rpcUrl}/restart`)
12
12
  })
13
13
 
@@ -19,7 +19,7 @@ describe('getNonce', () => {
19
19
  nonceKey: 1n,
20
20
  })
21
21
 
22
- expect(nonce).toBe(1n)
22
+ expect(nonce).toBe(0n)
23
23
  })
24
24
 
25
25
  test('behavior: different nonce keys are independent', async () => {
@@ -32,8 +32,8 @@ describe('getNonce', () => {
32
32
  nonceKey: 2n,
33
33
  })
34
34
 
35
- expect(nonce1).toBe(1n)
36
- expect(nonce2).toBe(1n)
35
+ expect(nonce1).toBe(0n)
36
+ expect(nonce2).toBe(0n)
37
37
 
38
38
  await actions.token.transferSync(clientWithAccount, {
39
39
  to: account2.address,
@@ -52,11 +52,17 @@ describe('getNonce', () => {
52
52
  })
53
53
 
54
54
  // nonceKey 2 should be incremented to 2
55
- expect(nonce1).toBe(1n)
56
- expect(nonce2).toBe(2n)
55
+ expect(nonce1).toBe(0n)
56
+ expect(nonce2).toBe(1n)
57
57
  })
58
58
 
59
59
  test('behavior: different accounts are independent', async () => {
60
+ await actions.token.transferSync(clientWithAccount, {
61
+ to: account2.address,
62
+ amount: 1n,
63
+ token: 1n,
64
+ nonceKey: 1n,
65
+ })
60
66
  const nonce1 = await actions.nonce.getNonce(clientWithAccount, {
61
67
  account: account.address,
62
68
  nonceKey: 1n,
@@ -66,9 +72,8 @@ describe('getNonce', () => {
66
72
  nonceKey: 1n,
67
73
  })
68
74
 
69
- // Both should return bigint values
70
75
  expect(nonce1).toBe(1n)
71
- expect(nonce2).toBe(1n)
76
+ expect(nonce2).toBe(0n)
72
77
  })
73
78
  })
74
79
 
@@ -76,7 +81,7 @@ describe('getNonceKeyCount', () => {
76
81
  test('default', async () => {
77
82
  // Get active nonce key count for a fresh account
78
83
  const count = await actions.nonce.getNonceKeyCount(clientWithAccount, {
79
- account: account.address,
84
+ account: accounts.at(10)!.address,
80
85
  })
81
86
 
82
87
  // Fresh account should have 0 active nonce keys
@@ -85,10 +90,10 @@ describe('getNonceKeyCount', () => {
85
90
 
86
91
  test('behavior: different accounts are independent', async () => {
87
92
  const count1 = await actions.nonce.getNonceKeyCount(clientWithAccount, {
88
- account: account.address,
93
+ account: accounts.at(10)!.address,
89
94
  })
90
95
  const count2 = await actions.nonce.getNonceKeyCount(clientWithAccount, {
91
- account: account2.address,
96
+ account: accounts.at(11)!.address,
92
97
  })
93
98
 
94
99
  // Both should be 0 for fresh accounts
@@ -161,6 +166,13 @@ describe('watchActiveKeyCountChanged', () => {
161
166
  },
162
167
  )
163
168
 
169
+ const priorKeyCount = await actions.nonce.getNonceKeyCount(
170
+ clientWithAccount,
171
+ {
172
+ account: account.address,
173
+ },
174
+ )
175
+
164
176
  try {
165
177
  // First use of nonceKey 10 should increment active key count
166
178
  await actions.token.transferSync(clientWithAccount, {
@@ -184,8 +196,9 @@ describe('watchActiveKeyCountChanged', () => {
184
196
 
185
197
  expect(events).toHaveLength(2)
186
198
  expect(events[0]!.args.account).toBe(account.address)
187
- expect(events[0]!.args.newCount).toBe(1n)
188
- expect(events[1]!.args.newCount).toBe(2n)
199
+ // Assert the number of new active keys
200
+ expect(events[0]!.args.newCount - priorKeyCount).toBe(1n)
201
+ expect(events[1]!.args.newCount - priorKeyCount).toBe(2n)
189
202
  } finally {
190
203
  unwatch()
191
204
  }
@@ -48,9 +48,10 @@ export async function getNonce<
48
48
  client: Client<Transport, chain, account>,
49
49
  parameters: getNonce.Parameters,
50
50
  ): Promise<getNonce.ReturnValue> {
51
+ const { account, nonceKey, ...rest } = parameters
51
52
  return readContract(client, {
52
- ...parameters,
53
- ...getNonce.call(parameters),
53
+ ...rest,
54
+ ...getNonce.call({ account, nonceKey }),
54
55
  })
55
56
  }
56
57
 
@@ -141,9 +142,10 @@ export async function getNonceKeyCount<
141
142
  client: Client<Transport, chain, account>,
142
143
  parameters: getNonceKeyCount.Parameters,
143
144
  ): Promise<getNonceKeyCount.ReturnValue> {
145
+ const { account, ...rest } = parameters
144
146
  return readContract(client, {
145
- ...parameters,
146
- ...getNonceKeyCount.call(parameters),
147
+ ...rest,
148
+ ...getNonceKeyCount.call({ account }),
147
149
  })
148
150
  }
149
151
 
@@ -1,6 +1,6 @@
1
1
  import { setTimeout } from 'node:timers/promises'
2
2
  import { Hex } from 'ox'
3
- import { TokenRole } from 'tempo.ts/ox'
3
+ import { TokenRole } from 'ox/tempo'
4
4
  import { Abis, Addresses, TokenIds } from 'tempo.ts/viem'
5
5
  import { parseUnits } from 'viem'
6
6
  import { getCode, writeContractSync } from 'viem/actions'
@@ -325,7 +325,7 @@ describe('getMetadata', () => {
325
325
  "quoteToken": "0x20C0000000000000000000000000000000000000",
326
326
  "supplyCap": 340282366920938463463374607431768211455n,
327
327
  "symbol": "AlphaUSD",
328
- "totalSupply": 36893488147419103230n,
328
+ "totalSupply": 202914184810805067765n,
329
329
  "transferPolicyId": 1n,
330
330
  }
331
331
  `)
@@ -369,7 +369,7 @@ describe('getMetadata', () => {
369
369
  "decimals": 6,
370
370
  "name": "pathUSD",
371
371
  "symbol": "pathUSD",
372
- "totalSupply": 18446744073709551615n,
372
+ "totalSupply": 184467440737095516150n,
373
373
  }
374
374
  `)
375
375
  }
@@ -385,7 +385,7 @@ describe('getMetadata', () => {
385
385
  "decimals": 6,
386
386
  "name": "pathUSD",
387
387
  "symbol": "pathUSD",
388
- "totalSupply": 18446744073709551615n,
388
+ "totalSupply": 184467440737095516150n,
389
389
  }
390
390
  `)
391
391
  }
@@ -1930,43 +1930,9 @@ describe('watchCreate', () => {
1930
1930
  symbol: 'WATCH2',
1931
1931
  })
1932
1932
 
1933
- await setTimeout(100)
1933
+ await setTimeout(500)
1934
1934
 
1935
1935
  expect(receivedTokens).toHaveLength(2)
1936
-
1937
- const {
1938
- token: token1,
1939
- tokenId: tokenId1,
1940
- ...rest1
1941
- } = receivedTokens.at(0)!.args
1942
- expect(rest1).toMatchInlineSnapshot(`
1943
- {
1944
- "admin": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
1945
- "currency": "USD",
1946
- "name": "Watch Test Token 1",
1947
- "quoteToken": "0x20C0000000000000000000000000000000000000",
1948
- "symbol": "WATCH1",
1949
- }
1950
- `)
1951
- expect(token1).toBeDefined()
1952
- expect(tokenId1).toBeDefined()
1953
-
1954
- const {
1955
- token: token2,
1956
- tokenId: tokenId2,
1957
- ...rest2
1958
- } = receivedTokens.at(1)!.args
1959
- expect(rest2).toMatchInlineSnapshot(`
1960
- {
1961
- "admin": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
1962
- "currency": "USD",
1963
- "name": "Watch Test Token 2",
1964
- "quoteToken": "0x20C0000000000000000000000000000000000000",
1965
- "symbol": "WATCH2",
1966
- }
1967
- `)
1968
- expect(token2).toBeDefined()
1969
- expect(tokenId2).toBeDefined()
1970
1936
  } finally {
1971
1937
  // Clean up watcher
1972
1938
  if (unwatch) unwatch()
@@ -2027,7 +1993,7 @@ describe('watchCreate', () => {
2027
1993
  symbol: 'FWATCH3',
2028
1994
  })
2029
1995
 
2030
- await setTimeout(100)
1996
+ await setTimeout(500)
2031
1997
 
2032
1998
  // Should only receive 1 event (for targetTokenId)
2033
1999
  expect(receivedTokens).toHaveLength(1)
@@ -2100,7 +2066,7 @@ describe('watchMint', () => {
2100
2066
  amount: parseUnits('50', 6),
2101
2067
  })
2102
2068
 
2103
- await setTimeout(100)
2069
+ await setTimeout(500)
2104
2070
 
2105
2071
  expect(receivedMints).toHaveLength(2)
2106
2072
 
@@ -2177,7 +2143,7 @@ describe('watchMint', () => {
2177
2143
  amount: parseUnits('75', 6),
2178
2144
  })
2179
2145
 
2180
- await setTimeout(100)
2146
+ await setTimeout(500)
2181
2147
 
2182
2148
  // Should only receive 2 events (for account2)
2183
2149
  expect(receivedMints).toHaveLength(2)
@@ -2245,7 +2211,7 @@ describe('watchApprove', () => {
2245
2211
  amount: parseUnits('50', 6),
2246
2212
  })
2247
2213
 
2248
- await setTimeout(100)
2214
+ await setTimeout(500)
2249
2215
 
2250
2216
  expect(receivedApprovals).toHaveLength(2)
2251
2217
 
@@ -2317,7 +2283,7 @@ describe('watchApprove', () => {
2317
2283
  amount: parseUnits('75', 6),
2318
2284
  })
2319
2285
 
2320
- await setTimeout(100)
2286
+ await setTimeout(500)
2321
2287
 
2322
2288
  // Should only receive 2 events (for account2)
2323
2289
  expect(receivedApprovals).toHaveLength(2)
@@ -2421,7 +2387,7 @@ describe('watchBurn', () => {
2421
2387
  amount: parseUnits('25', 6),
2422
2388
  })
2423
2389
 
2424
- await setTimeout(100)
2390
+ await setTimeout(500)
2425
2391
 
2426
2392
  expect(receivedBurns).toHaveLength(2)
2427
2393
 
@@ -2524,7 +2490,7 @@ describe('watchBurn', () => {
2524
2490
  amount: parseUnits('75', 6),
2525
2491
  })
2526
2492
 
2527
- await setTimeout(100)
2493
+ await setTimeout(500)
2528
2494
 
2529
2495
  // Should only receive 2 events (from clientWithAccount.account)
2530
2496
  expect(receivedBurns).toHaveLength(2)
@@ -2605,7 +2571,7 @@ describe('watchAdminRole', () => {
2605
2571
  adminRole: 'unpause',
2606
2572
  })
2607
2573
 
2608
- await setTimeout(100)
2574
+ await setTimeout(500)
2609
2575
 
2610
2576
  expect(receivedAdminUpdates).toHaveLength(2)
2611
2577
 
@@ -2668,7 +2634,7 @@ describe('watchRole', () => {
2668
2634
  from: account2.address,
2669
2635
  })
2670
2636
 
2671
- await setTimeout(100)
2637
+ await setTimeout(500)
2672
2638
 
2673
2639
  expect(receivedRoleUpdates).toHaveLength(3)
2674
2640
 
@@ -2740,7 +2706,7 @@ describe('watchRole', () => {
2740
2706
  from: account2.address,
2741
2707
  })
2742
2708
 
2743
- await setTimeout(100)
2709
+ await setTimeout(500)
2744
2710
 
2745
2711
  // Should only receive 2 events (for account2)
2746
2712
  expect(receivedRoleUpdates).toHaveLength(2)
@@ -2909,7 +2875,7 @@ describe('watchTransfer', () => {
2909
2875
  amount: parseUnits('75', 6),
2910
2876
  })
2911
2877
 
2912
- await setTimeout(100)
2878
+ await setTimeout(500)
2913
2879
 
2914
2880
  // Should only receive 2 events (to account2)
2915
2881
  expect(receivedTransfers).toHaveLength(2)
@@ -2986,7 +2952,7 @@ describe('watchUpdateQuoteToken', () => {
2986
2952
  token: address,
2987
2953
  })
2988
2954
 
2989
- await setTimeout(100)
2955
+ await setTimeout(500)
2990
2956
 
2991
2957
  // Should receive 2 events: one for update, one for finalized
2992
2958
  expect(receivedUpdates).toHaveLength(2)
@@ -3050,7 +3016,7 @@ describe('watchUpdateQuoteToken', () => {
3050
3016
  quoteToken: quoteTokenAddress,
3051
3017
  })
3052
3018
 
3053
- await setTimeout(100)
3019
+ await setTimeout(500)
3054
3020
 
3055
3021
  // Should only receive 1 event (not finalized)
3056
3022
  expect(receivedUpdates).toHaveLength(1)
@@ -1,4 +1,5 @@
1
1
  import * as Hex from 'ox/Hex'
2
+ import { TokenId, TokenRole } from 'ox/tempo'
2
3
  import {
3
4
  type Account,
4
5
  type Address,
@@ -30,8 +31,6 @@ import {
30
31
  writeContractSync,
31
32
  } from 'viem/actions'
32
33
  import type { Compute, OneOf, UnionOmit } from '../../internal/types.js'
33
- import * as TokenId from '../../ox/TokenId.js'
34
- import * as TokenRole from '../../ox/TokenRole.js'
35
34
  import * as Abis from '../Abis.js'
36
35
  import * as Addresses from '../Addresses.js'
37
36
  import type {
package/src/viem/Chain.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as Hex from 'ox/Hex'
2
+ import { TokenId } from 'ox/tempo'
2
3
  import {
3
4
  defineTransaction,
4
5
  defineTransactionReceipt,
@@ -7,7 +8,6 @@ import {
7
8
  type Chain as viem_Chain,
8
9
  } from 'viem'
9
10
  import type { IsUndefined } from '../internal/types.js'
10
- import type * as TokenId from '../ox/TokenId.js'
11
11
  import * as Formatters from './Formatters.js'
12
12
  import * as Transaction from './Transaction.js'
13
13
 
@@ -133,6 +133,8 @@ export function define<const chain extends viem_Chain>(
133
133
  ) as never
134
134
  }
135
135
 
136
+ export { TokenId }
137
+
136
138
  export declare namespace define {
137
139
  type Properties = {
138
140
  /**
@@ -630,35 +630,6 @@ export type Decorator<
630
630
  getOrder: (
631
631
  parameters: dexActions.getOrder.Parameters,
632
632
  ) => Promise<dexActions.getOrder.ReturnValue>
633
- /**
634
- * Gets paginated orders from the orderbook.
635
- *
636
- * @example
637
- * ```ts
638
- * import { createClient, http } from 'viem'
639
- * import { tempo } from 'tempo.ts/chains'
640
- * import { tempoActions } from 'tempo.ts/viem'
641
- *
642
- * const client = createClient({
643
- * chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
644
- * transport: http(),
645
- * }).extend(tempoActions())
646
- *
647
- * const { orders, nextCursor } = await client.dex.getOrders({
648
- * limit: 100,
649
- * filters: {
650
- * baseToken: '0x20c0...',
651
- * isBid: true,
652
- * }
653
- * })
654
- * ```
655
- *
656
- * @param parameters - Parameters.
657
- * @returns Paginated orders and next cursor.
658
- */
659
- getOrders: (
660
- parameters?: dexActions.getOrders.Parameters,
661
- ) => Promise<dexActions.getOrders.ReturnValue>
662
633
  /**
663
634
  * Gets the price level information at a specific tick.
664
635
  *
@@ -3055,7 +3026,6 @@ export function decorator() {
3055
3026
  getBalance: (parameters) => dexActions.getBalance(client, parameters),
3056
3027
  getBuyQuote: (parameters) => dexActions.getBuyQuote(client, parameters),
3057
3028
  getOrder: (parameters) => dexActions.getOrder(client, parameters),
3058
- getOrders: (parameters) => dexActions.getOrders(client, parameters),
3059
3029
  getTickLevel: (parameters) =>
3060
3030
  dexActions.getTickLevel(client, parameters),
3061
3031
  getSellQuote: (parameters) =>
@@ -1,6 +1,10 @@
1
1
  // TODO: Find opportunities to make this file less duplicated + more simplified with Viem v3.
2
2
 
3
3
  import * as Hex from 'ox/Hex'
4
+ import {
5
+ Transaction as ox_Transaction,
6
+ TransactionRequest as ox_TransactionRequest,
7
+ } from 'ox/tempo'
4
8
  import {
5
9
  type Chain,
6
10
  type Account as viem_Account,
@@ -10,8 +14,6 @@ import {
10
14
  } from 'viem'
11
15
  import { type Address, parseAccount } from 'viem/accounts'
12
16
  import type { UnionOmit } from '../internal/types.js'
13
- import * as ox_Transaction from '../ox/Transaction.js'
14
- import * as ox_TransactionRequest from '../ox/TransactionRequest.js'
15
17
  import type { Account } from './Account.js'
16
18
  import type { GetFeeTokenParameter } from './internal/types.js'
17
19
  import {
@@ -91,7 +93,11 @@ export function formatTransactionRequest<chain extends Chain | undefined>(
91
93
  if (action)
92
94
  request.calls = request.calls ?? [
93
95
  {
94
- to: r.to || '0x0000000000000000000000000000000000000000',
96
+ to:
97
+ r.to ||
98
+ (!r.data || r.data === '0x'
99
+ ? '0x0000000000000000000000000000000000000000'
100
+ : undefined),
95
101
  value: r.value,
96
102
  data: r.data,
97
103
  },
@@ -3,6 +3,13 @@
3
3
  import * as Hex from 'ox/Hex'
4
4
  import * as Secp256k1 from 'ox/Secp256k1'
5
5
  import * as Signature from 'ox/Signature'
6
+ import {
7
+ type AuthorizationTempo,
8
+ type KeyAuthorization,
9
+ type TransactionReceipt as ox_TransactionReceipt,
10
+ SignatureEnvelope,
11
+ TxEnvelopeTempo as TxTempo,
12
+ } from 'ox/tempo'
6
13
  import {
7
14
  type AccessList,
8
15
  type Account,
@@ -27,11 +34,6 @@ import {
27
34
  type TransactionType as viem_TransactionType,
28
35
  } from 'viem'
29
36
  import type { ExactPartial, OneOf, PartialBy } from '../internal/types.js'
30
- import type * as AuthorizationTempo from '../ox/AuthorizationTempo.js'
31
- import type * as KeyAuthorization from '../ox/KeyAuthorization.js'
32
- import * as SignatureEnvelope from '../ox/SignatureEnvelope.js'
33
- import * as TxTempo from '../ox/TransactionEnvelopeTempo.js'
34
- import type * as ox_TransactionReceipt from '../ox/TransactionReceipt.js'
35
37
 
36
38
  export type Transaction<
37
39
  bigintType = bigint,
@@ -294,7 +296,11 @@ async function serializeTempo(
294
296
  ? rest.calls
295
297
  : [
296
298
  {
297
- to: rest.to || '0x0000000000000000000000000000000000000000',
299
+ to:
300
+ rest.to ||
301
+ (!rest.data || rest.data === '0x'
302
+ ? '0x0000000000000000000000000000000000000000'
303
+ : undefined),
298
304
  value: rest.value,
299
305
  data: rest.data,
300
306
  },
@@ -311,7 +317,7 @@ async function serializeTempo(
311
317
  : undefined,
312
318
  type: 'tempo',
313
319
  ...(nonce ? { nonce: BigInt(nonce) } : {}),
314
- } satisfies TxTempo.TransactionEnvelopeTempo
320
+ } satisfies TxTempo.TxEnvelopeTempo
315
321
 
316
322
  if (signature && typeof transaction.feePayer === 'object') {
317
323
  const tx = TxTempo.from(transaction_ox, {
@@ -364,3 +370,13 @@ async function serializeTempo(
364
370
  },
365
371
  )
366
372
  }
373
+
374
+ // Export types required for inference.
375
+ export {
376
+ /** @deprecated */
377
+ KeyAuthorization as z_KeyAuthorization,
378
+ /** @deprecated */
379
+ SignatureEnvelope as z_SignatureEnvelope,
380
+ /** @deprecated */
381
+ TxEnvelopeTempo as z_TxEnvelopeTempo,
382
+ } from 'ox/tempo'
@@ -270,6 +270,25 @@ describe('sendTransaction', () => {
270
270
  expect(receipt).toBeDefined()
271
271
  }
272
272
  })
273
+
274
+ test('behavior: deploy contract', async () => {
275
+ const account = accounts[0]
276
+ const receipt = await client.sendTransactionSync({
277
+ account,
278
+ data: '0x608060405234801561001057600080fd5b50610ee0806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e1461025a578063bce38bd714610275578063c3077fa914610288578063ee82ac5e1461029b57600080fd5b80634d2301cc146101ec57806372425d9d1461022157806382ad56cb1461023457806386d516e81461024757600080fd5b80633408e470116100c65780633408e47014610191578063399542e9146101a45780633e64a696146101c657806342cbb15c146101d957600080fd5b80630f28c97d146100f8578063174dea711461011a578063252dba421461013a57806327e86d6e1461015b575b600080fd5b34801561010457600080fd5b50425b6040519081526020015b60405180910390f35b61012d610128366004610a85565b6102ba565b6040516101119190610bbe565b61014d610148366004610a85565b6104ef565b604051610111929190610bd8565b34801561016757600080fd5b50437fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0140610107565b34801561019d57600080fd5b5046610107565b6101b76101b2366004610c60565b610690565b60405161011193929190610cba565b3480156101d257600080fd5b5048610107565b3480156101e557600080fd5b5043610107565b3480156101f857600080fd5b50610107610207366004610ce2565b73ffffffffffffffffffffffffffffffffffffffff163190565b34801561022d57600080fd5b5044610107565b61012d610242366004610a85565b6106ab565b34801561025357600080fd5b5045610107565b34801561026657600080fd5b50604051418152602001610111565b61012d610283366004610c60565b61085a565b6101b7610296366004610a85565b610a1a565b3480156102a757600080fd5b506101076102b6366004610d18565b4090565b60606000828067ffffffffffffffff8111156102d8576102d8610d31565b60405190808252806020026020018201604052801561031e57816020015b6040805180820190915260008152606060208201528152602001906001900390816102f65790505b5092503660005b8281101561047757600085828151811061034157610341610d60565b6020026020010151905087878381811061035d5761035d610d60565b905060200281019061036f9190610d8f565b6040810135958601959093506103886020850185610ce2565b73ffffffffffffffffffffffffffffffffffffffff16816103ac6060870187610dcd565b6040516103ba929190610e32565b60006040518083038185875af1925050503d80600081146103f7576040519150601f19603f3d011682016040523d82523d6000602084013e6103fc565b606091505b50602080850191909152901515808452908501351761046d577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b5050600101610325565b508234146104e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4d756c746963616c6c333a2076616c7565206d69736d6174636800000000000060448201526064015b60405180910390fd5b50505092915050565b436060828067ffffffffffffffff81111561050c5761050c610d31565b60405190808252806020026020018201604052801561053f57816020015b606081526020019060019003908161052a5790505b5091503660005b8281101561068657600087878381811061056257610562610d60565b90506020028101906105749190610e42565b92506105836020840184610ce2565b73ffffffffffffffffffffffffffffffffffffffff166105a66020850185610dcd565b6040516105b4929190610e32565b6000604051808303816000865af19150503d80600081146105f1576040519150601f19603f3d011682016040523d82523d6000602084013e6105f6565b606091505b5086848151811061060957610609610d60565b602090810291909101015290508061067d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060448201526064016104dd565b50600101610546565b5050509250929050565b43804060606106a086868661085a565b905093509350939050565b6060818067ffffffffffffffff8111156106c7576106c7610d31565b60405190808252806020026020018201604052801561070d57816020015b6040805180820190915260008152606060208201528152602001906001900390816106e55790505b5091503660005b828110156104e657600084828151811061073057610730610d60565b6020026020010151905086868381811061074c5761074c610d60565b905060200281019061075e9190610e76565b925061076d6020840184610ce2565b73ffffffffffffffffffffffffffffffffffffffff166107906040850185610dcd565b60405161079e929190610e32565b6000604051808303816000865af19150503d80600081146107db576040519150601f19603f3d011682016040523d82523d6000602084013e6107e0565b606091505b506020808401919091529015158083529084013517610851577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b50600101610714565b6060818067ffffffffffffffff81111561087657610876610d31565b6040519080825280602002602001820160405280156108bc57816020015b6040805180820190915260008152606060208201528152602001906001900390816108945790505b5091503660005b82811015610a105760008482815181106108df576108df610d60565b602002602001015190508686838181106108fb576108fb610d60565b905060200281019061090d9190610e42565b925061091c6020840184610ce2565b73ffffffffffffffffffffffffffffffffffffffff1661093f6020850185610dcd565b60405161094d929190610e32565b6000604051808303816000865af19150503d806000811461098a576040519150601f19603f3d011682016040523d82523d6000602084013e61098f565b606091505b506020830152151581528715610a07578051610a07576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060448201526064016104dd565b506001016108c3565b5050509392505050565b6000806060610a2b60018686610690565b919790965090945092505050565b60008083601f840112610a4b57600080fd5b50813567ffffffffffffffff811115610a6357600080fd5b6020830191508360208260051b8501011115610a7e57600080fd5b9250929050565b60008060208385031215610a9857600080fd5b823567ffffffffffffffff811115610aaf57600080fd5b610abb85828601610a39565b90969095509350505050565b6000815180845260005b81811015610aed57602081850181015186830182015201610ad1565b81811115610aff576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600082825180855260208086019550808260051b84010181860160005b84811015610bb1578583037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001895281518051151584528401516040858501819052610b9d81860183610ac7565b9a86019a9450505090830190600101610b4f565b5090979650505050505050565b602081526000610bd16020830184610b32565b9392505050565b600060408201848352602060408185015281855180845260608601915060608160051b870101935082870160005b82811015610c52577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa0888703018452610c40868351610ac7565b95509284019290840190600101610c06565b509398975050505050505050565b600080600060408486031215610c7557600080fd5b83358015158114610c8557600080fd5b9250602084013567ffffffffffffffff811115610ca157600080fd5b610cad86828701610a39565b9497909650939450505050565b838152826020820152606060408201526000610cd96060830184610b32565b95945050505050565b600060208284031215610cf457600080fd5b813573ffffffffffffffffffffffffffffffffffffffff81168114610bd157600080fd5b600060208284031215610d2a57600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81833603018112610dc357600080fd5b9190910192915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112610e0257600080fd5b83018035915067ffffffffffffffff821115610e1d57600080fd5b602001915036819003821315610a7e57600080fd5b8183823760009101908152919050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc1833603018112610dc357600080fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa1833603018112610dc357600080fdfea2646970667358221220bb2b5c71a328032f97c676ae39a1ec2148d3e5d6f73d95e9b17910152d61f16264736f6c634300080c0033',
279
+ })
280
+ expect(receipt.contractAddress).toBeDefined()
281
+ })
282
+
283
+ test('behavior: deploy contract + `feeToken` (tempo tx)', async () => {
284
+ const account = accounts[0]
285
+ const receipt = await client.sendTransactionSync({
286
+ account,
287
+ feeToken: 1n,
288
+ data: '0x608060405234801561001057600080fd5b50610ee0806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e1461025a578063bce38bd714610275578063c3077fa914610288578063ee82ac5e1461029b57600080fd5b80634d2301cc146101ec57806372425d9d1461022157806382ad56cb1461023457806386d516e81461024757600080fd5b80633408e470116100c65780633408e47014610191578063399542e9146101a45780633e64a696146101c657806342cbb15c146101d957600080fd5b80630f28c97d146100f8578063174dea711461011a578063252dba421461013a57806327e86d6e1461015b575b600080fd5b34801561010457600080fd5b50425b6040519081526020015b60405180910390f35b61012d610128366004610a85565b6102ba565b6040516101119190610bbe565b61014d610148366004610a85565b6104ef565b604051610111929190610bd8565b34801561016757600080fd5b50437fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0140610107565b34801561019d57600080fd5b5046610107565b6101b76101b2366004610c60565b610690565b60405161011193929190610cba565b3480156101d257600080fd5b5048610107565b3480156101e557600080fd5b5043610107565b3480156101f857600080fd5b50610107610207366004610ce2565b73ffffffffffffffffffffffffffffffffffffffff163190565b34801561022d57600080fd5b5044610107565b61012d610242366004610a85565b6106ab565b34801561025357600080fd5b5045610107565b34801561026657600080fd5b50604051418152602001610111565b61012d610283366004610c60565b61085a565b6101b7610296366004610a85565b610a1a565b3480156102a757600080fd5b506101076102b6366004610d18565b4090565b60606000828067ffffffffffffffff8111156102d8576102d8610d31565b60405190808252806020026020018201604052801561031e57816020015b6040805180820190915260008152606060208201528152602001906001900390816102f65790505b5092503660005b8281101561047757600085828151811061034157610341610d60565b6020026020010151905087878381811061035d5761035d610d60565b905060200281019061036f9190610d8f565b6040810135958601959093506103886020850185610ce2565b73ffffffffffffffffffffffffffffffffffffffff16816103ac6060870187610dcd565b6040516103ba929190610e32565b60006040518083038185875af1925050503d80600081146103f7576040519150601f19603f3d011682016040523d82523d6000602084013e6103fc565b606091505b50602080850191909152901515808452908501351761046d577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b5050600101610325565b508234146104e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4d756c746963616c6c333a2076616c7565206d69736d6174636800000000000060448201526064015b60405180910390fd5b50505092915050565b436060828067ffffffffffffffff81111561050c5761050c610d31565b60405190808252806020026020018201604052801561053f57816020015b606081526020019060019003908161052a5790505b5091503660005b8281101561068657600087878381811061056257610562610d60565b90506020028101906105749190610e42565b92506105836020840184610ce2565b73ffffffffffffffffffffffffffffffffffffffff166105a66020850185610dcd565b6040516105b4929190610e32565b6000604051808303816000865af19150503d80600081146105f1576040519150601f19603f3d011682016040523d82523d6000602084013e6105f6565b606091505b5086848151811061060957610609610d60565b602090810291909101015290508061067d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060448201526064016104dd565b50600101610546565b5050509250929050565b43804060606106a086868661085a565b905093509350939050565b6060818067ffffffffffffffff8111156106c7576106c7610d31565b60405190808252806020026020018201604052801561070d57816020015b6040805180820190915260008152606060208201528152602001906001900390816106e55790505b5091503660005b828110156104e657600084828151811061073057610730610d60565b6020026020010151905086868381811061074c5761074c610d60565b905060200281019061075e9190610e76565b925061076d6020840184610ce2565b73ffffffffffffffffffffffffffffffffffffffff166107906040850185610dcd565b60405161079e929190610e32565b6000604051808303816000865af19150503d80600081146107db576040519150601f19603f3d011682016040523d82523d6000602084013e6107e0565b606091505b506020808401919091529015158083529084013517610851577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b50600101610714565b6060818067ffffffffffffffff81111561087657610876610d31565b6040519080825280602002602001820160405280156108bc57816020015b6040805180820190915260008152606060208201528152602001906001900390816108945790505b5091503660005b82811015610a105760008482815181106108df576108df610d60565b602002602001015190508686838181106108fb576108fb610d60565b905060200281019061090d9190610e42565b925061091c6020840184610ce2565b73ffffffffffffffffffffffffffffffffffffffff1661093f6020850185610dcd565b60405161094d929190610e32565b6000604051808303816000865af19150503d806000811461098a576040519150601f19603f3d011682016040523d82523d6000602084013e61098f565b606091505b506020830152151581528715610a07578051610a07576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060448201526064016104dd565b506001016108c3565b5050509392505050565b6000806060610a2b60018686610690565b919790965090945092505050565b60008083601f840112610a4b57600080fd5b50813567ffffffffffffffff811115610a6357600080fd5b6020830191508360208260051b8501011115610a7e57600080fd5b9250929050565b60008060208385031215610a9857600080fd5b823567ffffffffffffffff811115610aaf57600080fd5b610abb85828601610a39565b90969095509350505050565b6000815180845260005b81811015610aed57602081850181015186830182015201610ad1565b81811115610aff576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600082825180855260208086019550808260051b84010181860160005b84811015610bb1578583037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001895281518051151584528401516040858501819052610b9d81860183610ac7565b9a86019a9450505090830190600101610b4f565b5090979650505050505050565b602081526000610bd16020830184610b32565b9392505050565b600060408201848352602060408185015281855180845260608601915060608160051b870101935082870160005b82811015610c52577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa0888703018452610c40868351610ac7565b95509284019290840190600101610c06565b509398975050505050505050565b600080600060408486031215610c7557600080fd5b83358015158114610c8557600080fd5b9250602084013567ffffffffffffffff811115610ca157600080fd5b610cad86828701610a39565b9497909650939450505050565b838152826020820152606060408201526000610cd96060830184610b32565b95945050505050565b600060208284031215610cf457600080fd5b813573ffffffffffffffffffffffffffffffffffffffff81168114610bd157600080fd5b600060208284031215610d2a57600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81833603018112610dc357600080fd5b9190910192915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112610e0257600080fd5b83018035915067ffffffffffffffff821115610e1d57600080fd5b602001915036819003821315610a7e57600080fd5b8183823760009101908152919050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc1833603018112610dc357600080fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa1833603018112610dc357600080fdfea2646970667358221220bb2b5c71a328032f97c676ae39a1ec2148d3e5d6f73d95e9b17910152d61f16264736f6c634300080c0033',
289
+ })
290
+ expect(receipt.contractAddress).toBeDefined()
291
+ })
273
292
  })
274
293
 
275
294
  describe('p256', () => {
package/src/viem/index.ts CHANGED
@@ -1,4 +1,15 @@
1
- export * as Tick from '../ox/Tick.js'
1
+ // Export types required for inference.
2
+ export type {
3
+ /** @deprecated */
4
+ KeyAuthorization as z_KeyAuthorization,
5
+ /** @deprecated */
6
+ SignatureEnvelope as z_SignatureEnvelope,
7
+ /** @deprecated */
8
+ TokenId as z_TokenId,
9
+ /** @deprecated */
10
+ TxEnvelopeTempo as z_TxEnvelopeTempo,
11
+ } from 'ox/tempo'
12
+ export { Tick } from 'ox/tempo'
2
13
  export * as Abis from './Abis.js'
3
14
  export * as Account from './Account.js'
4
15
  export * as Actions from './Actions/index.js'