tempo.ts 0.2.1 → 0.4.0

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 (50) hide show
  1. package/README.md +24 -0
  2. package/dist/chains.d.ts +56 -1572
  3. package/dist/chains.d.ts.map +1 -1
  4. package/dist/viem/Abis.d.ts +103 -35
  5. package/dist/viem/Abis.d.ts.map +1 -1
  6. package/dist/viem/Abis.js +78 -27
  7. package/dist/viem/Abis.js.map +1 -1
  8. package/dist/viem/Actions/amm.d.ts +24 -42
  9. package/dist/viem/Actions/amm.d.ts.map +1 -1
  10. package/dist/viem/Actions/dex.d.ts +314 -66
  11. package/dist/viem/Actions/dex.d.ts.map +1 -1
  12. package/dist/viem/Actions/dex.js +10 -9
  13. package/dist/viem/Actions/dex.js.map +1 -1
  14. package/dist/viem/Actions/fee.d.ts +1 -1
  15. package/dist/viem/Actions/fee.d.ts.map +1 -1
  16. package/dist/viem/Actions/fee.js +3 -1
  17. package/dist/viem/Actions/fee.js.map +1 -1
  18. package/dist/viem/Actions/reward.d.ts +15 -3
  19. package/dist/viem/Actions/reward.d.ts.map +1 -1
  20. package/dist/viem/Actions/token.d.ts +75 -15
  21. package/dist/viem/Actions/token.d.ts.map +1 -1
  22. package/dist/viem/Chain.d.ts +8 -5
  23. package/dist/viem/Chain.d.ts.map +1 -1
  24. package/dist/viem/Chain.js +38 -25
  25. package/dist/viem/Chain.js.map +1 -1
  26. package/dist/viem/Decorator.d.ts +2 -2
  27. package/dist/viem/Decorator.d.ts.map +1 -1
  28. package/dist/viem/Decorator.js +1 -1
  29. package/dist/viem/Decorator.js.map +1 -1
  30. package/dist/wagmi/Actions/dex.d.ts +8 -8
  31. package/dist/wagmi/Actions/dex.d.ts.map +1 -1
  32. package/dist/wagmi/Actions/dex.js +9 -9
  33. package/dist/wagmi/Actions/dex.js.map +1 -1
  34. package/dist/wagmi/Hooks/dex.d.ts +4 -4
  35. package/dist/wagmi/Hooks/dex.d.ts.map +1 -1
  36. package/dist/wagmi/Hooks/dex.js +2 -2
  37. package/dist/wagmi/Hooks/dex.js.map +1 -1
  38. package/package.json +1 -54
  39. package/src/ox/TransactionEnvelopeAA.test.ts +42 -50
  40. package/src/prool/internal/chain.json +84 -80
  41. package/src/viem/Abis.ts +79 -27
  42. package/src/viem/Actions/dex.test.ts +12 -12
  43. package/src/viem/Actions/dex.ts +18 -14
  44. package/src/viem/Actions/fee.ts +3 -1
  45. package/src/viem/Chain.ts +59 -32
  46. package/src/viem/Decorator.ts +6 -6
  47. package/src/viem/e2e.test.ts +6 -6
  48. package/src/wagmi/Actions/dex.test.ts +12 -12
  49. package/src/wagmi/Actions/dex.ts +15 -15
  50. package/src/wagmi/Hooks/dex.ts +8 -8
@@ -44,21 +44,25 @@
44
44
  "0x0000000000000000000000000000000000000000000000000000000000000003": "0x6c696e6b696e6755534400000000000000000000000000000000000000000014",
45
45
  "0x0000000000000000000000000000000000000000000000000000000000000004": "0x5553440000000000000000000000000000000000000000000000000000000006",
46
46
  "0x0000000000000000000000000000000000000000000000000000000000000006": "0x0000000000000000000000000000000000000000000000000000000000000000",
