tempo.ts 0.1.5 → 0.2.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 (297) hide show
  1. package/README.md +33 -2
  2. package/dist/chains.d.ts +509 -115
  3. package/dist/chains.d.ts.map +1 -1
  4. package/dist/chains.js +20 -9
  5. package/dist/chains.js.map +1 -1
  6. package/dist/ox/Order.d.ts +92 -0
  7. package/dist/ox/Order.d.ts.map +1 -0
  8. package/dist/ox/Order.js +88 -0
  9. package/dist/ox/Order.js.map +1 -0
  10. package/dist/ox/OrdersFilters.d.ts +72 -0
  11. package/dist/ox/OrdersFilters.d.ts.map +1 -0
  12. package/dist/ox/OrdersFilters.js +100 -0
  13. package/dist/ox/OrdersFilters.js.map +1 -0
  14. package/dist/ox/Pagination.d.ts +128 -0
  15. package/dist/ox/Pagination.d.ts.map +1 -0
  16. package/dist/ox/Pagination.js +78 -0
  17. package/dist/ox/Pagination.js.map +1 -0
  18. package/dist/ox/PoolId.d.ts +18 -0
  19. package/dist/ox/PoolId.d.ts.map +1 -0
  20. package/dist/ox/PoolId.js +13 -0
  21. package/dist/ox/PoolId.js.map +1 -0
  22. package/dist/ox/RpcSchema.d.ts +32 -0
  23. package/dist/ox/RpcSchema.d.ts.map +1 -0
  24. package/dist/ox/RpcSchema.js +2 -0
  25. package/dist/ox/RpcSchema.js.map +1 -0
  26. package/dist/ox/SignatureEnvelope.d.ts +1 -1
  27. package/dist/ox/SignatureEnvelope.d.ts.map +1 -1
  28. package/dist/ox/SignatureEnvelope.js.map +1 -1
  29. package/dist/{viem → ox}/Tick.d.ts +4 -0
  30. package/dist/ox/Tick.d.ts.map +1 -0
  31. package/dist/ox/Tick.js.map +1 -0
  32. package/dist/ox/Transaction.d.ts.map +1 -1
  33. package/dist/ox/Transaction.js +2 -1
  34. package/dist/ox/Transaction.js.map +1 -1
  35. package/dist/ox/TransactionEnvelopeAA.d.ts +6 -6
  36. package/dist/ox/TransactionEnvelopeAA.d.ts.map +1 -1
  37. package/dist/ox/TransactionEnvelopeAA.js +4 -2
  38. package/dist/ox/TransactionEnvelopeAA.js.map +1 -1
  39. package/dist/ox/TransactionRequest.d.ts +4 -0
  40. package/dist/ox/TransactionRequest.d.ts.map +1 -1
  41. package/dist/ox/TransactionRequest.js.map +1 -1
  42. package/dist/ox/index.d.ts +6 -0
  43. package/dist/ox/index.d.ts.map +1 -1
  44. package/dist/ox/index.js +6 -0
  45. package/dist/ox/index.js.map +1 -1
  46. package/dist/prool/Instance.d.ts.map +1 -1
  47. package/dist/prool/Instance.js +20 -4
  48. package/dist/prool/Instance.js.map +1 -1
  49. package/dist/viem/Abis.d.ts +1469 -1082
  50. package/dist/viem/Abis.d.ts.map +1 -1
  51. package/dist/viem/Abis.js +932 -671
  52. package/dist/viem/Abis.js.map +1 -1
  53. package/dist/viem/Account.d.ts +150 -0
  54. package/dist/viem/Account.d.ts.map +1 -0
  55. package/dist/viem/Account.js +221 -0
  56. package/dist/viem/Account.js.map +1 -0
  57. package/dist/viem/Actions/amm.d.ts +144 -161
  58. package/dist/viem/Actions/amm.d.ts.map +1 -1
  59. package/dist/viem/Actions/amm.js +109 -163
  60. package/dist/viem/Actions/amm.js.map +1 -1
  61. package/dist/viem/Actions/dex.d.ts +920 -664
  62. package/dist/viem/Actions/dex.d.ts.map +1 -1
  63. package/dist/viem/Actions/dex.js +129 -30
  64. package/dist/viem/Actions/dex.js.map +1 -1
  65. package/dist/viem/Actions/faucet.d.ts +34 -0
  66. package/dist/viem/Actions/faucet.d.ts.map +1 -0
  67. package/dist/viem/Actions/faucet.js +33 -0
  68. package/dist/viem/Actions/faucet.js.map +1 -0
  69. package/dist/viem/Actions/fee.d.ts +16 -30
  70. package/dist/viem/Actions/fee.d.ts.map +1 -1
  71. package/dist/viem/Actions/fee.js +13 -13
  72. package/dist/viem/Actions/fee.js.map +1 -1
  73. package/dist/viem/Actions/index.d.ts +2 -0
  74. package/dist/viem/Actions/index.d.ts.map +1 -1
  75. package/dist/viem/Actions/index.js +2 -0
  76. package/dist/viem/Actions/index.js.map +1 -1
  77. package/dist/viem/Actions/policy.d.ts +46 -46
  78. package/dist/viem/Actions/policy.js +46 -46
  79. package/dist/viem/Actions/reward.d.ts +3236 -0
  80. package/dist/viem/Actions/reward.d.ts.map +1 -0
  81. package/dist/viem/Actions/reward.js +725 -0
  82. package/dist/viem/Actions/reward.js.map +1 -0
  83. package/dist/viem/Actions/token.d.ts +4399 -2750
  84. package/dist/viem/Actions/token.d.ts.map +1 -1
  85. package/dist/viem/Actions/token.js +361 -482
  86. package/dist/viem/Actions/token.js.map +1 -1
  87. package/dist/viem/Addresses.d.ts +1 -2
  88. package/dist/viem/Addresses.d.ts.map +1 -1
  89. package/dist/viem/Addresses.js +1 -2
  90. package/dist/viem/Addresses.js.map +1 -1
  91. package/dist/viem/Chain.d.ts +38 -12
  92. package/dist/viem/Chain.d.ts.map +1 -1
  93. package/dist/viem/Chain.js +27 -18
  94. package/dist/viem/Chain.js.map +1 -1
  95. package/dist/viem/Decorator.d.ts +1009 -428
  96. package/dist/viem/Decorator.d.ts.map +1 -1
  97. package/dist/viem/Decorator.js +17 -5
  98. package/dist/viem/Decorator.js.map +1 -1
  99. package/dist/viem/Formatters.d.ts +8 -1
  100. package/dist/viem/Formatters.d.ts.map +1 -1
  101. package/dist/viem/Formatters.js +17 -0
  102. package/dist/viem/Formatters.js.map +1 -1
  103. package/dist/viem/P256.d.ts +2 -0
  104. package/dist/viem/P256.d.ts.map +1 -0
  105. package/dist/viem/P256.js +2 -0
  106. package/dist/viem/P256.js.map +1 -0
  107. package/dist/viem/Secp256k1.d.ts +2 -0
  108. package/dist/viem/Secp256k1.d.ts.map +1 -0
  109. package/dist/viem/Secp256k1.js +2 -0
  110. package/dist/viem/Secp256k1.js.map +1 -0
  111. package/dist/viem/TokenIds.d.ts +1 -2
  112. package/dist/viem/TokenIds.d.ts.map +1 -1
  113. package/dist/viem/TokenIds.js +1 -2
  114. package/dist/viem/TokenIds.js.map +1 -1
  115. package/dist/viem/Transaction.d.ts +1 -1
  116. package/dist/viem/Transaction.d.ts.map +1 -1
  117. package/dist/viem/Transaction.js +46 -5
  118. package/dist/viem/Transaction.js.map +1 -1
  119. package/dist/viem/WebAuthnP256.d.ts +79 -0
  120. package/dist/viem/WebAuthnP256.d.ts.map +1 -0
  121. package/dist/viem/WebAuthnP256.js +95 -0
  122. package/dist/viem/WebAuthnP256.js.map +1 -0
  123. package/dist/viem/WebCryptoP256.d.ts +2 -0
  124. package/dist/viem/WebCryptoP256.d.ts.map +1 -0
  125. package/dist/viem/WebCryptoP256.js +2 -0
  126. package/dist/viem/WebCryptoP256.js.map +1 -0
  127. package/dist/viem/index.d.ts +6 -3
  128. package/dist/viem/index.d.ts.map +1 -1
  129. package/dist/viem/index.js +6 -3
  130. package/dist/viem/index.js.map +1 -1
  131. package/dist/viem/internal/account.d.ts +24 -0
  132. package/dist/viem/internal/account.d.ts.map +1 -0
  133. package/dist/viem/internal/account.js +68 -0
  134. package/dist/viem/internal/account.js.map +1 -0
  135. package/dist/viem/internal/types.d.ts +10 -0
  136. package/dist/viem/internal/types.d.ts.map +1 -1
  137. package/dist/wagmi/Actions/amm.d.ts +428 -0
  138. package/dist/wagmi/Actions/amm.d.ts.map +1 -0
  139. package/dist/wagmi/Actions/amm.js +472 -0
  140. package/dist/wagmi/Actions/amm.js.map +1 -0
  141. package/dist/wagmi/Actions/dex.d.ts +908 -0
  142. package/dist/wagmi/Actions/dex.d.ts.map +1 -0
  143. package/dist/wagmi/Actions/dex.js +1023 -0
  144. package/dist/wagmi/Actions/dex.js.map +1 -0
  145. package/dist/wagmi/Actions/faucet.d.ts +35 -0
  146. package/dist/wagmi/Actions/faucet.d.ts.map +1 -0
  147. package/dist/wagmi/Actions/faucet.js +33 -0
  148. package/dist/wagmi/Actions/faucet.js.map +1 -0
  149. package/dist/wagmi/Actions/fee.d.ts +111 -0
  150. package/dist/wagmi/Actions/fee.d.ts.map +1 -0
  151. package/dist/wagmi/Actions/fee.js +126 -0
  152. package/dist/wagmi/Actions/fee.js.map +1 -0
  153. package/dist/wagmi/Actions/index.d.ts +7 -0
  154. package/dist/wagmi/Actions/index.d.ts.map +1 -0
  155. package/dist/wagmi/Actions/index.js +7 -0
  156. package/dist/wagmi/Actions/index.js.map +1 -0
  157. package/dist/wagmi/Actions/reward.d.ts +348 -0
  158. package/dist/wagmi/Actions/reward.d.ts.map +1 -0
  159. package/dist/wagmi/Actions/reward.js +388 -0
  160. package/dist/wagmi/Actions/reward.js.map +1 -0
  161. package/dist/wagmi/Actions/token.d.ts +1546 -0
  162. package/dist/wagmi/Actions/token.d.ts.map +1 -0
  163. package/dist/wagmi/Actions/token.js +1712 -0
  164. package/dist/wagmi/Actions/token.js.map +1 -0
  165. package/dist/wagmi/Connector.d.ts +81 -0
  166. package/dist/wagmi/Connector.d.ts.map +1 -0
  167. package/dist/wagmi/Connector.js +261 -0
  168. package/dist/wagmi/Connector.js.map +1 -0
  169. package/dist/wagmi/Hooks/amm.d.ts +421 -0
  170. package/dist/wagmi/Hooks/amm.d.ts.map +1 -0
  171. package/dist/wagmi/Hooks/amm.js +504 -0
  172. package/dist/wagmi/Hooks/amm.js.map +1 -0
  173. package/dist/wagmi/Hooks/dex.d.ts +816 -0
  174. package/dist/wagmi/Hooks/dex.d.ts.map +1 -0
  175. package/dist/wagmi/Hooks/dex.js +973 -0
  176. package/dist/wagmi/Hooks/dex.js.map +1 -0
  177. package/dist/wagmi/Hooks/faucet.d.ts +39 -0
  178. package/dist/wagmi/Hooks/faucet.d.ts.map +1 -0
  179. package/dist/wagmi/Hooks/faucet.js +40 -0
  180. package/dist/wagmi/Hooks/faucet.js.map +1 -0
  181. package/dist/wagmi/Hooks/fee.d.ts +97 -0
  182. package/dist/wagmi/Hooks/fee.d.ts.map +1 -0
  183. package/dist/wagmi/Hooks/fee.js +109 -0
  184. package/dist/wagmi/Hooks/fee.js.map +1 -0
  185. package/dist/wagmi/Hooks/index.d.ts +7 -0
  186. package/dist/wagmi/Hooks/index.d.ts.map +1 -0
  187. package/dist/wagmi/Hooks/index.js +7 -0
  188. package/dist/wagmi/Hooks/index.js.map +1 -0
  189. package/dist/wagmi/Hooks/reward.d.ts +307 -0
  190. package/dist/wagmi/Hooks/reward.d.ts.map +1 -0
  191. package/dist/wagmi/Hooks/reward.js +349 -0
  192. package/dist/wagmi/Hooks/reward.js.map +1 -0
  193. package/dist/wagmi/Hooks/token.d.ts +1388 -0
  194. package/dist/wagmi/Hooks/token.d.ts.map +1 -0
  195. package/dist/wagmi/Hooks/token.js +1657 -0
  196. package/dist/wagmi/Hooks/token.js.map +1 -0
  197. package/dist/wagmi/index.d.ts +4 -0
  198. package/dist/wagmi/index.d.ts.map +1 -0
  199. package/dist/wagmi/index.js +4 -0
  200. package/dist/wagmi/index.js.map +1 -0
  201. package/package.json +54 -10
  202. package/src/chains.ts +21 -9
  203. package/src/ox/Order.test.ts +78 -0
  204. package/src/ox/Order.ts +125 -0
  205. package/src/ox/OrdersFilters.test.ts +182 -0
  206. package/src/ox/OrdersFilters.ts +125 -0
  207. package/src/ox/Pagination.test.ts +162 -0
  208. package/src/ox/Pagination.ts +164 -0
  209. package/src/ox/PoolId.test.ts +33 -0
  210. package/src/ox/PoolId.ts +27 -0
  211. package/src/ox/RpcSchema.ts +35 -0
  212. package/src/ox/SignatureEnvelope.ts +3 -1
  213. package/src/{viem → ox}/Tick.test.ts +1 -1
  214. package/src/{viem → ox}/Tick.ts +5 -0
  215. package/src/ox/Transaction.test.ts +1 -1
  216. package/src/ox/Transaction.ts +2 -1
  217. package/src/ox/TransactionEnvelopeAA.test.ts +239 -96
  218. package/src/ox/TransactionEnvelopeAA.ts +9 -7
  219. package/src/ox/TransactionRequest.ts +4 -0
  220. package/src/ox/index.ts +6 -0
  221. package/src/prool/Instance.ts +51 -37
  222. package/src/prool/internal/chain.json +104 -52
  223. package/src/tsconfig.json +9 -0
  224. package/src/viem/Abis.ts +972 -710
  225. package/src/viem/Account.ts +279 -0
  226. package/src/viem/Actions/__snapshots__/dex.test.ts.snap +850 -0
  227. package/src/viem/Actions/amm.test.ts +173 -169
  228. package/src/viem/Actions/amm.ts +131 -203
  229. package/src/viem/Actions/dex.test.ts +563 -484
  230. package/src/viem/Actions/dex.ts +203 -30
  231. package/src/viem/Actions/faucet.ts +50 -0
  232. package/src/viem/Actions/fee.test.ts +23 -34
  233. package/src/viem/Actions/fee.ts +20 -13
  234. package/src/viem/Actions/index.ts +2 -0
  235. package/src/viem/Actions/policy.test.ts +19 -33
  236. package/src/viem/Actions/policy.ts +46 -46
  237. package/src/viem/Actions/reward.test.ts +457 -0
  238. package/src/viem/Actions/reward.ts +999 -0
  239. package/src/viem/Actions/token.test.ts +453 -287
  240. package/src/viem/Actions/token.ts +605 -693
  241. package/src/viem/Addresses.ts +1 -2
  242. package/src/viem/Chain.bench-d.ts +12 -0
  243. package/src/viem/Chain.ts +70 -20
  244. package/src/viem/Decorator.bench-d.ts +1 -1
  245. package/src/viem/Decorator.test.ts +3 -1
  246. package/src/viem/Decorator.ts +1049 -442
  247. package/src/viem/Formatters.ts +31 -5
  248. package/src/viem/P256.ts +1 -0
  249. package/src/viem/Secp256k1.ts +1 -0
  250. package/src/viem/TokenIds.ts +1 -2
  251. package/src/viem/Transaction.ts +53 -7
  252. package/src/viem/WebAuthnP256.ts +140 -0
  253. package/src/viem/WebCryptoP256.ts +1 -0
  254. package/src/viem/e2e.test.ts +1126 -297
  255. package/src/viem/index.ts +6 -3
  256. package/src/viem/internal/account.ts +107 -0
  257. package/src/viem/internal/types.ts +9 -0
  258. package/src/wagmi/Actions/__snapshots__/dex.test.ts.snap +310 -0
  259. package/src/wagmi/Actions/amm.test.ts +198 -0
  260. package/src/wagmi/Actions/amm.ts +691 -0
  261. package/src/wagmi/Actions/dex.test.ts +1507 -0
  262. package/src/wagmi/Actions/dex.ts +1640 -0
  263. package/src/wagmi/Actions/faucet.ts +46 -0
  264. package/src/wagmi/Actions/fee.test.ts +63 -0
  265. package/src/wagmi/Actions/fee.ts +208 -0
  266. package/src/wagmi/Actions/index.ts +6 -0
  267. package/src/wagmi/Actions/reward.test.ts +210 -0
  268. package/src/wagmi/Actions/reward.ts +632 -0
  269. package/src/wagmi/Actions/token.test.ts +1308 -0
  270. package/src/wagmi/Actions/token.ts +2613 -0
  271. package/src/wagmi/Connector.test.ts +53 -0
  272. package/src/wagmi/Connector.ts +390 -0
  273. package/src/wagmi/Hooks/__snapshots__/dex.test.ts.snap +457 -0
  274. package/src/wagmi/Hooks/amm.test.ts +424 -0
  275. package/src/wagmi/Hooks/amm.ts +806 -0
  276. package/src/wagmi/Hooks/dex.test.ts +1017 -0
  277. package/src/wagmi/Hooks/dex.ts +1685 -0
  278. package/src/wagmi/Hooks/faucet.ts +76 -0
  279. package/src/wagmi/Hooks/fee.test.ts +166 -0
  280. package/src/wagmi/Hooks/fee.ts +206 -0
  281. package/src/wagmi/Hooks/index.ts +6 -0
  282. package/src/wagmi/Hooks/reward.test.ts +219 -0
  283. package/src/wagmi/Hooks/reward.ts +672 -0
  284. package/src/wagmi/Hooks/token.test.ts +1670 -0
  285. package/src/wagmi/Hooks/token.ts +2906 -0
  286. package/src/wagmi/index.ts +3 -0
  287. package/src/wagmi/internal/types.ts +16 -0
  288. package/dist/viem/Client.d.ts +0 -27
  289. package/dist/viem/Client.d.ts.map +0 -1
  290. package/dist/viem/Client.js +0 -28
  291. package/dist/viem/Client.js.map +0 -1
  292. package/dist/viem/Tick.d.ts.map +0 -1
  293. package/dist/viem/Tick.js.map +0 -1
  294. package/src/viem/Client.bench-d.ts +0 -8
  295. package/src/viem/Client.test.ts +0 -178
  296. package/src/viem/Client.ts +0 -91
  297. /package/dist/{viem → ox}/Tick.js +0 -0
