tempo.ts 0.1.5 → 0.2.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 (276) 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 +18 -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 +80 -118
  58. package/dist/viem/Actions/amm.d.ts.map +1 -1
  59. package/dist/viem/Actions/amm.js +47 -116
  60. package/dist/viem/Actions/amm.js.map +1 -1
  61. package/dist/viem/Actions/dex.d.ts +889 -633
  62. package/dist/viem/Actions/dex.d.ts.map +1 -1
  63. package/dist/viem/Actions/dex.js +99 -0
  64. package/dist/viem/Actions/dex.js.map +1 -1
  65. package/dist/viem/Actions/fee.d.ts +3 -17
  66. package/dist/viem/Actions/fee.d.ts.map +1 -1
  67. package/dist/viem/Actions/fee.js.map +1 -1
  68. package/dist/viem/Actions/index.d.ts +1 -0
  69. package/dist/viem/Actions/index.d.ts.map +1 -1
  70. package/dist/viem/Actions/index.js +1 -0
  71. package/dist/viem/Actions/index.js.map +1 -1
  72. package/dist/viem/Actions/reward.d.ts +3236 -0
  73. package/dist/viem/Actions/reward.d.ts.map +1 -0
  74. package/dist/viem/Actions/reward.js +725 -0
  75. package/dist/viem/Actions/reward.js.map +1 -0
  76. package/dist/viem/Actions/token.d.ts +4295 -2646
  77. package/dist/viem/Actions/token.d.ts.map +1 -1
  78. package/dist/viem/Actions/token.js +214 -335
  79. package/dist/viem/Actions/token.js.map +1 -1
  80. package/dist/viem/Addresses.d.ts +1 -2
  81. package/dist/viem/Addresses.d.ts.map +1 -1
  82. package/dist/viem/Addresses.js +1 -2
  83. package/dist/viem/Addresses.js.map +1 -1
  84. package/dist/viem/Chain.d.ts +38 -12
  85. package/dist/viem/Chain.d.ts.map +1 -1
  86. package/dist/viem/Chain.js +27 -18
  87. package/dist/viem/Chain.js.map +1 -1
  88. package/dist/viem/Decorator.d.ts +959 -405
  89. package/dist/viem/Decorator.d.ts.map +1 -1
  90. package/dist/viem/Decorator.js +13 -5
  91. package/dist/viem/Decorator.js.map +1 -1
  92. package/dist/viem/Formatters.d.ts +8 -1
  93. package/dist/viem/Formatters.d.ts.map +1 -1
  94. package/dist/viem/Formatters.js +17 -0
  95. package/dist/viem/Formatters.js.map +1 -1
  96. package/dist/viem/P256.d.ts +2 -0
  97. package/dist/viem/P256.d.ts.map +1 -0
  98. package/dist/viem/P256.js +2 -0
  99. package/dist/viem/P256.js.map +1 -0
  100. package/dist/viem/Secp256k1.d.ts +2 -0
  101. package/dist/viem/Secp256k1.d.ts.map +1 -0
  102. package/dist/viem/Secp256k1.js +2 -0
  103. package/dist/viem/Secp256k1.js.map +1 -0
  104. package/dist/viem/TokenIds.d.ts +1 -2
  105. package/dist/viem/TokenIds.d.ts.map +1 -1
  106. package/dist/viem/TokenIds.js +1 -2
  107. package/dist/viem/TokenIds.js.map +1 -1
  108. package/dist/viem/Transaction.d.ts +1 -1
  109. package/dist/viem/Transaction.d.ts.map +1 -1
  110. package/dist/viem/Transaction.js +46 -5
  111. package/dist/viem/Transaction.js.map +1 -1
  112. package/dist/viem/WebAuthnP256.d.ts +79 -0
  113. package/dist/viem/WebAuthnP256.d.ts.map +1 -0
  114. package/dist/viem/WebAuthnP256.js +95 -0
  115. package/dist/viem/WebAuthnP256.js.map +1 -0
  116. package/dist/viem/WebCryptoP256.d.ts +2 -0
  117. package/dist/viem/WebCryptoP256.d.ts.map +1 -0
  118. package/dist/viem/WebCryptoP256.js +2 -0
  119. package/dist/viem/WebCryptoP256.js.map +1 -0
  120. package/dist/viem/index.d.ts +6 -3
  121. package/dist/viem/index.d.ts.map +1 -1
  122. package/dist/viem/index.js +6 -3
  123. package/dist/viem/index.js.map +1 -1
  124. package/dist/viem/internal/account.d.ts +24 -0
  125. package/dist/viem/internal/account.d.ts.map +1 -0
  126. package/dist/viem/internal/account.js +68 -0
  127. package/dist/viem/internal/account.js.map +1 -0
  128. package/dist/viem/internal/types.d.ts +10 -0
  129. package/dist/viem/internal/types.d.ts.map +1 -1
  130. package/dist/wagmi/Actions/amm.d.ts +428 -0
  131. package/dist/wagmi/Actions/amm.d.ts.map +1 -0
  132. package/dist/wagmi/Actions/amm.js +472 -0
  133. package/dist/wagmi/Actions/amm.js.map +1 -0
  134. package/dist/wagmi/Actions/dex.d.ts +908 -0
  135. package/dist/wagmi/Actions/dex.d.ts.map +1 -0
  136. package/dist/wagmi/Actions/dex.js +1023 -0
  137. package/dist/wagmi/Actions/dex.js.map +1 -0
  138. package/dist/wagmi/Actions/fee.d.ts +111 -0
  139. package/dist/wagmi/Actions/fee.d.ts.map +1 -0
  140. package/dist/wagmi/Actions/fee.js +126 -0
  141. package/dist/wagmi/Actions/fee.js.map +1 -0
  142. package/dist/wagmi/Actions/index.d.ts +6 -0
  143. package/dist/wagmi/Actions/index.d.ts.map +1 -0
  144. package/dist/wagmi/Actions/index.js +6 -0
  145. package/dist/wagmi/Actions/index.js.map +1 -0
  146. package/dist/wagmi/Actions/reward.d.ts +348 -0
  147. package/dist/wagmi/Actions/reward.d.ts.map +1 -0
  148. package/dist/wagmi/Actions/reward.js +388 -0
  149. package/dist/wagmi/Actions/reward.js.map +1 -0
  150. package/dist/wagmi/Actions/token.d.ts +1546 -0
  151. package/dist/wagmi/Actions/token.d.ts.map +1 -0
  152. package/dist/wagmi/Actions/token.js +1712 -0
  153. package/dist/wagmi/Actions/token.js.map +1 -0
  154. package/dist/wagmi/Connector.d.ts +73 -0
  155. package/dist/wagmi/Connector.d.ts.map +1 -0
  156. package/dist/wagmi/Connector.js +249 -0
  157. package/dist/wagmi/Connector.js.map +1 -0
  158. package/dist/wagmi/Hooks/amm.d.ts +421 -0
  159. package/dist/wagmi/Hooks/amm.d.ts.map +1 -0
  160. package/dist/wagmi/Hooks/amm.js +504 -0
  161. package/dist/wagmi/Hooks/amm.js.map +1 -0
  162. package/dist/wagmi/Hooks/dex.d.ts +816 -0
  163. package/dist/wagmi/Hooks/dex.d.ts.map +1 -0
  164. package/dist/wagmi/Hooks/dex.js +973 -0
  165. package/dist/wagmi/Hooks/dex.js.map +1 -0
  166. package/dist/wagmi/Hooks/fee.d.ts +97 -0
  167. package/dist/wagmi/Hooks/fee.d.ts.map +1 -0
  168. package/dist/wagmi/Hooks/fee.js +109 -0
  169. package/dist/wagmi/Hooks/fee.js.map +1 -0
  170. package/dist/wagmi/Hooks/index.d.ts +6 -0
  171. package/dist/wagmi/Hooks/index.d.ts.map +1 -0
  172. package/dist/wagmi/Hooks/index.js +6 -0
  173. package/dist/wagmi/Hooks/index.js.map +1 -0
  174. package/dist/wagmi/Hooks/reward.d.ts +307 -0
  175. package/dist/wagmi/Hooks/reward.d.ts.map +1 -0
  176. package/dist/wagmi/Hooks/reward.js +349 -0
  177. package/dist/wagmi/Hooks/reward.js.map +1 -0
  178. package/dist/wagmi/Hooks/token.d.ts +1388 -0
  179. package/dist/wagmi/Hooks/token.d.ts.map +1 -0
  180. package/dist/wagmi/Hooks/token.js +1657 -0
  181. package/dist/wagmi/Hooks/token.js.map +1 -0
  182. package/dist/wagmi/index.d.ts +4 -0
  183. package/dist/wagmi/index.d.ts.map +1 -0
  184. package/dist/wagmi/index.js +4 -0
  185. package/dist/wagmi/index.js.map +1 -0
  186. package/package.json +54 -10
  187. package/src/chains.ts +19 -9
  188. package/src/ox/Order.test.ts +78 -0
  189. package/src/ox/Order.ts +125 -0
  190. package/src/ox/OrdersFilters.test.ts +182 -0
  191. package/src/ox/OrdersFilters.ts +125 -0
  192. package/src/ox/Pagination.test.ts +162 -0
  193. package/src/ox/Pagination.ts +164 -0
  194. package/src/ox/PoolId.test.ts +33 -0
  195. package/src/ox/PoolId.ts +27 -0
  196. package/src/ox/RpcSchema.ts +35 -0
  197. package/src/ox/SignatureEnvelope.ts +3 -1
  198. package/src/{viem → ox}/Tick.test.ts +1 -1
  199. package/src/{viem → ox}/Tick.ts +5 -0
  200. package/src/ox/Transaction.test.ts +1 -1
  201. package/src/ox/Transaction.ts +2 -1
  202. package/src/ox/TransactionEnvelopeAA.test.ts +239 -96
  203. package/src/ox/TransactionEnvelopeAA.ts +9 -7
  204. package/src/ox/TransactionRequest.ts +4 -0
  205. package/src/ox/index.ts +6 -0
  206. package/src/prool/Instance.ts +51 -37
  207. package/src/prool/internal/chain.json +104 -52
  208. package/src/tsconfig.json +9 -0
  209. package/src/viem/Abis.ts +972 -710
  210. package/src/viem/Account.ts +279 -0
  211. package/src/viem/Actions/__snapshots__/dex.test.ts.snap +850 -0
  212. package/src/viem/Actions/amm.test.ts +98 -169
  213. package/src/viem/Actions/amm.ts +68 -155
  214. package/src/viem/Actions/dex.test.ts +563 -484
  215. package/src/viem/Actions/dex.ts +173 -0
  216. package/src/viem/Actions/fee.test.ts +23 -34
  217. package/src/viem/Actions/fee.ts +7 -0
  218. package/src/viem/Actions/index.ts +1 -0
  219. package/src/viem/Actions/policy.test.ts +19 -33
  220. package/src/viem/Actions/reward.test.ts +457 -0
  221. package/src/viem/Actions/reward.ts +999 -0
  222. package/src/viem/Actions/token.test.ts +453 -287
  223. package/src/viem/Actions/token.ts +452 -540
  224. package/src/viem/Addresses.ts +1 -2
  225. package/src/viem/Chain.ts +70 -20
  226. package/src/viem/Decorator.test.ts +2 -1
  227. package/src/viem/Decorator.ts +996 -421
  228. package/src/viem/Formatters.ts +31 -5
  229. package/src/viem/P256.ts +1 -0
  230. package/src/viem/Secp256k1.ts +1 -0
  231. package/src/viem/TokenIds.ts +1 -2
  232. package/src/viem/Transaction.ts +53 -7
  233. package/src/viem/WebAuthnP256.ts +140 -0
  234. package/src/viem/WebCryptoP256.ts +1 -0
  235. package/src/viem/e2e.test.ts +1126 -297
  236. package/src/viem/index.ts +6 -3
  237. package/src/viem/internal/account.ts +107 -0
  238. package/src/viem/internal/types.ts +9 -0
  239. package/src/wagmi/Actions/__snapshots__/dex.test.ts.snap +310 -0
  240. package/src/wagmi/Actions/amm.test.ts +198 -0
  241. package/src/wagmi/Actions/amm.ts +691 -0
  242. package/src/wagmi/Actions/dex.test.ts +1507 -0
  243. package/src/wagmi/Actions/dex.ts +1640 -0
  244. package/src/wagmi/Actions/fee.test.ts +63 -0
  245. package/src/wagmi/Actions/fee.ts +208 -0
  246. package/src/wagmi/Actions/index.ts +5 -0
  247. package/src/wagmi/Actions/reward.test.ts +210 -0
  248. package/src/wagmi/Actions/reward.ts +632 -0
  249. package/src/wagmi/Actions/token.test.ts +1308 -0
  250. package/src/wagmi/Actions/token.ts +2613 -0
  251. package/src/wagmi/Connector.test.ts +53 -0
  252. package/src/wagmi/Connector.ts +367 -0
  253. package/src/wagmi/Hooks/__snapshots__/dex.test.ts.snap +457 -0
  254. package/src/wagmi/Hooks/amm.test.ts +424 -0
  255. package/src/wagmi/Hooks/amm.ts +806 -0
  256. package/src/wagmi/Hooks/dex.test.ts +1017 -0
  257. package/src/wagmi/Hooks/dex.ts +1685 -0
  258. package/src/wagmi/Hooks/fee.test.ts +166 -0
  259. package/src/wagmi/Hooks/fee.ts +206 -0
  260. package/src/wagmi/Hooks/index.ts +5 -0
  261. package/src/wagmi/Hooks/reward.test.ts +219 -0
  262. package/src/wagmi/Hooks/reward.ts +672 -0
  263. package/src/wagmi/Hooks/token.test.ts +1670 -0
  264. package/src/wagmi/Hooks/token.ts +2906 -0
  265. package/src/wagmi/index.ts +3 -0
  266. package/src/wagmi/internal/types.ts +16 -0
  267. package/dist/viem/Client.d.ts +0 -27
  268. package/dist/viem/Client.d.ts.map +0 -1
  269. package/dist/viem/Client.js +0 -28
  270. package/dist/viem/Client.js.map +0 -1
  271. package/dist/viem/Tick.d.ts.map +0 -1
  272. package/dist/viem/Tick.js.map +0 -1
  273. package/src/viem/Client.bench-d.ts +0 -8
  274. package/src/viem/Client.test.ts +0 -178
  275. package/src/viem/Client.ts +0 -91
  276. /package/dist/{viem → ox}/Tick.js +0 -0