47
- "0x0000000000000000000000000000000000000000000000000000000000000007": "0x0000000000000000000000000000000000000000000000000000000000000000",
48
- "0x0000000000000000000000000000000000000000000000000000000000000008": "0x0000000000000000000000000000000000000000000000000000000000000001",
49
- "0x0000000000000000000000000000000000000000000000000000000000000009": "0x000000000000000000000000000000000000000000000000ffffffffffffffff",
50
- "0x000000000000000000000000000000000000000000000000000000000000000e": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
51
- "0x0000000000000000000000000000000000000000000000000000000000000010": "0x0000000000000000000000000000000000000000000000000000000000000000",
52
- "0x0000000000000000000000000000000000000000000000000000000000000011": "0x0000000000000000000000000000000000000000000000000000000000000001",
53
- "0x0000000000000000000000000000000000000000000000000000000000000013": "0x0000000000000000000000000000000000000000000000000000000000000000",
54
- "0x48e7216947c77f4dbe209a10dd648f75777d5e8f77dcf5ccb2ab1f7eb019464c": "0x000000000000000000000000000000000000000000000000ffffffffffffffff",
55
- "0xa6a0e99b2b289e6ea26c1a5fd5a57112b10c0b562cea0515aa577160afff7cf5": "0x0000000000000000000000000000000000000000000000000000000000000001",
56
- "0xaa02246ac32a63df002045cc06677d4ccd1fb68751ee65bc01af3da72cdaf985": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
57
- "0xbfe5d0e441fc01f45da1a6e95ecd2b058eedfdcdfcaeecba7e54c8a15b94a366": "0x0000000000000000000000000000000000000000000000000000000000000001",
58
- "0xdee4dd470786a9405b68ad5b44591b77faa710310f82871cd572d62033c567f4": "0x0000000000000000000000000000000000000000000000000000000000000001",
59
- "0xfc32a6e3de0eb94f1866c1422d6c227cb75cb8bf74ff4413aa9479dec2665f65": "0x0000000000000000000000000000000000000000000000000000000000000000",
60
- "0xfc32a6e3de0eb94f1866c1422d6c227cb75cb8bf74ff4413aa9479dec2665f66": "0x0000000000000000000000000000000000000000000000000000000000000000",
61
- "0xfc32a6e3de0eb94f1866c1422d6c227cb75cb8bf74ff4413aa9479dec2665f67": "0x0000000000000000000000000000000000000000000000000000000000000000"
47
+ "0x0000000000000000000000000000000000000000000000000000000000000007": "0x0000000000000000000000010000000000000000000000000000000000000000",
48
+ "0x0000000000000000000000000000000000000000000000000000000000000008": "0x000000000000000000000000000000000000000000000000ffffffffffffffff",
49
+ "0x000000000000000000000000000000000000000000000000000000000000000c": "0x0000000000000000000000000000000000000000000000000000000000000000",
50
+ "0x000000000000000000000000000000000000000000000000000000000000000d": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
51
+ "0x000000000000000000000000000000000000000000000000000000000000000f": "0x0000000000000000000000000000000000000000000000000000000000000000",
52
+ "0x0000000000000000000000000000000000000000000000000000000000000010": "0x0000000000000000000000000000000000000000000000000000000000000001",
53
+ "0x0000000000000000000000000000000000000000000000000000000000000012": "0x0000000000000000000000000000000000000000000000000000000000000000",
54
+ "0x3ea9d9231d6540be7d278ae8aca803ad34a51009d77af115df60db856131261d": "0x0000000000000000000000000000000000000000000000000000000000000001",
55
+ "0x4aa7d878ced99e38cd20114097b6da04259057b1b890f87340f95f3cd79c3c55": "0x0000000000000000000000000000000000000000000000000000000000000001",
56
+ "0x4c8556900ad40fae55749518b5b88c44400dc2f4321bd01b14de194851914bff": "0x00000000000000000000000000000000000000000000000000000002540be400",
57
+ "0x6b0da69cc3fa18007ab42dc2caa54134b15e6b5df32929e85e27c168a93ff1da": "0x0000000000000000000000000000000000000000000000000000000000000001",
58
+ "0x6b7cecb07955e29e1bcc444ba162f765fd38ff165161f3657410920d6df4fcf7": "0x0000000000000000000000000000000000000000000000000000000000000000",
59
+ "0x6b7cecb07955e29e1bcc444ba162f765fd38ff165161f3657410920d6df4fcf8": "0x0000000000000000000000000000000000000000000000000000000000000000",
60
+ "0x6b7cecb07955e29e1bcc444ba162f765fd38ff165161f3657410920d6df4fcf9": "0x0000000000000000000000000000000000000000000000000000000000000000",
61
+ "0xc39d774f18115b85b81494d65e588b565d73abc969333d1da7b0a0eb0729accd": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
62
+ "0xcb8911fb82c2d10f6cf1d31d1e521ad3f4e3f42615f6ba67c454a9a2fdb9b6a7": "0x000000000000000000000000000000000000000000000000fffffffdabf41bff",
63
+ "0xe4e0bc72aa0148637194ba415a8ce179639949e244f4ec2193011bdebcb06a39": "0x0000000000000000000000000000000000000000000000000000000000000000",
64
+ "0xe4e0bc72aa0148637194ba415a8ce179639949e244f4ec2193011bdebcb06a3a": "0x0000000000000000000000000000000000000000000000000000000000000000",
65
+ "0xe4e0bc72aa0148637194ba415a8ce179639949e244f4ec2193011bdebcb06a3b": "0x0000000000000000000000000000000000000000000000000000000000000000"
62
66
  }
63
67
  },
