viem 2.43.5 → 2.44.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 (227) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/_cjs/account-abstraction/utils/userOperation/toPackedUserOperation.js +11 -1
  3. package/_cjs/account-abstraction/utils/userOperation/toPackedUserOperation.js.map +1 -1
  4. package/_cjs/actions/wallet/sendTransactionSync.js +1 -0
  5. package/_cjs/actions/wallet/sendTransactionSync.js.map +1 -1
  6. package/_cjs/chains/definitions/codex.js +47 -0
  7. package/_cjs/chains/definitions/codex.js.map +1 -0
  8. package/_cjs/chains/definitions/codexTestnet.js +47 -0
  9. package/_cjs/chains/definitions/codexTestnet.js.map +1 -0
  10. package/_cjs/chains/definitions/paseoPassetHub.js +26 -0
  11. package/_cjs/chains/definitions/paseoPassetHub.js.map +1 -0
  12. package/_cjs/chains/definitions/{tempoTestnet.js → tempoAndantino.js} +5 -5
  13. package/_cjs/chains/definitions/tempoAndantino.js.map +1 -0
  14. package/_cjs/chains/definitions/tempoDevnet.js +6 -0
  15. package/_cjs/chains/definitions/tempoDevnet.js.map +1 -1
  16. package/_cjs/chains/definitions/tempoModerato.js +28 -0
  17. package/_cjs/chains/definitions/tempoModerato.js.map +1 -0
  18. package/_cjs/chains/index.js +23 -14
  19. package/_cjs/chains/index.js.map +1 -1
  20. package/_cjs/errors/version.js +1 -1
  21. package/_cjs/index.js.map +1 -1
  22. package/_cjs/tempo/Abis.js +610 -752
  23. package/_cjs/tempo/Abis.js.map +1 -1
  24. package/_cjs/tempo/Addresses.js +2 -2
  25. package/_cjs/tempo/Addresses.js.map +1 -1
  26. package/_cjs/tempo/Decorator.js +5 -5
  27. package/_cjs/tempo/Decorator.js.map +1 -1
  28. package/_cjs/tempo/actions/amm.js +4 -38
  29. package/_cjs/tempo/actions/amm.js.map +1 -1
  30. package/_cjs/tempo/actions/dex.js +98 -46
  31. package/_cjs/tempo/actions/dex.js.map +1 -1
  32. package/_cjs/tempo/actions/nonce.js +0 -35
  33. package/_cjs/tempo/actions/nonce.js.map +1 -1
  34. package/_cjs/tempo/actions/reward.js +81 -62
  35. package/_cjs/tempo/actions/reward.js.map +1 -1
  36. package/_cjs/tempo/actions/token.js +11 -2
  37. package/_cjs/tempo/actions/token.js.map +1 -1
  38. package/_cjs/tempo/chainConfig.js +5 -10
  39. package/_cjs/tempo/chainConfig.js.map +1 -1
  40. package/_cjs/tempo/index.js +2 -1
  41. package/_cjs/tempo/index.js.map +1 -1
  42. package/_esm/account-abstraction/utils/userOperation/toPackedUserOperation.js +16 -2
  43. package/_esm/account-abstraction/utils/userOperation/toPackedUserOperation.js.map +1 -1
  44. package/_esm/actions/wallet/sendTransactionSync.js +1 -0
  45. package/_esm/actions/wallet/sendTransactionSync.js.map +1 -1
  46. package/_esm/chains/definitions/codex.js +44 -0
  47. package/_esm/chains/definitions/codex.js.map +1 -0
  48. package/_esm/chains/definitions/codexTestnet.js +44 -0
  49. package/_esm/chains/definitions/codexTestnet.js.map +1 -0
  50. package/_esm/chains/definitions/paseoPassetHub.js +23 -0
  51. package/_esm/chains/definitions/paseoPassetHub.js.map +1 -0
  52. package/_esm/chains/definitions/{tempoTestnet.js → tempoAndantino.js} +4 -4
  53. package/_esm/chains/definitions/tempoAndantino.js.map +1 -0
  54. package/_esm/chains/definitions/tempoDevnet.js +6 -0
  55. package/_esm/chains/definitions/tempoDevnet.js.map +1 -1
  56. package/_esm/chains/definitions/tempoModerato.js +25 -0
  57. package/_esm/chains/definitions/tempoModerato.js.map +1 -0
  58. package/_esm/chains/index.js +9 -1
  59. package/_esm/chains/index.js.map +1 -1
  60. package/_esm/errors/version.js +1 -1
  61. package/_esm/index.js.map +1 -1
  62. package/_esm/tempo/Abis.js +609 -751
  63. package/_esm/tempo/Abis.js.map +1 -1
  64. package/_esm/tempo/Addresses.js +1 -1
  65. package/_esm/tempo/Addresses.js.map +1 -1
  66. package/_esm/tempo/Decorator.js +5 -5
  67. package/_esm/tempo/Decorator.js.map +1 -1
  68. package/_esm/tempo/actions/amm.js +4 -62
  69. package/_esm/tempo/actions/amm.js.map +1 -1
  70. package/_esm/tempo/actions/dex.js +192 -48
  71. package/_esm/tempo/actions/dex.js.map +1 -1
  72. package/_esm/tempo/actions/nonce.js +0 -94
  73. package/_esm/tempo/actions/nonce.js.map +1 -1
  74. package/_esm/tempo/actions/reward.js +227 -189
  75. package/_esm/tempo/actions/reward.js.map +1 -1
  76. package/_esm/tempo/actions/token.js +11 -2
  77. package/_esm/tempo/actions/token.js.map +1 -1
  78. package/_esm/tempo/chainConfig.js +2 -7
  79. package/_esm/tempo/chainConfig.js.map +1 -1
  80. package/_esm/tempo/index.js +1 -1
  81. package/_esm/tempo/index.js.map +1 -1
  82. package/_types/account-abstraction/utils/userOperation/toPackedUserOperation.d.ts.map +1 -1
  83. package/_types/actions/wallet/sendTransactionSync.d.ts.map +1 -1
  84. package/_types/celo/chainConfig.d.ts +22 -22
  85. package/_types/celo/formatters.d.ts +11 -11
  86. package/_types/chains/definitions/abstract.d.ts +14 -14
  87. package/_types/chains/definitions/abstractTestnet.d.ts +14 -14
  88. package/_types/chains/definitions/ancient8.d.ts +3 -3
  89. package/_types/chains/definitions/ancient8Sepolia.d.ts +3 -3
  90. package/_types/chains/definitions/base.d.ts +6 -6
  91. package/_types/chains/definitions/baseGoerli.d.ts +3 -3
  92. package/_types/chains/definitions/baseSepolia.d.ts +6 -6
  93. package/_types/chains/definitions/blast.d.ts +3 -3
  94. package/_types/chains/definitions/bob.d.ts +3 -3
  95. package/_types/chains/definitions/bobSepolia.d.ts +3 -3
  96. package/_types/chains/definitions/celo.d.ts +22 -22
  97. package/_types/chains/definitions/celoAlfajores.d.ts +22 -22
  98. package/_types/chains/definitions/celoSepolia.d.ts +22 -22
  99. package/_types/chains/definitions/codex.d.ts +310 -0
  100. package/_types/chains/definitions/codex.d.ts.map +1 -0
  101. package/_types/chains/definitions/codexTestnet.d.ts +310 -0
  102. package/_types/chains/definitions/codexTestnet.d.ts.map +1 -0
  103. package/_types/chains/definitions/dchain.d.ts +3 -3
  104. package/_types/chains/definitions/dchainTestnet.d.ts +3 -3
  105. package/_types/chains/definitions/elysiumTestnet.d.ts +3 -3
  106. package/_types/chains/definitions/fraxtal.d.ts +3 -3
  107. package/_types/chains/definitions/fraxtalTestnet.d.ts +3 -3
  108. package/_types/chains/definitions/funkiMainnet.d.ts +3 -3
  109. package/_types/chains/definitions/funkiSepolia.d.ts +3 -3
  110. package/_types/chains/definitions/garnet.d.ts +3 -3
  111. package/_types/chains/definitions/giwaSepolia.d.ts +6 -6
  112. package/_types/chains/definitions/ink.d.ts +3 -3
  113. package/_types/chains/definitions/inkSepolia.d.ts +3 -3
  114. package/_types/chains/definitions/lisk.d.ts +3 -3
  115. package/_types/chains/definitions/liskSepolia.d.ts +3 -3
  116. package/_types/chains/definitions/metalL2.d.ts +3 -3
  117. package/_types/chains/definitions/mode.d.ts +3 -3
  118. package/_types/chains/definitions/modeTestnet.d.ts +3 -3
  119. package/_types/chains/definitions/optimism.d.ts +3 -3
  120. package/_types/chains/definitions/optimismGoerli.d.ts +3 -3
  121. package/_types/chains/definitions/optimismSepolia.d.ts +3 -3
  122. package/_types/chains/definitions/paseoPassetHub.d.ts +48 -0
  123. package/_types/chains/definitions/paseoPassetHub.d.ts.map +1 -0
  124. package/_types/chains/definitions/pgn.d.ts +3 -3
  125. package/_types/chains/definitions/pgnTestnet.d.ts +3 -3
  126. package/_types/chains/definitions/playfiAlbireo.d.ts +14 -14
  127. package/_types/chains/definitions/pyrope.d.ts +3 -3
  128. package/_types/chains/definitions/redstone.d.ts +3 -3
  129. package/_types/chains/definitions/rss3.d.ts +3 -3
  130. package/_types/chains/definitions/rss3Sepolia.d.ts +3 -3
  131. package/_types/chains/definitions/shape.d.ts +3 -3
  132. package/_types/chains/definitions/shapeSepolia.d.ts +3 -3
  133. package/_types/chains/definitions/snax.d.ts +3 -3
  134. package/_types/chains/definitions/snaxTestnet.d.ts +3 -3
  135. package/_types/chains/definitions/soneium.d.ts +3 -3
  136. package/_types/chains/definitions/soneiumMinato.d.ts +3 -3
  137. package/_types/chains/definitions/sophon.d.ts +14 -14
  138. package/_types/chains/definitions/sophonTestnet.d.ts +14 -14
  139. package/_types/chains/definitions/superseed.d.ts +3 -3
  140. package/_types/chains/definitions/superseedSepolia.d.ts +3 -3
  141. package/_types/chains/definitions/swellchain.d.ts +3 -3
  142. package/_types/chains/definitions/swellchainTestnet.d.ts +3 -3
  143. package/_types/chains/definitions/{tempoTestnet.d.ts → tempoAndantino.d.ts} +36 -40
  144. package/_types/chains/definitions/{tempoTestnet.d.ts.map → tempoAndantino.d.ts.map} +1 -1
  145. package/_types/chains/definitions/tempoDevnet.d.ts +41 -45
  146. package/_types/chains/definitions/tempoDevnet.d.ts.map +1 -1
  147. package/_types/chains/definitions/tempoLocalnet.d.ts +30 -34
  148. package/_types/chains/definitions/tempoLocalnet.d.ts.map +1 -1
  149. package/_types/chains/definitions/tempoModerato.d.ts +912 -0
  150. package/_types/chains/definitions/tempoModerato.d.ts.map +1 -0
  151. package/_types/chains/definitions/treasure.d.ts +14 -14
  152. package/_types/chains/definitions/treasureTopaz.d.ts +14 -14
  153. package/_types/chains/definitions/unichain.d.ts +3 -3
  154. package/_types/chains/definitions/unichainSepolia.d.ts +3 -3
  155. package/_types/chains/definitions/worldchain.d.ts +3 -3
  156. package/_types/chains/definitions/worldchainSepolia.d.ts +3 -3
  157. package/_types/chains/definitions/zircuit.d.ts +3 -3
  158. package/_types/chains/definitions/zircuitGarfieldTestnet.d.ts +3 -3
  159. package/_types/chains/definitions/zircuitTestnet.d.ts +3 -3
  160. package/_types/chains/definitions/zksync.d.ts +14 -14
  161. package/_types/chains/definitions/zksyncInMemoryNode.d.ts +14 -14
  162. package/_types/chains/definitions/zksyncLocalCustomHyperchain.d.ts +14 -14
  163. package/_types/chains/definitions/zksyncLocalHyperchain.d.ts +14 -14
  164. package/_types/chains/definitions/zksyncLocalNode.d.ts +14 -14
  165. package/_types/chains/definitions/zksyncSepoliaTestnet.d.ts +14 -14
  166. package/_types/chains/definitions/zora.d.ts +3 -3
  167. package/_types/chains/definitions/zoraSepolia.d.ts +3 -3
  168. package/_types/chains/definitions/zoraTestnet.d.ts +3 -3
  169. package/_types/chains/index.d.ts +9 -1
  170. package/_types/chains/index.d.ts.map +1 -1
  171. package/_types/errors/version.d.ts +1 -1
  172. package/_types/index.d.ts +2 -0
  173. package/_types/index.d.ts.map +1 -1
  174. package/_types/op-stack/chainConfig.d.ts +3 -3
  175. package/_types/op-stack/formatters.d.ts +3 -3
  176. package/_types/tempo/Abis.d.ts +937 -1194
  177. package/_types/tempo/Abis.d.ts.map +1 -1
  178. package/_types/tempo/Addresses.d.ts +1 -1
  179. package/_types/tempo/Addresses.d.ts.map +1 -1
  180. package/_types/tempo/Decorator.d.ts +91 -85
  181. package/_types/tempo/Decorator.d.ts.map +1 -1
  182. package/_types/tempo/actions/amm.d.ts +19 -360
  183. package/_types/tempo/actions/amm.d.ts.map +1 -1
  184. package/_types/tempo/actions/dex.d.ts +765 -237
  185. package/_types/tempo/actions/dex.d.ts.map +1 -1
  186. package/_types/tempo/actions/fee.d.ts +30 -11
  187. package/_types/tempo/actions/fee.d.ts.map +1 -1
  188. package/_types/tempo/actions/nonce.d.ts +0 -105
  189. package/_types/tempo/actions/nonce.d.ts.map +1 -1
  190. package/_types/tempo/actions/policy.d.ts +60 -0
  191. package/_types/tempo/actions/policy.d.ts.map +1 -1
  192. package/_types/tempo/actions/reward.d.ts +350 -526
  193. package/_types/tempo/actions/reward.d.ts.map +1 -1
  194. package/_types/tempo/actions/token.d.ts +368 -1984
  195. package/_types/tempo/actions/token.d.ts.map +1 -1
  196. package/_types/tempo/chainConfig.d.ts +16 -19
  197. package/_types/tempo/chainConfig.d.ts.map +1 -1
  198. package/_types/tempo/index.d.ts +1 -1
  199. package/_types/tempo/index.d.ts.map +1 -1
  200. package/_types/utils/formatters/transaction.d.ts +1 -1
  201. package/_types/utils/formatters/transactionRequest.d.ts +1 -1
  202. package/_types/zksync/chainConfig.d.ts +14 -14
  203. package/_types/zksync/formatters.d.ts +14 -14
  204. package/account-abstraction/utils/userOperation/toPackedUserOperation.ts +17 -2
  205. package/actions/wallet/sendTransactionSync.ts +1 -0
  206. package/chains/definitions/codex.ts +45 -0
  207. package/chains/definitions/codexTestnet.ts +45 -0
  208. package/chains/definitions/paseoPassetHub.ts +23 -0
  209. package/chains/definitions/{tempoTestnet.ts → tempoAndantino.ts} +3 -3
  210. package/chains/definitions/tempoDevnet.ts +6 -0
  211. package/chains/definitions/tempoModerato.ts +25 -0
  212. package/chains/index.ts +10 -1
  213. package/errors/version.ts +1 -1
  214. package/index.ts +9 -0
  215. package/package.json +2 -2
  216. package/tempo/Abis.ts +607 -752
  217. package/tempo/Addresses.ts +1 -1
  218. package/tempo/Decorator.ts +115 -106
  219. package/tempo/actions/amm.ts +13 -115
  220. package/tempo/actions/dex.ts +274 -72
  221. package/tempo/actions/nonce.ts +0 -148
  222. package/tempo/actions/reward.ts +310 -257
  223. package/tempo/actions/token.ts +16 -2
  224. package/tempo/chainConfig.ts +2 -9
  225. package/tempo/index.ts +1 -1
  226. package/_cjs/chains/definitions/tempoTestnet.js.map +0 -1
  227. package/_esm/chains/definitions/tempoTestnet.js.map +0 -1