@@ -7,8 +7,9 @@ import {
7
7
  Secp256k1,
8
8
  Value,
9
9
  WebAuthnP256,
10
+ WebCryptoP256,
10
11
  } from 'ox'
11
- import { createClient, http, parseEther } from 'viem'
12
+ import { createClient, http, parseUnits } from 'viem'
12
13
  import { privateKeyToAccount } from 'viem/accounts'
13
14
  import { afterEach, beforeEach, describe, expect, test } from 'vitest'
14
15
  import { tempoLocal } from '../chains.js'
@@ -127,7 +128,7 @@ describe('deserialize', () => {
127
128
  calls: [
128
129
  {
129
130
  to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
130
- value: Value.fromEther('1'),
131
+ value: Value.from('0.001', 6),
131
132
  },
132
133
  ],
133
134
  nonce: 785n,
@@ -159,11 +160,11 @@ describe('deserialize', () => {
159
160
  calls: [
160
161
  {
161
162
  to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
162
- value: Value.fromEther('1'),
163
+ value: Value.from('0.001', 6),
163
164
  },
164
165
  {
165
166
  to: '0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc',
166
- value: Value.fromEther('2'),
167
+ value: Value.from('0.002', 6),
167
168
  data: '0x1234',
168
169
  },
169
170
  ],
@@ -341,6 +342,7 @@ describe('deserialize', () => {
341
342
  '0x', // validAfter
342
343
  '0x', // feeToken
343
344
  '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', // feePayerSignatureOrSender (address)
345
+ [], // authorizationList
344
346
  ]).slice(2)}` as const
345
347
  const deserialized = TransactionEnvelopeAA.deserialize(serialized)
346
348
  expect(deserialized.feePayerSignature).toBe(null)
@@ -366,6 +368,7 @@ describe('deserialize', () => {
366
368
  '0x', // validAfter
367
369
  '0x', // feeToken
368
370
  [Hex.fromNumber(0), Hex.fromNumber(1), Hex.fromNumber(2)], // feePayerSignatureOrSender (signature tuple)
371
+ [], // authorizationList
369
372
  ]).slice(2)}` as const
370
373
  const deserialized = TransactionEnvelopeAA.deserialize(serialized)
371
374
  expect(deserialized.feePayerSignature).toEqual({
@@ -396,6 +399,7 @@ describe('deserialize', () => {
396
399
  '0x', // validAfter
397
400
  '0x', // feeToken
398
401
  '0x', // feePayerSignature
402
+ [], // authorizationList
399
403
  ]).slice(2)}` as const
400
404
  expect(
401
405
  TransactionEnvelopeAA.deserialize(serialized),
@@ -438,6 +442,7 @@ describe('deserialize', () => {
438
442
  '0x', // validAfter
439
443
  '0x', // feeToken
440
444
  '0x', // feePayerSignature
445
+ [], // authorizationList
441
446
  ]).slice(2)}` as const
442
447
  expect(
443
448
  TransactionEnvelopeAA.deserialize(serialized),
@@ -502,6 +507,7 @@ describe('deserialize', () => {
502
507
  '0x', // validAfter
503
508
  '0x', // feeToken
504
509
  '0x', // feePayerSignature
510
+ [], // authorizationList
505
511
  ]).slice(2)}`,
506
512
  ),
507
513
  ).toThrowErrorMatchingInlineSnapshot(
@@ -531,6 +537,7 @@ describe('deserialize', () => {
531
537
  '0x', // validAfter
532
538
  '0x', // feeToken
533
539
  '0x', // feePayerSignature
540
+ [], // authorizationList
534
541
  '0x1234', // signature
535
542
  '0x5678', // extra field
536
543
  ]).slice(2)}`,
@@ -538,7 +545,7 @@ describe('deserialize', () => {
538
545
  ).toThrowErrorMatchingInlineSnapshot(`
539
546
  [TransactionEnvelope.InvalidSerializedError: Invalid serialized transaction of type "aa" was provided.
540
547
 
541
- Serialized Transaction: "0x76ea01010101d8d7940000000000000000000000000000000000000000008080000080808080821234825678"]
548
+ Serialized Transaction: "0x76eb01010101d8d7940000000000000000000000000000000000000000008080000080808080c0821234825678"]
542
549
  `)
543
550
  })
544
551
  })
@@ -720,7 +727,7 @@ describe('serialize', () => {
720
727
  calls: [
721
728
  {
722
729
  to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
723
- value: Value.fromEther('1'),
730
+ value: Value.from('0.001', 6),
724
731
  },
725
732
  ],
726
733
  nonce: 785n,
@@ -728,7 +735,7 @@ describe('serialize', () => {
728
735
  maxPriorityFeePerGas: Value.fromGwei('2'),
729
736
  })
730
737
  expect(TransactionEnvelopeAA.serialize(transaction)).toMatchInlineSnapshot(
731
- `"0x76f6018477359400847735940080e0df9470997970c51812dc3a010c7d01b50e0d17dc79c8880de0b6b3a764000080c08082031180808080"`,
738
+ `"0x76f1018477359400847735940080dad99470997970c51812dc3a010c7d01b50e0d17dc79c88203e880c08082031180808080c0"`,
732
739
  )
733
740
  })
734
741
 
@@ -739,7 +746,7 @@ describe('serialize', () => {
739
746
  nonce: 0n,
740
747
  })
741
748
  expect(TransactionEnvelopeAA.serialize(transaction)).toMatchInlineSnapshot(
742
- `"0x76d001808080c4c3808080c0808080808080"`,
749
+ `"0x76d101808080c4c3808080c0808080808080c0"`,
743
750
  )
744
751
  })