64
68
  "0x20c0000000000000000000000000000000000001": {
@@ -70,25 +74,24 @@
70
74
  "0x0000000000000000000000000000000000000000000000000000000000000003": "0x416c706861555344000000000000000000000000000000000000000000000010",
71
75
  "0x0000000000000000000000000000000000000000000000000000000000000004": "0x5553440000000000000000000000000000000000000000000000000000000006",
72
76
  "0x0000000000000000000000000000000000000000000000000000000000000006": "0x00000000000000000000000020c0000000000000000000000000000000000000",
73
- "0x0000000000000000000000000000000000000000000000000000000000000007": "0x00000000000000000000000020c0000000000000000000000000000000000000",
74
- "0x0000000000000000000000000000000000000000000000000000000000000008": "0x0000000000000000000000000000000000000000000000000000000000000001",
75
- "0x0000000000000000000000000000000000000000000000000000000000000009": "0x000000000000000000000000000000000000000000000001fffffffffffffffe",
76
- "0x000000000000000000000000000000000000000000000000000000000000000d": "0x0000000000000000000000000000000000000000000000000000000000000000",
77
- "0x000000000000000000000000000000000000000000000000000000000000000e": "0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff",
78
- "0x0000000000000000000000000000000000000000000000000000000000000010": "0x0000000000000000000000000000000000000000000000000000000000000000",
79
- "0x0000000000000000000000000000000000000000000000000000000000000011": "0x0000000000000000000000000000000000000000000000000000000000000001",
80
- "0x0000000000000000000000000000000000000000000000000000000000000013": "0x0000000000000000000000000000000000000000000000000000000000000000",
81
- "0x1126b616a0dd599b72c2f0baa70e5b21dd97f9f5d04290b16318429dacfb562a": "0x0000000000000000000000000000000000000000000000000000000000000000",
82
- "0x1126b616a0dd599b72c2f0baa70e5b21dd97f9f5d04290b16318429dacfb562b": "0x0000000000000000000000000000000000000000000000000000000000000000",
83
- "0x1126b616a0dd599b72c2f0baa70e5b21dd97f9f5d04290b16318429dacfb562c": "0x0000000000000000000000000000000000000000000000000000000000000000",
84
- "0x48e7216947c77f4dbe209a10dd648f75777d5e8f77dcf5ccb2ab1f7eb019464c": "0x000000000000000000000000000000000000000000000001fffffffb57e837fe",
85
- "0xa6a0e99b2b289e6ea26c1a5fd5a57112b10c0b562cea0515aa577160afff7cf5": "0x0000000000000000000000000000000000000000000000000000000000000001",
86
- "0xaa02246ac32a63df002045cc06677d4ccd1fb68751ee65bc01af3da72cdaf985": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
87
- "0xbfe5d0e441fc01f45da1a6e95ecd2b058eedfdcdfcaeecba7e54c8a15b94a366": "0x0000000000000000000000000000000000000000000000000000000000000001",
88
- "0xc575514010954eba6215ee5ae6e5075ef02a2ac2ff314d4b40b889c6517d3c47": "0x00000000000000000000000000000000000000000000000000000004a817c800",
89
- "0xfc32a6e3de0eb94f1866c1422d6c227cb75cb8bf74ff4413aa9479dec2665f65": "0x0000000000000000000000000000000000000000000000000000000000000000",
90
- "0xfc32a6e3de0eb94f1866c1422d6c227cb75cb8bf74ff4413aa9479dec2665f66": "0x0000000000000000000000000000000000000000000000000000000000000000",
91
- "0xfc32a6e3de0eb94f1866c1422d6c227cb75cb8bf74ff4413aa9479dec2665f67": "0x0000000000000000000000000000000000000000000000000000000000000000"
77
+ "0x0000000000000000000000000000000000000000000000000000000000000007": "0x00000000000000000000000120c0000000000000000000000000000000000000",
78
+ "0x0000000000000000000000000000000000000000000000000000000000000008": "0x000000000000000000000000000000000000000000000001fffffffffffffffe",
79
+ "0x000000000000000000000000000000000000000000000000000000000000000c": "0x0000000000000000000000000000000000000000000000000000000000000000",
80
+ "0x000000000000000000000000000000000000000000000000000000000000000d": "0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff",
81
+ "0x000000000000000000000000000000000000000000000000000000000000000f": "0x0000000000000000000000000000000000000000000000000000000000000000",
82
+ "0x0000000000000000000000000000000000000000000000000000000000000010": "0x0000000000000000000000000000000000000000000000000000000000000001",
83
+ "0x0000000000000000000000000000000000000000000000000000000000000012": "0x0000000000000000000000000000000000000000000000000000000000000000",
84
+ "0x4aa7d878ced99e38cd20114097b6da04259057b1b890f87340f95f3cd79c3c55": "0x0000000000000000000000000000000000000000000000000000000000000001",
85
+ "0x4c8556900ad40fae55749518b5b88c44400dc2f4321bd01b14de194851914bff": "0x00000000000000000000000000000000000000000000000000000006fc23ac00",
86
+ "0x6b0da69cc3fa18007ab42dc2caa54134b15e6b5df32929e85e27c168a93ff1da": "0x0000000000000000000000000000000000000000000000000000000000000001",
87
+ "0x6b7cecb07955e29e1bcc444ba162f765fd38ff165161f3657410920d6df4fcf7": "0x0000000000000000000000000000000000000000000000000000000000000000",
88
+ "0x6b7cecb07955e29e1bcc444ba162f765fd38ff165161f3657410920d6df4fcf8": "0x0000000000000000000000000000000000000000000000000000000000000000",
89
+ "0x6b7cecb07955e29e1bcc444ba162f765fd38ff165161f3657410920d6df4fcf9": "0x0000000000000000000000000000000000000000000000000000000000000000",
90
+ "0xc39d774f18115b85b81494d65e588b565d73abc969333d1da7b0a0eb0729accd": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
91
+ "0xcb8911fb82c2d10f6cf1d31d1e521ad3f4e3f42615f6ba67c454a9a2fdb9b6a7": "0x000000000000000000000000000000000000000000000001fffffff903dc53fe",
92
+ "0xe4e0bc72aa0148637194ba415a8ce179639949e244f4ec2193011bdebcb06a39": "0x0000000000000000000000000000000000000000000000000000000000000000",
93
+ "0xe4e0bc72aa0148637194ba415a8ce179639949e244f4ec2193011bdebcb06a3a": "0x0000000000000000000000000000000000000000000000000000000000000000",
94
+ "0xe4e0bc72aa0148637194ba415a8ce179639949e244f4ec2193011bdebcb06a3b": "0x0000000000000000000000000000000000000000000000000000000000000000"
92
95
  }
93
96
  },