@@ -1,959 +1,844 @@
1
1
  // Generated with `pnpm gen:abis`. Do not modify manually.
2
- export const stablecoinExchange = [
2
+ export const tip20 = [
3
3
  {
4
- name: 'createPair',
4
+ name: 'name',
5
5
  type: 'function',
6
- stateMutability: 'nonpayable',
7
- inputs: [{ type: 'address', name: 'base' }],
8
- outputs: [{ type: 'bytes32', name: 'key' }],
6
+ stateMutability: 'view',
7
+ inputs: [],
8
+ outputs: [{ type: 'string' }],
9
9
  },
10
10
  {
11
- name: 'place',
11
+ name: 'symbol',
12
12
  type: 'function',
13
- stateMutability: 'nonpayable',
14
- inputs: [
15
- { type: 'address', name: 'token' },
16
- { type: 'uint128', name: 'amount' },
17
- { type: 'bool', name: 'isBid' },
18
- { type: 'int16', name: 'tick' },
19
- ],
20
- outputs: [{ type: 'uint128', name: 'orderId' }],
13
+ stateMutability: 'view',
14
+ inputs: [],
15
+ outputs: [{ type: 'string' }],
21
16
  },
22
17
  {
23
- name: 'placeFlip',
18
+ name: 'decimals',
24
19
  type: 'function',
25
- stateMutability: 'nonpayable',
26
- inputs: [
27
- { type: 'address', name: 'token' },
28
- { type: 'uint128', name: 'amount' },
29
- { type: 'bool', name: 'isBid' },
30
- { type: 'int16', name: 'tick' },
31
- { type: 'int16', name: 'flipTick' },
32
- ],
33
- outputs: [{ type: 'uint128', name: 'orderId' }],
20
+ stateMutability: 'view',
21
+ inputs: [],
22
+ outputs: [{ type: 'uint8' }],
34
23
  },
35
24
  {
36
- name: 'cancel',
25
+ name: 'totalSupply',
37
26
  type: 'function',
38
- stateMutability: 'nonpayable',
39
- inputs: [{ type: 'uint128', name: 'orderId' }],
40
- outputs: [],
27
+ stateMutability: 'view',
28
+ inputs: [],
29
+ outputs: [{ type: 'uint256' }],
41
30
  },
42
31
  {
43
- name: 'executeBlock',
32
+ name: 'quoteToken',
44
33
  type: 'function',
45
- stateMutability: 'nonpayable',
34
+ stateMutability: 'view',
46
35
  inputs: [],
47
- outputs: [],
36
+ outputs: [{ type: 'address' }],
48
37
  },
49
38
  {
50
- name: 'swapExactAmountIn',
39
+ name: 'nextQuoteToken',
51
40
  type: 'function',
52
- stateMutability: 'nonpayable',
53
- inputs: [
54
- { type: 'address', name: 'tokenIn' },
55
- { type: 'address', name: 'tokenOut' },
56
- { type: 'uint128', name: 'amountIn' },
57
- { type: 'uint128', name: 'minAmountOut' },
58
- ],
59
- outputs: [{ type: 'uint128', name: 'amountOut' }],
41
+ stateMutability: 'view',
42
+ inputs: [],
43
+ outputs: [{ type: 'address' }],
60
44
  },
61
45
  {
62
- name: 'swapExactAmountOut',
46
+ name: 'balanceOf',
47
+ type: 'function',
48
+ stateMutability: 'view',
49
+ inputs: [{ type: 'address', name: 'account' }],
50
+ outputs: [{ type: 'uint256' }],
51
+ },
52
+ {
53
+ name: 'transfer',
63
54
  type: 'function',
64
55
  stateMutability: 'nonpayable',
65
56
  inputs: [
66
- { type: 'address', name: 'tokenIn' },
67
- { type: 'address', name: 'tokenOut' },
68
- { type: 'uint128', name: 'amountOut' },
69
- { type: 'uint128', name: 'maxAmountIn' },
57
+ { type: 'address', name: 'to' },
58
+ { type: 'uint256', name: 'amount' },
70
59
  ],
71
- outputs: [{ type: 'uint128', name: 'amountIn' }],
60
+ outputs: [{ type: 'bool' }],
72
61
  },
73
62
  {
74
- name: 'quoteSwapExactAmountIn',
63
+ name: 'approve',
75
64
  type: 'function',
76
- stateMutability: 'view',
65
+ stateMutability: 'nonpayable',
77
66
  inputs: [
78
- { type: 'address', name: 'tokenIn' },
79
- { type: 'address', name: 'tokenOut' },
80
- { type: 'uint128', name: 'amountIn' },
67
+ { type: 'address', name: 'spender' },
68
+ { type: 'uint256', name: 'amount' },
81
69
  ],
82
- outputs: [{ type: 'uint128', name: 'amountOut' }],
70
+ outputs: [{ type: 'bool' }],
83
71
  },
84
72
  {
85
- name: 'quoteSwapExactAmountOut',
73
+ name: 'allowance',
86
74
  type: 'function',
87
75
  stateMutability: 'view',
88
76
  inputs: [
89
- { type: 'address', name: 'tokenIn' },
90
- { type: 'address', name: 'tokenOut' },
91
- { type: 'uint128', name: 'amountOut' },
77
+ { type: 'address', name: 'owner' },
78
+ { type: 'address', name: 'spender' },
92
79
  ],
93
- outputs: [{ type: 'uint128', name: 'amountIn' }],
80
+ outputs: [{ type: 'uint256' }],
94
81
  },
95
82
  {
96
- name: 'balanceOf',
83
+ name: 'transferFrom',
97
84
  type: 'function',
98
- stateMutability: 'view',
85
+ stateMutability: 'nonpayable',
99
86
  inputs: [
100
- { type: 'address', name: 'user' },
101
- { type: 'address', name: 'token' },
87
+ { type: 'address', name: 'from' },
88
+ { type: 'address', name: 'to' },
89
+ { type: 'uint256', name: 'amount' },
102
90
  ],
103
- outputs: [{ type: 'uint128' }],
91
+ outputs: [{ type: 'bool' }],
104
92
  },
105
93
  {
106
- name: 'withdraw',
94
+ name: 'mint',
107
95
  type: 'function',
108
96
  stateMutability: 'nonpayable',
109
97
  inputs: [
110
- { type: 'address', name: 'token' },
111
- { type: 'uint128', name: 'amount' },
98
+ { type: 'address', name: 'to' },
99
+ { type: 'uint256', name: 'amount' },
112
100
  ],
113
101
  outputs: [],
114
102
  },
115
103
  {
116
- name: 'getOrder',
104
+ name: 'burn',
117
105
  type: 'function',
118
- stateMutability: 'view',
119
- inputs: [{ type: 'uint128', name: 'orderId' }],
120
- outputs: [
121
- {
122
- type: 'tuple',
123
- components: [
124
- { type: 'uint128', name: 'orderId' },
125
- { type: 'address', name: 'maker' },
126
- { type: 'bytes32', name: 'bookKey' },
127
- { type: 'bool', name: 'isBid' },
128
- { type: 'int16', name: 'tick' },
129
- { type: 'uint128', name: 'amount' },
130
- { type: 'uint128', name: 'remaining' },
131
- { type: 'uint128', name: 'prev' },
132
- { type: 'uint128', name: 'next' },
133
- { type: 'bool', name: 'isFlip' },
134
- { type: 'int16', name: 'flipTick' },
135
- ],
136
- },
137
- ],
106
+ stateMutability: 'nonpayable',
107
+ inputs: [{ type: 'uint256', name: 'amount' }],
108
+ outputs: [],
138
109
  },
139
110
  {
140
- name: 'getTickLevel',
111
+ name: 'currency',
141
112
  type: 'function',
142
113
  stateMutability: 'view',
143
- inputs: [
144
- { type: 'address', name: 'base' },
145
- { type: 'int16', name: 'tick' },
146
- { type: 'bool', name: 'isBid' },
147
- ],
148
- outputs: [
149
- { type: 'uint128', name: 'head' },
150
- { type: 'uint128', name: 'tail' },
151
- { type: 'uint128', name: 'totalLiquidity' },
152
- ],
114
+ inputs: [],
115
+ outputs: [{ type: 'string' }],
153
116
  },
154
117
  {
155
- name: 'pairKey',
118
+ name: 'supplyCap',
156
119
  type: 'function',
157
- stateMutability: 'pure',
158
- inputs: [
159
- { type: 'address', name: 'tokenA' },
160
- { type: 'address', name: 'tokenB' },
161
- ],
162
- outputs: [{ type: 'bytes32' }],
120
+ stateMutability: 'view',
121
+ inputs: [],
122
+ outputs: [{ type: 'uint256' }],
163
123
  },
164
124
  {
165
- name: 'activeOrderId',
125
+ name: 'paused',
166
126
  type: 'function',
167
127
  stateMutability: 'view',
168
128
  inputs: [],
169
- outputs: [{ type: 'uint128' }],
129
+ outputs: [{ type: 'bool' }],
170
130
  },
171
131
  {
172
- name: 'pendingOrderId',
132
+ name: 'transferPolicyId',
173
133
  type: 'function',
174
134
  stateMutability: 'view',
175
135
  inputs: [],
176
- outputs: [{ type: 'uint128' }],
136
+ outputs: [{ type: 'uint64' }],
177
137
  },
178
138
  {
179
- name: 'books',
139
+ name: 'burnBlocked',
180
140
  type: 'function',
181
- stateMutability: 'view',
182
- inputs: [{ type: 'bytes32', name: 'pairKey' }],
183
- outputs: [
184
- {
185
- type: 'tuple',
186
- components: [
187
- { type: 'address', name: 'base' },
188
- { type: 'address', name: 'quote' },
189
- { type: 'int16', name: 'bestBidTick' },
190
- { type: 'int16', name: 'bestAskTick' },
191
- ],
192
- },
141
+ stateMutability: 'nonpayable',
142
+ inputs: [
143
+ { type: 'address', name: 'from' },
144
+ { type: 'uint256', name: 'amount' },
193
145
  ],
146
+ outputs: [],
194
147
  },
195
148
  {
196
- name: 'MIN_TICK',
149
+ name: 'mintWithMemo',
197
150
  type: 'function',
198
- stateMutability: 'pure',
199
- inputs: [],
200
- outputs: [{ type: 'int16' }],
151
+ stateMutability: 'nonpayable',
152
+ inputs: [
153
+ { type: 'address', name: 'to' },
154
+ { type: 'uint256', name: 'amount' },
155
+ { type: 'bytes32', name: 'memo' },
156
+ ],
157
+ outputs: [],
201
158
  },
202
159
  {
203
- name: 'MAX_TICK',
160
+ name: 'burnWithMemo',
204
161
  type: 'function',
205
- stateMutability: 'pure',
206
- inputs: [],
207
- outputs: [{ type: 'int16' }],
162
+ stateMutability: 'nonpayable',
163
+ inputs: [
164
+ { type: 'uint256', name: 'amount' },
165
+ { type: 'bytes32', name: 'memo' },
166
+ ],
167
+ outputs: [],
208
168
  },
209
169
  {
210
- name: 'TICK_SPACING',
170
+ name: 'transferWithMemo',
211
171
  type: 'function',
212
- stateMutability: 'pure',
213
- inputs: [],
214
- outputs: [{ type: 'int16' }],
172
+ stateMutability: 'nonpayable',
173
+ inputs: [
174
+ { type: 'address', name: 'to' },
175
+ { type: 'uint256', name: 'amount' },
176
+ { type: 'bytes32', name: 'memo' },
177
+ ],
178
+ outputs: [],
215
179
  },
216
180
  {
217
- name: 'PRICE_SCALE',
181
+ name: 'transferFromWithMemo',
218
182
  type: 'function',
219
- stateMutability: 'pure',
220
- inputs: [],
221
- outputs: [{ type: 'uint32' }],
183
+ stateMutability: 'nonpayable',
184
+ inputs: [
185
+ { type: 'address', name: 'from' },
186
+ { type: 'address', name: 'to' },
187
+ { type: 'uint256', name: 'amount' },
188
+ { type: 'bytes32', name: 'memo' },
189
+ ],
190
+ outputs: [{ type: 'bool' }],
222
191
  },
223
192
  {
224
- name: 'MIN_PRICE',
193
+ name: 'changeTransferPolicyId',
225
194
  type: 'function',
226
- stateMutability: 'pure',
227
- inputs: [],
228
- outputs: [{ type: 'uint32' }],
195
+ stateMutability: 'nonpayable',
196
+ inputs: [{ type: 'uint64', name: 'newPolicyId' }],
197
+ outputs: [],
229
198
  },
230
199
  {
231
- name: 'MAX_PRICE',
200
+ name: 'setSupplyCap',
232
201
  type: 'function',
233
- stateMutability: 'pure',
234
- inputs: [],
235
- outputs: [{ type: 'uint32' }],
202
+ stateMutability: 'nonpayable',
203
+ inputs: [{ type: 'uint256', name: 'newSupplyCap' }],
204
+ outputs: [],
236
205
  },
237
206
  {
238
- name: 'tickToPrice',
239
- type: 'function',
240
- stateMutability: 'pure',
241
- inputs: [{ type: 'int16', name: 'tick' }],
242
- outputs: [{ type: 'uint32', name: 'price' }],
243
- },
244
- {
245
- name: 'priceToTick',
246
- type: 'function',
247
- stateMutability: 'pure',
248
- inputs: [{ type: 'uint32', name: 'price' }],
249
- outputs: [{ type: 'int16', name: 'tick' }],
250
- },
251
- {
252
- name: 'PairCreated',
253
- type: 'event',
254
- inputs: [
255
- { type: 'bytes32', name: 'key', indexed: true },
256
- { type: 'address', name: 'base', indexed: true },
257
- { type: 'address', name: 'quote', indexed: true },
258
- ],
259
- },
260
- {
261
- name: 'OrderPlaced',
262
- type: 'event',
263
- inputs: [
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
- ],
271
- },
272
- {
273
- name: 'FlipOrderPlaced',
274
- type: 'event',
275
- inputs: [
276
- { type: 'uint128', name: 'orderId', indexed: true },
277
- { type: 'address', name: 'maker', indexed: true },
278
- { type: 'address', name: 'token', indexed: true },
279
- { type: 'uint128', name: 'amount' },
280
- { type: 'bool', name: 'isBid' },
281
- { type: 'int16', name: 'tick' },
282
- { type: 'int16', name: 'flipTick' },
283
- ],
284
- },
285
- {
286
- name: 'OrderFilled',
287
- type: 'event',
288
- inputs: [
289
- { type: 'uint128', name: 'orderId', indexed: true },
290
- { type: 'address', name: 'maker', indexed: true },
291
- { type: 'uint128', name: 'amountFilled' },
292
- { type: 'bool', name: 'partialFill' },
293
- ],
294
- },
295
- {
296
- name: 'OrderFilled',
297
- type: 'event',
298
- inputs: [
299
- { type: 'uint128', name: 'orderId', indexed: true },
300
- { type: 'address', name: 'maker', indexed: true },
301
- { type: 'address', name: 'taker', indexed: true },
302
- { type: 'uint128', name: 'amountFilled' },
303
- { type: 'bool', name: 'partialFill' },
304
- ],
305
- },
306
- {
307
- name: 'OrderCancelled',
308
- type: 'event',
309
- inputs: [{ type: 'uint128', name: 'orderId', indexed: true }],
310
- },
311
- { name: 'Unauthorized', type: 'error', inputs: [] },
312
- { name: 'PairDoesNotExist', type: 'error', inputs: [] },
313
- { name: 'PairAlreadyExists', type: 'error', inputs: [] },
314
- { name: 'OrderDoesNotExist', type: 'error', inputs: [] },
315
- { name: 'IdenticalTokens', type: 'error', inputs: [] },
316
- { name: 'InvalidToken', type: 'error', inputs: [] },
317
- {
318
- name: 'TickOutOfBounds',
319
- type: 'error',
320
- inputs: [{ type: 'int16', name: 'tick' }],
321
- },
322
- { name: 'InvalidTick', type: 'error', inputs: [] },
323
- { name: 'InvalidFlipTick', type: 'error', inputs: [] },
324
- { name: 'InsufficientBalance', type: 'error', inputs: [] },
325
- { name: 'InsufficientLiquidity', type: 'error', inputs: [] },
326
- { name: 'InsufficientOutput', type: 'error', inputs: [] },
327
- { name: 'MaxInputExceeded', type: 'error', inputs: [] },
328
- {
329
- name: 'BelowMinimumOrderSize',
330
- type: 'error',
331
- inputs: [{ type: 'uint128', name: 'amount' }],
332
- },
333
- { name: 'InvalidBaseToken', type: 'error', inputs: [] },
334
- ];
335
- export const tip20 = [
336
- {
337
- name: 'name',
207
+ name: 'pause',
338
208
  type: 'function',
339
- stateMutability: 'view',
209
+ stateMutability: 'nonpayable',
340
210
  inputs: [],
341
- outputs: [{ type: 'string' }],
211
+ outputs: [],
342
212
  },
343
213
  {
344
- name: 'symbol',
214
+ name: 'unpause',
345
215
  type: 'function',
346
- stateMutability: 'view',
216
+ stateMutability: 'nonpayable',
347
217
  inputs: [],
348
- outputs: [{ type: 'string' }],
218
+ outputs: [],
349
219
  },
350
220
  {
351
- name: 'decimals',
221
+ name: 'setNextQuoteToken',
352
222
  type: 'function',
353
- stateMutability: 'view',
354
- inputs: [],
355
- outputs: [{ type: 'uint8' }],
223
+ stateMutability: 'nonpayable',
224
+ inputs: [{ type: 'address', name: 'newQuoteToken' }],
225
+ outputs: [],
356
226
  },
357
227
  {
358
- name: 'totalSupply',
228
+ name: 'completeQuoteTokenUpdate',
359
229
  type: 'function',
360
- stateMutability: 'view',
230
+ stateMutability: 'nonpayable',
361
231
  inputs: [],
362
- outputs: [{ type: 'uint256' }],
232
+ outputs: [],
363
233
  },
364
234
  {
365
- name: 'quoteToken',
235
+ name: 'PAUSE_ROLE',
366
236
  type: 'function',
367
237
  stateMutability: 'view',
368
238
  inputs: [],
369
- outputs: [{ type: 'address' }],
239
+ outputs: [{ type: 'bytes32' }],
370
240
  },
371
241
  {
372
- name: 'nextQuoteToken',
242
+ name: 'UNPAUSE_ROLE',
373
243
  type: 'function',
374
244
  stateMutability: 'view',
375
245
  inputs: [],
376
- outputs: [{ type: 'address' }],
246
+ outputs: [{ type: 'bytes32' }],
377
247
  },
378
248
  {
379
- name: 'balanceOf',
249
+ name: 'ISSUER_ROLE',
380
250
  type: 'function',
381
251
  stateMutability: 'view',
382
- inputs: [{ type: 'address', name: 'account' }],
383
- outputs: [{ type: 'uint256' }],
384
- },
385
- {
386
- name: 'transfer',
387
- type: 'function',
388
- stateMutability: 'nonpayable',
389
- inputs: [
390
- { type: 'address', name: 'to' },
391
- { type: 'uint256', name: 'amount' },
392
- ],
393
- outputs: [{ type: 'bool' }],
394
- },
395
- {
396
- name: 'approve',
397
- type: 'function',
398
- stateMutability: 'nonpayable',
399
- inputs: [
400
- { type: 'address', name: 'spender' },
401
- { type: 'uint256', name: 'amount' },
402
- ],
403
- outputs: [{ type: 'bool' }],
252
+ inputs: [],
253
+ outputs: [{ type: 'bytes32' }],
404
254
  },
405
255
  {
406
- name: 'allowance',
256
+ name: 'BURN_BLOCKED_ROLE',
407
257
  type: 'function',
408
258
  stateMutability: 'view',
409
- inputs: [
410
- { type: 'address', name: 'owner' },
411
- { type: 'address', name: 'spender' },
412
- ],
413
- outputs: [{ type: 'uint256' }],
259
+ inputs: [],
260
+ outputs: [{ type: 'bytes32' }],
414
261
  },
415
262
  {
416
- name: 'transferFrom',
263
+ name: 'distributeReward',
417
264
  type: 'function',
418
265
  stateMutability: 'nonpayable',
419
- inputs: [
420
- { type: 'address', name: 'from' },
421
- { type: 'address', name: 'to' },
422
- { type: 'uint256', name: 'amount' },
423
- ],
424
- outputs: [{ type: 'bool' }],
266
+ inputs: [{ type: 'uint256', name: 'amount' }],
267
+ outputs: [],
425
268
  },
426
269
  {
427
- name: 'mint',
270
+ name: 'setRewardRecipient',
428
271
  type: 'function',
429
272
  stateMutability: 'nonpayable',
430
- inputs: [
431
- { type: 'address', name: 'to' },
432
- { type: 'uint256', name: 'amount' },
433
- ],
273
+ inputs: [{ type: 'address', name: 'recipient' }],
434
274
  outputs: [],
435
275
  },
436
276
  {
437
- name: 'burn',
277
+ name: 'claimRewards',
438
278
  type: 'function',
439
279
  stateMutability: 'nonpayable',
440
- inputs: [{ type: 'uint256', name: 'amount' }],
441
- outputs: [],
280
+ inputs: [],
281
+ outputs: [{ type: 'uint256' }],
442
282
  },
443
283
  {
444
- name: 'currency',
284
+ name: 'optedInSupply',
445
285
  type: 'function',
446
286
  stateMutability: 'view',
447
287
  inputs: [],
448
- outputs: [{ type: 'string' }],
288
+ outputs: [{ type: 'uint128' }],
449
289
  },
450
290
  {
451
- name: 'supplyCap',
291
+ name: 'globalRewardPerToken',
452
292
  type: 'function',
453
293
  stateMutability: 'view',
454
294
  inputs: [],
455
295
  outputs: [{ type: 'uint256' }],
456
296
  },
457
297
  {
458
- name: 'paused',
298
+ name: 'userRewardInfo',
459
299
  type: 'function',
460
300
  stateMutability: 'view',
461
- inputs: [],
462
- outputs: [{ type: 'bool' }],
301
+ inputs: [{ type: 'address', name: 'account' }],
302
+ outputs: [
303
+ {
304
+ type: 'tuple',
305
+ components: [
306
+ { type: 'address', name: 'rewardRecipient' },
307
+ { type: 'uint256', name: 'rewardPerToken' },
308
+ { type: 'uint256', name: 'rewardBalance' },
309
+ ],
310
+ },
311
+ ],
463
312
  },
464
313
  {
465
- name: 'transferPolicyId',
314
+ name: 'getPendingRewards',
466
315
  type: 'function',
467
316
  stateMutability: 'view',
468
- inputs: [],
469
- outputs: [{ type: 'uint64' }],
317
+ inputs: [{ type: 'address', name: 'account' }],
318
+ outputs: [{ type: 'uint128' }],
470
319
  },
471
320
  {
472
- name: 'burnBlocked',
473
- type: 'function',
474
- stateMutability: 'nonpayable',
321
+ name: 'Transfer',
322
+ type: 'event',
475
323
  inputs: [
476
- { type: 'address', name: 'from' },
324
+ { type: 'address', name: 'from', indexed: true },
325
+ { type: 'address', name: 'to', indexed: true },
477
326
  { type: 'uint256', name: 'amount' },
478
327
  ],
479
- outputs: [],
480
328
  },
481
329
  {
482
- name: 'mintWithMemo',
483
- type: 'function',
484
- stateMutability: 'nonpayable',
330
+ name: 'Approval',
331
+ type: 'event',
485
332
  inputs: [
486
- { type: 'address', name: 'to' },
333
+ { type: 'address', name: 'owner', indexed: true },
334
+ { type: 'address', name: 'spender', indexed: true },
487
335
  { type: 'uint256', name: 'amount' },
488
- { type: 'bytes32', name: 'memo' },
489
336
  ],
490
- outputs: [],
491
337
  },
492
338
  {
493
- name: 'burnWithMemo',
494
- type: 'function',
495
- stateMutability: 'nonpayable',
339
+ name: 'Mint',
340
+ type: 'event',
496
341
  inputs: [
342
+ { type: 'address', name: 'to', indexed: true },
497
343
  { type: 'uint256', name: 'amount' },
498
- { type: 'bytes32', name: 'memo' },
499
344
  ],
500
- outputs: [],
501
345
  },
502
346
  {
503
- name: 'transferWithMemo',
504
- type: 'function',
505
- stateMutability: 'nonpayable',
347
+ name: 'Burn',
348
+ type: 'event',
506
349
  inputs: [
507
- { type: 'address', name: 'to' },
350
+ { type: 'address', name: 'from', indexed: true },
508
351
  { type: 'uint256', name: 'amount' },
509
- { type: 'bytes32', name: 'memo' },
510
352
  ],
511
- outputs: [],
512
353
  },
513
354
  {
514
- name: 'transferFromWithMemo',
515
- type: 'function',
516
- stateMutability: 'nonpayable',
355
+ name: 'BurnBlocked',
356
+ type: 'event',
517
357
  inputs: [
518
- { type: 'address', name: 'from' },
519
- { type: 'address', name: 'to' },
358
+ { type: 'address', name: 'from', indexed: true },
520
359
  { type: 'uint256', name: 'amount' },
521
- { type: 'bytes32', name: 'memo' },
522
360
  ],
523
- outputs: [{ type: 'bool' }],
524
361
  },
525
362
  {
526
- name: 'feeRecipient',
527
- type: 'function',
528
- stateMutability: 'view',
529
- inputs: [],
530
- outputs: [{ type: 'address' }],
363
+ name: 'TransferWithMemo',
364
+ type: 'event',
365
+ inputs: [
366
+ { type: 'address', name: 'from', indexed: true },
367
+ { type: 'address', name: 'to', indexed: true },
368
+ { type: 'uint256', name: 'amount' },
369
+ { type: 'bytes32', name: 'memo', indexed: true },
370
+ ],
531
371
  },
532
372
  {
533
- name: 'setFeeRecipient',
534
- type: 'function',
535
- stateMutability: 'view',
536
- inputs: [{ type: 'address', name: 'newRecipient' }],
537
- outputs: [{ type: 'address' }],
373
+ name: 'TransferPolicyUpdate',
374
+ type: 'event',
375
+ inputs: [
376
+ { type: 'address', name: 'updater', indexed: true },
377
+ { type: 'uint64', name: 'newPolicyId', indexed: true },
378
+ ],
538
379
  },
539
380
  {
540
- name: 'changeTransferPolicyId',
541
- type: 'function',
542
- stateMutability: 'nonpayable',
543
- inputs: [{ type: 'uint64', name: 'newPolicyId' }],
544
- outputs: [],
381
+ name: 'SupplyCapUpdate',
382
+ type: 'event',
383
+ inputs: [
384
+ { type: 'address', name: 'updater', indexed: true },
385
+ { type: 'uint256', name: 'newSupplyCap', indexed: true },
386
+ ],
545
387
  },
546
388
  {
547
- name: 'setSupplyCap',
548
- type: 'function',
549
- stateMutability: 'nonpayable',
550
- inputs: [{ type: 'uint256', name: 'newSupplyCap' }],
551
- outputs: [],
389
+ name: 'PauseStateUpdate',
390
+ type: 'event',
391
+ inputs: [
392
+ { type: 'address', name: 'updater', indexed: true },
393
+ { type: 'bool', name: 'isPaused' },
394
+ ],
552
395
  },
553
396
  {
554
- name: 'pause',
555
- type: 'function',
556
- stateMutability: 'nonpayable',
557
- inputs: [],
558
- outputs: [],
397
+ name: 'NextQuoteTokenSet',
398
+ type: 'event',
399
+ inputs: [
400
+ { type: 'address', name: 'updater', indexed: true },
401
+ { type: 'address', name: 'nextQuoteToken', indexed: true },
402
+ ],
559
403
  },
560
404
  {
561
- name: 'unpause',
562
- type: 'function',
563
- stateMutability: 'nonpayable',
564
- inputs: [],
565
- outputs: [],
405
+ name: 'QuoteTokenUpdate',
406
+ type: 'event',
407
+ inputs: [
408
+ { type: 'address', name: 'updater', indexed: true },
409
+ { type: 'address', name: 'newQuoteToken', indexed: true },
410
+ ],
566
411
  },
567
412
  {
568
- name: 'setNextQuoteToken',
569
- type: 'function',
570
- stateMutability: 'nonpayable',
571
- inputs: [{ type: 'address', name: 'newQuoteToken' }],
572
- outputs: [],
413
+ name: 'RewardDistributed',
414
+ type: 'event',
415
+ inputs: [
416
+ { type: 'address', name: 'funder', indexed: true },
417
+ { type: 'uint256', name: 'amount' },
418
+ ],
573
419
  },
574
420
  {
575
- name: 'completeQuoteTokenUpdate',
576
- type: 'function',
577
- stateMutability: 'nonpayable',
578
- inputs: [],
579
- outputs: [],
421
+ name: 'RewardRecipientSet',
422
+ type: 'event',
423
+ inputs: [
424
+ { type: 'address', name: 'holder', indexed: true },
425
+ { type: 'address', name: 'recipient', indexed: true },
426
+ ],
580
427
  },
581
428
  {
582
- name: 'PAUSE_ROLE',
583
- type: 'function',
584
- stateMutability: 'view',
585
- inputs: [],
586
- outputs: [{ type: 'bytes32' }],
429
+ name: 'InsufficientBalance',
430
+ type: 'error',
431
+ inputs: [
432
+ { type: 'uint256', name: 'available' },
433
+ { type: 'uint256', name: 'required' },
434
+ { type: 'address', name: 'token' },
435
+ ],
587
436
  },
437
+ { name: 'InsufficientAllowance', type: 'error', inputs: [] },
438
+ { name: 'SupplyCapExceeded', type: 'error', inputs: [] },
439
+ { name: 'InvalidSupplyCap', type: 'error', inputs: [] },
440
+ { name: 'InvalidPayload', type: 'error', inputs: [] },
441
+ { name: 'StringTooLong', type: 'error', inputs: [] },
442
+ { name: 'PolicyForbids', type: 'error', inputs: [] },
443
+ { name: 'InvalidRecipient', type: 'error', inputs: [] },
444
+ { name: 'ContractPaused', type: 'error', inputs: [] },
445
+ { name: 'InvalidCurrency', type: 'error', inputs: [] },
446
+ { name: 'InvalidQuoteToken', type: 'error', inputs: [] },
447
+ { name: 'TransfersDisabled', type: 'error', inputs: [] },
448
+ { name: 'InvalidAmount', type: 'error', inputs: [] },
449
+ { name: 'NoOptedInSupply', type: 'error', inputs: [] },
450
+ { name: 'Unauthorized', type: 'error', inputs: [] },
451
+ { name: 'ProtectedAddress', type: 'error', inputs: [] },
452
+ { name: 'InvalidToken', type: 'error', inputs: [] },
453
+ { name: 'Uninitialized', type: 'error', inputs: [] },
454
+ { name: 'InvalidTransferPolicyId', type: 'error', inputs: [] },
588
455
  {
589
- name: 'UNPAUSE_ROLE',
456
+ name: 'hasRole',
590
457
  type: 'function',
591
458
  stateMutability: 'view',
592
- inputs: [],
593
- outputs: [{ type: 'bytes32' }],
459
+ inputs: [
460
+ { type: 'address', name: 'account' },
461
+ { type: 'bytes32', name: 'role' },
462
+ ],
463
+ outputs: [{ type: 'bool' }],
594
464
  },
595
465
  {
596
- name: 'ISSUER_ROLE',
466
+ name: 'getRoleAdmin',
597
467
  type: 'function',
598
468
  stateMutability: 'view',
599
- inputs: [],
469
+ inputs: [{ type: 'bytes32', name: 'role' }],
600
470
  outputs: [{ type: 'bytes32' }],
601
471
  },
602
472
  {
603
- name: 'BURN_BLOCKED_ROLE',
473
+ name: 'grantRole',
604
474
  type: 'function',
605
- stateMutability: 'view',
606
- inputs: [],
607
- outputs: [{ type: 'bytes32' }],
475
+ stateMutability: 'nonpayable',
476
+ inputs: [
477
+ { type: 'bytes32', name: 'role' },
478
+ { type: 'address', name: 'account' },
479
+ ],
480
+ outputs: [],
608
481
  },
609
482
  {
610
- name: 'startReward',
483
+ name: 'revokeRole',
611
484
  type: 'function',
612
485
  stateMutability: 'nonpayable',
613
486
  inputs: [
614
- { type: 'uint256', name: 'amount' },
615
- { type: 'uint32', name: 'secs' },
487
+ { type: 'bytes32', name: 'role' },
488
+ { type: 'address', name: 'account' },
616
489
  ],
617
- outputs: [{ type: 'uint64' }],
490
+ outputs: [],
618
491
  },
619
492
  {
620
- name: 'setRewardRecipient',
493
+ name: 'renounceRole',
621
494
  type: 'function',
622
495
  stateMutability: 'nonpayable',
623
- inputs: [{ type: 'address', name: 'recipient' }],
496
+ inputs: [{ type: 'bytes32', name: 'role' }],
624
497
  outputs: [],
625
498
  },
626
499
  {
627
- name: 'cancelReward',
500
+ name: 'setRoleAdmin',
628
501
  type: 'function',
629
502
  stateMutability: 'nonpayable',
630
- inputs: [{ type: 'uint64', name: 'id' }],
631
- outputs: [{ type: 'uint256' }],
503
+ inputs: [
504
+ { type: 'bytes32', name: 'role' },
505
+ { type: 'bytes32', name: 'adminRole' },
506
+ ],
507
+ outputs: [],
632
508
  },
633
509
  {
634
- name: 'claimRewards',
635
- type: 'function',
636
- stateMutability: 'nonpayable',
637
- inputs: [],
638
- outputs: [{ type: 'uint256' }],
510
+ name: 'RoleMembershipUpdated',
511
+ type: 'event',
512
+ inputs: [
513
+ { type: 'bytes32', name: 'role', indexed: true },
514
+ { type: 'address', name: 'account', indexed: true },
515
+ { type: 'address', name: 'sender', indexed: true },
516
+ { type: 'bool', name: 'hasRole' },
517
+ ],
639
518
  },
640
519
  {
641
- name: 'finalizeStreams',
520
+ name: 'RoleAdminUpdated',
521
+ type: 'event',
522
+ inputs: [
523
+ { type: 'bytes32', name: 'role', indexed: true },
524
+ { type: 'bytes32', name: 'newAdminRole', indexed: true },
525
+ { type: 'address', name: 'sender', indexed: true },
526
+ ],
527
+ },
528
+ { name: 'Unauthorized', type: 'error', inputs: [] },
529
+ ];
530
+ export const stablecoinDex = [
531
+ {
532
+ name: 'createPair',
642
533
  type: 'function',
643
534
  stateMutability: 'nonpayable',
644
- inputs: [{ type: 'uint64', name: 'timestamp' }],
645
- outputs: [],
535
+ inputs: [{ type: 'address', name: 'base' }],
536
+ outputs: [{ type: 'bytes32', name: 'key' }],
646
537
  },
647
538
  {
648
- name: 'getStream',
539
+ name: 'place',
649
540
  type: 'function',
650
- stateMutability: 'view',
651
- inputs: [{ type: 'uint64', name: 'id' }],
652
- outputs: [
653
- {
654
- type: 'tuple',
655
- components: [
656
- { type: 'address', name: 'funder' },
657
- { type: 'uint64', name: 'startTime' },
658
- { type: 'uint64', name: 'endTime' },
659
- { type: 'uint256', name: 'ratePerSecondScaled' },
660
- { type: 'uint256', name: 'amountTotal' },
661
- ],
662
- },
541
+ stateMutability: 'nonpayable',
542
+ inputs: [
543
+ { type: 'address', name: 'token' },
544
+ { type: 'uint128', name: 'amount' },
545
+ { type: 'bool', name: 'isBid' },
546
+ { type: 'int16', name: 'tick' },
663
547
  ],
548
+ outputs: [{ type: 'uint128', name: 'orderId' }],
664
549
  },
665
550
  {
666
- name: 'totalRewardPerSecond',
551
+ name: 'placeFlip',
667
552
  type: 'function',
668
- stateMutability: 'view',
669
- inputs: [],
670
- outputs: [{ type: 'uint256' }],
553
+ stateMutability: 'nonpayable',
554
+ inputs: [
555
+ { type: 'address', name: 'token' },
556
+ { type: 'uint128', name: 'amount' },
557
+ { type: 'bool', name: 'isBid' },
558
+ { type: 'int16', name: 'tick' },
559
+ { type: 'int16', name: 'flipTick' },
560
+ ],
561
+ outputs: [{ type: 'uint128', name: 'orderId' }],
671
562
  },
672
563
  {
673
- name: 'optedInSupply',
564
+ name: 'cancel',
674
565
  type: 'function',
675
- stateMutability: 'view',
676
- inputs: [],
677
- outputs: [{ type: 'uint128' }],
566
+ stateMutability: 'nonpayable',
567
+ inputs: [{ type: 'uint128', name: 'orderId' }],
568
+ outputs: [],
678
569
  },
679
570
  {
680
- name: 'nextStreamId',
571
+ name: 'cancelStaleOrder',
681
572
  type: 'function',
682
- stateMutability: 'view',
683
- inputs: [],
684
- outputs: [{ type: 'uint64' }],
573
+ stateMutability: 'nonpayable',
574
+ inputs: [{ type: 'uint128', name: 'orderId' }],
575
+ outputs: [],
685
576
  },
686
577
  {
687
- name: 'userRewardInfo',
578
+ name: 'swapExactAmountIn',
688
579
  type: 'function',
689
- stateMutability: 'view',
690
- inputs: [{ type: 'address', name: 'account' }],
691
- outputs: [
692
- {
693
- type: 'tuple',
694
- components: [
695
- { type: 'address', name: 'rewardRecipient' },
696
- { type: 'uint256', name: 'rewardPerToken' },
697
- { type: 'uint256', name: 'rewardBalance' },
698
- ],
699
- },
700
- ],
701
- },
702
- {
703
- name: 'Transfer',
704
- type: 'event',
580
+ stateMutability: 'nonpayable',
705
581
  inputs: [
706
- { type: 'address', name: 'from', indexed: true },
707
- { type: 'address', name: 'to', indexed: true },
708
- { type: 'uint256', name: 'amount' },
582
+ { type: 'address', name: 'tokenIn' },
583
+ { type: 'address', name: 'tokenOut' },
584
+ { type: 'uint128', name: 'amountIn' },
585
+ { type: 'uint128', name: 'minAmountOut' },
709
586
  ],
587
+ outputs: [{ type: 'uint128', name: 'amountOut' }],
710
588
  },
711
589
  {
712
- name: 'Approval',
713
- type: 'event',
590
+ name: 'swapExactAmountOut',
591
+ type: 'function',
592
+ stateMutability: 'nonpayable',
714
593
  inputs: [
715
- { type: 'address', name: 'owner', indexed: true },
716
- { type: 'address', name: 'spender', indexed: true },
717
- { type: 'uint256', name: 'amount' },
594
+ { type: 'address', name: 'tokenIn' },
595
+ { type: 'address', name: 'tokenOut' },
596
+ { type: 'uint128', name: 'amountOut' },
597
+ { type: 'uint128', name: 'maxAmountIn' },
718
598
  ],
599
+ outputs: [{ type: 'uint128', name: 'amountIn' }],
719
600
  },
720
601
  {
721
- name: 'Mint',
722
- type: 'event',
602
+ name: 'quoteSwapExactAmountIn',
603
+ type: 'function',
604
+ stateMutability: 'view',
723
605
  inputs: [
724
- { type: 'address', name: 'to', indexed: true },
725
- { type: 'uint256', name: 'amount' },
606
+ { type: 'address', name: 'tokenIn' },
607
+ { type: 'address', name: 'tokenOut' },
608
+ { type: 'uint128', name: 'amountIn' },
726
609
  ],
610
+ outputs: [{ type: 'uint128', name: 'amountOut' }],
727
611
  },
728
612
  {
729
- name: 'Burn',
730
- type: 'event',
613
+ name: 'quoteSwapExactAmountOut',
614
+ type: 'function',
615
+ stateMutability: 'view',
731
616
  inputs: [
732
- { type: 'address', name: 'from', indexed: true },
733
- { type: 'uint256', name: 'amount' },
617
+ { type: 'address', name: 'tokenIn' },
618
+ { type: 'address', name: 'tokenOut' },
619
+ { type: 'uint128', name: 'amountOut' },
734
620
  ],
621
+ outputs: [{ type: 'uint128', name: 'amountIn' }],
735
622
  },
736
623
  {
737
- name: 'BurnBlocked',
738
- type: 'event',
624
+ name: 'balanceOf',
625
+ type: 'function',
626
+ stateMutability: 'view',
739
627
  inputs: [
740
- { type: 'address', name: 'from', indexed: true },
741
- { type: 'uint256', name: 'amount' },
628
+ { type: 'address', name: 'user' },
629
+ { type: 'address', name: 'token' },
742
630
  ],
631
+ outputs: [{ type: 'uint128' }],
743
632
  },
744
633
  {
745
- name: 'TransferWithMemo',
746
- type: 'event',
634
+ name: 'withdraw',
635
+ type: 'function',
636
+ stateMutability: 'nonpayable',
747
637
  inputs: [
748
- { type: 'address', name: 'from', indexed: true },
749
- { type: 'address', name: 'to', indexed: true },
750
- { type: 'uint256', name: 'amount' },
751
- { type: 'bytes32', name: 'memo', indexed: true },
638
+ { type: 'address', name: 'token' },
639
+ { type: 'uint128', name: 'amount' },
752
640
  ],
641
+ outputs: [],
753
642
  },
754
643
  {
755
- name: 'TransferPolicyUpdate',
756
- type: 'event',
757
- inputs: [
758
- { type: 'address', name: 'updater', indexed: true },
759
- { type: 'uint64', name: 'newPolicyId', indexed: true },
644
+ name: 'getOrder',
645
+ type: 'function',
646
+ stateMutability: 'view',
647
+ inputs: [{ type: 'uint128', name: 'orderId' }],
648
+ outputs: [
649
+ {
650
+ type: 'tuple',
651
+ components: [
652
+ { type: 'uint128', name: 'orderId' },
653
+ { type: 'address', name: 'maker' },
654
+ { type: 'bytes32', name: 'bookKey' },
655
+ { type: 'bool', name: 'isBid' },
656
+ { type: 'int16', name: 'tick' },
657
+ { type: 'uint128', name: 'amount' },
658
+ { type: 'uint128', name: 'remaining' },
659
+ { type: 'uint128', name: 'prev' },
660
+ { type: 'uint128', name: 'next' },
661
+ { type: 'bool', name: 'isFlip' },
662
+ { type: 'int16', name: 'flipTick' },
663
+ ],
664
+ },
760
665
  ],
761
666
  },
762
667
  {
763
- name: 'SupplyCapUpdate',
764
- type: 'event',
668
+ name: 'getTickLevel',
669
+ type: 'function',
670
+ stateMutability: 'view',
765
671
  inputs: [
766
- { type: 'address', name: 'updater', indexed: true },
767
- { type: 'uint256', name: 'newSupplyCap', indexed: true },
672
+ { type: 'address', name: 'base' },
673
+ { type: 'int16', name: 'tick' },
674
+ { type: 'bool', name: 'isBid' },
768
675
  ],
769
- },
770
- {
771
- name: 'PauseStateUpdate',
772
- type: 'event',
773
- inputs: [
774
- { type: 'address', name: 'updater', indexed: true },
775
- { type: 'bool', name: 'isPaused' },
676
+ outputs: [
677
+ { type: 'uint128', name: 'head' },
678
+ { type: 'uint128', name: 'tail' },
679
+ { type: 'uint128', name: 'totalLiquidity' },
776
680
  ],
777
681
  },
778
682
  {
779
- name: 'NextQuoteTokenSet',
780
- type: 'event',
683
+ name: 'pairKey',
684
+ type: 'function',
685
+ stateMutability: 'pure',
781
686
  inputs: [
782
- { type: 'address', name: 'updater', indexed: true },
783
- { type: 'address', name: 'nextQuoteToken', indexed: true },
687
+ { type: 'address', name: 'tokenA' },
688
+ { type: 'address', name: 'tokenB' },
784
689
  ],
690
+ outputs: [{ type: 'bytes32' }],
785
691
  },
786
692
  {
787
- name: 'QuoteTokenUpdate',
788
- type: 'event',
789
- inputs: [
790
- { type: 'address', name: 'updater', indexed: true },
791
- { type: 'address', name: 'newQuoteToken', indexed: true },
792
- ],
693
+ name: 'nextOrderId',
694
+ type: 'function',
695
+ stateMutability: 'view',
696
+ inputs: [],
697
+ outputs: [{ type: 'uint128' }],
793
698
  },
794
699
  {
795
- name: 'RewardScheduled',
796
- type: 'event',
797
- inputs: [
798
- { type: 'address', name: 'funder', indexed: true },
799
- { type: 'uint64', name: 'id', indexed: true },
800
- { type: 'uint256', name: 'amount' },
801
- { type: 'uint32', name: 'durationSeconds' },
700
+ name: 'books',
701
+ type: 'function',
702
+ stateMutability: 'view',
703
+ inputs: [{ type: 'bytes32', name: 'pairKey' }],
704
+ outputs: [
705
+ {
706
+ type: 'tuple',
707
+ components: [
708
+ { type: 'address', name: 'base' },
709
+ { type: 'address', name: 'quote' },
710
+ { type: 'int16', name: 'bestBidTick' },
711
+ { type: 'int16', name: 'bestAskTick' },
712
+ ],
713
+ },
802
714
  ],
803
715
  },
804
716
  {
805
- name: 'RewardCanceled',
806
- type: 'event',
807
- inputs: [
808
- { type: 'address', name: 'funder', indexed: true },
809
- { type: 'uint64', name: 'id', indexed: true },
810
- { type: 'uint256', name: 'refund' },
811
- ],
717
+ name: 'MIN_TICK',
718
+ type: 'function',
719
+ stateMutability: 'pure',
720
+ inputs: [],
721
+ outputs: [{ type: 'int16' }],
812
722
  },
813
723
  {
814
- name: 'RewardRecipientSet',
815
- type: 'event',
816
- inputs: [
817
- { type: 'address', name: 'holder', indexed: true },
818
- { type: 'address', name: 'recipient', indexed: true },
819
- ],
724
+ name: 'MAX_TICK',
725
+ type: 'function',
726
+ stateMutability: 'pure',
727
+ inputs: [],
728
+ outputs: [{ type: 'int16' }],
820
729
  },
821
730
  {
822
- name: 'FeeRecipientUpdated',
823
- type: 'event',
824
- inputs: [
825
- { type: 'address', name: 'updater', indexed: true },
826
- { type: 'address', name: 'newRecipient', indexed: true },
827
- ],
731
+ name: 'TICK_SPACING',
732
+ type: 'function',
733
+ stateMutability: 'pure',
734
+ inputs: [],
735
+ outputs: [{ type: 'int16' }],
828
736
  },
829
737
  {
830
- name: 'InsufficientBalance',
831
- type: 'error',
832
- inputs: [
833
- { type: 'uint256', name: 'available' },
834
- { type: 'uint256', name: 'required' },
835
- { type: 'address', name: 'token' },
836
- ],
738
+ name: 'PRICE_SCALE',
739
+ type: 'function',
740
+ stateMutability: 'pure',
741
+ inputs: [],
742
+ outputs: [{ type: 'uint32' }],
837
743
  },
838
- { name: 'InsufficientAllowance', type: 'error', inputs: [] },
839
- { name: 'SupplyCapExceeded', type: 'error', inputs: [] },
840
- { name: 'InvalidSupplyCap', type: 'error', inputs: [] },
841
- { name: 'InvalidPayload', type: 'error', inputs: [] },
842
- { name: 'StringTooLong', type: 'error', inputs: [] },
843
- { name: 'PolicyForbids', type: 'error', inputs: [] },
844
- { name: 'InvalidRecipient', type: 'error', inputs: [] },
845
- { name: 'ContractPaused', type: 'error', inputs: [] },
846
- { name: 'InvalidCurrency', type: 'error', inputs: [] },
847
- { name: 'InvalidQuoteToken', type: 'error', inputs: [] },
848
- { name: 'TransfersDisabled', type: 'error', inputs: [] },
849
- { name: 'InvalidAmount', type: 'error', inputs: [] },
850
- { name: 'NotStreamFunder', type: 'error', inputs: [] },
851
- { name: 'StreamInactive', type: 'error', inputs: [] },
852
- { name: 'NoOptedInSupply', type: 'error', inputs: [] },
853
- { name: 'Unauthorized', type: 'error', inputs: [] },
854
- { name: 'RewardsDisabled', type: 'error', inputs: [] },
855
- { name: 'ScheduledRewardsDisabled', type: 'error', inputs: [] },
856
- { name: 'ProtectedAddress', type: 'error', inputs: [] },
857
- { name: 'InvalidToken', type: 'error', inputs: [] },
858
744
  {
859
- name: 'hasRole',
745
+ name: 'MIN_ORDER_AMOUNT',
860
746
  type: 'function',
861
- stateMutability: 'view',
862
- inputs: [
863
- { type: 'address', name: 'account' },
864
- { type: 'bytes32', name: 'role' },
865
- ],
866
- outputs: [{ type: 'bool' }],
747
+ stateMutability: 'pure',
748
+ inputs: [],
749
+ outputs: [{ type: 'uint128' }],
867
750
  },
868
751
  {
869
- name: 'getRoleAdmin',
752
+ name: 'MIN_PRICE',
870
753
  type: 'function',
871
- stateMutability: 'view',
872
- inputs: [{ type: 'bytes32', name: 'role' }],
873
- outputs: [{ type: 'bytes32' }],
754
+ stateMutability: 'pure',
755
+ inputs: [],
756
+ outputs: [{ type: 'uint32' }],
874
757
  },
875
758
  {
876
- name: 'grantRole',
759
+ name: 'MAX_PRICE',
877
760
  type: 'function',
878
- stateMutability: 'nonpayable',
879
- inputs: [
880
- { type: 'bytes32', name: 'role' },
881
- { type: 'address', name: 'account' },
882
- ],
883
- outputs: [],
761
+ stateMutability: 'pure',
762
+ inputs: [],
763
+ outputs: [{ type: 'uint32' }],
884
764
  },
885
765
  {
886
- name: 'revokeRole',
766
+ name: 'tickToPrice',
887
767
  type: 'function',
888
- stateMutability: 'nonpayable',
889
- inputs: [
890
- { type: 'bytes32', name: 'role' },
891
- { type: 'address', name: 'account' },
892
- ],
893
- outputs: [],
768
+ stateMutability: 'pure',
769
+ inputs: [{ type: 'int16', name: 'tick' }],
770
+ outputs: [{ type: 'uint32', name: 'price' }],
894
771
  },
895
772
  {
896
- name: 'renounceRole',
773
+ name: 'priceToTick',
897
774
  type: 'function',
898
- stateMutability: 'nonpayable',
899
- inputs: [{ type: 'bytes32', name: 'role' }],
900
- outputs: [],
775
+ stateMutability: 'pure',
776
+ inputs: [{ type: 'uint32', name: 'price' }],
777
+ outputs: [{ type: 'int16', name: 'tick' }],
901
778
  },
902
779
  {
903
- name: 'setRoleAdmin',
904
- type: 'function',
905
- stateMutability: 'nonpayable',
780
+ name: 'PairCreated',
781
+ type: 'event',
906
782
  inputs: [
907
- { type: 'bytes32', name: 'role' },
908
- { type: 'bytes32', name: 'adminRole' },
783
+ { type: 'bytes32', name: 'key', indexed: true },
784
+ { type: 'address', name: 'base', indexed: true },
785
+ { type: 'address', name: 'quote', indexed: true },
909
786
  ],
910
- outputs: [],
911
787
  },
912
788
  {
913
- name: 'RoleMembershipUpdated',
789
+ name: 'OrderPlaced',
914
790
  type: 'event',
915
791
  inputs: [
916
- { type: 'bytes32', name: 'role', indexed: true },
917
- { type: 'address', name: 'account', indexed: true },
918
- { type: 'address', name: 'sender', indexed: true },
919
- { type: 'bool', name: 'hasRole' },
792
+ { type: 'uint128', name: 'orderId', indexed: true },
793
+ { type: 'address', name: 'maker', indexed: true },
794
+ { type: 'address', name: 'token', indexed: true },
795
+ { type: 'uint128', name: 'amount' },
796
+ { type: 'bool', name: 'isBid' },
797
+ { type: 'int16', name: 'tick' },
798
+ { type: 'bool', name: 'isFlipOrder' },
799
+ { type: 'int16', name: 'flipTick' },
920
800
  ],
921
801
  },
922
802
  {
923
- name: 'RoleAdminUpdated',
803
+ name: 'OrderFilled',
924
804
  type: 'event',
925
805
  inputs: [
926
- { type: 'bytes32', name: 'role', indexed: true },
927
- { type: 'bytes32', name: 'newAdminRole', indexed: true },
928
- { type: 'address', name: 'sender', indexed: true },
806
+ { type: 'uint128', name: 'orderId', indexed: true },
807
+ { type: 'address', name: 'maker', indexed: true },
808
+ { type: 'address', name: 'taker', indexed: true },
809
+ { type: 'uint128', name: 'amountFilled' },
810
+ { type: 'bool', name: 'partialFill' },
929
811
  ],
930
812
  },
813
+ {
814
+ name: 'OrderCancelled',
815
+ type: 'event',
816
+ inputs: [{ type: 'uint128', name: 'orderId', indexed: true }],
817
+ },
931
818
  { name: 'Unauthorized', type: 'error', inputs: [] },
932
- ];
933
- export const tipAccountRegistrar = [
819
+ { name: 'PairDoesNotExist', type: 'error', inputs: [] },
820
+ { name: 'PairAlreadyExists', type: 'error', inputs: [] },
821
+ { name: 'OrderDoesNotExist', type: 'error', inputs: [] },
822
+ { name: 'IdenticalTokens', type: 'error', inputs: [] },
823
+ { name: 'InvalidToken', type: 'error', inputs: [] },
934
824
  {
935
- name: 'delegateToDefault',
936
- type: 'function',
937
- stateMutability: 'nonpayable',
938
- inputs: [
939
- { type: 'bytes32', name: 'hash' },
940
- { type: 'bytes', name: 'signature' },
941
- ],
942
- outputs: [{ type: 'address', name: 'authority' }],
825
+ name: 'TickOutOfBounds',
826
+ type: 'error',
827
+ inputs: [{ type: 'int16', name: 'tick' }],
943
828
  },
829
+ { name: 'InvalidTick', type: 'error', inputs: [] },
830
+ { name: 'InvalidFlipTick', type: 'error', inputs: [] },
831
+ { name: 'InsufficientBalance', type: 'error', inputs: [] },
832
+ { name: 'InsufficientLiquidity', type: 'error', inputs: [] },
833
+ { name: 'InsufficientOutput', type: 'error', inputs: [] },
834
+ { name: 'MaxInputExceeded', type: 'error', inputs: [] },
944
835
  {
945
- name: 'delegateToDefault',
946
- type: 'function',
947
- stateMutability: 'nonpayable',
948
- inputs: [
949
- { type: 'bytes', name: 'message' },
950
- { type: 'bytes', name: 'signature' },
951
- ],
952
- outputs: [{ type: 'address', name: 'authority' }],
836
+ name: 'BelowMinimumOrderSize',
837
+ type: 'error',
838
+ inputs: [{ type: 'uint128', name: 'amount' }],
953
839
  },
954
- { name: 'InvalidSignature', type: 'error', inputs: [] },
955
- { name: 'CodeNotEmpty', type: 'error', inputs: [] },
956
- { name: 'NonceNotZero', type: 'error', inputs: [] },
840
+ { name: 'InvalidBaseToken', type: 'error', inputs: [] },
841
+ { name: 'OrderNotStale', type: 'error', inputs: [] },
957
842
  ];
958
843
  export const feeManager = [
959
844
  {
@@ -985,21 +870,24 @@ export const feeManager = [
985
870
  outputs: [],
986
871
  },
987
872
  {
988
- name: 'getFeeTokenBalance',
873
+ name: 'distributeFees',
989
874
  type: 'function',
990
- stateMutability: 'view',
875
+ stateMutability: 'nonpayable',
991
876
  inputs: [
992
- { type: 'address', name: 'sender' },
993
877
  { type: 'address', name: 'validator' },
878
+ { type: 'address', name: 'token' },
994
879
  ],
995
- outputs: [{ type: 'address' }, { type: 'uint256' }],
880
+ outputs: [],
996
881
  },
997
882
  {
998
- name: 'executeBlock',
883
+ name: 'collectedFees',
999
884
  type: 'function',
1000
- stateMutability: 'nonpayable',
1001
- inputs: [],
1002
- outputs: [],
885
+ stateMutability: 'view',
886
+ inputs: [
887
+ { type: 'address', name: 'validator' },
888
+ { type: 'address', name: 'token' },
889
+ ],
890
+ outputs: [{ type: 'uint256' }],
1003
891
  },
1004
892
  {
1005
893
  name: 'UserTokenSet',
@@ -1017,6 +905,15 @@ export const feeManager = [
1017
905
  { type: 'address', name: 'token', indexed: true },
1018
906
  ],
1019
907
  },
908
+ {
909
+ name: 'FeesDistributed',
910
+ type: 'event',
911
+ inputs: [
912
+ { type: 'address', name: 'validator', indexed: true },
913
+ { type: 'address', name: 'token', indexed: true },
914
+ { type: 'uint256', name: 'amount' },
915
+ ],
916
+ },
1020
917
  { name: 'OnlyValidator', type: 'error', inputs: [] },
1021
918
  { name: 'OnlySystemContract', type: 'error', inputs: [] },
1022
919
  { name: 'InvalidToken', type: 'error', inputs: [] },
@@ -1103,19 +1000,6 @@ export const feeAmm = [
1103
1000
  name: 'mint',
1104
1001
  type: 'function',
1105
1002
  stateMutability: 'nonpayable',
1106
- inputs: [
1107
- { type: 'address', name: 'userToken' },
1108
- { type: 'address', name: 'validatorToken' },
1109
- { type: 'uint256', name: 'amountUserToken' },
1110
- { type: 'uint256', name: 'amountValidatorToken' },
1111
- { type: 'address', name: 'to' },
1112
- ],
1113
- outputs: [{ type: 'uint256', name: 'liquidity' }],
1114
- },
1115
- {
1116
- name: 'mintWithValidatorToken',
1117
- type: 'function',
1118
- stateMutability: 'nonpayable',
1119
1003
  inputs: [
1120
1004
  { type: 'address', name: 'userToken' },
1121
1005
  { type: 'address', name: 'validatorToken' },
@@ -1172,10 +1056,10 @@ export const feeAmm = [
1172
1056
  name: 'Mint',
1173
1057
  type: 'event',
1174
1058
  inputs: [
1175
- { type: 'address', name: 'sender', indexed: true },
1059
+ { type: 'address', name: 'sender' },
1060
+ { type: 'address', name: 'to', indexed: true },
1176
1061
  { type: 'address', name: 'userToken', indexed: true },
1177
1062
  { type: 'address', name: 'validatorToken', indexed: true },
1178
- { type: 'uint256', name: 'amountUserToken' },
1179
1063
  { type: 'uint256', name: 'amountValidatorToken' },
1180
1064
  { type: 'uint256', name: 'liquidity' },
1181
1065
  ],
@@ -1204,37 +1088,13 @@ export const feeAmm = [
1204
1088
  { type: 'uint256', name: 'amountOut' },
1205
1089
  ],
1206
1090
  },
1207
- {
1208
- name: 'FeeSwap',
1209
- type: 'event',
1210
- inputs: [
1211
- { type: 'address', name: 'userToken', indexed: true },
1212
- { type: 'address', name: 'validatorToken', indexed: true },
1213
- { type: 'uint256', name: 'amountIn' },
1214
- { type: 'uint256', name: 'amountOut' },
1215
- ],
1216
- },
1217
1091
  { name: 'IdenticalAddresses', type: 'error', inputs: [] },
1218
- { name: 'ZeroAddress', type: 'error', inputs: [] },
1219
- { name: 'PoolExists', type: 'error', inputs: [] },
1220
- { name: 'PoolDoesNotExist', type: 'error', inputs: [] },
1221
1092
  { name: 'InvalidToken', type: 'error', inputs: [] },
1222
1093
  { name: 'InsufficientLiquidity', type: 'error', inputs: [] },
1223
- { name: 'OnlyProtocol', type: 'error', inputs: [] },
1224
- { name: 'InsufficientPoolBalance', type: 'error', inputs: [] },
1225
1094
  { name: 'InsufficientReserves', type: 'error', inputs: [] },
1226
- { name: 'InsufficientLiquidityBalance', type: 'error', inputs: [] },
1227
- { name: 'MustDepositLowerBalanceToken', type: 'error', inputs: [] },
1228
1095
  { name: 'InvalidAmount', type: 'error', inputs: [] },
1229
- { name: 'InvalidRebalanceState', type: 'error', inputs: [] },
1230
- { name: 'InvalidRebalanceDirection', type: 'error', inputs: [] },
1231
- { name: 'InvalidNewReserves', type: 'error', inputs: [] },
1232
- { name: 'CannotSupportPendingSwaps', type: 'error', inputs: [] },
1233
1096
  { name: 'DivisionByZero', type: 'error', inputs: [] },
1234
1097
  { name: 'InvalidSwapCalculation', type: 'error', inputs: [] },
1235
- { name: 'InsufficientLiquidityForPending', type: 'error', inputs: [] },
1236
- { name: 'TokenTransferFailed', type: 'error', inputs: [] },
1237
- { name: 'InternalError', type: 'error', inputs: [] },
1238
1098
  ];
1239
1099
  export const accountKeychain = [
1240
1100
  {
@@ -1324,16 +1184,6 @@ export const accountKeychain = [
1324
1184
  { type: 'uint64', name: 'expiry' },
1325
1185
  ],
1326
1186
  },
1327
- {
1328
- name: 'KeyAuthorized',
1329
- type: 'event',
1330
- inputs: [
1331
- { type: 'address', name: 'account', indexed: true },
1332
- { type: 'bytes32', name: 'publicKey', indexed: true },
1333
- { type: 'uint8', name: 'signatureType' },
1334
- { type: 'uint64', name: 'expiry' },
1335
- ],
1336
- },
1337
1187
  {
1338
1188
  name: 'KeyRevoked',
1339
1189
  type: 'event',
@@ -1342,14 +1192,6 @@ export const accountKeychain = [
1342
1192
  { type: 'address', name: 'publicKey', indexed: true },
1343
1193
  ],
1344
1194
  },
1345
- {
1346
- name: 'KeyRevoked',
1347
- type: 'event',
1348
- inputs: [
1349
- { type: 'address', name: 'account', indexed: true },
1350
- { type: 'bytes32', name: 'publicKey', indexed: true },
1351
- ],
1352
- },
1353
1195
  {
1354
1196
  name: 'SpendingLimitUpdated',
1355
1197
  type: 'event',
@@ -1360,16 +1202,6 @@ export const accountKeychain = [
1360
1202
  { type: 'uint256', name: 'newLimit' },
1361
1203
  ],
1362
1204
  },
1363
- {
1364
- name: 'SpendingLimitUpdated',
1365
- type: 'event',
1366
- inputs: [
1367
- { type: 'address', name: 'account', indexed: true },
1368
- { type: 'bytes32', name: 'publicKey', indexed: true },
1369
- { type: 'address', name: 'token', indexed: true },
1370
- { type: 'uint256', name: 'newLimit' },
1371
- ],
1372
- },
1373
1205
  { name: 'UnauthorizedCaller', type: 'error', inputs: [] },
1374
1206
  { name: 'KeyAlreadyExists', type: 'error', inputs: [] },
1375
1207
  { name: 'KeyNotFound', type: 'error', inputs: [] },
@@ -1391,13 +1223,6 @@ export const nonce = [
1391
1223
  ],
1392
1224
  outputs: [{ type: 'uint64', name: 'nonce' }],
1393
1225
  },
1394
- {
1395
- name: 'getActiveNonceKeyCount',
1396
- type: 'function',
1397
- stateMutability: 'view',
1398
- inputs: [{ type: 'address', name: 'account' }],
1399
- outputs: [{ type: 'uint256', name: 'count' }],
1400
- },
1401
1226
  {
1402
1227
  name: 'NonceIncremented',
1403
1228
  type: 'event',
@@ -1407,29 +1232,10 @@ export const nonce = [
1407
1232
  { type: 'uint64', name: 'newNonce' },
1408
1233
  ],
1409
1234
  },
1410
- {
1411
- name: 'ActiveKeyCountChanged',
1412
- type: 'event',
1413
- inputs: [
1414
- { type: 'address', name: 'account', indexed: true },
1415
- { type: 'uint256', name: 'newCount' },
1416
- ],
1417
- },
1418
1235
  { name: 'ProtocolNonceNotSupported', type: 'error', inputs: [] },
1419
1236
  { name: 'InvalidNonceKey', type: 'error', inputs: [] },
1420
1237
  { name: 'NonceOverflow', type: 'error', inputs: [] },
1421
1238
  ];
1422
- export const tip20RewardsRegistry = [
1423
- {
1424
- name: 'finalizeStreams',
1425
- type: 'function',
1426
- stateMutability: 'nonpayable',
1427
- inputs: [],
1428
- outputs: [],
1429
- },
1430
- { name: 'Unauthorized', type: 'error', inputs: [] },
1431
- { name: 'StreamsAlreadyFinalized', type: 'error', inputs: [] },
1432
- ];
1433
1239
  export const tip20Factory = [
1434
1240
  {
1435
1241
  name: 'createToken',
@@ -1441,36 +1247,48 @@ export const tip20Factory = [
1441
1247
  { type: 'string', name: 'currency' },
1442
1248
  { type: 'address', name: 'quoteToken' },
1443
1249
  { type: 'address', name: 'admin' },
1250
+ { type: 'bytes32', name: 'salt' },
1444
1251
  ],
1445
1252
  outputs: [{ type: 'address' }],
1446
1253
  },
1447
1254
  {
1448
- name: 'tokenIdCounter',
1255
+ name: 'isTIP20',
1449
1256
  type: 'function',
1450
1257
  stateMutability: 'view',
1451
- inputs: [],
1452
- outputs: [{ type: 'uint256' }],
1258
+ inputs: [{ type: 'address', name: 'token' }],
1259
+ outputs: [{ type: 'bool' }],
1453
1260
  },
1454
1261
  {
1455
- name: 'isTIP20',
1262
+ name: 'getTokenAddress',
1456
1263
  type: 'function',
1457
1264
  stateMutability: 'view',
1458
- inputs: [{ type: 'address', name: 'token' }],
1459
- outputs: [{ type: 'bool' }],
1265
+ inputs: [
1266
+ { type: 'address', name: 'sender' },
1267
+ { type: 'bytes32', name: 'salt' },
1268
+ ],
1269
+ outputs: [{ type: 'address' }],
1460
1270
  },
1461
1271
  {
1462
1272
  name: 'TokenCreated',
1463
1273
  type: 'event',
1464
1274
  inputs: [
1465
1275
  { type: 'address', name: 'token', indexed: true },
1466
- { type: 'uint256', name: 'tokenId', indexed: true },
1467
1276
  { type: 'string', name: 'name' },
1468
1277
  { type: 'string', name: 'symbol' },
1469
1278
  { type: 'string', name: 'currency' },
1470
1279
  { type: 'address', name: 'quoteToken' },
1471
1280
  { type: 'address', name: 'admin' },
1281
+ { type: 'bytes32', name: 'salt' },
1472
1282
  ],
1473
1283
  },
1284
+ { name: 'AddressReserved', type: 'error', inputs: [] },
1285
+ { name: 'AddressNotReserved', type: 'error', inputs: [] },
1286
+ { name: 'InvalidQuoteToken', type: 'error', inputs: [] },
1287
+ {
1288
+ name: 'TokenAlreadyExists',
1289
+ type: 'error',
1290
+ inputs: [{ type: 'address', name: 'token' }],
1291
+ },
1474
1292
  ];
1475
1293
  export const tip403Registry = [
1476
1294
  {
@@ -1480,6 +1298,13 @@ export const tip403Registry = [
1480
1298
  inputs: [],
1481
1299
  outputs: [{ type: 'uint64' }],
1482
1300
  },
1301
+ {
1302
+ name: 'policyExists',
1303
+ type: 'function',
1304
+ stateMutability: 'view',
1305
+ inputs: [{ type: 'uint64', name: 'policyId' }],
1306
+ outputs: [{ type: 'bool' }],
1307
+ },
1483
1308
  {
1484
1309
  name: 'policyData',
1485
1310
  type: 'function',
@@ -1593,6 +1418,7 @@ export const tip403Registry = [
1593
1418
  },
1594
1419
  { name: 'Unauthorized', type: 'error', inputs: [] },
1595
1420
  { name: 'IncompatiblePolicyType', type: 'error', inputs: [] },
1421
+ { name: 'PolicyNotFound', type: 'error', inputs: [] },
1596
1422
  ];
1597
1423
  export const validatorConfig = [
1598
1424
  {
@@ -1664,9 +1490,57 @@ export const validatorConfig = [
1664
1490
  inputs: [{ type: 'address', name: 'newOwner' }],
1665
1491
  outputs: [],
1666
1492
  },
1493
+ {
1494
+ name: 'getNextFullDkgCeremony',
1495
+ type: 'function',
1496
+ stateMutability: 'view',
1497
+ inputs: [],
1498
+ outputs: [{ type: 'uint64' }],
1499
+ },
1500
+ {
1501
+ name: 'setNextFullDkgCeremony',
1502
+ type: 'function',
1503
+ stateMutability: 'nonpayable',
1504
+ inputs: [{ type: 'uint64', name: 'epoch' }],
1505
+ outputs: [],
1506
+ },
1507
+ {
1508
+ name: 'validatorsArray',
1509
+ type: 'function',
1510
+ stateMutability: 'view',
1511
+ inputs: [{ type: 'uint256', name: 'index' }],
1512
+ outputs: [{ type: 'address' }],
1513
+ },
1514
+ {
1515
+ name: 'validators',
1516
+ type: 'function',
1517
+ stateMutability: 'view',
1518
+ inputs: [{ type: 'address', name: 'validator' }],
1519
+ outputs: [
1520
+ {
1521
+ type: 'tuple',
1522
+ components: [
1523
+ { type: 'bytes32', name: 'publicKey' },
1524
+ { type: 'bool', name: 'active' },
1525
+ { type: 'uint64', name: 'index' },
1526
+ { type: 'address', name: 'validatorAddress' },
1527
+ { type: 'string', name: 'inboundAddress' },
1528
+ { type: 'string', name: 'outboundAddress' },
1529
+ ],
1530
+ },
1531
+ ],
1532
+ },
1533
+ {
1534
+ name: 'validatorCount',
1535
+ type: 'function',
1536
+ stateMutability: 'view',
1537
+ inputs: [],
1538
+ outputs: [{ type: 'uint64' }],
1539
+ },
1667
1540
  { name: 'Unauthorized', type: 'error', inputs: [] },
1668
1541
  { name: 'ValidatorAlreadyExists', type: 'error', inputs: [] },
1669
1542
  { name: 'ValidatorNotFound', type: 'error', inputs: [] },
1543
+ { name: 'InvalidPublicKey', type: 'error', inputs: [] },
1670
1544
  {
1671
1545
  name: 'NotHostPort',
1672
1546
  type: 'error',
@@ -1686,20 +1560,4 @@ export const validatorConfig = [
1686
1560
  ],
1687
1561
  },
1688
1562
  ];
1689
- export const pathUsd = [
1690
- {
1691
- name: 'TRANSFER_ROLE',
1692
- type: 'function',
1693
- stateMutability: 'view',
1694
- inputs: [],
1695
- outputs: [{ type: 'bytes32' }],
1696
- },
1697
- {
1698
- name: 'RECEIVE_WITH_MEMO_ROLE',
1699
- type: 'function',
1700
- stateMutability: 'view',
1701
- inputs: [],
1702
- outputs: [{ type: 'bytes32' }],
1703
- },
1704
- ];
1705
1563
  //# sourceMappingURL=Abis.js.map