745
752
 
@@ -752,7 +759,7 @@ describe('serialize', () => {
752
759
  })
753
760
  const serialized = TransactionEnvelopeAA.serialize(transaction)
754
761
  expect(serialized).toMatchInlineSnapshot(
755
- `"0x76d001808080c4c3808080c0808080808080"`,
762
+ `"0x76d101808080c4c3808080c0808080808080c0"`,
756
763
  )
757
764
  })
758
765
 
@@ -762,18 +769,18 @@ describe('serialize', () => {
762
769
  calls: [
763
770
  {
764
771
  to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
765
- value: Value.fromEther('1'),
772
+ value: Value.from('0.001', 6),
766
773
  },
767
774
  {
768
775
  to: '0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc',
769
- value: Value.fromEther('2'),
776
+ value: Value.from('0.002', 6),
770
777
  data: '0x1234',
771
778
  },
772
779
  ],
773
780
  nonce: 0n,
774
781
  })
775
782
  expect(TransactionEnvelopeAA.serialize(transaction)).toMatchInlineSnapshot(
776
- `"0x76f84f01808080f842df9470997970c51812dc3a010c7d01b50e0d17dc79c8880de0b6b3a764000080e1943c44cdddb6a900fa2b585dd299e03d12fa4293bc881bc16d674ec80000821234c0808080808080"`,
783
+ `"0x76f84301808080f6d99470997970c51812dc3a010c7d01b50e0d17dc79c88203e880db943c44cdddb6a900fa2b585dd299e03d12fa4293bc8207d0821234c0808080808080c0"`,
777
784
  )