94
97
  "0x20c0000000000000000000000000000000000002": {
@@ -100,25 +103,24 @@
100
103
  "0x0000000000000000000000000000000000000000000000000000000000000003": "0x426574615553440000000000000000000000000000000000000000000000000e",
101
104
  "0x0000000000000000000000000000000000000000000000000000000000000004": "0x5553440000000000000000000000000000000000000000000000000000000006",
102
105
  "0x0000000000000000000000000000000000000000000000000000000000000006": "0x00000000000000000000000020c0000000000000000000000000000000000000",
103
- "0x0000000000000000000000000000000000000000000000000000000000000007": "0x00000000000000000000000020c0000000000000000000000000000000000000",
104
- "0x0000000000000000000000000000000000000000000000000000000000000008": "0x0000000000000000000000000000000000000000000000000000000000000001",
105
- "0x0000000000000000000000000000000000000000000000000000000000000009": "0x000000000000000000000000000000000000000000000001fffffffffffffffe",
106
- "0x000000000000000000000000000000000000000000000000000000000000000d": "0x0000000000000000000000000000000000000000000000000000000000000000",
107
- "0x000000000000000000000000000000000000000000000000000000000000000e": "0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff",
108
- "0x0000000000000000000000000000000000000000000000000000000000000010": "0x0000000000000000000000000000000000000000000000000000000000000000",
109
- "0x0000000000000000000000000000000000000000000000000000000000000011": "0x0000000000000000000000000000000000000000000000000000000000000001",
110
- "0x0000000000000000000000000000000000000000000000000000000000000013": "0x0000000000000000000000000000000000000000000000000000000000000000",
111
- "0x1126b616a0dd599b72c2f0baa70e5b21dd97f9f5d04290b16318429dacfb562a": "0x0000000000000000000000000000000000000000000000000000000000000000",
112
- "0x1126b616a0dd599b72c2f0baa70e5b21dd97f9f5d04290b16318429dacfb562b": "0x0000000000000000000000000000000000000000000000000000000000000000",
113
- "0x1126b616a0dd599b72c2f0baa70e5b21dd97f9f5d04290b16318429dacfb562c": "0x0000000000000000000000000000000000000000000000000000000000000000",
114
- "0x48e7216947c77f4dbe209a10dd648f75777d5e8f77dcf5ccb2ab1f7eb019464c": "0x000000000000000000000000000000000000000000000001fffffffdabf41bfe",
115
- "0xa6a0e99b2b289e6ea26c1a5fd5a57112b10c0b562cea0515aa577160afff7cf5": "0x0000000000000000000000000000000000000000000000000000000000000001",
116
- "0xaa02246ac32a63df002045cc06677d4ccd1fb68751ee65bc01af3da72cdaf985": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
117
- "0xbfe5d0e441fc01f45da1a6e95ecd2b058eedfdcdfcaeecba7e54c8a15b94a366": "0x0000000000000000000000000000000000000000000000000000000000000001",
118
- "0xc575514010954eba6215ee5ae6e5075ef02a2ac2ff314d4b40b889c6517d3c47": "0x00000000000000000000000000000000000000000000000000000002540be400",
119
- "0xfc32a6e3de0eb94f1866c1422d6c227cb75cb8bf74ff4413aa9479dec2665f65": "0x0000000000000000000000000000000000000000000000000000000000000000",
120
- "0xfc32a6e3de0eb94f1866c1422d6c227cb75cb8bf74ff4413aa9479dec2665f66": "0x0000000000000000000000000000000000000000000000000000000000000000",
121
- "0xfc32a6e3de0eb94f1866c1422d6c227cb75cb8bf74ff4413aa9479dec2665f67": "0x0000000000000000000000000000000000000000000000000000000000000000"
106
+ "0x0000000000000000000000000000000000000000000000000000000000000007": "0x00000000000000000000000120c0000000000000000000000000000000000000",
107
+ "0x0000000000000000000000000000000000000000000000000000000000000008": "0x000000000000000000000000000000000000000000000001fffffffffffffffe",
108
+ "0x000000000000000000000000000000000000000000000000000000000000000c": "0x0000000000000000000000000000000000000000000000000000000000000000",
109
+ "0x000000000000000000000000000000000000000000000000000000000000000d": "0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff",
110
+ "0x000000000000000000000000000000000000000000000000000000000000000f": "0x0000000000000000000000000000000000000000000000000000000000000000",
111
+ "0x0000000000000000000000000000000000000000000000000000000000000010": "0x0000000000000000000000000000000000000000000000000000000000000001",
112
+ "0x0000000000000000000000000000000000000000000000000000000000000012": "0x0000000000000000000000000000000000000000000000000000000000000000",
113
+ "0x4aa7d878ced99e38cd20114097b6da04259057b1b890f87340f95f3cd79c3c55": "0x0000000000000000000000000000000000000000000000000000000000000001",
114
+ "0x4c8556900ad40fae55749518b5b88c44400dc2f4321bd01b14de194851914bff": "0x00000000000000000000000000000000000000000000000000000002540be400",
115
+ "0x6b0da69cc3fa18007ab42dc2caa54134b15e6b5df32929e85e27c168a93ff1da": "0x0000000000000000000000000000000000000000000000000000000000000001",
116
+ "0x6b7cecb07955e29e1bcc444ba162f765fd38ff165161f3657410920d6df4fcf7": "0x0000000000000000000000000000000000000000000000000000000000000000",
117
+ "0x6b7cecb07955e29e1bcc444ba162f765fd38ff165161f3657410920d6df4fcf8": "0x0000000000000000000000000000000000000000000000000000000000000000",
118
+ "0x6b7cecb07955e29e1bcc444ba162f765fd38ff165161f3657410920d6df4fcf9": "0x0000000000000000000000000000000000000000000000000000000000000000",
119
+ "0xc39d774f18115b85b81494d65e588b565d73abc969333d1da7b0a0eb0729accd": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
120
+ "0xcb8911fb82c2d10f6cf1d31d1e521ad3f4e3f42615f6ba67c454a9a2fdb9b6a7": "0x000000000000000000000000000000000000000000000001fffffffdabf41bfe",
121
+ "0xe4e0bc72aa0148637194ba415a8ce179639949e244f4ec2193011bdebcb06a39": "0x0000000000000000000000000000000000000000000000000000000000000000",
122
+ "0xe4e0bc72aa0148637194ba415a8ce179639949e244f4ec2193011bdebcb06a3a": "0x0000000000000000000000000000000000000000000000000000000000000000",
123
+ "0xe4e0bc72aa0148637194ba415a8ce179639949e244f4ec2193011bdebcb06a3b": "0x0000000000000000000000000000000000000000000000000000000000000000"
122
124
  }
123
125
  },
