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