778
785
  })
779
786
 
@@ -793,7 +800,7 @@ describe('serialize', () => {
793
800
  signature: SignatureEnvelope.from(signature),
794
801
  }),
795
802
  ).toMatchInlineSnapshot(
796
- `"0x76f86701808080d8d79470997970c51812dc3a010c7d01b50e0d17dc79c88080c0808080808080b841e333995974d0f82e5dfdb201476c03516d849f1fd3b05db4bb1595dba9ad207827aca889a4780887341008f2d3fac949b145304735ea395b5d68498e80e138be1b"`,
803
+ `"0x76f86801808080d8d79470997970c51812dc3a010c7d01b50e0d17dc79c88080c0808080808080c0b8416b37e17bf41d92dfee5ffdce55431bf01dd7875b2229d6258350c5ee6fe6a54225b867dc1b19c9ec97833ebdccd830d2846c5b724b72dcd754d694d08b5e80ee1c"`,
797
804
  )
798
805
  })
799
806
 
@@ -842,7 +849,7 @@ describe('serialize', () => {
842
849
  },
843
850
  }),
844
851
  ).toMatchInlineSnapshot(
845
- `"0x76e701808080d8d79470997970c51812dc3a010c7d01b50e0d17dc79c88080c08080808080c3800102"`,
852
+ `"0x76e801808080d8d79470997970c51812dc3a010c7d01b50e0d17dc79c88080c08080808080c3800102c0"`,
846
853
  )
847
854
  })
848
855
 
@@ -857,7 +864,7 @@ describe('serialize', () => {
857
864
  feePayerSignature: null,
858
865
  }),
859
866
  ).toMatchInlineSnapshot(
860
- `"0x76e401808080d8d79470997970c51812dc3a010c7d01b50e0d17dc79c88080c0808080808000"`,
867
+ `"0x76e501808080d8d79470997970c51812dc3a010c7d01b50e0d17dc79c88080c0808080808000c0"`,
861
868
  )
862
869
  })
863
870
 
@@ -873,7 +880,7 @@ describe('serialize', () => {
873
880
  format: 'feePayer',
874
881
  }),
875
882
  ).toMatchInlineSnapshot(
876
- `"0x78f83801808080d8d79470997970c51812dc3a010c7d01b50e0d17dc79c88080c0808080808094f39fd6e51aad88f6f4ce6ab8827279cfffb92266"`,
883
+ `"0x78f83901808080d8d79470997970c51812dc3a010c7d01b50e0d17dc79c88080c0808080808094f39fd6e51aad88f6f4ce6ab8827279cfffb92266c0"`,
877
884
  )
878
885
  })
879
886
  })