124
126
  "0x20c0000000000000000000000000000000000003": {
@@ -130,25 +132,24 @@
130
132
  "0x0000000000000000000000000000000000000000000000000000000000000003": "0x5468657461555344000000000000000000000000000000000000000000000010",
131
133
  "0x0000000000000000000000000000000000000000000000000000000000000004": "0x5553440000000000000000000000000000000000000000000000000000000006",
132
134
  "0x0000000000000000000000000000000000000000000000000000000000000006": "0x00000000000000000000000020c0000000000000000000000000000000000000",
133
- "0x0000000000000000000000000000000000000000000000000000000000000007": "0x00000000000000000000000020c0000000000000000000000000000000000000",
134
- "0x0000000000000000000000000000000000000000000000000000000000000008": "0x0000000000000000000000000000000000000000000000000000000000000001",
135
- "0x0000000000000000000000000000000000000000000000000000000000000009": "0x000000000000000000000000000000000000000000000001fffffffffffffffe",
136
- "0x000000000000000000000000000000000000000000000000000000000000000d": "0x0000000000000000000000000000000000000000000000000000000000000000",
137
- "0x000000000000000000000000000000000000000000000000000000000000000e": "0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff",
138
- "0x0000000000000000000000000000000000000000000000000000000000000010": "0x0000000000000000000000000000000000000000000000000000000000000000",
139
- "0x0000000000000000000000000000000000000000000000000000000000000011": "0x0000000000000000000000000000000000000000000000000000000000000001",
140
- "0x0000000000000000000000000000000000000000000000000000000000000013": "0x0000000000000000000000000000000000000000000000000000000000000000",
141
- "0x1126b616a0dd599b72c2f0baa70e5b21dd97f9f5d04290b16318429dacfb562a": "0x0000000000000000000000000000000000000000000000000000000000000000",
142
- "0x1126b616a0dd599b72c2f0baa70e5b21dd97f9f5d04290b16318429dacfb562b": "0x0000000000000000000000000000000000000000000000000000000000000000",
143
- "0x1126b616a0dd599b72c2f0baa70e5b21dd97f9f5d04290b16318429dacfb562c": "0x0000000000000000000000000000000000000000000000000000000000000000",
144
- "0x48e7216947c77f4dbe209a10dd648f75777d5e8f77dcf5ccb2ab1f7eb019464c": "0x000000000000000000000000000000000000000000000001fffffffdabf41bfe",
145
- "0xa6a0e99b2b289e6ea26c1a5fd5a57112b10c0b562cea0515aa577160afff7cf5": "0x0000000000000000000000000000000000000000000000000000000000000001",
146
- "0xaa02246ac32a63df002045cc06677d4ccd1fb68751ee65bc01af3da72cdaf985": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
147
- "0xbfe5d0e441fc01f45da1a6e95ecd2b058eedfdcdfcaeecba7e54c8a15b94a366": "0x0000000000000000000000000000000000000000000000000000000000000001",
148
- "0xc575514010954eba6215ee5ae6e5075ef02a2ac2ff314d4b40b889c6517d3c47": "0x00000000000000000000000000000000000000000000000000000002540be400",
149
- "0xfc32a6e3de0eb94f1866c1422d6c227cb75cb8bf74ff4413aa9479dec2665f65": "0x0000000000000000000000000000000000000000000000000000000000000000",
150
- "0xfc32a6e3de0eb94f1866c1422d6c227cb75cb8bf74ff4413aa9479dec2665f66": "0x0000000000000000000000000000000000000000000000000000000000000000",
151
- "0xfc32a6e3de0eb94f1866c1422d6c227cb75cb8bf74ff4413aa9479dec2665f67": "0x0000000000000000000000000000000000000000000000000000000000000000"
135
+ "0x0000000000000000000000000000000000000000000000000000000000000007": "0x00000000000000000000000120c0000000000000000000000000000000000000",
136
+ "0x0000000000000000000000000000000000000000000000000000000000000008": "0x000000000000000000000000000000000000000000000001fffffffffffffffe",
137
+ "0x000000000000000000000000000000000000000000000000000000000000000c": "0x0000000000000000000000000000000000000000000000000000000000000000",
138
+ "0x000000000000000000000000000000000000000000000000000000000000000d": "0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff",
139
+ "0x000000000000000000000000000000000000000000000000000000000000000f": "0x0000000000000000000000000000000000000000000000000000000000000000",
140
+ "0x0000000000000000000000000000000000000000000000000000000000000010": "0x0000000000000000000000000000000000000000000000000000000000000001",
141
+ "0x0000000000000000000000000000000000000000000000000000000000000012": "0x0000000000000000000000000000000000000000000000000000000000000000",
142
+ "0x4aa7d878ced99e38cd20114097b6da04259057b1b890f87340f95f3cd79c3c55": "0x0000000000000000000000000000000000000000000000000000000000000001",
143
+ "0x4c8556900ad40fae55749518b5b88c44400dc2f4321bd01b14de194851914bff": "0x00000000000000000000000000000000000000000000000000000002540be400",
144
+ "0x6b0da69cc3fa18007ab42dc2caa54134b15e6b5df32929e85e27c168a93ff1da": "0x0000000000000000000000000000000000000000000000000000000000000001",
145
+ "0x6b7cecb07955e29e1bcc444ba162f765fd38ff165161f3657410920d6df4fcf7": "0x0000000000000000000000000000000000000000000000000000000000000000",
146
+ "0x6b7cecb07955e29e1bcc444ba162f765fd38ff165161f3657410920d6df4fcf8": "0x0000000000000000000000000000000000000000000000000000000000000000",
147
+ "0x6b7cecb07955e29e1bcc444ba162f765fd38ff165161f3657410920d6df4fcf9": "0x0000000000000000000000000000000000000000000000000000000000000000",
148
+ "0xc39d774f18115b85b81494d65e588b565d73abc969333d1da7b0a0eb0729accd": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
149
+ "0xcb8911fb82c2d10f6cf1d31d1e521ad3f4e3f42615f6ba67c454a9a2fdb9b6a7": "0x000000000000000000000000000000000000000000000001fffffffdabf41bfe",
150
+ "0xe4e0bc72aa0148637194ba415a8ce179639949e244f4ec2193011bdebcb06a39": "0x0000000000000000000000000000000000000000000000000000000000000000",
151
+ "0xe4e0bc72aa0148637194ba415a8ce179639949e244f4ec2193011bdebcb06a3a": "0x0000000000000000000000000000000000000000000000000000000000000000",
152
+ "0xe4e0bc72aa0148637194ba415a8ce179639949e244f4ec2193011bdebcb06a3b": "0x0000000000000000000000000000000000000000000000000000000000000000"
152
153
  }
153
154
  },