package/dist/viem/Abis.js CHANGED
@@ -1,887 +1,1112 @@
1
1
  // Generated with `pnpm gen:abis`. Do not modify manually.
2
- export const tip20 = [
2
+ export const nonce = [
3
3
  {
4
- name: 'name',
4
+ name: 'getNonce',
5
5
  type: 'function',
6
6
  stateMutability: 'view',
7
- inputs: [],
8
- outputs: [{ type: 'string' }],
7
+ inputs: [
8
+ { type: 'address', name: 'account' },
9
+ { type: 'uint256', name: 'nonceKey' },
10
+ ],
11
+ outputs: [{ type: 'uint64', name: 'nonce' }],
9
12
  },
10
13
  {
11
- name: 'symbol',
14
+ name: 'getActiveNonceKeyCount',
12
15
  type: 'function',
13
16
  stateMutability: 'view',
14
- inputs: [],
15
- outputs: [{ type: 'string' }],
17
+ inputs: [{ type: 'address', name: 'account' }],
18
+ outputs: [{ type: 'uint256', name: 'count' }],
16
19
  },
17
20
  {
18
- name: 'decimals',
21
+ name: 'NonceIncremented',
22
+ type: 'event',
23
+ inputs: [
24
+ { type: 'address', name: 'account', indexed: true },
25
+ { type: 'uint256', name: 'nonceKey', indexed: true },
26
+ { type: 'uint64', name: 'newNonce' },
27
+ ],
28
+ },
29
+ {
30
+ name: 'ActiveKeyCountChanged',
31
+ type: 'event',
32
+ inputs: [
33
+ { type: 'address', name: 'account', indexed: true },
34
+ { type: 'uint256', name: 'newCount' },
35
+ ],
36
+ },
37
+ { name: 'ProtocolNonceNotSupported', type: 'error', inputs: [] },
38
+ { name: 'InvalidNonceKey', type: 'error', inputs: [] },
39
+ { name: 'NonceOverflow', type: 'error', inputs: [] },
40
+ ];
41
+ export const stablecoinExchange = [
42
+ {
43
+ name: 'createPair',
19
44
  type: 'function',
20
- stateMutability: 'view',
21
- inputs: [],
22
- outputs: [{ type: 'uint8' }],
45
+ stateMutability: 'nonpayable',
46
+ inputs: [{ type: 'address', name: 'base' }],
47
+ outputs: [{ type: 'bytes32', name: 'key' }],
23
48
  },
24
49
  {
25
- name: 'totalSupply',
50
+ name: 'place',
26
51
  type: 'function',
27
- stateMutability: 'view',
28
- inputs: [],
29
- outputs: [{ type: 'uint256' }],
52
+ stateMutability: 'nonpayable',
53
+ inputs: [
54
+ { type: 'address', name: 'token' },
55
+ { type: 'uint128', name: 'amount' },
56
+ { type: 'bool', name: 'isBid' },
57
+ { type: 'int16', name: 'tick' },
58
+ ],
59
+ outputs: [{ type: 'uint128', name: 'orderId' }],
30
60
  },
31
61
  {
32
- name: 'quoteToken',
62
+ name: 'placeFlip',
33
63
  type: 'function',
34
- stateMutability: 'view',
35
- inputs: [],
36
- outputs: [{ type: 'address' }],
64
+ stateMutability: 'nonpayable',
65
+ inputs: [
66
+ { type: 'address', name: 'token' },
67
+ { type: 'uint128', name: 'amount' },
68
+ { type: 'bool', name: 'isBid' },
69
+ { type: 'int16', name: 'tick' },
70
+ { type: 'int16', name: 'flipTick' },
71
+ ],
72
+ outputs: [{ type: 'uint128', name: 'orderId' }],
37
73
  },
38
74
  {
39
- name: 'nextQuoteToken',
75
+ name: 'cancel',
40
76
  type: 'function',
41
- stateMutability: 'view',
42
- inputs: [],
43
- outputs: [{ type: 'address' }],
77
+ stateMutability: 'nonpayable',
78
+ inputs: [{ type: 'uint128', name: 'orderId' }],
79
+ outputs: [],
44
80
  },
45
81
  {
46
- name: 'balanceOf',
82
+ name: 'executeBlock',
47
83
  type: 'function',
48
- stateMutability: 'view',
49
- inputs: [{ type: 'address', name: 'account' }],
50
- outputs: [{ type: 'uint256' }],
84
+ stateMutability: 'nonpayable',
85
+ inputs: [],
86
+ outputs: [],
51
87
  },
52
88
  {
53
- name: 'transfer',
89
+ name: 'swapExactAmountIn',
54
90
  type: 'function',
55
91
  stateMutability: 'nonpayable',
56
92
  inputs: [
57
- { type: 'address', name: 'to' },
58
- { type: 'uint256', name: 'amount' },
93
+ { type: 'address', name: 'tokenIn' },
94
+ { type: 'address', name: 'tokenOut' },
95
+ { type: 'uint128', name: 'amountIn' },
96
+ { type: 'uint128', name: 'minAmountOut' },
59
97
  ],
60
- outputs: [{ type: 'bool' }],
98
+ outputs: [{ type: 'uint128', name: 'amountOut' }],
61
99
  },
62
100
  {
63
- name: 'approve',
101
+ name: 'swapExactAmountOut',
64
102
  type: 'function',
65
103
  stateMutability: 'nonpayable',
66
104
  inputs: [
67
- { type: 'address', name: 'spender' },
68
- { type: 'uint256', name: 'amount' },
105
+ { type: 'address', name: 'tokenIn' },
106
+ { type: 'address', name: 'tokenOut' },
107
+ { type: 'uint128', name: 'amountOut' },
108
+ { type: 'uint128', name: 'maxAmountIn' },
69
109
  ],
70
- outputs: [{ type: 'bool' }],
110
+ outputs: [{ type: 'uint128', name: 'amountIn' }],
71
111
  },
72
112
  {
73
- name: 'allowance',
113
+ name: 'quoteSwapExactAmountIn',
74
114
  type: 'function',
75
115
  stateMutability: 'view',
76
116
  inputs: [
77
- { type: 'address', name: 'owner' },
78
- { type: 'address', name: 'spender' },
117
+ { type: 'address', name: 'tokenIn' },
118
+ { type: 'address', name: 'tokenOut' },
119
+ { type: 'uint128', name: 'amountIn' },
79
120
  ],
80
- outputs: [{ type: 'uint256' }],
121
+ outputs: [{ type: 'uint128', name: 'amountOut' }],
81
122
  },
82
123
  {
83
- name: 'transferFrom',
124
+ name: 'quoteSwapExactAmountOut',
84
125
  type: 'function',
85
- stateMutability: 'nonpayable',
126
+ stateMutability: 'view',
86
127
  inputs: [
87
- { type: 'address', name: 'from' },
88
- { type: 'address', name: 'to' },
89
- { type: 'uint256', name: 'amount' },
128
+ { type: 'address', name: 'tokenIn' },
129
+ { type: 'address', name: 'tokenOut' },
130
+ { type: 'uint128', name: 'amountOut' },
90
131
  ],
91
- outputs: [{ type: 'bool' }],
132
+ outputs: [{ type: 'uint128', name: 'amountIn' }],
92
133
  },
93
134
  {
94
- name: 'mint',
135
+ name: 'balanceOf',
95
136
  type: 'function',
96
- stateMutability: 'nonpayable',
137
+ stateMutability: 'view',
97
138
  inputs: [
98
- { type: 'address', name: 'to' },
99
- { type: 'uint256', name: 'amount' },
139
+ { type: 'address', name: 'user' },
140
+ { type: 'address', name: 'token' },
100
141
  ],
101
- outputs: [],
142
+ outputs: [{ type: 'uint128' }],
102
143
  },
103
144
  {
104
- name: 'burn',
145
+ name: 'withdraw',
105
146
  type: 'function',
106
147
  stateMutability: 'nonpayable',
107
- inputs: [{ type: 'uint256', name: 'amount' }],
148
+ inputs: [
149
+ { type: 'address', name: 'token' },
150
+ { type: 'uint128', name: 'amount' },
151
+ ],
108
152
  outputs: [],
109
153
  },
110
154
  {
111
- name: 'currency',
155
+ name: 'getOrder',
112
156
  type: 'function',
113
157
  stateMutability: 'view',
114
- inputs: [],
115
- outputs: [{ type: 'string' }],
158
+ inputs: [{ type: 'uint128', name: 'orderId' }],
159
+ outputs: [
160
+ {
161
+ type: 'tuple',
162
+ components: [
163
+ { type: 'uint128', name: 'orderId' },
164
+ { type: 'address', name: 'maker' },
165
+ { type: 'bytes32', name: 'bookKey' },
166
+ { type: 'bool', name: 'isBid' },
167
+ { type: 'int16', name: 'tick' },
168
+ { type: 'uint128', name: 'amount' },
169
+ { type: 'uint128', name: 'remaining' },
170
+ { type: 'uint128', name: 'prev' },
171
+ { type: 'uint128', name: 'next' },
172
+ { type: 'bool', name: 'isFlip' },
173
+ { type: 'int16', name: 'flipTick' },
174
+ ],
175
+ },
176
+ ],
116
177
  },
117
178
  {
118
- name: 'supplyCap',
179
+ name: 'getPriceLevel',
119
180
  type: 'function',
120
181
  stateMutability: 'view',
121
- inputs: [],
122
- outputs: [{ type: 'uint256' }],
182
+ inputs: [
183
+ { type: 'address', name: 'base' },
184
+ { type: 'int16', name: 'tick' },
185
+ { type: 'bool', name: 'isBid' },
186
+ ],
187
+ outputs: [
188
+ {
189
+ type: 'tuple',
190
+ components: [
191
+ { type: 'uint128', name: 'head' },
192
+ { type: 'uint128', name: 'tail' },
193
+ { type: 'uint128', name: 'totalLiquidity' },
194
+ ],
195
+ },
196
+ ],
123
197
  },
124
198
  {
125
- name: 'paused',
199
+ name: 'pairKey',
126
200
  type: 'function',
127
201
  stateMutability: 'view',
128
- inputs: [],
129
- outputs: [{ type: 'bool' }],
202
+ inputs: [
203
+ { type: 'address', name: 'tokenA' },
204
+ { type: 'address', name: 'tokenB' },
205
+ ],
206
+ outputs: [{ type: 'bytes32' }],
130
207
  },
131
208
  {
132
- name: 'transferPolicyId',
209
+ name: 'activeOrderId',
133
210
  type: 'function',
134
211
  stateMutability: 'view',
135
212
  inputs: [],
136
- outputs: [{ type: 'uint64' }],
213
+ outputs: [{ type: 'uint128' }],
137
214
  },
138
215
  {
139
- name: 'nonces',
216
+ name: 'pendingOrderId',
140
217
  type: 'function',
141
218
  stateMutability: 'view',
142
- inputs: [{ type: 'address', name: 'owner' }],
143
- outputs: [{ type: 'uint256' }],
219
+ inputs: [],
220
+ outputs: [{ type: 'uint128' }],
144
221
  },
145
222
  {
146
- name: 'salts',
223
+ name: 'books',
147
224
  type: 'function',
148
225
  stateMutability: 'view',
149
- inputs: [
150
- { type: 'address', name: 'owner' },
151
- { type: 'bytes4', name: 'salt' },
226
+ inputs: [{ type: 'bytes32', name: 'pairKey' }],
227
+ outputs: [
228
+ {
229
+ type: 'tuple',
230
+ components: [
231
+ { type: 'address', name: 'base' },
232
+ { type: 'address', name: 'quote' },
233
+ { type: 'int16', name: 'bestBidTick' },
234
+ { type: 'int16', name: 'bestAskTick' },
235
+ ],
236
+ },
152
237
  ],
153
- outputs: [{ type: 'bool' }],
154
238
  },
155
239
  {
156
- name: 'burnBlocked',
157
- type: 'function',
158
- stateMutability: 'nonpayable',
240
+ name: 'PairCreated',
241
+ type: 'event',
159
242
  inputs: [
160
- { type: 'address', name: 'from' },
161
- { type: 'uint256', name: 'amount' },
243
+ { type: 'bytes32', name: 'key', indexed: true },
244
+ { type: 'address', name: 'base', indexed: true },
245
+ { type: 'address', name: 'quote', indexed: true },
162
246
  ],
163
- outputs: [],
164
247
  },
165
248
  {
166
- name: 'mintWithMemo',
167
- type: 'function',
168
- stateMutability: 'nonpayable',
249
+ name: 'OrderPlaced',
250
+ type: 'event',
169
251
  inputs: [
170
- { type: 'address', name: 'to' },
171
- { type: 'uint256', name: 'amount' },
172
- { type: 'bytes32', name: 'memo' },
252
+ { type: 'uint128', name: 'orderId', indexed: true },
253
+ { type: 'address', name: 'maker', indexed: true },
254
+ { type: 'address', name: 'token', indexed: true },
255
+ { type: 'uint128', name: 'amount' },
256
+ { type: 'bool', name: 'isBid' },
257
+ { type: 'int16', name: 'tick' },
173
258
  ],
174
- outputs: [],
175
259
  },
176
260
  {
177
- name: 'burnWithMemo',
178
- type: 'function',
179
- stateMutability: 'nonpayable',
261
+ name: 'FlipOrderPlaced',
262
+ type: 'event',
180
263
  inputs: [
181
- { type: 'uint256', name: 'amount' },
182
- { type: 'bytes32', name: 'memo' },
264
+ { type: 'uint128', name: 'orderId', indexed: true },
265
+ { type: 'address', name: 'maker', indexed: true },
266
+ { type: 'address', name: 'token', indexed: true },
267
+ { type: 'uint128', name: 'amount' },
268
+ { type: 'bool', name: 'isBid' },
269
+ { type: 'int16', name: 'tick' },
270
+ { type: 'int16', name: 'flipTick' },
183
271
  ],
184
- outputs: [],
185
272
  },
186
273
  {
187
- name: 'transferWithMemo',
188
- type: 'function',
189
- stateMutability: 'nonpayable',
274
+ name: 'OrderFilled',
275
+ type: 'event',
190
276
  inputs: [
191
- { type: 'address', name: 'to' },
192
- { type: 'uint256', name: 'amount' },
193
- { type: 'bytes32', name: 'memo' },
194
- ],
195
- outputs: [],
196
- },
197
- {
198
- name: 'transferFromWithMemo',
199
- type: 'function',
200
- stateMutability: 'nonpayable',
201
- inputs: [
202
- { type: 'address', name: 'from' },
203
- { type: 'address', name: 'to' },
204
- { type: 'uint256', name: 'amount' },
205
- { type: 'bytes32', name: 'memo' },
277
+ { type: 'uint128', name: 'orderId', indexed: true },
278
+ { type: 'address', name: 'maker', indexed: true },
279
+ { type: 'uint128', name: 'amountFilled' },
280
+ { type: 'bool', name: 'partialFill' },
206
281
  ],
207
- outputs: [{ type: 'bool' }],
208
282
  },
209
283
  {
210
- name: 'changeTransferPolicyId',
211
- type: 'function',
212
- stateMutability: 'nonpayable',
213
- inputs: [{ type: 'uint64', name: 'newPolicyId' }],
214
- outputs: [],
284
+ name: 'OrderCancelled',
285
+ type: 'event',
286
+ inputs: [{ type: 'uint128', name: 'orderId', indexed: true }],
215
287
  },
288
+ { name: 'Unauthorized', type: 'error', inputs: [] },
289
+ { name: 'PairDoesNotExist', type: 'error', inputs: [] },
290
+ { name: 'PairAlreadyExists', type: 'error', inputs: [] },
291
+ { name: 'OrderDoesNotExist', type: 'error', inputs: [] },
292
+ { name: 'IdenticalTokens', type: 'error', inputs: [] },
216
293
  {
217
- name: 'setSupplyCap',
218
- type: 'function',
219
- stateMutability: 'nonpayable',
220
- inputs: [{ type: 'uint256', name: 'newSupplyCap' }],
221
- outputs: [],
294
+ name: 'TickOutOfBounds',
295
+ type: 'error',
296
+ inputs: [{ type: 'int16', name: 'tick' }],
297
+ },
298
+ { name: 'InvalidTick', type: 'error', inputs: [] },
299
+ { name: 'InvalidFlipTick', type: 'error', inputs: [] },
300
+ { name: 'InsufficientBalance', type: 'error', inputs: [] },
301
+ { name: 'InsufficientLiquidity', type: 'error', inputs: [] },
302
+ { name: 'InsufficientOutput', type: 'error', inputs: [] },
303
+ { name: 'MaxInputExceeded', type: 'error', inputs: [] },
304
+ {
305
+ name: 'BelowMinimumOrderSize',
306
+ type: 'error',
307
+ inputs: [{ type: 'uint128', name: 'amount' }],
222
308
  },
309
+ ];
310
+ export const tip20 = [
223
311
  {
224
- name: 'pause',
312
+ name: 'name',
225
313
  type: 'function',
226
- stateMutability: 'nonpayable',
314
+ stateMutability: 'view',
227
315
  inputs: [],
228
- outputs: [],
316
+ outputs: [{ type: 'string' }],
229
317
  },
230
318
  {
231
- name: 'unpause',
319
+ name: 'symbol',
232
320
  type: 'function',
233
- stateMutability: 'nonpayable',
321
+ stateMutability: 'view',
234
322
  inputs: [],
235
- outputs: [],
323
+ outputs: [{ type: 'string' }],
236
324
  },
237
325
  {
238
- name: 'updateQuoteToken',
326
+ name: 'decimals',
239
327
  type: 'function',
240
- stateMutability: 'nonpayable',
241
- inputs: [{ type: 'address', name: 'newQuoteToken' }],
242
- outputs: [],
328
+ stateMutability: 'view',
329
+ inputs: [],
330
+ outputs: [{ type: 'uint8' }],
243
331
  },
244
332
  {
245
- name: 'finalizeQuoteTokenUpdate',
333
+ name: 'totalSupply',
246
334
  type: 'function',
247
- stateMutability: 'nonpayable',
335
+ stateMutability: 'view',
248
336
  inputs: [],
249
- outputs: [],
337
+ outputs: [{ type: 'uint256' }],
250
338
  },
251
339
  {
252
- name: 'permit',
340
+ name: 'quoteToken',
253
341
  type: 'function',
254
- stateMutability: 'nonpayable',
255
- inputs: [
256
- { type: 'address', name: 'owner' },
257
- { type: 'address', name: 'spender' },
258
- { type: 'uint256', name: 'value' },
259
- { type: 'uint256', name: 'deadline' },
260
- { type: 'uint8', name: 'v' },
261
- { type: 'bytes32', name: 'r' },
262
- { type: 'bytes32', name: 's' },
263
- ],
264
- outputs: [],
342
+ stateMutability: 'view',
343
+ inputs: [],
344
+ outputs: [{ type: 'address' }],
265
345
  },
266
346
  {
267
- name: 'DOMAIN_SEPARATOR',
347
+ name: 'nextQuoteToken',
268
348
  type: 'function',
269
349
  stateMutability: 'view',
270
350
  inputs: [],
271
- outputs: [{ type: 'bytes32' }],
351
+ outputs: [{ type: 'address' }],
272
352
  },
273
353
  {
274
- name: 'Transfer',
275
- type: 'event',
276
- inputs: [
277
- { type: 'address', name: 'from', indexed: true },
278
- { type: 'address', name: 'to', indexed: true },
279
- { type: 'uint256', name: 'amount' },
280
- ],
354
+ name: 'balanceOf',
355
+ type: 'function',
356
+ stateMutability: 'view',
357
+ inputs: [{ type: 'address', name: 'account' }],
358
+ outputs: [{ type: 'uint256' }],
281
359
  },
282
360
  {
283
- name: 'Approval',
284
- type: 'event',
361
+ name: 'transfer',
362
+ type: 'function',
363
+ stateMutability: 'nonpayable',
285
364
  inputs: [
286
- { type: 'address', name: 'owner', indexed: true },
287
- { type: 'address', name: 'spender', indexed: true },
365
+ { type: 'address', name: 'to' },
288
366
  { type: 'uint256', name: 'amount' },
289
367
  ],
368
+ outputs: [{ type: 'bool' }],
290
369
  },
291
370
  {
292
- name: 'Mint',
293
- type: 'event',
371
+ name: 'approve',
372
+ type: 'function',
373
+ stateMutability: 'nonpayable',
294
374
  inputs: [
295
- { type: 'address', name: 'to', indexed: true },
375
+ { type: 'address', name: 'spender' },
296
376
  { type: 'uint256', name: 'amount' },
297
377
  ],
378
+ outputs: [{ type: 'bool' }],
298
379
  },
299
380
  {
300
- name: 'Burn',
301
- type: 'event',
381
+ name: 'allowance',
382
+ type: 'function',
383
+ stateMutability: 'view',
302
384
  inputs: [
303
- { type: 'address', name: 'from', indexed: true },
304
- { type: 'uint256', name: 'amount' },
385
+ { type: 'address', name: 'owner' },
386
+ { type: 'address', name: 'spender' },
305
387
  ],
388
+ outputs: [{ type: 'uint256' }],
306
389
  },
307
390
  {
308
- name: 'BurnBlocked',
309
- type: 'event',
391
+ name: 'transferFrom',
392
+ type: 'function',
393
+ stateMutability: 'nonpayable',
310
394
  inputs: [
311
- { type: 'address', name: 'from', indexed: true },
395
+ { type: 'address', name: 'from' },
396
+ { type: 'address', name: 'to' },
312
397
  { type: 'uint256', name: 'amount' },
313
398
  ],
399
+ outputs: [{ type: 'bool' }],
314
400
  },
315
401
  {
316
- name: 'TransferWithMemo',
317
- type: 'event',
402
+ name: 'mint',
403
+ type: 'function',
404
+ stateMutability: 'nonpayable',
318
405
  inputs: [
319
- { type: 'address', name: 'from', indexed: true },
320
- { type: 'address', name: 'to', indexed: true },
406
+ { type: 'address', name: 'to' },
321
407
  { type: 'uint256', name: 'amount' },
322
- { type: 'bytes32', name: 'memo' },
323
408
  ],
409
+ outputs: [],
324
410
  },
325
411
  {
326
- name: 'TransferPolicyUpdate',
327
- type: 'event',
328
- inputs: [
329
- { type: 'address', name: 'updater', indexed: true },
330
- { type: 'uint64', name: 'newPolicyId', indexed: true },
331
- ],
412
+ name: 'burn',
413
+ type: 'function',
414
+ stateMutability: 'nonpayable',
415
+ inputs: [{ type: 'uint256', name: 'amount' }],
416
+ outputs: [],
332
417
  },
333
418
  {
334
- name: 'SupplyCapUpdate',
335
- type: 'event',
336
- inputs: [
337
- { type: 'address', name: 'updater', indexed: true },
338
- { type: 'uint256', name: 'newSupplyCap', indexed: true },
339
- ],
419
+ name: 'currency',
420
+ type: 'function',
421
+ stateMutability: 'view',
422
+ inputs: [],
423
+ outputs: [{ type: 'string' }],
340
424
  },
341
425
  {
342
- name: 'PauseStateUpdate',
343
- type: 'event',
344
- inputs: [
345
- { type: 'address', name: 'updater', indexed: true },
346
- { type: 'bool', name: 'isPaused' },
347
- ],
426
+ name: 'supplyCap',
427
+ type: 'function',
428
+ stateMutability: 'view',
429
+ inputs: [],
430
+ outputs: [{ type: 'uint256' }],
348
431
  },
349
432
  {
350
- name: 'UpdateQuoteToken',
351
- type: 'event',
352
- inputs: [
353
- { type: 'address', name: 'updater', indexed: true },
354
- { type: 'address', name: 'newQuoteToken', indexed: true },
355
- ],
433
+ name: 'paused',
434
+ type: 'function',
435
+ stateMutability: 'view',
436
+ inputs: [],
437
+ outputs: [{ type: 'bool' }],
356
438
  },
357
439
  {
358
- name: 'QuoteTokenUpdateFinalized',
359
- type: 'event',
360
- inputs: [
361
- { type: 'address', name: 'updater', indexed: true },
362
- { type: 'address', name: 'newQuoteToken', indexed: true },
363
- ],
440
+ name: 'transferPolicyId',
441
+ type: 'function',
442
+ stateMutability: 'view',
443
+ inputs: [],
444
+ outputs: [{ type: 'uint64' }],
364
445
  },
365
- { name: 'InsufficientBalance', type: 'error', inputs: [] },
366
- { name: 'InsufficientAllowance', type: 'error', inputs: [] },
367
- { name: 'SupplyCapExceeded', type: 'error', inputs: [] },
368
- { name: 'InvalidSignature', type: 'error', inputs: [] },
369
- { name: 'InvalidPayload', type: 'error', inputs: [] },
370
- { name: 'InvalidNonce', type: 'error', inputs: [] },
371
- { name: 'StringTooLong', type: 'error', inputs: [] },
372
- { name: 'PolicyForbids', type: 'error', inputs: [] },
373
- { name: 'InvalidRecipient', type: 'error', inputs: [] },
374
- { name: 'Expired', type: 'error', inputs: [] },
375
- { name: 'SaltAlreadyUsed', type: 'error', inputs: [] },
376
- { name: 'ContractPaused', type: 'error', inputs: [] },
377
- { name: 'InvalidCurrency', type: 'error', inputs: [] },
378
- { name: 'InvalidQuoteToken', type: 'error', inputs: [] },
379
- { name: 'TransfersDisabled', type: 'error', inputs: [] },
380
446
  {
381
- name: 'grantRole',
447
+ name: 'burnBlocked',
382
448
  type: 'function',
383
449
  stateMutability: 'nonpayable',
384
450
  inputs: [
385
- { type: 'bytes32', name: 'role' },
386
- { type: 'address', name: 'account' },
451
+ { type: 'address', name: 'from' },
452
+ { type: 'uint256', name: 'amount' },
387
453
  ],
388
454
  outputs: [],
389
455
  },
390
456
  {
391
- name: 'revokeRole',
457
+ name: 'mintWithMemo',
392
458
  type: 'function',
393
459
  stateMutability: 'nonpayable',
394
460
  inputs: [
395
- { type: 'bytes32', name: 'role' },
396
- { type: 'address', name: 'account' },
461
+ { type: 'address', name: 'to' },
462
+ { type: 'uint256', name: 'amount' },
463
+ { type: 'bytes32', name: 'memo' },
397
464
  ],
398
465
  outputs: [],
399
466
  },
400
467
  {
401
- name: 'renounceRole',
468
+ name: 'burnWithMemo',
402
469
  type: 'function',
403
470
  stateMutability: 'nonpayable',
404
- inputs: [{ type: 'bytes32', name: 'role' }],
471
+ inputs: [
472
+ { type: 'uint256', name: 'amount' },
473
+ { type: 'bytes32', name: 'memo' },
474
+ ],
405
475
  outputs: [],
406
476
  },
407
477
  {
408
- name: 'setRoleAdmin',
478
+ name: 'transferWithMemo',
409
479
  type: 'function',
410
480
  stateMutability: 'nonpayable',
411
481
  inputs: [
412
- { type: 'bytes32', name: 'role' },
413
- { type: 'bytes32', name: 'adminRole' },
482
+ { type: 'address', name: 'to' },
483
+ { type: 'uint256', name: 'amount' },
484
+ { type: 'bytes32', name: 'memo' },
414
485
  ],
415
486
  outputs: [],
416
487
  },
417
488
  {
418
- name: 'hasRole',
489
+ name: 'transferFromWithMemo',
419
490
  type: 'function',
420
- stateMutability: 'view',
491
+ stateMutability: 'nonpayable',
421
492
  inputs: [
422
- { type: 'address', name: 'account' },
423
- { type: 'bytes32', name: 'role' },
493
+ { type: 'address', name: 'from' },
494
+ { type: 'address', name: 'to' },
495
+ { type: 'uint256', name: 'amount' },
496
+ { type: 'bytes32', name: 'memo' },
424
497
  ],
425
498
  outputs: [{ type: 'bool' }],
426
499
  },
427
500
  {
428
- name: 'getRoleAdmin',
501
+ name: 'changeTransferPolicyId',
429
502
  type: 'function',
430
- stateMutability: 'view',
431
- inputs: [{ type: 'bytes32', name: 'role' }],
432
- outputs: [{ type: 'bytes32' }],
503
+ stateMutability: 'nonpayable',
504
+ inputs: [{ type: 'uint64', name: 'newPolicyId' }],
505
+ outputs: [],
433
506
  },
434
507
  {
435
- name: 'RoleMembershipUpdated',
436
- type: 'event',
437
- inputs: [
438
- { type: 'bytes32', name: 'role', indexed: true },
439
- { type: 'address', name: 'account', indexed: true },
440
- { type: 'address', name: 'sender', indexed: true },
441
- { type: 'bool', name: 'hasRole' },
442
- ],
508
+ name: 'setSupplyCap',
509
+ type: 'function',
510
+ stateMutability: 'nonpayable',
511
+ inputs: [{ type: 'uint256', name: 'newSupplyCap' }],
512
+ outputs: [],
443
513
  },
444
514
  {
445
- name: 'RoleAdminUpdated',
446
- type: 'event',
447
- inputs: [
448
- { type: 'bytes32', name: 'role', indexed: true },
449
- { type: 'bytes32', name: 'newAdminRole', indexed: true },
450
- { type: 'address', name: 'sender', indexed: true },
451
- ],
515
+ name: 'pause',
516
+ type: 'function',
517
+ stateMutability: 'nonpayable',
518
+ inputs: [],
519
+ outputs: [],
452
520
  },
453
- { name: 'Unauthorized', type: 'error', inputs: [] },
454
- ];
455
- export const tip20Factory = [
456
521
  {
457
- name: 'createToken',
522
+ name: 'unpause',
523
+ type: 'function',
524
+ stateMutability: 'nonpayable',
525
+ inputs: [],
526
+ outputs: [],
527
+ },
528
+ {
529
+ name: 'setNextQuoteToken',
530
+ type: 'function',
531
+ stateMutability: 'nonpayable',
532
+ inputs: [{ type: 'address', name: 'newQuoteToken' }],
533
+ outputs: [],
534
+ },
535
+ {
536
+ name: 'completeQuoteTokenUpdate',
537
+ type: 'function',
538
+ stateMutability: 'nonpayable',
539
+ inputs: [],
540
+ outputs: [],
541
+ },
542
+ {
543
+ name: 'PAUSE_ROLE',
544
+ type: 'function',
545
+ stateMutability: 'view',
546
+ inputs: [],
547
+ outputs: [{ type: 'bytes32' }],
548
+ },
549
+ {
550
+ name: 'UNPAUSE_ROLE',
551
+ type: 'function',
552
+ stateMutability: 'view',
553
+ inputs: [],
554
+ outputs: [{ type: 'bytes32' }],
555
+ },
556
+ {
557
+ name: 'ISSUER_ROLE',
558
+ type: 'function',
559
+ stateMutability: 'view',
560
+ inputs: [],
561
+ outputs: [{ type: 'bytes32' }],
562
+ },
563
+ {
564
+ name: 'BURN_BLOCKED_ROLE',
565
+ type: 'function',
566
+ stateMutability: 'view',
567
+ inputs: [],
568
+ outputs: [{ type: 'bytes32' }],
569
+ },
570
+ {
571
+ name: 'startReward',
458
572
  type: 'function',
459
573
  stateMutability: 'nonpayable',
460
574
  inputs: [
461
- { type: 'string', name: 'name' },
462
- { type: 'string', name: 'symbol' },
463
- { type: 'string', name: 'currency' },
464
- { type: 'address', name: 'quoteToken' },
465
- { type: 'address', name: 'admin' },
575
+ { type: 'uint256', name: 'amount' },
576
+ { type: 'uint32', name: 'secs' },
466
577
  ],
578
+ outputs: [{ type: 'uint64' }],
579
+ },
580
+ {
581
+ name: 'setRewardRecipient',
582
+ type: 'function',
583
+ stateMutability: 'nonpayable',
584
+ inputs: [{ type: 'address', name: 'recipient' }],
585
+ outputs: [],
586
+ },
587
+ {
588
+ name: 'cancelReward',
589
+ type: 'function',
590
+ stateMutability: 'nonpayable',
591
+ inputs: [{ type: 'uint64', name: 'id' }],
467
592
  outputs: [{ type: 'uint256' }],
468
593
  },
469
594
  {
470
- name: 'tokenIdCounter',
595
+ name: 'claimRewards',
471
596
  type: 'function',
472
- stateMutability: 'view',
597
+ stateMutability: 'nonpayable',
473
598
  inputs: [],
474
599
  outputs: [{ type: 'uint256' }],
475
600
  },
476
601
  {
477
- name: 'TokenCreated',
478
- type: 'event',
479
- inputs: [
480
- { type: 'address', name: 'token', indexed: true },
481
- { type: 'uint256', name: 'tokenId', indexed: true },
482
- { type: 'string', name: 'name' },
483
- { type: 'string', name: 'symbol' },
484
- { type: 'string', name: 'currency' },
485
- { type: 'address', name: 'admin' },
602
+ name: 'finalizeStreams',
603
+ type: 'function',
604
+ stateMutability: 'nonpayable',
605
+ inputs: [{ type: 'uint64', name: 'timestamp' }],
606
+ outputs: [],
607
+ },
608
+ {
609
+ name: 'getStream',
610
+ type: 'function',
611
+ stateMutability: 'view',
612
+ inputs: [{ type: 'uint64', name: 'id' }],
613
+ outputs: [
614
+ {
615
+ type: 'tuple',
616
+ components: [
617
+ { type: 'address', name: 'funder' },
618
+ { type: 'uint64', name: 'startTime' },
619
+ { type: 'uint64', name: 'endTime' },
620
+ { type: 'uint256', name: 'ratePerSecondScaled' },
621
+ { type: 'uint256', name: 'amountTotal' },
622
+ ],
623
+ },
486
624
  ],
487
625
  },
488
- ];
489
- export const tip403Registry = [
490
626
  {
491
- name: 'policyIdCounter',
627
+ name: 'totalRewardPerSecond',
628
+ type: 'function',
629
+ stateMutability: 'view',
630
+ inputs: [],
631
+ outputs: [{ type: 'uint256' }],
632
+ },
633
+ {
634
+ name: 'optedInSupply',
635
+ type: 'function',
636
+ stateMutability: 'view',
637
+ inputs: [],
638
+ outputs: [{ type: 'uint128' }],
639
+ },
640
+ {
641
+ name: 'nextStreamId',
492
642
  type: 'function',
493
643
  stateMutability: 'view',
494
644
  inputs: [],
495
645
  outputs: [{ type: 'uint64' }],
496
646
  },
497
647
  {
498
- name: 'policyData',
648
+ name: 'userRewardInfo',
499
649
  type: 'function',
500
650
  stateMutability: 'view',
501
- inputs: [{ type: 'uint64', name: 'policyId' }],
651
+ inputs: [{ type: 'address', name: 'account' }],
502
652
  outputs: [
503
- { type: 'uint8', name: 'policyType' },
504
- { type: 'address', name: 'admin' },
653
+ {
654
+ type: 'tuple',
655
+ components: [
656
+ { type: 'address', name: 'delegatedRecipient' },
657
+ { type: 'uint256', name: 'rewardPerToken' },
658
+ { type: 'uint256', name: 'rewardBalance' },
659
+ ],
660
+ },
505
661
  ],
506
662
  },
507
663
  {
508
- name: 'isAuthorized',
509
- type: 'function',
510
- stateMutability: 'view',
664
+ name: 'Transfer',
665
+ type: 'event',
511
666
  inputs: [
512
- { type: 'uint64', name: 'policyId' },
513
- { type: 'address', name: 'user' },
667
+ { type: 'address', name: 'from', indexed: true },
668
+ { type: 'address', name: 'to', indexed: true },
669
+ { type: 'uint256', name: 'amount' },
514
670
  ],
515
- outputs: [{ type: 'bool' }],
516
671
  },
517
672
  {
518
- name: 'createPolicy',
519
- type: 'function',
520
- stateMutability: 'nonpayable',
673
+ name: 'Approval',
674
+ type: 'event',
521
675
  inputs: [
522
- { type: 'address', name: 'admin' },
523
- { type: 'uint8', name: 'policyType' },
676
+ { type: 'address', name: 'owner', indexed: true },
677
+ { type: 'address', name: 'spender', indexed: true },
678
+ { type: 'uint256', name: 'amount' },
524
679
  ],
525
- outputs: [{ type: 'uint64' }],
526
680
  },
527
681
  {
528
- name: 'createPolicyWithAccounts',
529
- type: 'function',
530
- stateMutability: 'nonpayable',
682
+ name: 'Mint',
683
+ type: 'event',
531
684
  inputs: [
532
- { type: 'address', name: 'admin' },
533
- { type: 'uint8', name: 'policyType' },
534
- { type: 'address[]', name: 'accounts' },
685
+ { type: 'address', name: 'to', indexed: true },
686
+ { type: 'uint256', name: 'amount' },
535
687
  ],
536
- outputs: [{ type: 'uint64' }],
537
688
  },
538
689
  {
539
- name: 'setPolicyAdmin',
540
- type: 'function',
541
- stateMutability: 'nonpayable',
690
+ name: 'Burn',
691
+ type: 'event',
542
692
  inputs: [
543
- { type: 'uint64', name: 'policyId' },
544
- { type: 'address', name: 'admin' },
693
+ { type: 'address', name: 'from', indexed: true },
694
+ { type: 'uint256', name: 'amount' },
545
695
  ],
546
- outputs: [],
547
696
  },
548
697
  {
549
- name: 'modifyPolicyWhitelist',
550
- type: 'function',
551
- stateMutability: 'nonpayable',
698
+ name: 'BurnBlocked',
699
+ type: 'event',
552
700
  inputs: [
553
- { type: 'uint64', name: 'policyId' },
554
- { type: 'address', name: 'account' },
555
- { type: 'bool', name: 'allowed' },
701
+ { type: 'address', name: 'from', indexed: true },
702
+ { type: 'uint256', name: 'amount' },
556
703
  ],
557
- outputs: [],
558
704
  },
559
705
  {
560
- name: 'modifyPolicyBlacklist',
561
- type: 'function',
562
- stateMutability: 'nonpayable',
706
+ name: 'TransferWithMemo',
707
+ type: 'event',
563
708
  inputs: [
564
- { type: 'uint64', name: 'policyId' },
565
- { type: 'address', name: 'account' },
566
- { type: 'bool', name: 'restricted' },
709
+ { type: 'address', name: 'from', indexed: true },
710
+ { type: 'address', name: 'to', indexed: true },
711
+ { type: 'uint256', name: 'amount' },
712
+ { type: 'bytes32', name: 'memo', indexed: true },
567
713
  ],
568
- outputs: [],
569
714
  },
570
715
  {
571
- name: 'PolicyAdminUpdated',
716
+ name: 'TransferPolicyUpdate',
572
717
  type: 'event',
573
718
  inputs: [
574
- { type: 'uint64', name: 'policyId', indexed: true },
575
719
  { type: 'address', name: 'updater', indexed: true },
576
- { type: 'address', name: 'admin', indexed: true },
720
+ { type: 'uint64', name: 'newPolicyId', indexed: true },
577
721
  ],
578
722
  },
579
723
  {
580
- name: 'PolicyCreated',
724
+ name: 'SupplyCapUpdate',
581
725
  type: 'event',
582
726
  inputs: [
583
- { type: 'uint64', name: 'policyId', indexed: true },
584
727
  { type: 'address', name: 'updater', indexed: true },
585
- { type: 'uint8', name: 'policyType' },
728
+ { type: 'uint256', name: 'newSupplyCap', indexed: true },
586
729
  ],
587
730
  },
588
731
  {
589
- name: 'WhitelistUpdated',
732
+ name: 'PauseStateUpdate',
590
733
  type: 'event',
591
734
  inputs: [
592
- { type: 'uint64', name: 'policyId', indexed: true },
593
735
  { type: 'address', name: 'updater', indexed: true },
594
- { type: 'address', name: 'account', indexed: true },
595
- { type: 'bool', name: 'allowed' },
736
+ { type: 'bool', name: 'isPaused' },
596
737
  ],
597
738
  },
598
739
  {
599
- name: 'BlacklistUpdated',
740
+ name: 'NextQuoteTokenSet',
600
741
  type: 'event',
601
742
  inputs: [
602
- { type: 'uint64', name: 'policyId', indexed: true },
603
743
  { type: 'address', name: 'updater', indexed: true },
604
- { type: 'address', name: 'account', indexed: true },
605
- { type: 'bool', name: 'restricted' },
744
+ { type: 'address', name: 'nextQuoteToken', indexed: true },
606
745
  ],
607
746
  },
608
- { name: 'Unauthorized', type: 'error', inputs: [] },
609
- { name: 'IncompatiblePolicyType', type: 'error', inputs: [] },
610
- { name: 'SelfOwnedPolicyMustBeWhitelist', type: 'error', inputs: [] },
611
- ];
612
- export const tip4217Registry = [
613
747
  {
614
- name: 'getCurrencyDecimals',
615
- type: 'function',
616
- stateMutability: 'view',
617
- inputs: [{ type: 'string', name: 'currency' }],
618
- outputs: [{ type: 'uint8' }],
748
+ name: 'QuoteTokenUpdate',
749
+ type: 'event',
750
+ inputs: [
751
+ { type: 'address', name: 'updater', indexed: true },
752
+ { type: 'address', name: 'newQuoteToken', indexed: true },
753
+ ],
619
754
  },
620
- ];
621
- export const nonce = [
622
755
  {
623
- name: 'getNonce',
624
- type: 'function',
625
- stateMutability: 'view',
756
+ name: 'RewardScheduled',
757
+ type: 'event',
626
758
  inputs: [
627
- { type: 'address', name: 'account' },
628
- { type: 'uint64', name: 'nonceKey' },
759
+ { type: 'address', name: 'funder', indexed: true },
760
+ { type: 'uint64', name: 'id', indexed: true },
761
+ { type: 'uint256', name: 'amount' },
762
+ { type: 'uint32', name: 'durationSeconds' },
629
763
  ],
630
- outputs: [{ type: 'uint64' }],
631
764
  },
632
765
  {
633
- name: 'getActiveNonceKeyCount',
634
- type: 'function',
635
- stateMutability: 'view',
636
- inputs: [{ type: 'address', name: 'account' }],
637
- outputs: [{ type: 'uint256' }],
766
+ name: 'RewardCanceled',
767
+ type: 'event',
768
+ inputs: [
769
+ { type: 'address', name: 'funder', indexed: true },
770
+ { type: 'uint64', name: 'id', indexed: true },
771
+ { type: 'uint256', name: 'refund' },
772
+ ],
638
773
  },
639
- ];
640
- export const tipAccountRegistrar = [
641
774
  {
642
- name: 'delegateToDefault',
643
- type: 'function',
644
- stateMutability: 'nonpayable',
775
+ name: 'RewardRecipientSet',
776
+ type: 'event',
645
777
  inputs: [
646
- { type: 'bytes32', name: 'hash' },
647
- { type: 'bytes', name: 'signature' },
778
+ { type: 'address', name: 'holder', indexed: true },
779
+ { type: 'address', name: 'recipient', indexed: true },
648
780
  ],
649
- outputs: [{ type: 'address', name: 'authority' }],
650
781
  },
651
782
  {
652
- name: 'getDelegationMessage',
653
- type: 'function',
654
- stateMutability: 'pure',
655
- inputs: [],
656
- outputs: [{ type: 'string' }],
657
- },
658
- { name: 'InvalidSignature', type: 'error', inputs: [] },
659
- { name: 'CodeNotEmpty', type: 'error', inputs: [] },
660
- { name: 'NonceNotZero', type: 'error', inputs: [] },
661
- ];
662
- export const feeAmm = [
663
- {
664
- name: 'getPoolId',
665
- type: 'function',
666
- stateMutability: 'pure',
783
+ name: 'InsufficientBalance',
784
+ type: 'error',
667
785
  inputs: [
668
- { type: 'address', name: 'userToken' },
669
- { type: 'address', name: 'validatorToken' },
786
+ { type: 'uint256', name: 'available' },
787
+ { type: 'uint256', name: 'required' },
788
+ { type: 'address', name: 'token' },
670
789
  ],
671
- outputs: [{ type: 'bytes32' }],
672
790
  },
791
+ { name: 'InsufficientAllowance', type: 'error', inputs: [] },
792
+ { name: 'SupplyCapExceeded', type: 'error', inputs: [] },
793
+ { name: 'InvalidSupplyCap', type: 'error', inputs: [] },
794
+ { name: 'InvalidPayload', type: 'error', inputs: [] },
795
+ { name: 'StringTooLong', type: 'error', inputs: [] },
796
+ { name: 'PolicyForbids', type: 'error', inputs: [] },
797
+ { name: 'InvalidRecipient', type: 'error', inputs: [] },
798
+ { name: 'ContractPaused', type: 'error', inputs: [] },
799
+ { name: 'InvalidCurrency', type: 'error', inputs: [] },
800
+ { name: 'InvalidQuoteToken', type: 'error', inputs: [] },
801
+ { name: 'TransfersDisabled', type: 'error', inputs: [] },
802
+ { name: 'InvalidAmount', type: 'error', inputs: [] },
803
+ { name: 'NotStreamFunder', type: 'error', inputs: [] },
804
+ { name: 'StreamInactive', type: 'error', inputs: [] },
805
+ { name: 'NoOptedInSupply', type: 'error', inputs: [] },
806
+ { name: 'Unauthorized', type: 'error', inputs: [] },
673
807
  {
674
- name: 'getPool',
808
+ name: 'hasRole',
675
809
  type: 'function',
676
810
  stateMutability: 'view',
677
811
  inputs: [
678
- { type: 'address', name: 'userToken' },
679
- { type: 'address', name: 'validatorToken' },
680
- ],
681
- outputs: [
682
- {
683
- type: 'tuple',
684
- components: [
685
- { type: 'uint128', name: 'reserveUserToken' },
686
- { type: 'uint128', name: 'reserveValidatorToken' },
687
- ],
688
- },
812
+ { type: 'address', name: 'account' },
813
+ { type: 'bytes32', name: 'role' },
689
814
  ],
815
+ outputs: [{ type: 'bool' }],
690
816
  },
691
817
  {
692
- name: 'pools',
818
+ name: 'getRoleAdmin',
693
819
  type: 'function',
694
820
  stateMutability: 'view',
695
- inputs: [{ type: 'bytes32', name: 'poolId' }],
696
- outputs: [
697
- {
698
- type: 'tuple',
699
- components: [
700
- { type: 'uint128', name: 'reserveUserToken' },
701
- { type: 'uint128', name: 'reserveValidatorToken' },
702
- ],
703
- },
704
- ],
821
+ inputs: [{ type: 'bytes32', name: 'role' }],
822
+ outputs: [{ type: 'bytes32' }],
705
823
  },
706
824
  {
707
- name: 'mint',
825
+ name: 'grantRole',
708
826
  type: 'function',
709
827
  stateMutability: 'nonpayable',
710
828
  inputs: [
711
- { type: 'address', name: 'userToken' },
712
- { type: 'address', name: 'validatorToken' },
713
- { type: 'uint256', name: 'amountUserToken' },
714
- { type: 'uint256', name: 'amountValidatorToken' },
715
- { type: 'address', name: 'to' },
829
+ { type: 'bytes32', name: 'role' },
830
+ { type: 'address', name: 'account' },
716
831
  ],
717
- outputs: [{ type: 'uint256', name: 'liquidity' }],
832
+ outputs: [],
718
833
  },
719
834
  {
720
- name: 'burn',
835
+ name: 'revokeRole',
721
836
  type: 'function',
722
837
  stateMutability: 'nonpayable',
723
838
  inputs: [
724
- { type: 'address', name: 'userToken' },
725
- { type: 'address', name: 'validatorToken' },
726
- { type: 'uint256', name: 'liquidity' },
727
- { type: 'address', name: 'to' },
728
- ],
729
- outputs: [
730
- { type: 'uint256', name: 'amountUserToken' },
731
- { type: 'uint256', name: 'amountValidatorToken' },
732
- ],
733
- },
734
- {
735
- name: 'totalSupply',
736
- type: 'function',
737
- stateMutability: 'view',
738
- inputs: [{ type: 'bytes32', name: 'poolId' }],
739
- outputs: [{ type: 'uint256' }],
740
- },
741
- {
742
- name: 'liquidityBalances',
743
- type: 'function',
744
- stateMutability: 'view',
745
- inputs: [
746
- { type: 'bytes32', name: 'poolId' },
747
- { type: 'address', name: 'user' },
839
+ { type: 'bytes32', name: 'role' },
840
+ { type: 'address', name: 'account' },
748
841
  ],
749
- outputs: [{ type: 'uint256' }],
842
+ outputs: [],
750
843
  },
751
844
  {
752
- name: 'rebalanceSwap',
845
+ name: 'renounceRole',
753
846
  type: 'function',
754
847
  stateMutability: 'nonpayable',
755
- inputs: [
756
- { type: 'address', name: 'userToken' },
757
- { type: 'address', name: 'validatorToken' },
758
- { type: 'uint256', name: 'amountOut' },
759
- { type: 'address', name: 'to' },
760
- ],
761
- outputs: [{ type: 'uint256', name: 'amountIn' }],
848
+ inputs: [{ type: 'bytes32', name: 'role' }],
849
+ outputs: [],
762
850
  },
763
851
  {
764
- name: 'calculateLiquidity',
852
+ name: 'setRoleAdmin',
765
853
  type: 'function',
766
- stateMutability: 'pure',
854
+ stateMutability: 'nonpayable',
767
855
  inputs: [
768
- { type: 'uint256', name: 'x' },
769
- { type: 'uint256', name: 'y' },
856
+ { type: 'bytes32', name: 'role' },
857
+ { type: 'bytes32', name: 'adminRole' },
770
858
  ],
771
- outputs: [{ type: 'uint256' }],
859
+ outputs: [],
772
860
  },
773
861
  {
774
- name: 'Mint',
862
+ name: 'RoleMembershipUpdated',
775
863
  type: 'event',
776
864
  inputs: [
865
+ { type: 'bytes32', name: 'role', indexed: true },
866
+ { type: 'address', name: 'account', indexed: true },
777
867
  { type: 'address', name: 'sender', indexed: true },
778
- { type: 'address', name: 'userToken', indexed: true },
779
- { type: 'address', name: 'validatorToken', indexed: true },
780
- { type: 'uint256', name: 'amountUserToken' },
781
- { type: 'uint256', name: 'amountValidatorToken' },
782
- { type: 'uint256', name: 'liquidity' },
868
+ { type: 'bool', name: 'hasRole' },
783
869
  ],
784
870
  },
785
871
  {
786
- name: 'Burn',
872
+ name: 'RoleAdminUpdated',
787
873
  type: 'event',
788
874
  inputs: [
875
+ { type: 'bytes32', name: 'role', indexed: true },
876
+ { type: 'bytes32', name: 'newAdminRole', indexed: true },
789
877
  { type: 'address', name: 'sender', indexed: true },
790
- { type: 'address', name: 'userToken', indexed: true },
791
- { type: 'address', name: 'validatorToken', indexed: true },
792
- { type: 'uint256', name: 'amountUserToken' },
793
- { type: 'uint256', name: 'amountValidatorToken' },
794
- { type: 'uint256', name: 'liquidity' },
795
- { type: 'address', name: 'to' },
796
878
  ],
797
879
  },
880
+ { name: 'Unauthorized', type: 'error', inputs: [] },
881
+ ];
882
+ export const tip20Factory = [
798
883
  {
799
- name: 'RebalanceSwap',
800
- type: 'event',
884
+ name: 'createToken',
885
+ type: 'function',
886
+ stateMutability: 'nonpayable',
801
887
  inputs: [
802
- { type: 'address', name: 'userToken', indexed: true },
803
- { type: 'address', name: 'validatorToken', indexed: true },
804
- { type: 'address', name: 'swapper', indexed: true },
805
- { type: 'uint256', name: 'amountIn' },
806
- { type: 'uint256', name: 'amountOut' },
888
+ { type: 'string', name: 'name' },
889
+ { type: 'string', name: 'symbol' },
890
+ { type: 'string', name: 'currency' },
891
+ { type: 'address', name: 'quoteToken' },
892
+ { type: 'address', name: 'admin' },
807
893
  ],
894
+ outputs: [{ type: 'address' }],
808
895
  },
809
896
  {
810
- name: 'FeeSwap',
897
+ name: 'tokenIdCounter',
898
+ type: 'function',
899
+ stateMutability: 'view',
900
+ inputs: [],
901
+ outputs: [{ type: 'uint256' }],
902
+ },
903
+ {
904
+ name: 'isTIP20',
905
+ type: 'function',
906
+ stateMutability: 'view',
907
+ inputs: [{ type: 'address', name: 'token' }],
908
+ outputs: [{ type: 'bool' }],
909
+ },
910
+ {
911
+ name: 'TokenCreated',
811
912
  type: 'event',
812
913
  inputs: [
813
- { type: 'address', name: 'userToken', indexed: true },
814
- { type: 'address', name: 'validatorToken', indexed: true },
815
- { type: 'uint256', name: 'amountIn' },
816
- { type: 'uint256', name: 'amountOut' },
914
+ { type: 'address', name: 'token', indexed: true },
915
+ { type: 'uint256', name: 'tokenId', indexed: true },
916
+ { type: 'string', name: 'name' },
917
+ { type: 'string', name: 'symbol' },
918
+ { type: 'string', name: 'currency' },
919
+ { type: 'address', name: 'quoteToken' },
920
+ { type: 'address', name: 'admin' },
817
921
  ],
818
922
  },
819
- { name: 'IdenticalAddresses', type: 'error', inputs: [] },
820
- { name: 'ZeroAddress', type: 'error', inputs: [] },
821
- { name: 'PoolExists', type: 'error', inputs: [] },
822
- { name: 'PoolDoesNotExist', type: 'error', inputs: [] },
823
- { name: 'InvalidToken', type: 'error', inputs: [] },
824
- { name: 'InsufficientLiquidity', type: 'error', inputs: [] },
825
- { name: 'OnlyProtocol', type: 'error', inputs: [] },
826
- { name: 'InsufficientPoolBalance', type: 'error', inputs: [] },
827
- { name: 'InsufficientReserves', type: 'error', inputs: [] },
828
- { name: 'InsufficientLiquidityBalance', type: 'error', inputs: [] },
829
- { name: 'MustDepositLowerBalanceToken', type: 'error', inputs: [] },
830
- { name: 'InvalidAmount', type: 'error', inputs: [] },
831
- { name: 'InvalidRebalanceState', type: 'error', inputs: [] },
832
- { name: 'InvalidRebalanceDirection', type: 'error', inputs: [] },
833
- { name: 'InvalidNewReserves', type: 'error', inputs: [] },
834
- { name: 'CannotSupportPendingSwaps', type: 'error', inputs: [] },
835
- { name: 'DivisionByZero', type: 'error', inputs: [] },
836
- { name: 'InvalidSwapCalculation', type: 'error', inputs: [] },
837
- { name: 'InsufficientLiquidityForPending', type: 'error', inputs: [] },
838
- { name: 'TokenTransferFailed', type: 'error', inputs: [] },
839
- { name: 'InternalError', type: 'error', inputs: [] },
840
923
  ];
841
- export const feeManager = [
924
+ export const tip20RewardsRegistry = [
842
925
  {
843
- name: 'BASIS_POINTS',
926
+ name: 'finalizeStreams',
844
927
  type: 'function',
845
- stateMutability: 'pure',
928
+ stateMutability: 'nonpayable',
846
929
  inputs: [],
847
- outputs: [{ type: 'uint256' }],
930
+ outputs: [],
848
931
  },
932
+ { name: 'Unauthorized', type: 'error', inputs: [] },
933
+ { name: 'StreamsAlreadyFinalized', type: 'error', inputs: [] },
934
+ ];
935
+ export const tip403Registry = [
849
936
  {
850
- name: 'FEE_BPS',
937
+ name: 'policyIdCounter',
851
938
  type: 'function',
852
- stateMutability: 'pure',
939
+ stateMutability: 'view',
853
940
  inputs: [],
854
- outputs: [{ type: 'uint256' }],
941
+ outputs: [{ type: 'uint64' }],
855
942
  },
856
943
  {
857
- name: 'userTokens',
944
+ name: 'policyData',
858
945
  type: 'function',
859
946
  stateMutability: 'view',
860
- inputs: [{ type: 'address', name: 'user' }],
861
- outputs: [{ type: 'address' }],
947
+ inputs: [{ type: 'uint64', name: 'policyId' }],
948
+ outputs: [
949
+ { type: 'uint8', name: 'policyType' },
950
+ { type: 'address', name: 'admin' },
951
+ ],
862
952
  },
863
953
  {
864
- name: 'validatorTokens',
954
+ name: 'isAuthorized',
865
955
  type: 'function',
866
956
  stateMutability: 'view',
867
- inputs: [{ type: 'address', name: 'validator' }],
868
- outputs: [{ type: 'address' }],
957
+ inputs: [
958
+ { type: 'uint64', name: 'policyId' },
959
+ { type: 'address', name: 'user' },
960
+ ],
961
+ outputs: [{ type: 'bool' }],
869
962
  },
870
963
  {
871
- name: 'setUserToken',
964
+ name: 'createPolicy',
872
965
  type: 'function',
873
966
  stateMutability: 'nonpayable',
874
- inputs: [{ type: 'address', name: 'token' }],
875
- outputs: [],
967
+ inputs: [
968
+ { type: 'address', name: 'admin' },
969
+ { type: 'uint8', name: 'policyType' },
970
+ ],
971
+ outputs: [{ type: 'uint64' }],
876
972
  },
877
973
  {
878
- name: 'setValidatorToken',
974
+ name: 'createPolicyWithAccounts',
879
975
  type: 'function',
880
976
  stateMutability: 'nonpayable',
881
- inputs: [{ type: 'address', name: 'token' }],
882
- outputs: [],
883
- },
884
- {
977
+ inputs: [
978
+ { type: 'address', name: 'admin' },
979
+ { type: 'uint8', name: 'policyType' },
980
+ { type: 'address[]', name: 'accounts' },
981
+ ],
982
+ outputs: [{ type: 'uint64' }],
983
+ },
984
+ {
985
+ name: 'setPolicyAdmin',
986
+ type: 'function',
987
+ stateMutability: 'nonpayable',
988
+ inputs: [
989
+ { type: 'uint64', name: 'policyId' },
990
+ { type: 'address', name: 'admin' },
991
+ ],
992
+ outputs: [],
993
+ },
994
+ {
995
+ name: 'modifyPolicyWhitelist',
996
+ type: 'function',
997
+ stateMutability: 'nonpayable',
998
+ inputs: [
999
+ { type: 'uint64', name: 'policyId' },
1000
+ { type: 'address', name: 'account' },
1001
+ { type: 'bool', name: 'allowed' },
1002
+ ],
1003
+ outputs: [],
1004
+ },
1005
+ {
1006
+ name: 'modifyPolicyBlacklist',
1007
+ type: 'function',
1008
+ stateMutability: 'nonpayable',
1009
+ inputs: [
1010
+ { type: 'uint64', name: 'policyId' },
1011
+ { type: 'address', name: 'account' },
1012
+ { type: 'bool', name: 'restricted' },
1013
+ ],
1014
+ outputs: [],
1015
+ },
1016
+ {
1017
+ name: 'PolicyAdminUpdated',
1018
+ type: 'event',
1019
+ inputs: [
1020
+ { type: 'uint64', name: 'policyId', indexed: true },
1021
+ { type: 'address', name: 'updater', indexed: true },
1022
+ { type: 'address', name: 'admin', indexed: true },
1023
+ ],
1024
+ },
1025
+ {
1026
+ name: 'PolicyCreated',
1027
+ type: 'event',
1028
+ inputs: [
1029
+ { type: 'uint64', name: 'policyId', indexed: true },
1030
+ { type: 'address', name: 'updater', indexed: true },
1031
+ { type: 'uint8', name: 'policyType' },
1032
+ ],
1033
+ },
1034
+ {
1035
+ name: 'WhitelistUpdated',
1036
+ type: 'event',
1037
+ inputs: [
1038
+ { type: 'uint64', name: 'policyId', indexed: true },
1039
+ { type: 'address', name: 'updater', indexed: true },
1040
+ { type: 'address', name: 'account', indexed: true },
1041
+ { type: 'bool', name: 'allowed' },
1042
+ ],
1043
+ },
1044
+ {
1045
+ name: 'BlacklistUpdated',
1046
+ type: 'event',
1047
+ inputs: [
1048
+ { type: 'uint64', name: 'policyId', indexed: true },
1049
+ { type: 'address', name: 'updater', indexed: true },
1050
+ { type: 'address', name: 'account', indexed: true },
1051
+ { type: 'bool', name: 'restricted' },
1052
+ ],
1053
+ },
1054
+ { name: 'Unauthorized', type: 'error', inputs: [] },
1055
+ { name: 'IncompatiblePolicyType', type: 'error', inputs: [] },
1056
+ { name: 'SelfOwnedPolicyMustBeWhitelist', type: 'error', inputs: [] },
1057
+ ];
1058
+ export const tipAccountRegistrar = [
1059
+ {
1060
+ name: 'delegateToDefault',
1061
+ type: 'function',
1062
+ stateMutability: 'nonpayable',
1063
+ inputs: [
1064
+ { type: 'bytes32', name: 'hash' },
1065
+ { type: 'bytes', name: 'signature' },
1066
+ ],
1067
+ outputs: [{ type: 'address', name: 'authority' }],
1068
+ },
1069
+ {
1070
+ name: 'getDelegationMessage',
1071
+ type: 'function',
1072
+ stateMutability: 'pure',
1073
+ inputs: [],
1074
+ outputs: [{ type: 'string' }],
1075
+ },
1076
+ { name: 'InvalidSignature', type: 'error', inputs: [] },
1077
+ { name: 'CodeNotEmpty', type: 'error', inputs: [] },
1078
+ { name: 'NonceNotZero', type: 'error', inputs: [] },
1079
+ ];
1080
+ export const feeManager = [
1081
+ {
1082
+ name: 'userTokens',
1083
+ type: 'function',
1084
+ stateMutability: 'view',
1085
+ inputs: [{ type: 'address', name: 'user' }],
1086
+ outputs: [{ type: 'address' }],
1087
+ },
1088
+ {
1089
+ name: 'validatorTokens',
1090
+ type: 'function',
1091
+ stateMutability: 'view',
1092
+ inputs: [{ type: 'address', name: 'validator' }],
1093
+ outputs: [{ type: 'address' }],
1094
+ },
1095
+ {
1096
+ name: 'setUserToken',
1097
+ type: 'function',
1098
+ stateMutability: 'nonpayable',
1099
+ inputs: [{ type: 'address', name: 'token' }],
1100
+ outputs: [],
1101
+ },
1102
+ {
1103
+ name: 'setValidatorToken',
1104
+ type: 'function',
1105
+ stateMutability: 'nonpayable',
1106
+ inputs: [{ type: 'address', name: 'token' }],
1107
+ outputs: [],
1108
+ },
1109
+ {
885
1110
  name: 'getFeeTokenBalance',
886
1111
  type: 'function',
887
1112
  stateMutability: 'view',
@@ -924,251 +1149,287 @@ export const feeManager = [
924
1149
  { name: 'CannotChangeWithinBlock', type: 'error', inputs: [] },
925
1150
  { name: 'TokenPolicyForbids', type: 'error', inputs: [] },
926
1151
  ];
927
- export const stablecoinExchange = [
1152
+ export const feeAmm = [
928
1153
  {
929
- name: 'balanceOf',
1154
+ name: 'getPoolId',
930
1155
  type: 'function',
931
- stateMutability: 'view',
1156
+ stateMutability: 'pure',
932
1157
  inputs: [
933
- { type: 'address', name: 'user' },
934
- { type: 'address', name: 'token' },
1158
+ { type: 'address', name: 'userToken' },
1159
+ { type: 'address', name: 'validatorToken' },
935
1160
  ],
936
- outputs: [{ type: 'uint128' }],
1161
+ outputs: [{ type: 'bytes32' }],
937
1162
  },
938
1163
  {
939
- name: 'quoteSwapExactAmountOut',
1164
+ name: 'getPool',
940
1165
  type: 'function',
941
1166
  stateMutability: 'view',
942
1167
  inputs: [
943
- { type: 'address', name: 'tokenIn' },
944
- { type: 'address', name: 'tokenOut' },
945
- { type: 'uint128', name: 'amountOut' },
1168
+ { type: 'address', name: 'userToken' },
1169
+ { type: 'address', name: 'validatorToken' },
1170
+ ],
1171
+ outputs: [
1172
+ {
1173
+ type: 'tuple',
1174
+ components: [
1175
+ { type: 'uint128', name: 'reserveUserToken' },
1176
+ { type: 'uint128', name: 'reserveValidatorToken' },
1177
+ ],
1178
+ },
946
1179
  ],
947
- outputs: [{ type: 'uint128', name: 'amountIn' }],
948
1180
  },
949
1181
  {
950
- name: 'quoteSwapExactAmountIn',
1182
+ name: 'pools',
951
1183
  type: 'function',
952
1184
  stateMutability: 'view',
1185
+ inputs: [{ type: 'bytes32', name: 'poolId' }],
1186
+ outputs: [
1187
+ {
1188
+ type: 'tuple',
1189
+ components: [
1190
+ { type: 'uint128', name: 'reserveUserToken' },
1191
+ { type: 'uint128', name: 'reserveValidatorToken' },
1192
+ ],
1193
+ },
1194
+ ],
1195
+ },
1196
+ {
1197
+ name: 'mint',
1198
+ type: 'function',
1199
+ stateMutability: 'nonpayable',
953
1200
  inputs: [
954
- { type: 'address', name: 'tokenIn' },
955
- { type: 'address', name: 'tokenOut' },
956
- { type: 'uint128', name: 'amountIn' },
1201
+ { type: 'address', name: 'userToken' },
1202
+ { type: 'address', name: 'validatorToken' },
1203
+ { type: 'uint256', name: 'amountUserToken' },
1204
+ { type: 'uint256', name: 'amountValidatorToken' },
1205
+ { type: 'address', name: 'to' },
957
1206
  ],
958
- outputs: [{ type: 'uint128', name: 'amountOut' }],
1207
+ outputs: [{ type: 'uint256', name: 'liquidity' }],
959
1208
  },
960
1209
  {
961
- name: 'pairKey',
1210
+ name: 'mintWithValidatorToken',
962
1211
  type: 'function',
963
- stateMutability: 'pure',
1212
+ stateMutability: 'nonpayable',
964
1213
  inputs: [
965
- { type: 'address', name: 'tokenA' },
966
- { type: 'address', name: 'tokenB' },
1214
+ { type: 'address', name: 'userToken' },
1215
+ { type: 'address', name: 'validatorToken' },
1216
+ { type: 'uint256', name: 'amountValidatorToken' },
1217
+ { type: 'address', name: 'to' },
967
1218
  ],
968
- outputs: [{ type: 'bytes32', name: 'key' }],
1219
+ outputs: [{ type: 'uint256', name: 'liquidity' }],
969
1220
  },
970
1221
  {
971
- name: 'getPriceLevel',
1222
+ name: 'burn',
972
1223
  type: 'function',
973
- stateMutability: 'view',
1224
+ stateMutability: 'nonpayable',
974
1225
  inputs: [
975
- { type: 'address', name: 'base' },
976
- { type: 'int16', name: 'tick' },
977
- { type: 'bool', name: 'isBid' },
1226
+ { type: 'address', name: 'userToken' },
1227
+ { type: 'address', name: 'validatorToken' },
1228
+ { type: 'uint256', name: 'liquidity' },
1229
+ { type: 'address', name: 'to' },
978
1230
  ],
979
1231
  outputs: [
980
- {
981
- type: 'tuple',
982
- name: 'level',
983
- components: [
984
- { type: 'uint128', name: 'head' },
985
- { type: 'uint128', name: 'tail' },
986
- { type: 'uint128', name: 'totalLiquidity' },
987
- ],
988
- },
1232
+ { type: 'uint256', name: 'amountUserToken' },
1233
+ { type: 'uint256', name: 'amountValidatorToken' },
989
1234
  ],
990
1235
  },
991
1236
  {
992
- name: 'activeOrderId',
1237
+ name: 'totalSupply',
993
1238
  type: 'function',
994
1239
  stateMutability: 'view',
995
- inputs: [],
996
- outputs: [{ type: 'uint128' }],
1240
+ inputs: [{ type: 'bytes32', name: 'poolId' }],
1241
+ outputs: [{ type: 'uint256' }],
997
1242
  },
998
1243
  {
999
- name: 'pendingOrderId',
1244
+ name: 'liquidityBalances',
1000
1245
  type: 'function',
1001
1246
  stateMutability: 'view',
1002
- inputs: [],
1003
- outputs: [{ type: 'uint128' }],
1247
+ inputs: [
1248
+ { type: 'bytes32', name: 'poolId' },
1249
+ { type: 'address', name: 'user' },
1250
+ ],
1251
+ outputs: [{ type: 'uint256' }],
1004
1252
  },
1005
1253
  {
1006
- name: 'getOrder',
1254
+ name: 'rebalanceSwap',
1007
1255
  type: 'function',
1008
- stateMutability: 'view',
1009
- inputs: [{ type: 'uint128', name: 'orderId' }],
1010
- outputs: [
1011
- {
1012
- type: 'tuple',
1013
- components: [
1014
- { type: 'address', name: 'maker' },
1015
- { type: 'bytes32', name: 'bookKey' },
1016
- { type: 'bool', name: 'isBid' },
1017
- { type: 'int16', name: 'tick' },
1018
- { type: 'uint128', name: 'amount' },
1019
- { type: 'uint128', name: 'remaining' },
1020
- { type: 'uint128', name: 'prev' },
1021
- { type: 'uint128', name: 'next' },
1022
- { type: 'bool', name: 'isFlip' },
1023
- { type: 'int16', name: 'flipTick' },
1024
- ],
1025
- },
1256
+ stateMutability: 'nonpayable',
1257
+ inputs: [
1258
+ { type: 'address', name: 'userToken' },
1259
+ { type: 'address', name: 'validatorToken' },
1260
+ { type: 'uint256', name: 'amountOut' },
1261
+ { type: 'address', name: 'to' },
1026
1262
  ],
1263
+ outputs: [{ type: 'uint256', name: 'amountIn' }],
1027
1264
  },
1028
1265
  {
1029
- name: 'createPair',
1266
+ name: 'calculateLiquidity',
1030
1267
  type: 'function',
1031
- stateMutability: 'nonpayable',
1032
- inputs: [{ type: 'address', name: 'base' }],
1033
- outputs: [{ type: 'bytes32', name: 'key' }],
1268
+ stateMutability: 'pure',
1269
+ inputs: [
1270
+ { type: 'uint256', name: 'x' },
1271
+ { type: 'uint256', name: 'y' },
1272
+ ],
1273
+ outputs: [{ type: 'uint256' }],
1034
1274
  },
1035
1275
  {
1036
- name: 'swapExactAmountIn',
1037
- type: 'function',
1038
- stateMutability: 'nonpayable',
1276
+ name: 'Mint',
1277
+ type: 'event',
1039
1278
  inputs: [
1040
- { type: 'address', name: 'tokenIn' },
1041
- { type: 'address', name: 'tokenOut' },
1042
- { type: 'uint128', name: 'amountIn' },
1043
- { type: 'uint128', name: 'minAmountOut' },
1279
+ { type: 'address', name: 'sender', indexed: true },
1280
+ { type: 'address', name: 'userToken', indexed: true },
1281
+ { type: 'address', name: 'validatorToken', indexed: true },
1282
+ { type: 'uint256', name: 'amountUserToken' },
1283
+ { type: 'uint256', name: 'amountValidatorToken' },
1284
+ { type: 'uint256', name: 'liquidity' },
1044
1285
  ],
1045
- outputs: [{ type: 'uint128', name: 'amountOut' }],
1046
1286
  },
1047
1287
  {
1048
- name: 'swapExactAmountOut',
1049
- type: 'function',
1050
- stateMutability: 'nonpayable',
1288
+ name: 'Burn',
1289
+ type: 'event',
1051
1290
  inputs: [
1052
- { type: 'address', name: 'tokenIn' },
1053
- { type: 'address', name: 'tokenOut' },
1054
- { type: 'uint128', name: 'amountOut' },
1055
- { type: 'uint128', name: 'maxAmountIn' },
1291
+ { type: 'address', name: 'sender', indexed: true },
1292
+ { type: 'address', name: 'userToken', indexed: true },
1293
+ { type: 'address', name: 'validatorToken', indexed: true },
1294
+ { type: 'uint256', name: 'amountUserToken' },
1295
+ { type: 'uint256', name: 'amountValidatorToken' },
1296
+ { type: 'uint256', name: 'liquidity' },
1297
+ { type: 'address', name: 'to' },
1056
1298
  ],
1057
- outputs: [{ type: 'uint128', name: 'amountIn' }],
1058
1299
  },
1059
1300
  {
1060
- name: 'place',
1061
- type: 'function',
1062
- stateMutability: 'nonpayable',
1301
+ name: 'RebalanceSwap',
1302
+ type: 'event',
1063
1303
  inputs: [
1064
- { type: 'address', name: 'token' },
1065
- { type: 'uint128', name: 'amount' },
1066
- { type: 'bool', name: 'isBid' },
1067
- { type: 'int16', name: 'tick' },
1304
+ { type: 'address', name: 'userToken', indexed: true },
1305
+ { type: 'address', name: 'validatorToken', indexed: true },
1306
+ { type: 'address', name: 'swapper', indexed: true },
1307
+ { type: 'uint256', name: 'amountIn' },
1308
+ { type: 'uint256', name: 'amountOut' },
1068
1309
  ],
1069
- outputs: [{ type: 'uint128', name: 'orderId' }],
1070
1310
  },
1071
1311
  {
1072
- name: 'placeFlip',
1073
- type: 'function',
1074
- stateMutability: 'nonpayable',
1312
+ name: 'FeeSwap',
1313
+ type: 'event',
1075
1314
  inputs: [
1076
- { type: 'address', name: 'token' },
1077
- { type: 'uint128', name: 'amount' },
1078
- { type: 'bool', name: 'isBid' },
1079
- { type: 'int16', name: 'tick' },
1080
- { type: 'int16', name: 'flipTick' },
1315
+ { type: 'address', name: 'userToken', indexed: true },
1316
+ { type: 'address', name: 'validatorToken', indexed: true },
1317
+ { type: 'uint256', name: 'amountIn' },
1318
+ { type: 'uint256', name: 'amountOut' },
1081
1319
  ],
1082
- outputs: [{ type: 'uint128', name: 'orderId' }],
1083
1320
  },
1321
+ { name: 'IdenticalAddresses', type: 'error', inputs: [] },
1322
+ { name: 'ZeroAddress', type: 'error', inputs: [] },
1323
+ { name: 'PoolExists', type: 'error', inputs: [] },
1324
+ { name: 'PoolDoesNotExist', type: 'error', inputs: [] },
1325
+ { name: 'InvalidToken', type: 'error', inputs: [] },
1326
+ { name: 'InsufficientLiquidity', type: 'error', inputs: [] },
1327
+ { name: 'OnlyProtocol', type: 'error', inputs: [] },
1328
+ { name: 'InsufficientPoolBalance', type: 'error', inputs: [] },
1329
+ { name: 'InsufficientReserves', type: 'error', inputs: [] },
1330
+ { name: 'InsufficientLiquidityBalance', type: 'error', inputs: [] },
1331
+ { name: 'MustDepositLowerBalanceToken', type: 'error', inputs: [] },
1332
+ { name: 'InvalidAmount', type: 'error', inputs: [] },
1333
+ { name: 'InvalidRebalanceState', type: 'error', inputs: [] },
1334
+ { name: 'InvalidRebalanceDirection', type: 'error', inputs: [] },
1335
+ { name: 'InvalidNewReserves', type: 'error', inputs: [] },
1336
+ { name: 'CannotSupportPendingSwaps', type: 'error', inputs: [] },
1337
+ { name: 'DivisionByZero', type: 'error', inputs: [] },
1338
+ { name: 'InvalidSwapCalculation', type: 'error', inputs: [] },
1339
+ { name: 'InsufficientLiquidityForPending', type: 'error', inputs: [] },
1340
+ { name: 'TokenTransferFailed', type: 'error', inputs: [] },
1341
+ { name: 'InternalError', type: 'error', inputs: [] },
1342
+ ];
1343
+ export const validatorConfig = [
1084
1344
  {
1085
- name: 'cancel',
1345
+ name: 'getValidators',
1086
1346
  type: 'function',
1087
- stateMutability: 'nonpayable',
1088
- inputs: [{ type: 'uint128', name: 'orderId' }],
1089
- outputs: [],
1347
+ stateMutability: 'view',
1348
+ inputs: [],
1349
+ outputs: [
1350
+ {
1351
+ type: 'tuple[]',
1352
+ name: 'validators',
1353
+ components: [
1354
+ { type: 'bytes32', name: 'publicKey' },
1355
+ { type: 'bool', name: 'active' },
1356
+ { type: 'uint64', name: 'index' },
1357
+ { type: 'address', name: 'validatorAddress' },
1358
+ { type: 'string', name: 'inboundAddress' },
1359
+ { type: 'string', name: 'outboundAddress' },
1360
+ ],
1361
+ },
1362
+ ],
1090
1363
  },
1091
1364
  {
1092
- name: 'withdraw',
1365
+ name: 'addValidator',
1093
1366
  type: 'function',
1094
1367
  stateMutability: 'nonpayable',
1095
1368
  inputs: [
1096
- { type: 'address', name: 'token' },
1097
- { type: 'uint128', name: 'amount' },
1369
+ { type: 'address', name: 'newValidatorAddress' },
1370
+ { type: 'bytes32', name: 'publicKey' },
1371
+ { type: 'bool', name: 'active' },
1372
+ { type: 'string', name: 'inboundAddress' },
1373
+ { type: 'string', name: 'outboundAddress' },
1098
1374
  ],
1099
1375
  outputs: [],
1100
1376
  },
1101
1377
  {
1102
- name: 'executeBlock',
1378
+ name: 'updateValidator',
1103
1379
  type: 'function',
1104
1380
  stateMutability: 'nonpayable',
1105
- inputs: [],
1106
- outputs: [],
1107
- },
1108
- {
1109
- name: 'PairCreated',
1110
- type: 'event',
1111
1381
  inputs: [
1112
- { type: 'bytes32', name: 'key', indexed: true },
1113
- { type: 'address', name: 'base', indexed: true },
1114
- { type: 'address', name: 'quote', indexed: true },
1382
+ { type: 'address', name: 'newValidatorAddress' },
1383
+ { type: 'bytes32', name: 'publicKey' },
1384
+ { type: 'string', name: 'inboundAddress' },
1385
+ { type: 'string', name: 'outboundAddress' },
1115
1386
  ],
1387
+ outputs: [],
1116
1388
  },
1117
1389
  {
1118
- name: 'OrderPlaced',
1119
- type: 'event',
1390
+ name: 'changeValidatorStatus',
1391
+ type: 'function',
1392
+ stateMutability: 'nonpayable',
1120
1393
  inputs: [
1121
- { type: 'uint128', name: 'orderId', indexed: true },
1122
- { type: 'address', name: 'maker', indexed: true },
1123
- { type: 'address', name: 'token', indexed: true },
1124
- { type: 'uint128', name: 'amount' },
1125
- { type: 'bool', name: 'isBid' },
1126
- { type: 'int16', name: 'tick' },
1394
+ { type: 'address', name: 'validator' },
1395
+ { type: 'bool', name: 'active' },
1127
1396
  ],
1397
+ outputs: [],
1128
1398
  },
1129
1399
  {
1130
- name: 'FlipOrderPlaced',
1131
- type: 'event',
1132
- inputs: [
1133
- { type: 'uint128', name: 'orderId', indexed: true },
1134
- { type: 'address', name: 'maker', indexed: true },
1135
- { type: 'address', name: 'token', indexed: true },
1136
- { type: 'uint128', name: 'amount' },
1137
- { type: 'bool', name: 'isBid' },
1138
- { type: 'int16', name: 'tick' },
1139
- { type: 'int16', name: 'flipTick' },
1140
- ],
1400
+ name: 'owner',
1401
+ type: 'function',
1402
+ stateMutability: 'view',
1403
+ inputs: [],
1404
+ outputs: [{ type: 'address' }],
1141
1405
  },
1142
1406
  {
1143
- name: 'OrderCancelled',
1144
- type: 'event',
1145
- inputs: [{ type: 'uint128', name: 'orderId', indexed: true }],
1407
+ name: 'changeOwner',
1408
+ type: 'function',
1409
+ stateMutability: 'nonpayable',
1410
+ inputs: [{ type: 'address', name: 'newOwner' }],
1411
+ outputs: [],
1146
1412
  },
1413
+ { name: 'Unauthorized', type: 'error', inputs: [] },
1414
+ { name: 'ValidatorAlreadyExists', type: 'error', inputs: [] },
1415
+ { name: 'ValidatorNotFound', type: 'error', inputs: [] },
1147
1416
  {
1148
- name: 'OrderFilled',
1149
- type: 'event',
1417
+ name: 'NotHostPort',
1418
+ type: 'error',
1150
1419
  inputs: [
1151
- { type: 'uint128', name: 'orderId', indexed: true },
1152
- { type: 'address', name: 'maker', indexed: true },
1153
- { type: 'uint128', name: 'amountFilled' },
1154
- { type: 'bool', name: 'partialFill' },
1420
+ { type: 'string', name: 'field' },
1421
+ { type: 'string', name: 'input' },
1422
+ { type: 'string', name: 'backtrace' },
1155
1423
  ],
1156
1424
  },
1157
- { name: 'OrderDoesNotExist', type: 'error', inputs: [] },
1158
- { name: 'Unauthorized', type: 'error', inputs: [] },
1159
- { name: 'FillFailed', type: 'error', inputs: [] },
1160
- { name: 'InvalidTick', type: 'error', inputs: [] },
1161
- { name: 'InsufficientBalance', type: 'error', inputs: [] },
1162
- { name: 'InvalidFlipTick', type: 'error', inputs: [] },
1163
1425
  {
1164
- name: 'TickOutOfBounds',
1426
+ name: 'NotIpPort',
1165
1427
  type: 'error',
1166
- inputs: [{ type: 'int16', name: 'tick' }],
1428
+ inputs: [
1429
+ { type: 'string', name: 'field' },
1430
+ { type: 'string', name: 'input' },
1431
+ { type: 'string', name: 'backtrace' },
1432
+ ],
1167
1433
  },
1168
- { name: 'InsufficientLiquidity', type: 'error', inputs: [] },
1169
- { name: 'MaxInputExceeded', type: 'error', inputs: [] },
1170
- { name: 'InsufficientOutput', type: 'error', inputs: [] },
1171
- { name: 'PairDoesNotExist', type: 'error', inputs: [] },
1172
- { name: 'PairAlreadyExists', type: 'error', inputs: [] },
1173
1434
  ];
1174
1435
  //# sourceMappingURL=Abis.js.map