@@ -886,7 +893,7 @@ describe('hash', () => {
886
893
  calls: [
887
894
  {
888
895
  to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
889
- value: Value.fromEther('1'),
896
+ value: Value.from('0.001', 6),
890
897
  },
891
898
  ],
892
899
  nonce: 0n,
@@ -899,7 +906,7 @@ describe('hash', () => {
899
906
  signature: SignatureEnvelope.from(signature),
900
907
  })
901
908
  expect(TransactionEnvelopeAA.hash(signed)).toMatchInlineSnapshot(
902
- `"0x3f46e9635e9a55ceb7c4efa5a652227446c392becf1853ca024078974451ba36"`,
909
+ `"0x10a0722db9339abf44b48ddfdcffe574003043362d9463794cc32bd7b58cdd30"`,
903
910
  )
904
911
  })
905
912
  })
@@ -910,7 +917,7 @@ describe('hash', () => {
910
917
  calls: [
911
918
  {
912
919
  to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
913
- value: Value.fromEther('1'),
920
+ value: Value.from('0.001', 6),
914
921
  },
915
922
  ],
916
923
  nonce: 0n,
@@ -918,7 +925,7 @@ describe('hash', () => {
918
925
  expect(
919
926
  TransactionEnvelopeAA.hash(transaction, { presign: true }),
920
927
  ).toMatchInlineSnapshot(
921
- `"0x10470898907327464194b05c9d6cbc6bc6c4dab48e6287898c0600dd231f111d"`,
928
+ `"0xef3eaf3a85df1d843290fb1a11f99b22ef4096625f2a65ffb5380e2e259ea003"`,
922
929
  )
923
930
  })
924
931
  })
@@ -930,7 +937,7 @@ describe('getSignPayload', () => {
930
937
  calls: [
931
938
  {
932
939
  to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
933
- value: Value.fromEther('1'),
940
+ value: Value.from('0.001', 6),
934
941
  },
935
942
  ],
936
943
  nonce: 0n,
@@ -938,7 +945,7 @@ describe('getSignPayload', () => {
938
945
  expect(
939
946
  TransactionEnvelopeAA.getSignPayload(transaction),
940
947
  ).toMatchInlineSnapshot(
941
- `"0x10470898907327464194b05c9d6cbc6bc6c4dab48e6287898c0600dd231f111d"`,
948
+ `"0xef3eaf3a85df1d843290fb1a11f99b22ef4096625f2a65ffb5380e2e259ea003"`,
942
949
  )
943
950
  })
944
951
  })
@@ -950,7 +957,7 @@ describe('getFeePayerSignPayload', () => {
950
957
  calls: [
951
958
  {
952
959
  to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
953
- value: Value.fromEther('1'),
960
+ value: Value.from('0.001', 6),
954
961
  },
955
962
  ],
956
963
  nonce: 0n,
@@ -960,7 +967,7 @@ describe('getFeePayerSignPayload', () => {
960
967
  sender: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
961
968
  }),
962
969
  ).toMatchInlineSnapshot(
963
- `"0xaeee7aa3df5d00d3ca8fe76e524f1bc728741f4dfb3e99cbb908d666926a1cf6"`,
970
+ `"0x3aa1c1faedc521436188d1fcaf5715a6d00066c4e33260517f2240ce6b72b5f1"`,
964
971
  )
965
972
  })
966
973
 