154
155
  "0x20fc000000000000000000000000000000000000": {
@@ -217,14 +218,17 @@
217
218
  "balance": "0x0",
218
219
  "code": "0xef",
219
220
  "storage": {
220
- "0x093e7cda68fd8f492da399b2e0738f42ba1eec35053d2f935f5c23e25594b958": "0x000000000000000000000000000000000000000000000002b5e3af16b1880000",
221
- "0x1ffacc17f1c82e06dacddf48dd05d84e726968e55b5bf5603d3a75aed30ab986": "0x00000000000000000000000020c0000000000000000000000000000000000001",
222
- "0x246d1e7b2a27b0afa3906ae9a8a98a775c692ef7134d15f6ba377fdfd8895334": "0x000000000000000000000000000000000000000000000002b5e3af16b187fc18",
223
- "0x489a55db1b10e8dd3f0af34beadb715813c35bb01b459227087b2b8b73da7a9b": "0x00000000000000000000000020c0000000000000000000000000000000000001",
224
- "0x6f1a4bc17444dbec6e93d5a672c5727292751e9490c5cbfa7494d80c93078daa": "0x000000000000000000000000000000000000000000000002b5e3af16b187fc18",
225
- "0xb38ab1c5f7f7d223b457339871fb981c7900084e80341d470585feca2dcdad59": "0x000000000000000000000002540be400000000000000000000000002540be400",
226
- "0xb3ae0ae00397b23ae1d5ffe2e10786ed544119d3da24bc04ce69d22cfdcb8a23": "0x000000000000000000000000000000000000000000000002b5e3af16b1880000",
227
- "0xdfc5cf32298b719d8b149ff85d8ed6e7262be8d27c8492f8b53b4ae3341a5172": "0x000000000000000000000002540be400000000000000000000000002540be400"
221
+ "0x0e8bc3a1a04a8952d40154d1c6959e1fd23658eaa42acc3362fce396a20994df": "0x000000000000000000000000000000000000000000000002b5e3af16b1880000",
222
+ "0x1fc4a9d8d01ab0f9dc8f14d1e69af349f4208b1ad05a111edd80f8170c3bd4d9": "0x000000000000000000000002540be400000000000000000000000002540be400",
223
+ "0x34bbab512dd327531043e0b6baddaabb5e53359af739f12159398c20ca9b6e5e": "0x000000000000000000000000000000000000000000000002b5e3af16b187fc18",
224
+ "0x3f8482bd7d52eb9f53a7d8460650a604871ede051caec95d5ba40ec16226e441": "0x000000000000000000000002540be400000000000000000000000002540be400",
225
+ "0x77b2abe38ccd60457bde3ba80042109da83137cd032c5a3739f27e038f22f9d4": "0x000000000000000000000000000000000000000000000002b5e3af16b1880000",
226
+ "0x8a31a76d2c4456f61628ef019def98074cadcc2b497ca2fe1659163c8ab4595a": "0x000000000000000000000000000000000000000000000002b5e3af16b187fc18",
227
+ "0xa3c1274aadd82e4d12c8004c33fb244ca686dad4fcc8957fc5668588c11d9502": "0x00000000000000000000000020c0000000000000000000000000000000000001",
228
+ "0xad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5": "0x00000000000000000000000020c0000000000000000000000000000000000001",
229
+ "0xcb82452031e01d2d2e56c8439b97257a99f22bcabfc60dd9d1298be3c05aed4f": "0x000000000000000000000000000000000000000000000002b5e3af16b1880000",
230
+ "0xe270dff72f261e778dc5ab0920b47eb9a22cd1aea97bd050b24ae036f7813d07": "0x000000000000000000000000000000000000000000000002b5e3af16b187fc18",
231
+ "0xe69abbba1b65a2824aaaf3cebd4e204d1bdf59ae1e7dbc277119b3d9d1a8de6c": "0x000000000000000000000002540be400000000000000000000000002540be400"
228
232
  }
229
233
  }
230
234
  },
package/src/viem/Abis.ts CHANGED
@@ -1,5 +1,22 @@
1
1
  // Generated with `pnpm gen:abis`. Do not modify manually.
2
2
 
3
+ export const linkingUsd = [
4
+ {
5
+ name: 'TRANSFER_ROLE',
6
+ type: 'function',
7
+ stateMutability: 'view',
8
+ inputs: [],
9
+ outputs: [{ type: 'bytes32' }],
10
+ },
11
+ {
12
+ name: 'RECEIVE_WITH_MEMO_ROLE',
13
+ type: 'function',
14
+ stateMutability: 'view',
15
+ inputs: [],
16
+ outputs: [{ type: 'bytes32' }],
17
+ },
18
+ ] as const
19
+
3
20
  export const nonce = [
4
21
  {
5
22
  name: 'getNonce',
@@ -178,7 +195,7 @@ export const stablecoinExchange = [
178
195
  ],
179
196
  },
180
197
  {
181
- name: 'getPriceLevel',
198
+ name: 'getTickLevel',
182
199
  type: 'function',
183
200
  stateMutability: 'view',
184
201
  inputs: [
@@ -187,14 +204,9 @@ export const stablecoinExchange = [
187
204
  { type: 'bool', name: 'isBid' },
188
205
  ],
189
206
  outputs: [
190
- {
191
- type: 'tuple',
192
- components: [
193
- { type: 'uint128', name: 'head' },
194
- { type: 'uint128', name: 'tail' },
195
- { type: 'uint128', name: 'totalLiquidity' },
196
- ],
197
- },
207
+ { type: 'uint128', name: 'head' },
208
+ { type: 'uint128', name: 'tail' },
209
+ { type: 'uint128', name: 'totalLiquidity' },
198
210
  ],
199
211
  },
200
212
  {
@@ -238,6 +250,55 @@ export const stablecoinExchange = [
238
250
  },
239
251
  ],
240
252
  },
253
+ {
254
+ name: 'MIN_TICK',
255
+ type: 'function',
256
+ stateMutability: 'pure',
257
+ inputs: [],
258
+ outputs: [{ type: 'int16' }],
259
+ },
260
+ {
261
+ name: 'MAX_TICK',
262
+ type: 'function',
263
+ stateMutability: 'pure',
264
+ inputs: [],
265
+ outputs: [{ type: 'int16' }],
266
+ },
267
+ {
268
+ name: 'PRICE_SCALE',
269
+ type: 'function',
270
+ stateMutability: 'pure',
271
+ inputs: [],
272
+ outputs: [{ type: 'uint32' }],
273
+ },
274
+ {
275
+ name: 'MIN_PRICE',
276
+ type: 'function',
277
+ stateMutability: 'pure',
278
+ inputs: [],
279
+ outputs: [{ type: 'uint32' }],
280
+ },
281
+ {
282
+ name: 'MAX_PRICE',
283
+ type: 'function',
284
+ stateMutability: 'pure',
285
+ inputs: [],
286
+ outputs: [{ type: 'uint32' }],
287
+ },
288
+ {
289
+ name: 'tickToPrice',
290
+ type: 'function',
291
+ stateMutability: 'pure',
292
+ inputs: [{ type: 'int16', name: 'tick' }],
293
+ outputs: [{ type: 'uint32', name: 'price' }],
294
+ },
295
+ {
296
+ name: 'priceToTick',
297
+ type: 'function',
298
+ stateMutability: 'pure',
299
+ inputs: [{ type: 'uint32', name: 'price' }],
300
+ outputs: [{ type: 'int16', name: 'tick' }],
301
+ },
241
302
  {
242
303
  name: 'PairCreated',
243
304
  type: 'event',
@@ -656,7 +717,7 @@ export const tip20 = [
656
717
  {
657
718
  type: 'tuple',
658
719
  components: [
659
- { type: 'address', name: 'delegatedRecipient' },
720
+ { type: 'address', name: 'rewardRecipient' },
660
721
  { type: 'uint256', name: 'rewardPerToken' },
661
722
  { type: 'uint256', name: 'rewardBalance' },
662
723
  ],
@@ -807,6 +868,7 @@ export const tip20 = [
807
868
  { name: 'StreamInactive', type: 'error', inputs: [] },
808
869
  { name: 'NoOptedInSupply', type: 'error', inputs: [] },
809
870
  { name: 'Unauthorized', type: 'error', inputs: [] },
871
+ { name: 'RewardsDisabled', type: 'error', inputs: [] },
810
872
  {
811
873
  name: 'hasRole',
812
874
  type: 'function',
@@ -1073,13 +1135,6 @@ export const tipAccountRegistrar = [
1073
1135
  ],
1074
1136
  outputs: [{ type: 'address', name: 'authority' }],
1075
1137
  },
1076
- {
1077
- name: 'getDelegationMessage',
1078
- type: 'function',
1079
- stateMutability: 'pure',
1080
- inputs: [],
1081
- outputs: [{ type: 'string' }],
1082
- },
1083
1138
  { name: 'InvalidSignature', type: 'error', inputs: [] },
1084
1139
  { name: 'CodeNotEmpty', type: 'error', inputs: [] },
1085
1140
  { name: 'NonceNotZero', type: 'error', inputs: [] },
@@ -1159,6 +1214,13 @@ export const feeManager = [
1159
1214
  ] as const
1160
1215
 
1161
1216
  export const feeAmm = [
1217
+ {
1218
+ name: 'MIN_LIQUIDITY',
1219
+ type: 'function',
1220
+ stateMutability: 'view',
1221
+ inputs: [],
1222
+ outputs: [{ type: 'uint256' }],
1223
+ },
1162
1224
  {
1163
1225
  name: 'getPoolId',
1164
1226
  type: 'function',
@@ -1271,16 +1333,6 @@ export const feeAmm = [
1271
1333
  ],
1272
1334
  outputs: [{ type: 'uint256', name: 'amountIn' }],
1273
1335
  },
1274
- {
1275
- name: 'calculateLiquidity',
1276
- type: 'function',
1277
- stateMutability: 'pure',
1278
- inputs: [
1279
- { type: 'uint256', name: 'x' },
1280
- { type: 'uint256', name: 'y' },
1281
- ],
1282
- outputs: [{ type: 'uint256' }],
1283
- },
1284
1336
  {
1285
1337
  name: 'Mint',
1286
1338
  type: 'event',
@@ -785,7 +785,7 @@ describe('getOrderbook', () => {
785
785
  })
786
786
  })
787
787
 
788
- describe('getPriceLevel', () => {
788
+ describe('getTickLevel', () => {
789
789
  test('default', async () => {
790
790
  const { base } = await setupTokenPair(client)
791
791
 
@@ -800,7 +800,7 @@ describe('getPriceLevel', () => {
800
800
  })
801
801
 
802
802
  // Get the price level
803
- const level = await Actions.dex.getPriceLevel(client, {
803
+ const level = await Actions.dex.getTickLevel(client, {
804
804
  base,
805
805
  tick,
806
806
  isBid: true,
@@ -818,7 +818,7 @@ describe('getPriceLevel', () => {
818
818
  const tick = Tick.fromPrice('1.001')
819
819
 
820
820
  // Query a tick with no orders
821
- const level = await Actions.dex.getPriceLevel(client, {
821
+ const level = await Actions.dex.getTickLevel(client, {
822
822
  base,
823
823
  tick,
824
824
  isBid: true,
@@ -852,7 +852,7 @@ describe('getPriceLevel', () => {
852
852
  })
853
853
 
854
854
  // Get the price level
855
- const level = await Actions.dex.getPriceLevel(client, {
855
+ const level = await Actions.dex.getTickLevel(client, {
856
856
  base,
857
857
  tick,
858
858
  isBid: true,
@@ -886,14 +886,14 @@ describe('getPriceLevel', () => {
886
886
  })
887
887
 
888
888
  // Get bid side
889
- const bidLevel = await Actions.dex.getPriceLevel(client, {
889
+ const bidLevel = await Actions.dex.getTickLevel(client, {
890
890
  base,
891
891
  tick,
892
892
  isBid: true,
893
893
  })
894
894
 
895
895
  // Get ask side
896
- const askLevel = await Actions.dex.getPriceLevel(client, {
896
+ const askLevel = await Actions.dex.getTickLevel(client, {
897
897
  base,
898
898
  tick,
899
899
  isBid: false,
@@ -926,7 +926,7 @@ describe('getPriceLevel', () => {
926
926
  })
927
927
 
928
928
  // Get level before cancellation
929
- const levelBefore = await Actions.dex.getPriceLevel(client, {
929
+ const levelBefore = await Actions.dex.getTickLevel(client, {
930
930
  base,
931
931
  tick,
932
932
  isBid: true,
@@ -938,7 +938,7 @@ describe('getPriceLevel', () => {
938
938
  })
939
939
 
940
940
  // Get level after cancellation
941
- const levelAfter = await Actions.dex.getPriceLevel(client, {
941
+ const levelAfter = await Actions.dex.getTickLevel(client, {
942
942
  base,
943
943
  tick,
944
944
  isBid: true,
@@ -962,7 +962,7 @@ describe('getPriceLevel', () => {
962
962
  })
963
963
 
964
964
  // Get level before fill
965
- const levelBefore = await Actions.dex.getPriceLevel(client, {
965
+ const levelBefore = await Actions.dex.getTickLevel(client, {
966
966
  base,
967
967
  tick,
968
968
  isBid: false,
@@ -977,7 +977,7 @@ describe('getPriceLevel', () => {
977
977
  })
978
978
 
979
979
  // Get level after fill
980
- const levelAfter = await Actions.dex.getPriceLevel(client, {
980
+ const levelAfter = await Actions.dex.getTickLevel(client, {
981
981
  base,
982
982
  tick,
983
983
  isBid: false,
@@ -999,7 +999,7 @@ describe('getPriceLevel', () => {
999
999
  })
1000
1000
 
1001
1001
  // Query min tick
1002
- const minLevel = await Actions.dex.getPriceLevel(client, {
1002
+ const minLevel = await Actions.dex.getTickLevel(client, {
1003
1003
  base,
1004
1004
  tick: Tick.minTick,
1005
1005
  isBid: false,
@@ -1015,7 +1015,7 @@ describe('getPriceLevel', () => {
1015
1015
  })
1016
1016
 
1017
1017
  // Query max tick
1018
- const maxLevel = await Actions.dex.getPriceLevel(client, {
1018
+ const maxLevel = await Actions.dex.getTickLevel(client, {
1019
1019
  base,
1020
1020
  tick: Tick.maxTick,
1021
1021
  isBid: true,
@@ -959,7 +959,7 @@ export namespace getOrderbook {
959
959
  * transport: http(),
960
960
  * })
961
961
  *
962
- * const level = await Actions.dex.getPriceLevel(client, {
962
+ * const level = await Actions.dex.getTickLevel(client, {
963
963
  * base: '0x20c...11',
964
964
  * tick: Tick.fromPrice('1.001'),
965
965
  * isBid: true,
@@ -970,18 +970,19 @@ export namespace getOrderbook {
970
970
  * @param parameters - Parameters.
971
971
  * @returns The price level information.
972
972
  */
973
- export async function getPriceLevel<chain extends Chain | undefined>(
973
+ export async function getTickLevel<chain extends Chain | undefined>(
974
974
  client: Client<Transport, chain>,
975
- parameters: getPriceLevel.Parameters,
976
- ): Promise<getPriceLevel.ReturnValue> {
975
+ parameters: getTickLevel.Parameters,
976
+ ): Promise<getTickLevel.ReturnValue> {
977
977
  const { base, tick, isBid, ...rest } = parameters
978
- return readContract(client, {
978
+ const [head, tail, totalLiquidity] = await readContract(client, {
979
979
  ...rest,
980
- ...getPriceLevel.call({ base, tick, isBid }),
980
+ ...getTickLevel.call({ base, tick, isBid }),
981
981
  })
982
+ return { head, tail, totalLiquidity }
982
983
  }
983
984
 
984
- export namespace getPriceLevel {
985
+ export namespace getTickLevel {
985
986
  export type Parameters = ReadParameters & Args
986
987
 
987
988
  export type Args = {
@@ -993,14 +994,17 @@ export namespace getPriceLevel {
993
994
  tick: number
994
995
  }
995
996
 
996
- export type ReturnValue = ReadContractReturnType<
997
- typeof Abis.stablecoinExchange,
998
- 'getPriceLevel',
999
- never
1000
- >
997
+ export type ReturnValue = {
998
+ /** Order ID of the first order at this tick (0 if empty) */
999
+ head: bigint
1000
+ /** Order ID of the last order at this tick (0 if empty) */
1001
+ tail: bigint
1002
+ /** Total liquidity available at this tick level */
1003
+ totalLiquidity: bigint
1004
+ }
1001
1005
 
1002
1006
  /**
1003
- * Defines a call to the `getPriceLevel` function.
1007
+ * Defines a call to the `getTickLevel` function.
1004
1008
  *
1005
1009
  * @param args - Arguments.
1006
1010
  * @returns The call.
@@ -1011,7 +1015,7 @@ export namespace getPriceLevel {
1011
1015
  address: Addresses.stablecoinExchange,
1012
1016
  abi: Abis.stablecoinExchange,
1013
1017
  args: [base, tick, isBid],
1014
- functionName: 'getPriceLevel',
1018
+ functionName: 'getTickLevel',
1015
1019
  })
1016
1020
  }
1017
1021
  }
@@ -13,6 +13,7 @@ import {
13
13
  type Log as viem_Log,
14
14
  type WatchContractEventParameters,
15
15
  type WriteContractReturnType,
16
+ zeroAddress,
16
17
  } from 'viem'
17
18
  import { parseAccount } from 'viem/accounts'
18
19
  import {
@@ -71,6 +72,7 @@ export async function getUserToken<
71
72
  ...rest,
72
73
  ...getUserToken.call({ account: account.address }),
73
74
  })
75
+ if (address === zeroAddress) return null
74
76
  return {
75
77
  address,
76
78
  id: TokenId.fromAddress(address),
@@ -90,7 +92,7 @@ export namespace getUserToken {
90
92
  export type ReturnValue = Compute<{
91
93
  address: Address
92
94
  id: bigint
93
- }>
95
+ } | null>
94
96
 
95
97
  /**
96
98
  * Defines a call to the `userTokens` function.