@@ -970,7 +977,7 @@ describe('getFeePayerSignPayload', () => {
970
977
  calls: [
971
978
  {
972
979
  to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
973
- value: Value.fromEther('1'),
980
+ value: Value.from('0.001', 6),
974
981
  },
975
982
  ],
976
983
  nonce: 0n,
@@ -1045,7 +1052,7 @@ describe('e2e', () => {
1045
1052
  calls: [
1046
1053
  {
1047
1054
  to: '0x0000000000000000000000000000000000000000',
1048
- value: Value.fromEther('1'),
1055
+ value: Value.from('0.001', 6),
1049
1056
  },
1050
1057
  ],
1051
1058
  chainId: 1337,
@@ -1085,12 +1092,14 @@ describe('e2e', () => {
1085
1092
  expect(blockHash).toBeDefined()
1086
1093
  expect(rest).toMatchInlineSnapshot(`
1087
1094
  {
1095
+ "aaAuthorizationList": [],
1088
1096
  "accessList": [],
1089
1097
  "calls": [
1090
1098
  {
1099
+ "data": null,
1091
1100
  "input": "0x",
1092
1101
  "to": "0x0000000000000000000000000000000000000000",
1093
- "value": "0xde0b6b3a7640000",
1102
+ "value": "0x3e8",
1094
1103
  },
1095
1104
  ],
1096
1105
  "chainId": "0x539",
@@ -1098,20 +1107,20 @@ describe('e2e', () => {
1098
1107
  "feeToken": "0x20c0000000000000000000000000000000000001",
1099
1108
  "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
1100
1109
  "gas": "0x186a0",
1101
- "gasPrice": "0x2540be42c",
1102
- "hash": "0x619a731fb6541ad920821eb1cb11fa0bc718dbd894913d7952be322f6245c98e",
1110
+ "gasPrice": "0x4a817c800",
1111
+ "hash": "0x3c8ab736a60336ee86fdf3a9f9b30b228c93368d12194848324a89cd3e2cdab5",
1103
1112
  "maxFeePerGas": "0x4a817c800",
1104
1113
  "maxPriorityFeePerGas": "0x2540be400",
1105
1114
  "nonce": "0x0",
1106
1115
  "nonceKey": "0x0",
1107
1116
  "signature": {
1108
- "r": "0xe43858180a3fb0849348c721682a8610ee0583328f20644c5a20aa51acef479c",
1109
- "s": "0x3106b71428823fe3f9199d1476605220af5855f1cb1b0483a48a50d7bc36096b",
1117
+ "r": "0xea2d0d027a924e6cef441ab214aa7ff13efe0fd0cddf27a4cc46d49f4c12793",
1118
+ "s": "0x830471740f75c3199aa9923e4cd9cdbb03c23a6d819dcb26124514b4fbc5be",
1110
1119
  "type": "secp256k1",
1111
- "v": "0x1",
1112
- "yParity": "0x1",
1120
+ "v": "0x0",
1121
+ "yParity": "0x0",
1113
1122
  },
1114
- "transactionIndex": "0x0",
1123
+ "transactionIndex": "0x1",
1115
1124
  "type": "0x76",
1116
1125
  "validAfter": null,
1117
1126
  "validBefore": null,
@@ -1119,23 +1128,23 @@ describe('e2e', () => {
1119
1128
  `)
1120
1129
  }
1121
1130
 
1122
- const { blockNumber, blockHash, ...rest } = receipt
1131
+ const { blockNumber, blockHash, logs, logsBloom, ...rest } = receipt
1123
1132
 
1124
1133
  expect(blockNumber).toBeDefined()
1125
1134
  expect(blockHash).toBeDefined()
1135
+ expect(logs).toBeDefined()
1136
+ expect(logsBloom).toBeDefined()
1126
1137
  expect(rest).toMatchInlineSnapshot(`
1127
1138
  {
1128
1139
  "contractAddress": null,
1129
- "cumulativeGasUsed": "0x5208",
1130
- "effectiveGasPrice": "0x2540be42c",
1140
+ "cumulativeGasUsed": "0x7f58",
1141
+ "effectiveGasPrice": "0x4a817c800",
1131
1142
  "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
1132
- "gasUsed": "0x5208",
1133
- "logs": [],
1134
- "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
1143
+ "gasUsed": "0x7f58",
1135
1144
  "status": "0x0",
1136
1145
  "to": "0x0000000000000000000000000000000000000000",
1137
- "transactionHash": "0x619a731fb6541ad920821eb1cb11fa0bc718dbd894913d7952be322f6245c98e",
1138
- "transactionIndex": "0x0",
1146
+ "transactionHash": "0x3c8ab736a60336ee86fdf3a9f9b30b228c93368d12194848324a89cd3e2cdab5",
1147
+ "transactionIndex": "0x1",
1139
1148
  "type": "0x76",
1140
1149
  }
1141
1150
  `)
@@ -1151,12 +1160,13 @@ describe('e2e', () => {
1151
1160
  account: privateKeyToAccount(
1152
1161
  '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80',
1153
1162
  ),
1154
- chain: tempoLocal,
1163
+ chain: tempoLocal({ feeToken: 1n }),
1155
1164
  transport: http('http://localhost:3000'),
1156
1165
  })
1157
1166
 
1158
1167
  await Actions.token.transferSync(client, {
1159
- amount: parseEther('10000'),
1168
+ amount: parseUnits('10', 6),
1169
+ token: 1n,
1160
1170
  to: address,
1161
1171
  })
1162
1172
 
@@ -1164,7 +1174,7 @@ describe('e2e', () => {
1164
1174
  calls: [
1165
1175
  {
1166
1176
  to: '0x0000000000000000000000000000000000000000',
1167
- value: Value.fromEther('1'),
1177
+ value: Value.from('0.001', 6),
1168
1178
  },
1169
1179
  ],
1170
1180
  chainId: 1337,
@@ -1207,12 +1217,14 @@ describe('e2e', () => {
1207
1217
  expect(blockHash).toBeDefined()
1208
1218
  expect(rest).toMatchInlineSnapshot(`
1209
1219
  {
1220
+ "aaAuthorizationList": [],
1210
1221
  "accessList": [],
1211
1222
  "calls": [
1212
1223
  {
1224
+ "data": null,
1213
1225
  "input": "0x",
1214
1226
  "to": "0x0000000000000000000000000000000000000000",
1215
- "value": "0xde0b6b3a7640000",
1227
+ "value": "0x3e8",
1216
1228
  },
1217
1229
  ],
1218
1230
  "chainId": "0x539",
@@ -1220,8 +1232,8 @@ describe('e2e', () => {
1220
1232
  "feeToken": null,
1221
1233
  "from": "0x6472aeab3269f4165775753156702c06ccc70f8b",
1222
1234
  "gas": "0x186a0",
1223
- "gasPrice": "0x2540be42c",
1224
- "hash": "0x6555ebf80163ff84929f864a281fd475685c15279b516233035d4a243f427bfe",
1235
+ "gasPrice": "0x4a817c800",
1236
+ "hash": "0xcb2daeed7600e4d3f5df68782d606aad29495f9211e8befa14dc4b9a3a5f2bd8",
1225
1237
  "maxFeePerGas": "0x4a817c800",
1226
1238
  "maxPriorityFeePerGas": "0x2540be400",
1227
1239
  "nonce": "0x0",
@@ -1230,11 +1242,11 @@ describe('e2e', () => {
1230
1242
  "preHash": false,
1231
1243
  "pubKeyX": "0xecbf69146add5d7c649c96d90b64d90702c6faae7115adbad50e5e61b2c5f40d",
1232
1244
  "pubKeyY": "0xeca3a5fc6dc4225b4f3f9720750651d43c6eb45c0492b8e9930394d1524784c6",
1233
- "r": "0x78de783595944c23338512ed47edac09c3908e6fdbcd1283cebd86ddb24f160f",
1234
- "s": "0x442099a953b4db06ae2eaa901c29979cbda1f126169c99e534855c4691c220ca",
1245
+ "r": "0x91f7311d18be0aea5d7379465e7499400a56a12ca3d3e1e809172f00b3219f2c",
1246
+ "s": "0x6445a28a7c12fb2cef4e6e1b2f1cfa7297fa7502bbc7b2612b325607e5928421",
1235
1247
  "type": "p256",
1236
1248
  },
1237
- "transactionIndex": "0x0",
1249
+ "transactionIndex": "0x1",
1238
1250
  "type": "0x76",
1239
1251
  "validAfter": null,
1240
1252
  "validBefore": null,
@@ -1242,23 +1254,149 @@ describe('e2e', () => {
1242
1254
  `)
1243
1255
  }
1244
1256
 
1245
- const { blockNumber, blockHash, ...rest } = receipt
1257
+ const { blockNumber, blockHash, logs, logsBloom, ...rest } = receipt
1246
1258
 
1247
1259
  expect(blockNumber).toBeDefined()
1248
1260
  expect(blockHash).toBeDefined()
1261
+ expect(logs).toBeDefined()
1262
+ expect(logsBloom).toBeDefined()
1249
1263
  expect(rest).toMatchInlineSnapshot(`
1250
1264
  {
1251
1265
  "contractAddress": null,
1252
- "cumulativeGasUsed": "0x6590",
1253
- "effectiveGasPrice": "0x2540be42c",
1266
+ "cumulativeGasUsed": "0x92e0",
1267
+ "effectiveGasPrice": "0x4a817c800",
1254
1268
  "from": "0x6472aeab3269f4165775753156702c06ccc70f8b",
1255
- "gasUsed": "0x6590",
1256
- "logs": [],
1257
- "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
1269
+ "gasUsed": "0x92e0",
1258
1270
  "status": "0x0",
1259
1271
  "to": "0x0000000000000000000000000000000000000000",
1260
- "transactionHash": "0x6555ebf80163ff84929f864a281fd475685c15279b516233035d4a243f427bfe",
1261
- "transactionIndex": "0x0",
1272
+ "transactionHash": "0xcb2daeed7600e4d3f5df68782d606aad29495f9211e8befa14dc4b9a3a5f2bd8",
1273
+ "transactionIndex": "0x1",
1274
+ "type": "0x76",
1275
+ }
1276
+ `)
1277
+ })
1278
+
1279
+ test('behavior: default (p256 - webcrypto)', async () => {
1280
+ const keyPair = await WebCryptoP256.createKeyPair()
1281
+ const address = Address.fromPublicKey(keyPair.publicKey)
1282
+
1283
+ const client = createClient({
1284
+ account: privateKeyToAccount(
1285
+ '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80',
1286
+ ),
1287
+ chain: tempoLocal({ feeToken: 1n }),
1288
+ transport: http('http://localhost:3000'),
1289
+ })
1290
+
1291
+ await Actions.token.transferSync(client, {
1292
+ amount: parseUnits('10', 6),
1293
+ token: 1n,
1294
+ to: address,
1295
+ })
1296
+
1297
+ const transaction = TransactionEnvelopeAA.from({
1298
+ calls: [
1299
+ {
1300
+ to: '0x0000000000000000000000000000000000000000',
1301
+ value: Value.from('0.001', 6),
1302
+ },
1303
+ ],
1304
+ chainId: 1337,
1305
+ gas: 100_000n,
1306
+ maxFeePerGas: Value.fromGwei('20'),
1307
+ maxPriorityFeePerGas: Value.fromGwei('10'),
1308
+ })
1309
+
1310
+ const signature = await WebCryptoP256.sign({
1311
+ payload: TransactionEnvelopeAA.getSignPayload(transaction),
1312
+ privateKey: keyPair.privateKey,
1313
+ })
1314
+
1315
+ const serialized_signed = TransactionEnvelopeAA.serialize(transaction, {
1316
+ signature: SignatureEnvelope.from({
1317
+ signature,
1318
+ publicKey: keyPair.publicKey,
1319
+ prehash: true,
1320
+ type: 'p256',
1321
+ }),
1322
+ })
1323
+
1324
+ const receipt = await client.request({
1325
+ method: 'eth_sendRawTransactionSync',
1326
+ params: [serialized_signed],
1327
+ })
1328
+
1329
+ expect(receipt).toBeDefined()
1330
+
1331
+ {
1332
+ const response = await client.request({
1333
+ method: 'eth_getTransactionByHash',
1334
+ params: [receipt.transactionHash],
1335
+ })
1336
+ if (!response) throw new Error()
1337
+
1338
+ const { blockNumber, blockHash, from, hash, signature, ...rest } =
1339
+ response as any
1340
+
1341
+ expect(blockNumber).toBeDefined()
1342
+ expect(blockHash).toBeDefined()
1343
+ expect(from).toBeDefined()
1344
+ expect(hash).toBe(receipt.transactionHash)
1345
+ expect(signature).toBeDefined()
1346
+ expect(rest).toMatchInlineSnapshot(`
1347
+ {
1348
+ "aaAuthorizationList": [],
1349
+ "accessList": [],
1350
+ "calls": [
1351
+ {
1352
+ "data": null,
1353
+ "input": "0x",
1354
+ "to": "0x0000000000000000000000000000000000000000",
1355
+ "value": "0x3e8",
1356
+ },
1357
+ ],
1358
+ "chainId": "0x539",
1359
+ "feePayerSignature": null,
1360
+ "feeToken": null,
1361
+ "gas": "0x186a0",
1362
+ "gasPrice": "0x4a817c800",
1363
+ "maxFeePerGas": "0x4a817c800",
1364
+ "maxPriorityFeePerGas": "0x2540be400",
1365
+ "nonce": "0x0",
1366
+ "nonceKey": "0x0",
1367
+ "transactionIndex": "0x1",
1368
+ "type": "0x76",
1369
+ "validAfter": null,
1370
+ "validBefore": null,
1371
+ }
1372
+ `)
1373
+ }
1374
+
1375
+ const {
1376
+ blockNumber,
1377
+ blockHash,
1378
+ from,
1379
+ logs,
1380
+ logsBloom,
1381
+ transactionHash,
1382
+ ...rest
1383
+ } = receipt
1384
+
1385
+ expect(blockNumber).toBeDefined()
1386
+ expect(blockHash).toBeDefined()
1387
+ expect(from).toBeDefined()
1388
+ expect(logs).toBeDefined()
1389
+ expect(logsBloom).toBeDefined()
1390
+ expect(transactionHash).toBe(receipt.transactionHash)
1391
+ expect(rest).toMatchInlineSnapshot(`
1392
+ {
1393
+ "contractAddress": null,
1394
+ "cumulativeGasUsed": "0x92e0",
1395
+ "effectiveGasPrice": "0x4a817c800",
1396
+ "gasUsed": "0x92e0",
1397
+ "status": "0x0",
1398
+ "to": "0x0000000000000000000000000000000000000000",
1399
+ "transactionIndex": "0x1",
1262
1400
  "type": "0x76",
1263
1401
  }
1264
1402
  `)
@@ -1274,12 +1412,13 @@ describe('e2e', () => {
1274
1412
  account: privateKeyToAccount(
1275
1413
  '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80',
1276
1414
  ),
1277
- chain: tempoLocal,
1415
+ chain: tempoLocal({ feeToken: 1n }),
1278
1416
  transport: http('http://localhost:3000'),
1279
1417
  })
1280
1418
 
1281
1419
  await Actions.token.transferSync(client, {
1282
- amount: parseEther('10000'),
1420
+ amount: parseUnits('10', 6),
1421
+ token: 1n,
1283
1422
  to: address,
1284
1423
  })
1285
1424
 
@@ -1287,7 +1426,7 @@ describe('e2e', () => {
1287
1426
  calls: [
1288
1427
  {
1289
1428
  to: '0x0000000000000000000000000000000000000000',
1290
- value: Value.fromEther('1'),
1429
+ value: Value.from('0.001', 6),
1291
1430
  },
1292
1431
  ],
1293
1432
  chainId: 1337,
@@ -1336,12 +1475,14 @@ describe('e2e', () => {
1336
1475
  expect(blockHash).toBeDefined()
1337
1476
  expect(rest).toMatchInlineSnapshot(`
1338
1477
  {
1478
+ "aaAuthorizationList": [],
1339
1479
  "accessList": [],
1340
1480
  "calls": [
1341
1481
  {
1482
+ "data": null,
1342
1483
  "input": "0x",
1343
1484
  "to": "0x0000000000000000000000000000000000000000",
1344
- "value": "0xde0b6b3a7640000",
1485
+ "value": "0x3e8",
1345
1486
  },
1346
1487
  ],
1347
1488
  "chainId": "0x539",
@@ -1349,8 +1490,8 @@ describe('e2e', () => {
1349
1490
  "feeToken": null,
1350
1491
  "from": "0x6472aeab3269f4165775753156702c06ccc70f8b",
1351
1492
  "gas": "0x186a0",
1352
- "gasPrice": "0x2540be42c",
1353
- "hash": "0x69f56d391d297b45ce3767fa803c93b14ceb1662db67b3822795da9032dab925",
1493
+ "gasPrice": "0x4a817c800",
1494
+ "hash": "0x2a4ed201cef80aa14b342148cae7851cf5ef5494cd009cbff6e5b5a501734a7d",
1354
1495
  "maxFeePerGas": "0x4a817c800",
1355
1496
  "maxPriorityFeePerGas": "0x2540be400",
1356
1497
  "nonce": "0x0",
@@ -1358,12 +1499,12 @@ describe('e2e', () => {
1358
1499
  "signature": {
1359
1500
  "pubKeyX": "0xecbf69146add5d7c649c96d90b64d90702c6faae7115adbad50e5e61b2c5f40d",
1360
1501
  "pubKeyY": "0xeca3a5fc6dc4225b4f3f9720750651d43c6eb45c0492b8e9930394d1524784c6",
1361
- "r": "0x85ab9affd4d7f867f4cc7c4a89995ddeab77c803cf201a22d4797a23852bde22",
1362
- "s": "0x451d76d4db09f1ab6a635d46eaece7bd006c0dc67d750830d4154fbee599dcc1",
1502
+ "r": "0x602ae1039dd8f97bfaf44c672484ca80cf789bcf63653340837a41a11d69b8f9",
1503
+ "s": "0x737e861d3447ecf99e50ccfca6d6b766409a8d7075beeaebd62c30d4fef05aa1",
1363
1504
  "type": "webAuthn",
1364
- "webauthnData": "0x49960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d976305000000007b2274797065223a22776562617574686e2e676574222c226368616c6c656e6765223a225a7275684846506271366434384f646c4f326658574c52697456457739674d5944594f6141704333744538222c226f726967696e223a22687474703a2f2f6c6f63616c686f7374222c2263726f73734f726967696e223a66616c73657d",
1505
+ "webauthnData": "0x49960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d976305000000007b2274797065223a22776562617574686e2e676574222c226368616c6c656e6765223a22786c62733832574448435277736f6e6c7030302d792d386634784937782d783146795246334e714b475559222c226f726967696e223a22687474703a2f2f6c6f63616c686f7374222c2263726f73734f726967696e223a66616c73657d",
1365
1506
  },
1366
- "transactionIndex": "0x0",
1507
+ "transactionIndex": "0x1",
1367
1508
  "type": "0x76",
1368
1509
  "validAfter": null,
1369
1510
  "validBefore": null,
@@ -1371,23 +1512,24 @@ describe('e2e', () => {
1371
1512
  `)
1372
1513
  }
1373
1514
 
1374
- const { blockNumber, blockHash, ...rest } = receipt
1515
+ const { blockNumber, blockHash, logs, logsBloom, ...rest } = receipt
1375
1516
 
1376
1517
  expect(blockNumber).toBeDefined()
1377
1518
  expect(blockHash).toBeDefined()
1519
+ expect(logs).toBeDefined()
1520
+ expect(logsBloom).toBeDefined()
1521
+
1378
1522
  expect(rest).toMatchInlineSnapshot(`
1379
1523
  {
1380
1524
  "contractAddress": null,
1381
- "cumulativeGasUsed": "0x6fc0",
1382
- "effectiveGasPrice": "0x2540be42c",
1525
+ "cumulativeGasUsed": "0x9d10",
1526
+ "effectiveGasPrice": "0x4a817c800",
1383
1527
  "from": "0x6472aeab3269f4165775753156702c06ccc70f8b",
1384
- "gasUsed": "0x6fc0",
1385
- "logs": [],
1386
- "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
1528
+ "gasUsed": "0x9d10",
1387
1529
  "status": "0x0",
1388
1530
  "to": "0x0000000000000000000000000000000000000000",
1389
- "transactionHash": "0x69f56d391d297b45ce3767fa803c93b14ceb1662db67b3822795da9032dab925",
1390
- "transactionIndex": "0x0",
1531
+ "transactionHash": "0x2a4ed201cef80aa14b342148cae7851cf5ef5494cd009cbff6e5b5a501734a7d",
1532
+ "transactionIndex": "0x1",
1391
1533
  "type": "0x76",
1392
1534
  }
1393
1535
  `)
@@ -1418,8 +1560,8 @@ describe('e2e', () => {
1418
1560
  feePayerSignature: null,
1419
1561
  nonce: BigInt(nonce),
1420
1562
  gas: 100000n,
1421
- maxFeePerGas: Hex.toBigInt('0x2c'),
1422
- maxPriorityFeePerGas: Hex.toBigInt('0x2c'),
1563
+ maxFeePerGas: Value.fromGwei('20'),
1564
+ maxPriorityFeePerGas: Value.fromGwei('10'),
1423
1565
  })
1424
1566
 
1425
1567
  const signature = Secp256k1.sign({
@@ -1452,23 +1594,23 @@ describe('e2e', () => {
1452
1594
  params: [serialized_signed],
1453
1595
  })
1454
1596
 
1455
- const { blockNumber, blockHash, logs, ...rest } = receipt
1597
+ const { blockNumber, blockHash, logs, logsBloom, ...rest } = receipt
1456
1598
 
1457
1599
  expect(blockNumber).toBeDefined()
1458
1600
  expect(blockHash).toBeDefined()
1459
1601
  expect(logs).toBeDefined()
1602
+ expect(logsBloom).toBeDefined()
1460
1603
  expect(rest).toMatchInlineSnapshot(`
1461
1604
  {
1462
1605
  "contractAddress": null,
1463
- "cumulativeGasUsed": "0x5208",
1464
- "effectiveGasPrice": "0x2c",
1606
+ "cumulativeGasUsed": "0x5c30",
1607
+ "effectiveGasPrice": "0x4a817c800",
1465
1608
  "from": "0x0a275bee91b39092dfd57089dee0eb0539020b90",
1466
- "gasUsed": "0x5208",
1467
- "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000008000000000008000000000000000000000000000000000000000000000000000100000000000000000000000000000010000000000000000000000000000000000020000000000000100000000040000000000000000020000000000000000000000000000000000000000000000000000000000000000002000000200000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
1609
+ "gasUsed": "0x5c30",
1468
1610
  "status": "0x1",
1469
1611
  "to": "0x0000000000000000000000000000000000000000",
1470
- "transactionHash": "0x4dfc9ff9ca1613f5598aef948a6582f5b1e703cac2a9c42ff6aee17594e8e410",
1471
- "transactionIndex": "0x0",
1612
+ "transactionHash": "0xec109f6683ab104359031628e425d08f13b3d7d8cca68672325305eac6b89919",
1613
+ "transactionIndex": "0x1",
1472
1614
  "type": "0x76",
1473
1615
  }
1474
1616
  `)
@@ -1486,6 +1628,7 @@ describe('e2e', () => {
1486
1628
  blockNumber: undefined,
1487
1629
  }).toMatchInlineSnapshot(`
1488
1630
  {
1631
+ "aaAuthorizationList": [],
1489
1632
  "accessList": [],
1490
1633
  "blockHash": undefined,
1491
1634
  "blockNumber": undefined,
@@ -1500,29 +1643,29 @@ describe('e2e', () => {
1500
1643
  "data": undefined,
1501
1644
  "feePayer": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
1502
1645
  "feePayerSignature": {
1503
- "r": 43378281592208347441865552210308016112467267198196289074355464650745129225935n,
1504
- "s": 27085416135574431106158684173224223218527774861914424707575629469330173001812n,
1646
+ "r": 90188278262501455201631375192727818264315724619851296903313643365872014474939n,
1647
+ "s": 21522416408659292937651233939002591804919112021519345001364348623262878861140n,
1505
1648
  "v": 27,
1506
1649
  "yParity": 0,
1507
1650
  },
1508
1651
  "feeToken": null,
1509
1652
  "from": "0x0a275bee91b39092dfd57089dee0eb0539020b90",
1510
1653
  "gas": 100000n,
1511
- "gasPrice": 44n,
1512
- "hash": "0x4dfc9ff9ca1613f5598aef948a6582f5b1e703cac2a9c42ff6aee17594e8e410",
1513
- "maxFeePerGas": 44n,
1514
- "maxPriorityFeePerGas": 44n,
1654
+ "gasPrice": 20000000000n,
1655
+ "hash": "0xec109f6683ab104359031628e425d08f13b3d7d8cca68672325305eac6b89919",
1656
+ "maxFeePerGas": 20000000000n,
1657
+ "maxPriorityFeePerGas": 10000000000n,
1515
1658
  "nonce": 0n,
1516
1659
  "nonceKey": 0n,
1517
1660
  "signature": {
1518
1661
  "signature": {
1519
- "r": 58903572187112378577233587639727517391280428405029588654830213610953355580984n,
1520
- "s": 37751027942634060522067136615803679123517065498160046803985825017412584342835n,
1521
- "yParity": 1,
1662
+ "r": 10292676348145489655282185382992892512159498737579150910965384786990352734279n,
1663
+ "s": 28525945667606979170826991633900153723921049713502164917966936632594819232361n,
1664
+ "yParity": 0,
1522
1665
  },
1523
1666
  "type": "secp256k1",
1524
1667
  },
1525
- "transactionIndex": 0,
1668
+ "transactionIndex": 1,
1526
1669
  "type": "aa",
1527
1670
  "validAfter": null,
1528
1671
  "validBefore": null,