viem 2.52.0 → 2.53.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/_cjs/account-abstraction/actions/bundler/estimateUserOperationGas.js +2 -0
  3. package/_cjs/account-abstraction/actions/bundler/estimateUserOperationGas.js.map +1 -1
  4. package/_cjs/actions/wallet/prepareTransactionRequest.js.map +1 -1
  5. package/_cjs/chains/definitions/citrate.js +17 -0
  6. package/_cjs/chains/definitions/citrate.js.map +1 -0
  7. package/_cjs/chains/definitions/grav.js +24 -0
  8. package/_cjs/chains/definitions/grav.js.map +1 -0
  9. package/_cjs/chains/definitions/ladyChain.js +22 -0
  10. package/_cjs/chains/definitions/ladyChain.js.map +1 -0
  11. package/_cjs/chains/definitions/monad.js +5 -5
  12. package/_cjs/chains/definitions/monad.js.map +1 -1
  13. package/_cjs/chains/definitions/tempoModerato.js +1 -0
  14. package/_cjs/chains/definitions/tempoModerato.js.map +1 -1
  15. package/_cjs/chains/definitions/valygoNft.js +37 -0
  16. package/_cjs/chains/definitions/valygoNft.js.map +1 -0
  17. package/_cjs/chains/definitions/valygoSmartchain.js +37 -0
  18. package/_cjs/chains/definitions/valygoSmartchain.js.map +1 -0
  19. package/_cjs/chains/definitions/whitechainSepolia.js +31 -0
  20. package/_cjs/chains/definitions/whitechainSepolia.js.map +1 -0
  21. package/_cjs/chains/index.js +25 -13
  22. package/_cjs/chains/index.js.map +1 -1
  23. package/_cjs/errors/version.js +1 -1
  24. package/_cjs/tempo/Abis.js +1866 -1866
  25. package/_cjs/tempo/Abis.js.map +1 -1
  26. package/_cjs/tempo/Account.js +35 -3
  27. package/_cjs/tempo/Account.js.map +1 -1
  28. package/_cjs/tempo/Client.js +27 -0
  29. package/_cjs/tempo/Client.js.map +1 -0
  30. package/_cjs/tempo/Formatters.js +2 -1
  31. package/_cjs/tempo/Formatters.js.map +1 -1
  32. package/_cjs/tempo/Scopes.js +39 -0
  33. package/_cjs/tempo/Scopes.js.map +1 -0
  34. package/_cjs/tempo/Selectors.js +226 -0
  35. package/_cjs/tempo/Selectors.js.map +1 -0
  36. package/_cjs/tempo/Transaction.js +22 -0
  37. package/_cjs/tempo/Transaction.js.map +1 -1
  38. package/_cjs/tempo/chainConfig.js +10 -0
  39. package/_cjs/tempo/chainConfig.js.map +1 -1
  40. package/_cjs/tempo/index.js +14 -1
  41. package/_cjs/tempo/index.js.map +1 -1
  42. package/_esm/account-abstraction/actions/bundler/estimateUserOperationGas.js +2 -0
  43. package/_esm/account-abstraction/actions/bundler/estimateUserOperationGas.js.map +1 -1
  44. package/_esm/actions/wallet/prepareTransactionRequest.js.map +1 -1
  45. package/_esm/chains/definitions/citrate.js +14 -0
  46. package/_esm/chains/definitions/citrate.js.map +1 -0
  47. package/_esm/chains/definitions/grav.js +21 -0
  48. package/_esm/chains/definitions/grav.js.map +1 -0
  49. package/_esm/chains/definitions/ladyChain.js +19 -0
  50. package/_esm/chains/definitions/ladyChain.js.map +1 -0
  51. package/_esm/chains/definitions/monad.js +5 -5
  52. package/_esm/chains/definitions/monad.js.map +1 -1
  53. package/_esm/chains/definitions/tempoModerato.js +1 -0
  54. package/_esm/chains/definitions/tempoModerato.js.map +1 -1
  55. package/_esm/chains/definitions/valygoNft.js +34 -0
  56. package/_esm/chains/definitions/valygoNft.js.map +1 -0
  57. package/_esm/chains/definitions/valygoSmartchain.js +34 -0
  58. package/_esm/chains/definitions/valygoSmartchain.js.map +1 -0
  59. package/_esm/chains/definitions/whitechainSepolia.js +28 -0
  60. package/_esm/chains/definitions/whitechainSepolia.js.map +1 -0
  61. package/_esm/chains/index.js +6 -0
  62. package/_esm/chains/index.js.map +1 -1
  63. package/_esm/errors/version.js +1 -1
  64. package/_esm/tempo/Abis.js +1865 -1865
  65. package/_esm/tempo/Abis.js.map +1 -1
  66. package/_esm/tempo/Account.js +81 -4
  67. package/_esm/tempo/Account.js.map +1 -1
  68. package/_esm/tempo/Client.js +66 -0
  69. package/_esm/tempo/Client.js.map +1 -0
  70. package/_esm/tempo/Formatters.js +5 -1
  71. package/_esm/tempo/Formatters.js.map +1 -1
  72. package/_esm/tempo/Scopes.js +49 -0
  73. package/_esm/tempo/Scopes.js.map +1 -0
  74. package/_esm/tempo/Selectors.js +224 -0
  75. package/_esm/tempo/Selectors.js.map +1 -0
  76. package/_esm/tempo/Transaction.js +34 -0
  77. package/_esm/tempo/Transaction.js.map +1 -1
  78. package/_esm/tempo/chainConfig.js +24 -1
  79. package/_esm/tempo/chainConfig.js.map +1 -1
  80. package/_esm/tempo/index.js +10 -1
  81. package/_esm/tempo/index.js.map +1 -1
  82. package/_types/account-abstraction/actions/bundler/estimateUserOperationGas.d.ts.map +1 -1
  83. package/_types/actions/wallet/prepareTransactionRequest.d.ts +12 -1
  84. package/_types/actions/wallet/prepareTransactionRequest.d.ts.map +1 -1
  85. package/_types/chains/definitions/citrate.d.ts +57 -0
  86. package/_types/chains/definitions/citrate.d.ts.map +1 -0
  87. package/_types/chains/definitions/grav.d.ts +43 -0
  88. package/_types/chains/definitions/grav.d.ts.map +1 -0
  89. package/_types/chains/definitions/ladyChain.d.ts +50 -0
  90. package/_types/chains/definitions/ladyChain.d.ts.map +1 -0
  91. package/_types/chains/definitions/monad.d.ts +5 -5
  92. package/_types/chains/definitions/tempo.d.ts +36 -0
  93. package/_types/chains/definitions/tempo.d.ts.map +1 -1
  94. package/_types/chains/definitions/tempoDevnet.d.ts +36 -0
  95. package/_types/chains/definitions/tempoDevnet.d.ts.map +1 -1
  96. package/_types/chains/definitions/tempoLocalnet.d.ts +36 -0
  97. package/_types/chains/definitions/tempoLocalnet.d.ts.map +1 -1
  98. package/_types/chains/definitions/tempoModerato.d.ts +38 -0
  99. package/_types/chains/definitions/tempoModerato.d.ts.map +1 -1
  100. package/_types/chains/definitions/valygoNft.d.ts +48 -0
  101. package/_types/chains/definitions/valygoNft.d.ts.map +1 -0
  102. package/_types/chains/definitions/valygoSmartchain.d.ts +48 -0
  103. package/_types/chains/definitions/valygoSmartchain.d.ts.map +1 -0
  104. package/_types/chains/definitions/whitechainSepolia.d.ts +46 -0
  105. package/_types/chains/definitions/whitechainSepolia.d.ts.map +1 -0
  106. package/_types/chains/index.d.ts +6 -0
  107. package/_types/chains/index.d.ts.map +1 -1
  108. package/_types/errors/version.d.ts +1 -1
  109. package/_types/tempo/Abis.d.ts +5816 -5816
  110. package/_types/tempo/Abis.d.ts.map +1 -1
  111. package/_types/tempo/Account.d.ts +48 -1
  112. package/_types/tempo/Account.d.ts.map +1 -1
  113. package/_types/tempo/Client.d.ts +98 -0
  114. package/_types/tempo/Client.d.ts.map +1 -0
  115. package/_types/tempo/Formatters.d.ts.map +1 -1
  116. package/_types/tempo/Scopes.d.ts +48 -0
  117. package/_types/tempo/Scopes.d.ts.map +1 -0
  118. package/_types/tempo/Selectors.d.ts +223 -0
  119. package/_types/tempo/Selectors.d.ts.map +1 -0
  120. package/_types/tempo/Transaction.d.ts +5 -1
  121. package/_types/tempo/Transaction.d.ts.map +1 -1
  122. package/_types/tempo/chainConfig.d.ts +34 -15
  123. package/_types/tempo/chainConfig.d.ts.map +1 -1
  124. package/_types/tempo/index.d.ts +10 -1
  125. package/_types/tempo/index.d.ts.map +1 -1
  126. package/_types/tempo/zones/zone.d.ts +108 -0
  127. package/_types/tempo/zones/zone.d.ts.map +1 -1
  128. package/account-abstraction/actions/bundler/estimateUserOperationGas.ts +2 -0
  129. package/actions/wallet/prepareTransactionRequest.ts +40 -5
  130. package/chains/definitions/citrate.ts +14 -0
  131. package/chains/definitions/grav.ts +21 -0
  132. package/chains/definitions/ladyChain.ts +19 -0
  133. package/chains/definitions/monad.ts +5 -5
  134. package/chains/definitions/tempoModerato.ts +1 -0
  135. package/chains/definitions/valygoNft.ts +34 -0
  136. package/chains/definitions/valygoSmartchain.ts +34 -0
  137. package/chains/definitions/whitechainSepolia.ts +28 -0
  138. package/chains/index.ts +6 -0
  139. package/errors/version.ts +1 -1
  140. package/package.json +3 -4
  141. package/tempo/Abis.ts +1869 -1869
  142. package/tempo/Account.ts +97 -4
  143. package/tempo/Client.ts +172 -0
  144. package/tempo/Formatters.ts +12 -1
  145. package/tempo/Scopes.ts +124 -0
  146. package/tempo/Selectors.ts +260 -0
  147. package/tempo/Transaction.ts +42 -0
  148. package/tempo/chainConfig.ts +32 -3
  149. package/tempo/index.ts +35 -0
@@ -1,2769 +1,2566 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.abis = exports.validatorConfig = exports.tip403Registry = exports.tip20Factory = exports.nonce = exports.accountKeychain = exports.receivePolicyGuard = exports.feeAmm = exports.feeManager = exports.addressRegistry = exports.stablecoinDex = exports.signatureVerifier = exports.validatorConfigV2 = exports.tip20 = exports.tip20ChannelReserve = void 0;
4
- exports.tip20ChannelReserve = [
5
- {
6
- name: 'CLOSE_GRACE_PERIOD',
7
- type: 'function',
8
- stateMutability: 'view',
9
- inputs: [],
10
- outputs: [{ type: 'uint64' }],
11
- },
12
- {
13
- name: 'VOUCHER_TYPEHASH',
14
- type: 'function',
15
- stateMutability: 'view',
16
- inputs: [],
17
- outputs: [{ type: 'bytes32' }],
18
- },
19
- {
20
- name: 'open',
21
- type: 'function',
22
- stateMutability: 'nonpayable',
23
- inputs: [
24
- { type: 'address', name: 'payee' },
25
- { type: 'address', name: 'operator' },
26
- { type: 'address', name: 'token' },
27
- { type: 'uint96', name: 'deposit' },
28
- { type: 'bytes32', name: 'salt' },
29
- { type: 'address', name: 'authorizedSigner' },
30
- ],
31
- outputs: [{ type: 'bytes32', name: 'channelId' }],
32
- },
3
+ exports.abis = exports.validatorConfigV2 = exports.validatorConfig = exports.feeAmm = exports.feeManager = exports.tip403Registry = exports.tip20Factory = exports.tip20ChannelReserve = exports.tip20 = exports.stablecoinDex = exports.signatureVerifier = exports.receivePolicyGuard = exports.nonce = exports.addressRegistry = exports.accountKeychain = void 0;
4
+ exports.accountKeychain = [
33
5
  {
34
- name: 'settle',
6
+ name: 'authorizeKey',
35
7
  type: 'function',
36
8
  stateMutability: 'nonpayable',
37
9
  inputs: [
10
+ { type: 'address', name: 'keyId' },
11
+ { type: 'uint8', name: 'signatureType' },
12
+ { type: 'uint64', name: 'expiry' },
13
+ { type: 'bool', name: 'enforceLimits' },
38
14
  {
39
- type: 'tuple',
40
- name: 'descriptor',
15
+ type: 'tuple[]',
16
+ name: 'limits',
41
17
  components: [
42
- { type: 'address', name: 'payer' },
43
- { type: 'address', name: 'payee' },
44
- { type: 'address', name: 'operator' },
45
18
  { type: 'address', name: 'token' },
46
- { type: 'bytes32', name: 'salt' },
47
- { type: 'address', name: 'authorizedSigner' },
48
- { type: 'bytes32', name: 'expiringNonceHash' },
19
+ { type: 'uint256', name: 'amount' },
49
20
  ],
50
21
  },
51
- { type: 'uint96', name: 'cumulativeAmount' },
52
- { type: 'bytes', name: 'signature' },
53
22
  ],
54
23
  outputs: [],
55
24
  },
56
25
  {
57
- name: 'topUp',
26
+ name: 'authorizeKey',
58
27
  type: 'function',
59
28
  stateMutability: 'nonpayable',
60
29
  inputs: [
30
+ { type: 'address', name: 'keyId' },
31
+ { type: 'uint8', name: 'signatureType' },
61
32
  {
62
33
  type: 'tuple',
63
- name: 'descriptor',
34
+ name: 'config',
64
35
  components: [
65
- { type: 'address', name: 'payer' },
66
- { type: 'address', name: 'payee' },
67
- { type: 'address', name: 'operator' },
68
- { type: 'address', name: 'token' },
69
- { type: 'bytes32', name: 'salt' },
70
- { type: 'address', name: 'authorizedSigner' },
71
- { type: 'bytes32', name: 'expiringNonceHash' },
36
+ { type: 'uint64', name: 'expiry' },
37
+ { type: 'bool', name: 'enforceLimits' },
38
+ {
39
+ type: 'tuple[]',
40
+ name: 'limits',
41
+ components: [
42
+ { type: 'address', name: 'token' },
43
+ { type: 'uint256', name: 'amount' },
44
+ { type: 'uint64', name: 'period' },
45
+ ],
46
+ },
47
+ { type: 'bool', name: 'allowAnyCalls' },
48
+ {
49
+ type: 'tuple[]',
50
+ name: 'allowedCalls',
51
+ components: [
52
+ { type: 'address', name: 'target' },
53
+ {
54
+ type: 'tuple[]',
55
+ name: 'selectorRules',
56
+ components: [
57
+ { type: 'bytes4', name: 'selector' },
58
+ { type: 'address[]', name: 'recipients' },
59
+ ],
60
+ },
61
+ ],
62
+ },
72
63
  ],
73
64
  },
74
- { type: 'uint96', name: 'additionalDeposit' },
75
65
  ],
76
66
  outputs: [],
77
67
  },
78
68
  {
79
- name: 'close',
69
+ name: 'authorizeKey',
80
70
  type: 'function',
81
71
  stateMutability: 'nonpayable',
82
72
  inputs: [
73
+ { type: 'address', name: 'keyId' },
74
+ { type: 'uint8', name: 'signatureType' },
83
75
  {
84
76
  type: 'tuple',
85
- name: 'descriptor',
77
+ name: 'config',
86
78
  components: [
87
- { type: 'address', name: 'payer' },
88
- { type: 'address', name: 'payee' },
89
- { type: 'address', name: 'operator' },
90
- { type: 'address', name: 'token' },
91
- { type: 'bytes32', name: 'salt' },
92
- { type: 'address', name: 'authorizedSigner' },
93
- { type: 'bytes32', name: 'expiringNonceHash' },
79
+ { type: 'uint64', name: 'expiry' },
80
+ { type: 'bool', name: 'enforceLimits' },
81
+ {
82
+ type: 'tuple[]',
83
+ name: 'limits',
84
+ components: [
85
+ { type: 'address', name: 'token' },
86
+ { type: 'uint256', name: 'amount' },
87
+ { type: 'uint64', name: 'period' },
88
+ ],
89
+ },
90
+ { type: 'bool', name: 'allowAnyCalls' },
91
+ {
92
+ type: 'tuple[]',
93
+ name: 'allowedCalls',
94
+ components: [
95
+ { type: 'address', name: 'target' },
96
+ {
97
+ type: 'tuple[]',
98
+ name: 'selectorRules',
99
+ components: [
100
+ { type: 'bytes4', name: 'selector' },
101
+ { type: 'address[]', name: 'recipients' },
102
+ ],
103
+ },
104
+ ],
105
+ },
94
106
  ],
95
107
  },
96
- { type: 'uint96', name: 'cumulativeAmount' },
97
- { type: 'uint96', name: 'captureAmount' },
98
- { type: 'bytes', name: 'signature' },
108
+ { type: 'bytes32', name: 'witness' },
99
109
  ],
100
110
  outputs: [],
101
111
  },
102
112
  {
103
- name: 'requestClose',
113
+ name: 'authorizeAdminKey',
104
114
  type: 'function',
105
115
  stateMutability: 'nonpayable',
106
116
  inputs: [
107
- {
108
- type: 'tuple',
109
- name: 'descriptor',
110
- components: [
111
- { type: 'address', name: 'payer' },
112
- { type: 'address', name: 'payee' },
113
- { type: 'address', name: 'operator' },
114
- { type: 'address', name: 'token' },
115
- { type: 'bytes32', name: 'salt' },
116
- { type: 'address', name: 'authorizedSigner' },
117
- { type: 'bytes32', name: 'expiringNonceHash' },
118
- ],
119
- },
117
+ { type: 'address', name: 'keyId' },
118
+ { type: 'uint8', name: 'signatureType' },
119
+ { type: 'bytes32', name: 'witness' },
120
120
  ],
121
121
  outputs: [],
122
122
  },
123
123
  {
124
- name: 'withdraw',
124
+ name: 'burnKeyAuthorizationWitness',
125
+ type: 'function',
126
+ stateMutability: 'nonpayable',
127
+ inputs: [{ type: 'bytes32', name: 'witness' }],
128
+ outputs: [],
129
+ },
130
+ {
131
+ name: 'revokeKey',
132
+ type: 'function',
133
+ stateMutability: 'nonpayable',
134
+ inputs: [{ type: 'address', name: 'keyId' }],
135
+ outputs: [],
136
+ },
137
+ {
138
+ name: 'updateSpendingLimit',
125
139
  type: 'function',
126
140
  stateMutability: 'nonpayable',
127
141
  inputs: [
128
- {
129
- type: 'tuple',
130
- name: 'descriptor',
131
- components: [
132
- { type: 'address', name: 'payer' },
133
- { type: 'address', name: 'payee' },
134
- { type: 'address', name: 'operator' },
135
- { type: 'address', name: 'token' },
136
- { type: 'bytes32', name: 'salt' },
137
- { type: 'address', name: 'authorizedSigner' },
138
- { type: 'bytes32', name: 'expiringNonceHash' },
139
- ],
140
- },
142
+ { type: 'address', name: 'keyId' },
143
+ { type: 'address', name: 'token' },
144
+ { type: 'uint256', name: 'newLimit' },
141
145
  ],
142
146
  outputs: [],
143
147
  },
144
148
  {
145
- name: 'getChannel',
149
+ name: 'setAllowedCalls',
146
150
  type: 'function',
147
- stateMutability: 'view',
151
+ stateMutability: 'nonpayable',
148
152
  inputs: [
153
+ { type: 'address', name: 'keyId' },
149
154
  {
150
- type: 'tuple',
151
- name: 'descriptor',
152
- components: [
153
- { type: 'address', name: 'payer' },
154
- { type: 'address', name: 'payee' },
155
- { type: 'address', name: 'operator' },
156
- { type: 'address', name: 'token' },
157
- { type: 'bytes32', name: 'salt' },
158
- { type: 'address', name: 'authorizedSigner' },
159
- { type: 'bytes32', name: 'expiringNonceHash' },
160
- ],
161
- },
162
- ],
163
- outputs: [
164
- {
165
- type: 'tuple',
155
+ type: 'tuple[]',
156
+ name: 'scopes',
166
157
  components: [
158
+ { type: 'address', name: 'target' },
167
159
  {
168
- type: 'tuple',
169
- name: 'descriptor',
170
- components: [
171
- { type: 'address', name: 'payer' },
172
- { type: 'address', name: 'payee' },
173
- { type: 'address', name: 'operator' },
174
- { type: 'address', name: 'token' },
175
- { type: 'bytes32', name: 'salt' },
176
- { type: 'address', name: 'authorizedSigner' },
177
- { type: 'bytes32', name: 'expiringNonceHash' },
178
- ],
179
- },
180
- {
181
- type: 'tuple',
182
- name: 'state',
160
+ type: 'tuple[]',
161
+ name: 'selectorRules',
183
162
  components: [
184
- { type: 'uint96', name: 'settled' },
185
- { type: 'uint96', name: 'deposit' },
186
- { type: 'uint32', name: 'closeRequestedAt' },
163
+ { type: 'bytes4', name: 'selector' },
164
+ { type: 'address[]', name: 'recipients' },
187
165
  ],
188
166
  },
189
167
  ],
190
168
  },
191
169
  ],
170
+ outputs: [],
192
171
  },
193
172
  {
194
- name: 'getChannelState',
173
+ name: 'removeAllowedCalls',
174
+ type: 'function',
175
+ stateMutability: 'nonpayable',
176
+ inputs: [
177
+ { type: 'address', name: 'keyId' },
178
+ { type: 'address', name: 'target' },
179
+ ],
180
+ outputs: [],
181
+ },
182
+ {
183
+ name: 'getKey',
195
184
  type: 'function',
196
185
  stateMutability: 'view',
197
- inputs: [{ type: 'bytes32', name: 'channelId' }],
186
+ inputs: [
187
+ { type: 'address', name: 'account' },
188
+ { type: 'address', name: 'keyId' },
189
+ ],
198
190
  outputs: [
199
191
  {
200
192
  type: 'tuple',
201
193
  components: [
202
- { type: 'uint96', name: 'settled' },
203
- { type: 'uint96', name: 'deposit' },
204
- { type: 'uint32', name: 'closeRequestedAt' },
194
+ { type: 'uint8', name: 'signatureType' },
195
+ { type: 'address', name: 'keyId' },
196
+ { type: 'uint64', name: 'expiry' },
197
+ { type: 'bool', name: 'enforceLimits' },
198
+ { type: 'bool', name: 'isRevoked' },
205
199
  ],
206
200
  },
207
201
  ],
208
202
  },
209
203
  {
210
- name: 'getChannelStatesBatch',
204
+ name: 'getRemainingLimit',
211
205
  type: 'function',
212
206
  stateMutability: 'view',
213
- inputs: [{ type: 'bytes32[]', name: 'channelIds' }],
207
+ inputs: [
208
+ { type: 'address', name: 'account' },
209
+ { type: 'address', name: 'keyId' },
210
+ { type: 'address', name: 'token' },
211
+ ],
212
+ outputs: [{ type: 'uint256', name: 'remaining' }],
213
+ },
214
+ {
215
+ name: 'getRemainingLimitWithPeriod',
216
+ type: 'function',
217
+ stateMutability: 'view',
218
+ inputs: [
219
+ { type: 'address', name: 'account' },
220
+ { type: 'address', name: 'keyId' },
221
+ { type: 'address', name: 'token' },
222
+ ],
223
+ outputs: [
224
+ { type: 'uint256', name: 'remaining' },
225
+ { type: 'uint64', name: 'periodEnd' },
226
+ ],
227
+ },
228
+ {
229
+ name: 'getAllowedCalls',
230
+ type: 'function',
231
+ stateMutability: 'view',
232
+ inputs: [
233
+ { type: 'address', name: 'account' },
234
+ { type: 'address', name: 'keyId' },
235
+ ],
214
236
  outputs: [
237
+ { type: 'bool', name: 'isScoped' },
215
238
  {
216
239
  type: 'tuple[]',
240
+ name: 'scopes',
217
241
  components: [
218
- { type: 'uint96', name: 'settled' },
219
- { type: 'uint96', name: 'deposit' },
220
- { type: 'uint32', name: 'closeRequestedAt' },
242
+ { type: 'address', name: 'target' },
243
+ {
244
+ type: 'tuple[]',
245
+ name: 'selectorRules',
246
+ components: [
247
+ { type: 'bytes4', name: 'selector' },
248
+ { type: 'address[]', name: 'recipients' },
249
+ ],
250
+ },
221
251
  ],
222
252
  },
223
253
  ],
224
254
  },
225
255
  {
226
- name: 'computeChannelId',
256
+ name: 'isKeyAuthorizationWitnessBurned',
227
257
  type: 'function',
228
258
  stateMutability: 'view',
229
259
  inputs: [
230
- { type: 'address', name: 'payer' },
231
- { type: 'address', name: 'payee' },
232
- { type: 'address', name: 'operator' },
233
- { type: 'address', name: 'token' },
234
- { type: 'bytes32', name: 'salt' },
235
- { type: 'address', name: 'authorizedSigner' },
236
- { type: 'bytes32', name: 'expiringNonceHash' },
260
+ { type: 'address', name: 'account' },
261
+ { type: 'bytes32', name: 'witness' },
237
262
  ],
238
- outputs: [{ type: 'bytes32' }],
263
+ outputs: [{ type: 'bool' }],
239
264
  },
240
265
  {
241
- name: 'getVoucherDigest',
266
+ name: 'isAdminKey',
242
267
  type: 'function',
243
268
  stateMutability: 'view',
244
269
  inputs: [
245
- { type: 'bytes32', name: 'channelId' },
246
- { type: 'uint96', name: 'cumulativeAmount' },
270
+ { type: 'address', name: 'account' },
271
+ { type: 'address', name: 'keyId' },
247
272
  ],
248
- outputs: [{ type: 'bytes32' }],
273
+ outputs: [{ type: 'bool' }],
249
274
  },
250
275
  {
251
- name: 'domainSeparator',
276
+ name: 'getTransactionKey',
252
277
  type: 'function',
253
278
  stateMutability: 'view',
254
279
  inputs: [],
255
- outputs: [{ type: 'bytes32' }],
280
+ outputs: [{ type: 'address' }],
256
281
  },
257
282
  {
258
- name: 'ChannelOpened',
283
+ name: 'KeyAuthorized',
259
284
  type: 'event',
260
285
  inputs: [
261
- { type: 'bytes32', name: 'channelId', indexed: true },
262
- { type: 'address', name: 'payer', indexed: true },
263
- { type: 'address', name: 'payee', indexed: true },
264
- { type: 'address', name: 'operator' },
265
- { type: 'address', name: 'token' },
266
- { type: 'address', name: 'authorizedSigner' },
267
- { type: 'bytes32', name: 'salt' },
268
- { type: 'bytes32', name: 'expiringNonceHash' },
269
- { type: 'uint96', name: 'deposit' },
286
+ { type: 'address', name: 'account', indexed: true },
287
+ { type: 'address', name: 'publicKey', indexed: true },
288
+ { type: 'uint8', name: 'signatureType' },
289
+ { type: 'uint64', name: 'expiry' },
270
290
  ],
271
291
  },
272
292
  {
273
- name: 'Settled',
293
+ name: 'AdminKeyAuthorized',
274
294
  type: 'event',
275
295
  inputs: [
276
- { type: 'bytes32', name: 'channelId', indexed: true },
277
- { type: 'address', name: 'payer', indexed: true },
278
- { type: 'address', name: 'payee', indexed: true },
279
- { type: 'uint96', name: 'cumulativeAmount' },
280
- { type: 'uint96', name: 'deltaPaid' },
281
- { type: 'uint96', name: 'newSettled' },
296
+ { type: 'address', name: 'account', indexed: true },
297
+ { type: 'address', name: 'publicKey', indexed: true },
282
298
  ],
283
299
  },
284
300
  {
285
- name: 'TopUp',
301
+ name: 'KeyRevoked',
286
302
  type: 'event',
287
303
  inputs: [
288
- { type: 'bytes32', name: 'channelId', indexed: true },
289
- { type: 'address', name: 'payer', indexed: true },
290
- { type: 'address', name: 'payee', indexed: true },
291
- { type: 'uint96', name: 'additionalDeposit' },
292
- { type: 'uint96', name: 'newDeposit' },
304
+ { type: 'address', name: 'account', indexed: true },
305
+ { type: 'address', name: 'publicKey', indexed: true },
293
306
  ],
294
307
  },
295
308
  {
296
- name: 'CloseRequested',
309
+ name: 'SpendingLimitUpdated',
297
310
  type: 'event',
298
311
  inputs: [
299
- { type: 'bytes32', name: 'channelId', indexed: true },
300
- { type: 'address', name: 'payer', indexed: true },
301
- { type: 'address', name: 'payee', indexed: true },
302
- { type: 'uint256', name: 'closeGraceEnd' },
312
+ { type: 'address', name: 'account', indexed: true },
313
+ { type: 'address', name: 'publicKey', indexed: true },
314
+ { type: 'address', name: 'token', indexed: true },
315
+ { type: 'uint256', name: 'newLimit' },
303
316
  ],
304
317
  },
305
318
  {
306
- name: 'ChannelClosed',
319
+ name: 'AccessKeySpend',
307
320
  type: 'event',
308
321
  inputs: [
309
- { type: 'bytes32', name: 'channelId', indexed: true },
310
- { type: 'address', name: 'payer', indexed: true },
311
- { type: 'address', name: 'payee', indexed: true },
312
- { type: 'uint96', name: 'settledToPayee' },
313
- { type: 'uint96', name: 'refundedToPayer' },
322
+ { type: 'address', name: 'account', indexed: true },
323
+ { type: 'address', name: 'publicKey', indexed: true },
324
+ { type: 'address', name: 'token', indexed: true },
325
+ { type: 'uint256', name: 'amount' },
326
+ { type: 'uint256', name: 'remainingLimit' },
314
327
  ],
315
328
  },
316
329
  {
317
- name: 'CloseRequestCancelled',
330
+ name: 'KeyAuthorizationWitness',
318
331
  type: 'event',
319
332
  inputs: [
320
- { type: 'bytes32', name: 'channelId', indexed: true },
321
- { type: 'address', name: 'payer', indexed: true },
322
- { type: 'address', name: 'payee', indexed: true },
333
+ { type: 'address', name: 'account', indexed: true },
334
+ { type: 'bytes32', name: 'witness', indexed: true },
323
335
  ],
324
336
  },
325
- { name: 'ChannelAlreadyExists', type: 'error', inputs: [] },
326
- { name: 'ChannelNotFound', type: 'error', inputs: [] },
327
- { name: 'NotPayer', type: 'error', inputs: [] },
328
- { name: 'NotPayeeOrOperator', type: 'error', inputs: [] },
329
- { name: 'InvalidPayee', type: 'error', inputs: [] },
330
- { name: 'ZeroDeposit', type: 'error', inputs: [] },
331
- { name: 'ExpiringNonceHashNotSet', type: 'error', inputs: [] },
332
- { name: 'InvalidSignature', type: 'error', inputs: [] },
333
- { name: 'AmountExceedsDeposit', type: 'error', inputs: [] },
334
- { name: 'AmountNotIncreasing', type: 'error', inputs: [] },
335
- { name: 'CaptureAmountInvalid', type: 'error', inputs: [] },
336
- { name: 'CloseNotReady', type: 'error', inputs: [] },
337
- { name: 'DepositOverflow', type: 'error', inputs: [] },
338
- ];
339
- exports.tip20 = [
340
337
  {
341
- name: 'name',
342
- type: 'function',
343
- stateMutability: 'view',
344
- inputs: [],
345
- outputs: [{ type: 'string' }],
338
+ name: 'KeyAuthorizationWitnessBurned',
339
+ type: 'event',
340
+ inputs: [
341
+ { type: 'address', name: 'account', indexed: true },
342
+ { type: 'bytes32', name: 'witness', indexed: true },
343
+ ],
346
344
  },
345
+ { name: 'UnauthorizedCaller', type: 'error', inputs: [] },
346
+ { name: 'KeyAlreadyExists', type: 'error', inputs: [] },
347
+ { name: 'KeyNotFound', type: 'error', inputs: [] },
348
+ { name: 'KeyExpired', type: 'error', inputs: [] },
349
+ { name: 'SpendingLimitExceeded', type: 'error', inputs: [] },
350
+ { name: 'InvalidSpendingLimit', type: 'error', inputs: [] },
351
+ { name: 'InvalidSignatureType', type: 'error', inputs: [] },
352
+ { name: 'ZeroPublicKey', type: 'error', inputs: [] },
353
+ { name: 'ExpiryInPast', type: 'error', inputs: [] },
354
+ { name: 'KeyAlreadyRevoked', type: 'error', inputs: [] },
347
355
  {
348
- name: 'symbol',
349
- type: 'function',
350
- stateMutability: 'view',
351
- inputs: [],
352
- outputs: [{ type: 'string' }],
356
+ name: 'SignatureTypeMismatch',
357
+ type: 'error',
358
+ inputs: [
359
+ { type: 'uint8', name: 'expected' },
360
+ { type: 'uint8', name: 'actual' },
361
+ ],
353
362
  },
363
+ { name: 'CallNotAllowed', type: 'error', inputs: [] },
364
+ { name: 'InvalidCallScope', type: 'error', inputs: [] },
365
+ { name: 'InvalidKeyId', type: 'error', inputs: [] },
366
+ { name: 'InvalidKeyAuthorizationWitness', type: 'error', inputs: [] },
367
+ { name: 'KeyAuthorizationWitnessAlreadyBurned', type: 'error', inputs: [] },
354
368
  {
355
- name: 'decimals',
356
- type: 'function',
357
- stateMutability: 'pure',
358
- inputs: [],
359
- outputs: [{ type: 'uint8' }],
369
+ name: 'LegacyAuthorizeKeySelectorChanged',
370
+ type: 'error',
371
+ inputs: [{ type: 'bytes4', name: 'newSelector' }],
360
372
  },
373
+ ];
374
+ exports.addressRegistry = [
361
375
  {
362
- name: 'totalSupply',
376
+ name: 'registerVirtualMaster',
363
377
  type: 'function',
364
- stateMutability: 'view',
365
- inputs: [],
366
- outputs: [{ type: 'uint256' }],
378
+ stateMutability: 'nonpayable',
379
+ inputs: [{ type: 'bytes32', name: 'salt' }],
380
+ outputs: [{ type: 'bytes4', name: 'masterId' }],
367
381
  },
368
382
  {
369
- name: 'quoteToken',
383
+ name: 'getMaster',
370
384
  type: 'function',
371
385
  stateMutability: 'view',
372
- inputs: [],
386
+ inputs: [{ type: 'bytes4', name: 'masterId' }],
373
387
  outputs: [{ type: 'address' }],
374
388
  },
375
389
  {
376
- name: 'nextQuoteToken',
390
+ name: 'resolveRecipient',
377
391
  type: 'function',
378
392
  stateMutability: 'view',
379
- inputs: [],
380
- outputs: [{ type: 'address' }],
393
+ inputs: [{ type: 'address', name: 'to' }],
394
+ outputs: [{ type: 'address', name: 'effectiveRecipient' }],
381
395
  },
382
396
  {
383
- name: 'balanceOf',
397
+ name: 'resolveVirtualAddress',
384
398
  type: 'function',
385
399
  stateMutability: 'view',
386
- inputs: [{ type: 'address', name: 'account' }],
387
- outputs: [{ type: 'uint256' }],
400
+ inputs: [{ type: 'address', name: 'virtualAddr' }],
401
+ outputs: [{ type: 'address', name: 'master' }],
388
402
  },
389
403
  {
390
- name: 'transfer',
404
+ name: 'isVirtualAddress',
391
405
  type: 'function',
392
- stateMutability: 'nonpayable',
393
- inputs: [
394
- { type: 'address', name: 'to' },
395
- { type: 'uint256', name: 'amount' },
396
- ],
406
+ stateMutability: 'pure',
407
+ inputs: [{ type: 'address', name: 'addr' }],
397
408
  outputs: [{ type: 'bool' }],
398
409
  },
399
410
  {
400
- name: 'approve',
411
+ name: 'decodeVirtualAddress',
401
412
  type: 'function',
402
- stateMutability: 'nonpayable',
403
- inputs: [
404
- { type: 'address', name: 'spender' },
405
- { type: 'uint256', name: 'amount' },
413
+ stateMutability: 'pure',
414
+ inputs: [{ type: 'address', name: 'addr' }],
415
+ outputs: [
416
+ { type: 'bool', name: 'isVirtual' },
417
+ { type: 'bytes4', name: 'masterId' },
418
+ { type: 'bytes6', name: 'userTag' },
406
419
  ],
407
- outputs: [{ type: 'bool' }],
408
420
  },
409
421
  {
410
- name: 'allowance',
422
+ name: 'isImplicitlyApproved',
411
423
  type: 'function',
412
424
  stateMutability: 'view',
425
+ inputs: [{ type: 'address', name: 'addr' }],
426
+ outputs: [{ type: 'bool' }],
427
+ },
428
+ {
429
+ name: 'MasterRegistered',
430
+ type: 'event',
413
431
  inputs: [
414
- { type: 'address', name: 'owner' },
415
- { type: 'address', name: 'spender' },
432
+ { type: 'bytes4', name: 'masterId', indexed: true },
433
+ { type: 'address', name: 'masterAddress', indexed: true },
416
434
  ],
417
- outputs: [{ type: 'uint256' }],
418
435
  },
419
436
  {
420
- name: 'transferFrom',
437
+ name: 'MasterIdCollision',
438
+ type: 'error',
439
+ inputs: [{ type: 'address', name: 'master' }],
440
+ },
441
+ { name: 'InvalidMasterAddress', type: 'error', inputs: [] },
442
+ { name: 'ProofOfWorkFailed', type: 'error', inputs: [] },
443
+ { name: 'VirtualAddressUnregistered', type: 'error', inputs: [] },
444
+ ];
445
+ exports.nonce = [
446
+ {
447
+ name: 'getNonce',
421
448
  type: 'function',
422
- stateMutability: 'nonpayable',
449
+ stateMutability: 'view',
423
450
  inputs: [
424
- { type: 'address', name: 'from' },
425
- { type: 'address', name: 'to' },
426
- { type: 'uint256', name: 'amount' },
451
+ { type: 'address', name: 'account' },
452
+ { type: 'uint256', name: 'nonceKey' },
427
453
  ],
428
- outputs: [{ type: 'bool' }],
454
+ outputs: [{ type: 'uint64', name: 'nonce' }],
429
455
  },
430
456
  {
431
- name: 'mint',
457
+ name: 'NonceIncremented',
458
+ type: 'event',
459
+ inputs: [
460
+ { type: 'address', name: 'account', indexed: true },
461
+ { type: 'uint256', name: 'nonceKey', indexed: true },
462
+ { type: 'uint64', name: 'newNonce' },
463
+ ],
464
+ },
465
+ { name: 'ProtocolNonceNotSupported', type: 'error', inputs: [] },
466
+ { name: 'InvalidNonceKey', type: 'error', inputs: [] },
467
+ { name: 'NonceOverflow', type: 'error', inputs: [] },
468
+ { name: 'ExpiringNonceReplay', type: 'error', inputs: [] },
469
+ { name: 'ExpiringNonceSetFull', type: 'error', inputs: [] },
470
+ { name: 'InvalidExpiringNonceExpiry', type: 'error', inputs: [] },
471
+ ];
472
+ exports.receivePolicyGuard = [
473
+ {
474
+ name: 'balanceOf',
475
+ type: 'function',
476
+ stateMutability: 'view',
477
+ inputs: [{ type: 'bytes', name: 'receipt' }],
478
+ outputs: [{ type: 'uint256', name: 'amount' }],
479
+ },
480
+ {
481
+ name: 'claim',
432
482
  type: 'function',
433
483
  stateMutability: 'nonpayable',
434
484
  inputs: [
435
485
  { type: 'address', name: 'to' },
436
- { type: 'uint256', name: 'amount' },
486
+ { type: 'bytes', name: 'receipt' },
437
487
  ],
438
488
  outputs: [],
439
489
  },
440
490
  {
441
- name: 'burn',
491
+ name: 'burnBlockedReceipt',
442
492
  type: 'function',
443
493
  stateMutability: 'nonpayable',
444
- inputs: [{ type: 'uint256', name: 'amount' }],
494
+ inputs: [{ type: 'bytes', name: 'receipt' }],
445
495
  outputs: [],
446
496
  },
447
497
  {
448
- name: 'currency',
449
- type: 'function',
450
- stateMutability: 'view',
451
- inputs: [],
452
- outputs: [{ type: 'string' }],
498
+ name: 'TransferBlocked',
499
+ type: 'event',
500
+ inputs: [
501
+ { type: 'address', name: 'token', indexed: true },
502
+ { type: 'address', name: 'receiver', indexed: true },
503
+ { type: 'uint64', name: 'blockedNonce', indexed: true },
504
+ { type: 'uint256', name: 'amount' },
505
+ { type: 'uint8', name: 'receiptVersion' },
506
+ { type: 'bytes', name: 'receipt' },
507
+ ],
453
508
  },
454
509
  {
455
- name: 'supplyCap',
510
+ name: 'ReceiptClaimed',
511
+ type: 'event',
512
+ inputs: [
513
+ { type: 'address', name: 'token', indexed: true },
514
+ { type: 'address', name: 'receiver', indexed: true },
515
+ { type: 'uint64', name: 'blockedNonce', indexed: true },
516
+ { type: 'uint64', name: 'blockedAt' },
517
+ { type: 'uint8', name: 'receiptVersion' },
518
+ { type: 'address', name: 'originator' },
519
+ { type: 'address', name: 'recipient' },
520
+ { type: 'address', name: 'recoveryAuthority' },
521
+ { type: 'address', name: 'caller' },
522
+ { type: 'address', name: 'to' },
523
+ { type: 'uint256', name: 'amount' },
524
+ ],
525
+ },
526
+ {
527
+ name: 'ReceiptBurned',
528
+ type: 'event',
529
+ inputs: [
530
+ { type: 'address', name: 'token', indexed: true },
531
+ { type: 'address', name: 'receiver', indexed: true },
532
+ { type: 'uint64', name: 'blockedNonce', indexed: true },
533
+ { type: 'uint64', name: 'blockedAt' },
534
+ { type: 'uint8', name: 'receiptVersion' },
535
+ { type: 'address', name: 'originator' },
536
+ { type: 'address', name: 'recipient' },
537
+ { type: 'address', name: 'recoveryAuthority' },
538
+ { type: 'address', name: 'caller' },
539
+ { type: 'uint256', name: 'amount' },
540
+ ],
541
+ },
542
+ { name: 'InvalidReceipt', type: 'error', inputs: [] },
543
+ { name: 'InvalidClaimAddress', type: 'error', inputs: [] },
544
+ { name: 'UnauthorizedClaimer', type: 'error', inputs: [] },
545
+ { name: 'AddressReserved', type: 'error', inputs: [] },
546
+ ];
547
+ exports.signatureVerifier = [
548
+ {
549
+ name: 'recover',
456
550
  type: 'function',
457
551
  stateMutability: 'view',
458
- inputs: [],
459
- outputs: [{ type: 'uint256' }],
552
+ inputs: [
553
+ { type: 'bytes32', name: 'hash' },
554
+ { type: 'bytes', name: 'signature' },
555
+ ],
556
+ outputs: [{ type: 'address', name: 'signer' }],
460
557
  },
461
558
  {
462
- name: 'paused',
559
+ name: 'verify',
463
560
  type: 'function',
464
561
  stateMutability: 'view',
465
- inputs: [],
562
+ inputs: [
563
+ { type: 'address', name: 'signer' },
564
+ { type: 'bytes32', name: 'hash' },
565
+ { type: 'bytes', name: 'signature' },
566
+ ],
466
567
  outputs: [{ type: 'bool' }],
467
568
  },
468
569
  {
469
- name: 'transferPolicyId',
570
+ name: 'verifyKeychain',
470
571
  type: 'function',
471
572
  stateMutability: 'view',
472
- inputs: [],
473
- outputs: [{ type: 'uint64' }],
573
+ inputs: [
574
+ { type: 'address', name: 'account' },
575
+ { type: 'bytes32', name: 'hash' },
576
+ { type: 'bytes', name: 'signature' },
577
+ ],
578
+ outputs: [{ type: 'bool' }],
474
579
  },
475
580
  {
476
- name: 'logoURI',
581
+ name: 'verifyKeychainAdmin',
477
582
  type: 'function',
478
583
  stateMutability: 'view',
479
- inputs: [],
480
- outputs: [{ type: 'string' }],
584
+ inputs: [
585
+ { type: 'address', name: 'account' },
586
+ { type: 'bytes32', name: 'hash' },
587
+ { type: 'bytes', name: 'signature' },
588
+ ],
589
+ outputs: [{ type: 'bool' }],
481
590
  },
591
+ { name: 'InvalidFormat', type: 'error', inputs: [] },
592
+ { name: 'InvalidSignature', type: 'error', inputs: [] },
593
+ ];
594
+ exports.stablecoinDex = [
482
595
  {
483
- name: 'setLogoURI',
596
+ name: 'createPair',
484
597
  type: 'function',
485
598
  stateMutability: 'nonpayable',
486
- inputs: [{ type: 'string', name: 'newLogoURI' }],
487
- outputs: [],
599
+ inputs: [{ type: 'address', name: 'base' }],
600
+ outputs: [{ type: 'bytes32', name: 'key' }],
488
601
  },
489
602
  {
490
- name: 'burnBlocked',
603
+ name: 'place',
491
604
  type: 'function',
492
605
  stateMutability: 'nonpayable',
493
606
  inputs: [
494
- { type: 'address', name: 'from' },
495
- { type: 'uint256', name: 'amount' },
607
+ { type: 'address', name: 'token' },
608
+ { type: 'uint128', name: 'amount' },
609
+ { type: 'bool', name: 'isBid' },
610
+ { type: 'int16', name: 'tick' },
496
611
  ],
497
- outputs: [],
612
+ outputs: [{ type: 'uint128', name: 'orderId' }],
498
613
  },
499
614
  {
500
- name: 'mintWithMemo',
615
+ name: 'placeFlip',
501
616
  type: 'function',
502
617
  stateMutability: 'nonpayable',
503
618
  inputs: [
504
- { type: 'address', name: 'to' },
505
- { type: 'uint256', name: 'amount' },
506
- { type: 'bytes32', name: 'memo' },
619
+ { type: 'address', name: 'token' },
620
+ { type: 'uint128', name: 'amount' },
621
+ { type: 'bool', name: 'isBid' },
622
+ { type: 'int16', name: 'tick' },
623
+ { type: 'int16', name: 'flipTick' },
507
624
  ],
508
- outputs: [],
625
+ outputs: [{ type: 'uint128', name: 'orderId' }],
509
626
  },
510
627
  {
511
- name: 'burnWithMemo',
628
+ name: 'cancel',
512
629
  type: 'function',
513
630
  stateMutability: 'nonpayable',
514
- inputs: [
515
- { type: 'uint256', name: 'amount' },
516
- { type: 'bytes32', name: 'memo' },
517
- ],
631
+ inputs: [{ type: 'uint128', name: 'orderId' }],
518
632
  outputs: [],
519
633
  },
520
634
  {
521
- name: 'transferWithMemo',
635
+ name: 'cancelStaleOrder',
522
636
  type: 'function',
523
637
  stateMutability: 'nonpayable',
524
- inputs: [
525
- { type: 'address', name: 'to' },
526
- { type: 'uint256', name: 'amount' },
527
- { type: 'bytes32', name: 'memo' },
528
- ],
638
+ inputs: [{ type: 'uint128', name: 'orderId' }],
529
639
  outputs: [],
530
640
  },
531
641
  {
532
- name: 'transferFromWithMemo',
642
+ name: 'swapExactAmountIn',
533
643
  type: 'function',
534
644
  stateMutability: 'nonpayable',
535
645
  inputs: [
536
- { type: 'address', name: 'from' },
537
- { type: 'address', name: 'to' },
538
- { type: 'uint256', name: 'amount' },
539
- { type: 'bytes32', name: 'memo' },
646
+ { type: 'address', name: 'tokenIn' },
647
+ { type: 'address', name: 'tokenOut' },
648
+ { type: 'uint128', name: 'amountIn' },
649
+ { type: 'uint128', name: 'minAmountOut' },
540
650
  ],
541
- outputs: [{ type: 'bool' }],
651
+ outputs: [{ type: 'uint128', name: 'amountOut' }],
542
652
  },
543
653
  {
544
- name: 'changeTransferPolicyId',
654
+ name: 'swapExactAmountOut',
545
655
  type: 'function',
546
656
  stateMutability: 'nonpayable',
547
- inputs: [{ type: 'uint64', name: 'newPolicyId' }],
548
- outputs: [],
657
+ inputs: [
658
+ { type: 'address', name: 'tokenIn' },
659
+ { type: 'address', name: 'tokenOut' },
660
+ { type: 'uint128', name: 'amountOut' },
661
+ { type: 'uint128', name: 'maxAmountIn' },
662
+ ],
663
+ outputs: [{ type: 'uint128', name: 'amountIn' }],
549
664
  },
550
665
  {
551
- name: 'setSupplyCap',
666
+ name: 'quoteSwapExactAmountIn',
552
667
  type: 'function',
553
- stateMutability: 'nonpayable',
554
- inputs: [{ type: 'uint256', name: 'newSupplyCap' }],
555
- outputs: [],
668
+ stateMutability: 'view',
669
+ inputs: [
670
+ { type: 'address', name: 'tokenIn' },
671
+ { type: 'address', name: 'tokenOut' },
672
+ { type: 'uint128', name: 'amountIn' },
673
+ ],
674
+ outputs: [{ type: 'uint128', name: 'amountOut' }],
556
675
  },
557
676
  {
558
- name: 'pause',
677
+ name: 'quoteSwapExactAmountOut',
559
678
  type: 'function',
560
- stateMutability: 'nonpayable',
561
- inputs: [],
562
- outputs: [],
679
+ stateMutability: 'view',
680
+ inputs: [
681
+ { type: 'address', name: 'tokenIn' },
682
+ { type: 'address', name: 'tokenOut' },
683
+ { type: 'uint128', name: 'amountOut' },
684
+ ],
685
+ outputs: [{ type: 'uint128', name: 'amountIn' }],
563
686
  },
564
687
  {
565
- name: 'unpause',
688
+ name: 'balanceOf',
566
689
  type: 'function',
567
- stateMutability: 'nonpayable',
568
- inputs: [],
569
- outputs: [],
690
+ stateMutability: 'view',
691
+ inputs: [
692
+ { type: 'address', name: 'user' },
693
+ { type: 'address', name: 'token' },
694
+ ],
695
+ outputs: [{ type: 'uint128' }],
570
696
  },
571
697
  {
572
- name: 'setNextQuoteToken',
698
+ name: 'withdraw',
573
699
  type: 'function',
574
700
  stateMutability: 'nonpayable',
575
- inputs: [{ type: 'address', name: 'newQuoteToken' }],
701
+ inputs: [
702
+ { type: 'address', name: 'token' },
703
+ { type: 'uint128', name: 'amount' },
704
+ ],
576
705
  outputs: [],
577
706
  },
578
707
  {
579
- name: 'completeQuoteTokenUpdate',
580
- type: 'function',
581
- stateMutability: 'nonpayable',
582
- inputs: [],
583
- outputs: [],
584
- },
585
- {
586
- name: 'PAUSE_ROLE',
708
+ name: 'getOrder',
587
709
  type: 'function',
588
710
  stateMutability: 'view',
589
- inputs: [],
590
- outputs: [{ type: 'bytes32' }],
711
+ inputs: [{ type: 'uint128', name: 'orderId' }],
712
+ outputs: [
713
+ {
714
+ type: 'tuple',
715
+ components: [
716
+ { type: 'uint128', name: 'orderId' },
717
+ { type: 'address', name: 'maker' },
718
+ { type: 'bytes32', name: 'bookKey' },
719
+ { type: 'bool', name: 'isBid' },
720
+ { type: 'int16', name: 'tick' },
721
+ { type: 'uint128', name: 'amount' },
722
+ { type: 'uint128', name: 'remaining' },
723
+ { type: 'uint128', name: 'prev' },
724
+ { type: 'uint128', name: 'next' },
725
+ { type: 'bool', name: 'isFlip' },
726
+ { type: 'int16', name: 'flipTick' },
727
+ ],
728
+ },
729
+ ],
591
730
  },
592
731
  {
593
- name: 'UNPAUSE_ROLE',
732
+ name: 'getTickLevel',
594
733
  type: 'function',
595
734
  stateMutability: 'view',
596
- inputs: [],
597
- outputs: [{ type: 'bytes32' }],
735
+ inputs: [
736
+ { type: 'address', name: 'base' },
737
+ { type: 'int16', name: 'tick' },
738
+ { type: 'bool', name: 'isBid' },
739
+ ],
740
+ outputs: [
741
+ { type: 'uint128', name: 'head' },
742
+ { type: 'uint128', name: 'tail' },
743
+ { type: 'uint128', name: 'totalLiquidity' },
744
+ ],
598
745
  },
599
746
  {
600
- name: 'ISSUER_ROLE',
747
+ name: 'pairKey',
601
748
  type: 'function',
602
- stateMutability: 'view',
603
- inputs: [],
749
+ stateMutability: 'pure',
750
+ inputs: [
751
+ { type: 'address', name: 'tokenA' },
752
+ { type: 'address', name: 'tokenB' },
753
+ ],
604
754
  outputs: [{ type: 'bytes32' }],
605
755
  },
606
756
  {
607
- name: 'BURN_BLOCKED_ROLE',
757
+ name: 'nextOrderId',
608
758
  type: 'function',
609
759
  stateMutability: 'view',
610
760
  inputs: [],
611
- outputs: [{ type: 'bytes32' }],
761
+ outputs: [{ type: 'uint128' }],
612
762
  },
613
763
  {
614
- name: 'permit',
764
+ name: 'books',
615
765
  type: 'function',
616
- stateMutability: 'nonpayable',
617
- inputs: [
618
- { type: 'address', name: 'owner' },
619
- { type: 'address', name: 'spender' },
620
- { type: 'uint256', name: 'value' },
621
- { type: 'uint256', name: 'deadline' },
622
- { type: 'uint8', name: 'v' },
623
- { type: 'bytes32', name: 'r' },
624
- { type: 'bytes32', name: 's' },
766
+ stateMutability: 'view',
767
+ inputs: [{ type: 'bytes32', name: 'pairKey' }],
768
+ outputs: [
769
+ {
770
+ type: 'tuple',
771
+ components: [
772
+ { type: 'address', name: 'base' },
773
+ { type: 'address', name: 'quote' },
774
+ { type: 'int16', name: 'bestBidTick' },
775
+ { type: 'int16', name: 'bestAskTick' },
776
+ ],
777
+ },
625
778
  ],
626
- outputs: [],
627
779
  },
628
780
  {
629
- name: 'nonces',
781
+ name: 'MIN_TICK',
630
782
  type: 'function',
631
- stateMutability: 'view',
632
- inputs: [{ type: 'address', name: 'owner' }],
633
- outputs: [{ type: 'uint256' }],
783
+ stateMutability: 'pure',
784
+ inputs: [],
785
+ outputs: [{ type: 'int16' }],
634
786
  },
635
787
  {
636
- name: 'DOMAIN_SEPARATOR',
788
+ name: 'MAX_TICK',
637
789
  type: 'function',
638
- stateMutability: 'view',
790
+ stateMutability: 'pure',
639
791
  inputs: [],
640
- outputs: [{ type: 'bytes32' }],
792
+ outputs: [{ type: 'int16' }],
641
793
  },
642
794
  {
643
- name: 'distributeReward',
795
+ name: 'TICK_SPACING',
644
796
  type: 'function',
645
- stateMutability: 'nonpayable',
646
- inputs: [{ type: 'uint256', name: 'amount' }],
647
- outputs: [],
797
+ stateMutability: 'pure',
798
+ inputs: [],
799
+ outputs: [{ type: 'int16' }],
648
800
  },
649
801
  {
650
- name: 'setRewardRecipient',
802
+ name: 'PRICE_SCALE',
651
803
  type: 'function',
652
- stateMutability: 'nonpayable',
653
- inputs: [{ type: 'address', name: 'recipient' }],
654
- outputs: [],
804
+ stateMutability: 'pure',
805
+ inputs: [],
806
+ outputs: [{ type: 'uint32' }],
655
807
  },
656
808
  {
657
- name: 'claimRewards',
809
+ name: 'MIN_ORDER_AMOUNT',
658
810
  type: 'function',
659
- stateMutability: 'nonpayable',
811
+ stateMutability: 'pure',
660
812
  inputs: [],
661
- outputs: [{ type: 'uint256' }],
813
+ outputs: [{ type: 'uint128' }],
662
814
  },
663
815
  {
664
- name: 'optedInSupply',
816
+ name: 'MIN_PRICE',
665
817
  type: 'function',
666
- stateMutability: 'view',
818
+ stateMutability: 'pure',
667
819
  inputs: [],
668
- outputs: [{ type: 'uint128' }],
820
+ outputs: [{ type: 'uint32' }],
669
821
  },
670
822
  {
671
- name: 'globalRewardPerToken',
823
+ name: 'MAX_PRICE',
672
824
  type: 'function',
673
- stateMutability: 'view',
825
+ stateMutability: 'pure',
674
826
  inputs: [],
675
- outputs: [{ type: 'uint256' }],
827
+ outputs: [{ type: 'uint32' }],
676
828
  },
677
829
  {
678
- name: 'userRewardInfo',
830
+ name: 'tickToPrice',
679
831
  type: 'function',
680
- stateMutability: 'view',
681
- inputs: [{ type: 'address', name: 'account' }],
682
- outputs: [
683
- {
684
- type: 'tuple',
685
- components: [
686
- { type: 'address', name: 'rewardRecipient' },
687
- { type: 'uint256', name: 'rewardPerToken' },
688
- { type: 'uint256', name: 'rewardBalance' },
689
- ],
690
- },
691
- ],
832
+ stateMutability: 'pure',
833
+ inputs: [{ type: 'int16', name: 'tick' }],
834
+ outputs: [{ type: 'uint32', name: 'price' }],
692
835
  },
693
836
  {
694
- name: 'getPendingRewards',
837
+ name: 'priceToTick',
695
838
  type: 'function',
696
- stateMutability: 'view',
697
- inputs: [{ type: 'address', name: 'account' }],
698
- outputs: [{ type: 'uint128' }],
839
+ stateMutability: 'pure',
840
+ inputs: [{ type: 'uint32', name: 'price' }],
841
+ outputs: [{ type: 'int16', name: 'tick' }],
699
842
  },
700
843
  {
701
- name: 'Transfer',
844
+ name: 'PairCreated',
702
845
  type: 'event',
703
846
  inputs: [
704
- { type: 'address', name: 'from', indexed: true },
705
- { type: 'address', name: 'to', indexed: true },
706
- { type: 'uint256', name: 'amount' },
847
+ { type: 'bytes32', name: 'key', indexed: true },
848
+ { type: 'address', name: 'base', indexed: true },
849
+ { type: 'address', name: 'quote', indexed: true },
707
850
  ],
708
851
  },
709
852
  {
710
- name: 'Approval',
853
+ name: 'OrderPlaced',
711
854
  type: 'event',
712
855
  inputs: [
713
- { type: 'address', name: 'owner', indexed: true },
714
- { type: 'address', name: 'spender', indexed: true },
715
- { type: 'uint256', name: 'amount' },
856
+ { type: 'uint128', name: 'orderId', indexed: true },
857
+ { type: 'address', name: 'maker', indexed: true },
858
+ { type: 'address', name: 'token', indexed: true },
859
+ { type: 'uint128', name: 'amount' },
860
+ { type: 'bool', name: 'isBid' },
861
+ { type: 'int16', name: 'tick' },
862
+ { type: 'bool', name: 'isFlipOrder' },
863
+ { type: 'int16', name: 'flipTick' },
716
864
  ],
717
865
  },
718
866
  {
719
- name: 'Mint',
867
+ name: 'OrderFilled',
720
868
  type: 'event',
721
869
  inputs: [
722
- { type: 'address', name: 'to', indexed: true },
723
- { type: 'uint256', name: 'amount' },
870
+ { type: 'uint128', name: 'orderId', indexed: true },
871
+ { type: 'address', name: 'maker', indexed: true },
872
+ { type: 'address', name: 'taker', indexed: true },
873
+ { type: 'uint128', name: 'amountFilled' },
874
+ { type: 'bool', name: 'partialFill' },
724
875
  ],
725
876
  },
726
877
  {
727
- name: 'Burn',
878
+ name: 'OrderFlipped',
728
879
  type: 'event',
729
880
  inputs: [
730
- { type: 'address', name: 'from', indexed: true },
731
- { type: 'uint256', name: 'amount' },
881
+ { type: 'uint128', name: 'orderId', indexed: true },
882
+ { type: 'address', name: 'maker', indexed: true },
883
+ { type: 'address', name: 'token', indexed: true },
884
+ { type: 'uint128', name: 'amount' },
885
+ { type: 'bool', name: 'isBid' },
886
+ { type: 'int16', name: 'tick' },
887
+ { type: 'int16', name: 'flipTick' },
732
888
  ],
733
889
  },
734
890
  {
735
- name: 'BurnBlocked',
891
+ name: 'FlipFailed',
736
892
  type: 'event',
737
893
  inputs: [
738
- { type: 'address', name: 'from', indexed: true },
739
- { type: 'uint256', name: 'amount' },
894
+ { type: 'uint128', name: 'orderId', indexed: true },
895
+ { type: 'address', name: 'maker', indexed: true },
896
+ { type: 'bytes4', name: 'reason' },
740
897
  ],
741
898
  },
742
899
  {
743
- name: 'TransferWithMemo',
900
+ name: 'OrderCancelled',
744
901
  type: 'event',
745
- inputs: [
746
- { type: 'address', name: 'from', indexed: true },
747
- { type: 'address', name: 'to', indexed: true },
748
- { type: 'uint256', name: 'amount' },
749
- { type: 'bytes32', name: 'memo', indexed: true },
750
- ],
902
+ inputs: [{ type: 'uint128', name: 'orderId', indexed: true }],
751
903
  },
904
+ { name: 'Unauthorized', type: 'error', inputs: [] },
905
+ { name: 'PairDoesNotExist', type: 'error', inputs: [] },
906
+ { name: 'PairAlreadyExists', type: 'error', inputs: [] },
907
+ { name: 'OrderDoesNotExist', type: 'error', inputs: [] },
908
+ { name: 'IdenticalTokens', type: 'error', inputs: [] },
909
+ { name: 'InvalidToken', type: 'error', inputs: [] },
752
910
  {
753
- name: 'TransferPolicyUpdate',
754
- type: 'event',
755
- inputs: [
756
- { type: 'address', name: 'updater', indexed: true },
757
- { type: 'uint64', name: 'newPolicyId', indexed: true },
758
- ],
911
+ name: 'TickOutOfBounds',
912
+ type: 'error',
913
+ inputs: [{ type: 'int16', name: 'tick' }],
759
914
  },
915
+ { name: 'InvalidTick', type: 'error', inputs: [] },
916
+ { name: 'InvalidFlipTick', type: 'error', inputs: [] },
917
+ { name: 'InsufficientBalance', type: 'error', inputs: [] },
918
+ { name: 'InsufficientLiquidity', type: 'error', inputs: [] },
919
+ { name: 'InsufficientOutput', type: 'error', inputs: [] },
920
+ { name: 'MaxInputExceeded', type: 'error', inputs: [] },
760
921
  {
761
- name: 'SupplyCapUpdate',
762
- type: 'event',
763
- inputs: [
764
- { type: 'address', name: 'updater', indexed: true },
765
- { type: 'uint256', name: 'newSupplyCap', indexed: true },
766
- ],
922
+ name: 'BelowMinimumOrderSize',
923
+ type: 'error',
924
+ inputs: [{ type: 'uint128', name: 'amount' }],
767
925
  },
926
+ { name: 'InvalidBaseToken', type: 'error', inputs: [] },
927
+ { name: 'OrderNotStale', type: 'error', inputs: [] },
928
+ ];
929
+ exports.tip20 = [
768
930
  {
769
- name: 'PauseStateUpdate',
770
- type: 'event',
771
- inputs: [
772
- { type: 'address', name: 'updater', indexed: true },
773
- { type: 'bool', name: 'isPaused' },
774
- ],
931
+ name: 'name',
932
+ type: 'function',
933
+ stateMutability: 'view',
934
+ inputs: [],
935
+ outputs: [{ type: 'string' }],
775
936
  },
776
937
  {
777
- name: 'NextQuoteTokenSet',
778
- type: 'event',
779
- inputs: [
780
- { type: 'address', name: 'updater', indexed: true },
781
- { type: 'address', name: 'nextQuoteToken', indexed: true },
782
- ],
938
+ name: 'symbol',
939
+ type: 'function',
940
+ stateMutability: 'view',
941
+ inputs: [],
942
+ outputs: [{ type: 'string' }],
783
943
  },
784
944
  {
785
- name: 'QuoteTokenUpdate',
786
- type: 'event',
945
+ name: 'decimals',
946
+ type: 'function',
947
+ stateMutability: 'pure',
948
+ inputs: [],
949
+ outputs: [{ type: 'uint8' }],
950
+ },
951
+ {
952
+ name: 'totalSupply',
953
+ type: 'function',
954
+ stateMutability: 'view',
955
+ inputs: [],
956
+ outputs: [{ type: 'uint256' }],
957
+ },
958
+ {
959
+ name: 'quoteToken',
960
+ type: 'function',
961
+ stateMutability: 'view',
962
+ inputs: [],
963
+ outputs: [{ type: 'address' }],
964
+ },
965
+ {
966
+ name: 'nextQuoteToken',
967
+ type: 'function',
968
+ stateMutability: 'view',
969
+ inputs: [],
970
+ outputs: [{ type: 'address' }],
971
+ },
972
+ {
973
+ name: 'balanceOf',
974
+ type: 'function',
975
+ stateMutability: 'view',
976
+ inputs: [{ type: 'address', name: 'account' }],
977
+ outputs: [{ type: 'uint256' }],
978
+ },
979
+ {
980
+ name: 'transfer',
981
+ type: 'function',
982
+ stateMutability: 'nonpayable',
787
983
  inputs: [
788
- { type: 'address', name: 'updater', indexed: true },
789
- { type: 'address', name: 'newQuoteToken', indexed: true },
984
+ { type: 'address', name: 'to' },
985
+ { type: 'uint256', name: 'amount' },
790
986
  ],
987
+ outputs: [{ type: 'bool' }],
791
988
  },
792
989
  {
793
- name: 'RewardDistributed',
794
- type: 'event',
990
+ name: 'approve',
991
+ type: 'function',
992
+ stateMutability: 'nonpayable',
795
993
  inputs: [
796
- { type: 'address', name: 'funder', indexed: true },
994
+ { type: 'address', name: 'spender' },
797
995
  { type: 'uint256', name: 'amount' },
798
996
  ],
997
+ outputs: [{ type: 'bool' }],
799
998
  },
800
999
  {
801
- name: 'RewardRecipientSet',
802
- type: 'event',
1000
+ name: 'allowance',
1001
+ type: 'function',
1002
+ stateMutability: 'view',
803
1003
  inputs: [
804
- { type: 'address', name: 'holder', indexed: true },
805
- { type: 'address', name: 'recipient', indexed: true },
1004
+ { type: 'address', name: 'owner' },
1005
+ { type: 'address', name: 'spender' },
806
1006
  ],
1007
+ outputs: [{ type: 'uint256' }],
807
1008
  },
808
1009
  {
809
- name: 'LogoURIUpdated',
810
- type: 'event',
1010
+ name: 'transferFrom',
1011
+ type: 'function',
1012
+ stateMutability: 'nonpayable',
811
1013
  inputs: [
812
- { type: 'address', name: 'updater', indexed: true },
813
- { type: 'string', name: 'newLogoURI' },
1014
+ { type: 'address', name: 'from' },
1015
+ { type: 'address', name: 'to' },
1016
+ { type: 'uint256', name: 'amount' },
814
1017
  ],
1018
+ outputs: [{ type: 'bool' }],
815
1019
  },
816
1020
  {
817
- name: 'InsufficientBalance',
818
- type: 'error',
1021
+ name: 'mint',
1022
+ type: 'function',
1023
+ stateMutability: 'nonpayable',
819
1024
  inputs: [
820
- { type: 'uint256', name: 'available' },
821
- { type: 'uint256', name: 'required' },
822
- { type: 'address', name: 'token' },
1025
+ { type: 'address', name: 'to' },
1026
+ { type: 'uint256', name: 'amount' },
823
1027
  ],
1028
+ outputs: [],
824
1029
  },
825
- { name: 'InsufficientAllowance', type: 'error', inputs: [] },
826
- { name: 'SupplyCapExceeded', type: 'error', inputs: [] },
827
- { name: 'InvalidSupplyCap', type: 'error', inputs: [] },
828
- { name: 'InvalidPayload', type: 'error', inputs: [] },
829
- { name: 'PolicyForbids', type: 'error', inputs: [] },
830
- { name: 'InvalidRecipient', type: 'error', inputs: [] },
831
- { name: 'ContractPaused', type: 'error', inputs: [] },
832
- { name: 'InvalidCurrency', type: 'error', inputs: [] },
833
- { name: 'InvalidQuoteToken', type: 'error', inputs: [] },
834
- { name: 'InvalidAmount', type: 'error', inputs: [] },
835
- { name: 'NoOptedInSupply', type: 'error', inputs: [] },
836
- { name: 'Unauthorized', type: 'error', inputs: [] },
837
- { name: 'ProtectedAddress', type: 'error', inputs: [] },
838
- { name: 'InvalidToken', type: 'error', inputs: [] },
839
- { name: 'Uninitialized', type: 'error', inputs: [] },
840
- { name: 'InvalidTransferPolicyId', type: 'error', inputs: [] },
841
- { name: 'PermitExpired', type: 'error', inputs: [] },
842
- { name: 'InvalidSignature', type: 'error', inputs: [] },
843
- { name: 'LogoURITooLong', type: 'error', inputs: [] },
844
- { name: 'InvalidLogoURI', type: 'error', inputs: [] },
845
1030
  {
846
- name: 'hasRole',
1031
+ name: 'burn',
1032
+ type: 'function',
1033
+ stateMutability: 'nonpayable',
1034
+ inputs: [{ type: 'uint256', name: 'amount' }],
1035
+ outputs: [],
1036
+ },
1037
+ {
1038
+ name: 'currency',
847
1039
  type: 'function',
848
1040
  stateMutability: 'view',
849
- inputs: [
850
- { type: 'address', name: 'account' },
851
- { type: 'bytes32', name: 'role' },
852
- ],
1041
+ inputs: [],
1042
+ outputs: [{ type: 'string' }],
1043
+ },
1044
+ {
1045
+ name: 'supplyCap',
1046
+ type: 'function',
1047
+ stateMutability: 'view',
1048
+ inputs: [],
1049
+ outputs: [{ type: 'uint256' }],
1050
+ },
1051
+ {
1052
+ name: 'paused',
1053
+ type: 'function',
1054
+ stateMutability: 'view',
1055
+ inputs: [],
853
1056
  outputs: [{ type: 'bool' }],
854
1057
  },
855
1058
  {
856
- name: 'getRoleAdmin',
1059
+ name: 'transferPolicyId',
857
1060
  type: 'function',
858
1061
  stateMutability: 'view',
859
- inputs: [{ type: 'bytes32', name: 'role' }],
860
- outputs: [{ type: 'bytes32' }],
1062
+ inputs: [],
1063
+ outputs: [{ type: 'uint64' }],
861
1064
  },
862
1065
  {
863
- name: 'grantRole',
1066
+ name: 'logoURI',
1067
+ type: 'function',
1068
+ stateMutability: 'view',
1069
+ inputs: [],
1070
+ outputs: [{ type: 'string' }],
1071
+ },
1072
+ {
1073
+ name: 'setLogoURI',
864
1074
  type: 'function',
865
1075
  stateMutability: 'nonpayable',
866
- inputs: [
867
- { type: 'bytes32', name: 'role' },
868
- { type: 'address', name: 'account' },
869
- ],
1076
+ inputs: [{ type: 'string', name: 'newLogoURI' }],
870
1077
  outputs: [],
871
1078
  },
872
1079
  {
873
- name: 'revokeRole',
1080
+ name: 'burnBlocked',
874
1081
  type: 'function',
875
1082
  stateMutability: 'nonpayable',
876
1083
  inputs: [
877
- { type: 'bytes32', name: 'role' },
878
- { type: 'address', name: 'account' },
1084
+ { type: 'address', name: 'from' },
1085
+ { type: 'uint256', name: 'amount' },
879
1086
  ],
880
1087
  outputs: [],
881
1088
  },
882
1089
  {
883
- name: 'renounceRole',
1090
+ name: 'mintWithMemo',
884
1091
  type: 'function',
885
1092
  stateMutability: 'nonpayable',
886
- inputs: [{ type: 'bytes32', name: 'role' }],
1093
+ inputs: [
1094
+ { type: 'address', name: 'to' },
1095
+ { type: 'uint256', name: 'amount' },
1096
+ { type: 'bytes32', name: 'memo' },
1097
+ ],
887
1098
  outputs: [],
888
1099
  },
889
1100
  {
890
- name: 'setRoleAdmin',
1101
+ name: 'burnWithMemo',
891
1102
  type: 'function',
892
1103
  stateMutability: 'nonpayable',
893
1104
  inputs: [
894
- { type: 'bytes32', name: 'role' },
895
- { type: 'bytes32', name: 'adminRole' },
1105
+ { type: 'uint256', name: 'amount' },
1106
+ { type: 'bytes32', name: 'memo' },
896
1107
  ],
897
1108
  outputs: [],
898
1109
  },
899
1110
  {
900
- name: 'RoleMembershipUpdated',
901
- type: 'event',
1111
+ name: 'transferWithMemo',
1112
+ type: 'function',
1113
+ stateMutability: 'nonpayable',
902
1114
  inputs: [
903
- { type: 'bytes32', name: 'role', indexed: true },
904
- { type: 'address', name: 'account', indexed: true },
905
- { type: 'address', name: 'sender', indexed: true },
906
- { type: 'bool', name: 'hasRole' },
1115
+ { type: 'address', name: 'to' },
1116
+ { type: 'uint256', name: 'amount' },
1117
+ { type: 'bytes32', name: 'memo' },
907
1118
  ],
1119
+ outputs: [],
908
1120
  },
909
1121
  {
910
- name: 'RoleAdminUpdated',
911
- type: 'event',
1122
+ name: 'transferFromWithMemo',
1123
+ type: 'function',
1124
+ stateMutability: 'nonpayable',
912
1125
  inputs: [
913
- { type: 'bytes32', name: 'role', indexed: true },
914
- { type: 'bytes32', name: 'newAdminRole', indexed: true },
915
- { type: 'address', name: 'sender', indexed: true },
1126
+ { type: 'address', name: 'from' },
1127
+ { type: 'address', name: 'to' },
1128
+ { type: 'uint256', name: 'amount' },
1129
+ { type: 'bytes32', name: 'memo' },
916
1130
  ],
1131
+ outputs: [{ type: 'bool' }],
917
1132
  },
918
- { name: 'Unauthorized', type: 'error', inputs: [] },
919
- ];
920
- exports.validatorConfigV2 = [
921
1133
  {
922
- name: 'getActiveValidators',
1134
+ name: 'changeTransferPolicyId',
923
1135
  type: 'function',
924
- stateMutability: 'view',
925
- inputs: [],
926
- outputs: [
927
- {
928
- type: 'tuple[]',
929
- name: 'validators',
930
- components: [
931
- { type: 'bytes32', name: 'publicKey' },
932
- { type: 'address', name: 'validatorAddress' },
933
- { type: 'string', name: 'ingress' },
934
- { type: 'string', name: 'egress' },
935
- { type: 'address', name: 'feeRecipient' },
936
- { type: 'uint64', name: 'index' },
937
- { type: 'uint64', name: 'addedAtHeight' },
938
- { type: 'uint64', name: 'deactivatedAtHeight' },
939
- ],
940
- },
941
- ],
1136
+ stateMutability: 'nonpayable',
1137
+ inputs: [{ type: 'uint64', name: 'newPolicyId' }],
1138
+ outputs: [],
942
1139
  },
943
1140
  {
944
- name: 'getInitializedAtHeight',
1141
+ name: 'setSupplyCap',
945
1142
  type: 'function',
946
- stateMutability: 'view',
947
- inputs: [],
948
- outputs: [{ type: 'uint64' }],
1143
+ stateMutability: 'nonpayable',
1144
+ inputs: [{ type: 'uint256', name: 'newSupplyCap' }],
1145
+ outputs: [],
949
1146
  },
950
1147
  {
951
- name: 'owner',
1148
+ name: 'pause',
952
1149
  type: 'function',
953
- stateMutability: 'view',
1150
+ stateMutability: 'nonpayable',
954
1151
  inputs: [],
955
- outputs: [{ type: 'address' }],
1152
+ outputs: [],
956
1153
  },
957
1154
  {
958
- name: 'validatorCount',
1155
+ name: 'unpause',
959
1156
  type: 'function',
960
- stateMutability: 'view',
1157
+ stateMutability: 'nonpayable',
961
1158
  inputs: [],
962
- outputs: [{ type: 'uint64' }],
1159
+ outputs: [],
963
1160
  },
964
1161
  {
965
- name: 'validatorByIndex',
1162
+ name: 'setNextQuoteToken',
966
1163
  type: 'function',
967
- stateMutability: 'view',
968
- inputs: [{ type: 'uint64', name: 'index' }],
969
- outputs: [
970
- {
971
- type: 'tuple',
972
- components: [
973
- { type: 'bytes32', name: 'publicKey' },
974
- { type: 'address', name: 'validatorAddress' },
975
- { type: 'string', name: 'ingress' },
976
- { type: 'string', name: 'egress' },
977
- { type: 'address', name: 'feeRecipient' },
978
- { type: 'uint64', name: 'index' },
979
- { type: 'uint64', name: 'addedAtHeight' },
980
- { type: 'uint64', name: 'deactivatedAtHeight' },
981
- ],
982
- },
983
- ],
1164
+ stateMutability: 'nonpayable',
1165
+ inputs: [{ type: 'address', name: 'newQuoteToken' }],
1166
+ outputs: [],
984
1167
  },
985
1168
  {
986
- name: 'validatorByAddress',
1169
+ name: 'completeQuoteTokenUpdate',
1170
+ type: 'function',
1171
+ stateMutability: 'nonpayable',
1172
+ inputs: [],
1173
+ outputs: [],
1174
+ },
1175
+ {
1176
+ name: 'PAUSE_ROLE',
987
1177
  type: 'function',
988
1178
  stateMutability: 'view',
989
- inputs: [{ type: 'address', name: 'validatorAddress' }],
990
- outputs: [
991
- {
992
- type: 'tuple',
993
- components: [
994
- { type: 'bytes32', name: 'publicKey' },
995
- { type: 'address', name: 'validatorAddress' },
996
- { type: 'string', name: 'ingress' },
997
- { type: 'string', name: 'egress' },
998
- { type: 'address', name: 'feeRecipient' },
999
- { type: 'uint64', name: 'index' },
1000
- { type: 'uint64', name: 'addedAtHeight' },
1001
- { type: 'uint64', name: 'deactivatedAtHeight' },
1002
- ],
1003
- },
1004
- ],
1179
+ inputs: [],
1180
+ outputs: [{ type: 'bytes32' }],
1005
1181
  },
1006
1182
  {
1007
- name: 'validatorByPublicKey',
1183
+ name: 'UNPAUSE_ROLE',
1008
1184
  type: 'function',
1009
1185
  stateMutability: 'view',
1010
- inputs: [{ type: 'bytes32', name: 'publicKey' }],
1011
- outputs: [
1012
- {
1013
- type: 'tuple',
1014
- components: [
1015
- { type: 'bytes32', name: 'publicKey' },
1016
- { type: 'address', name: 'validatorAddress' },
1017
- { type: 'string', name: 'ingress' },
1018
- { type: 'string', name: 'egress' },
1019
- { type: 'address', name: 'feeRecipient' },
1020
- { type: 'uint64', name: 'index' },
1021
- { type: 'uint64', name: 'addedAtHeight' },
1022
- { type: 'uint64', name: 'deactivatedAtHeight' },
1023
- ],
1024
- },
1025
- ],
1186
+ inputs: [],
1187
+ outputs: [{ type: 'bytes32' }],
1026
1188
  },
1027
1189
  {
1028
- name: 'getNextNetworkIdentityRotationEpoch',
1190
+ name: 'ISSUER_ROLE',
1029
1191
  type: 'function',
1030
1192
  stateMutability: 'view',
1031
1193
  inputs: [],
1032
- outputs: [{ type: 'uint64' }],
1194
+ outputs: [{ type: 'bytes32' }],
1033
1195
  },
1034
1196
  {
1035
- name: 'isInitialized',
1197
+ name: 'BURN_BLOCKED_ROLE',
1036
1198
  type: 'function',
1037
1199
  stateMutability: 'view',
1038
1200
  inputs: [],
1039
- outputs: [{ type: 'bool' }],
1201
+ outputs: [{ type: 'bytes32' }],
1040
1202
  },
1041
1203
  {
1042
- name: 'addValidator',
1204
+ name: 'permit',
1043
1205
  type: 'function',
1044
1206
  stateMutability: 'nonpayable',
1045
1207
  inputs: [
1046
- { type: 'address', name: 'validatorAddress' },
1047
- { type: 'bytes32', name: 'publicKey' },
1048
- { type: 'string', name: 'ingress' },
1049
- { type: 'string', name: 'egress' },
1050
- { type: 'address', name: 'feeRecipient' },
1051
- { type: 'bytes', name: 'signature' },
1208
+ { type: 'address', name: 'owner' },
1209
+ { type: 'address', name: 'spender' },
1210
+ { type: 'uint256', name: 'value' },
1211
+ { type: 'uint256', name: 'deadline' },
1212
+ { type: 'uint8', name: 'v' },
1213
+ { type: 'bytes32', name: 'r' },
1214
+ { type: 'bytes32', name: 's' },
1052
1215
  ],
1053
- outputs: [{ type: 'uint64', name: 'index' }],
1216
+ outputs: [],
1054
1217
  },
1055
1218
  {
1056
- name: 'deactivateValidator',
1219
+ name: 'nonces',
1057
1220
  type: 'function',
1058
- stateMutability: 'nonpayable',
1059
- inputs: [{ type: 'uint64', name: 'idx' }],
1060
- outputs: [],
1221
+ stateMutability: 'view',
1222
+ inputs: [{ type: 'address', name: 'owner' }],
1223
+ outputs: [{ type: 'uint256' }],
1061
1224
  },
1062
1225
  {
1063
- name: 'rotateValidator',
1226
+ name: 'DOMAIN_SEPARATOR',
1064
1227
  type: 'function',
1065
- stateMutability: 'nonpayable',
1066
- inputs: [
1067
- { type: 'uint64', name: 'idx' },
1068
- { type: 'bytes32', name: 'publicKey' },
1069
- { type: 'string', name: 'ingress' },
1070
- { type: 'string', name: 'egress' },
1071
- { type: 'bytes', name: 'signature' },
1072
- ],
1073
- outputs: [],
1228
+ stateMutability: 'view',
1229
+ inputs: [],
1230
+ outputs: [{ type: 'bytes32' }],
1074
1231
  },
1075
1232
  {
1076
- name: 'setFeeRecipient',
1233
+ name: 'distributeReward',
1077
1234
  type: 'function',
1078
1235
  stateMutability: 'nonpayable',
1079
- inputs: [
1080
- { type: 'uint64', name: 'idx' },
1081
- { type: 'address', name: 'feeRecipient' },
1082
- ],
1236
+ inputs: [{ type: 'uint256', name: 'amount' }],
1083
1237
  outputs: [],
1084
1238
  },
1085
1239
  {
1086
- name: 'setIpAddresses',
1240
+ name: 'setRewardRecipient',
1087
1241
  type: 'function',
1088
1242
  stateMutability: 'nonpayable',
1089
- inputs: [
1090
- { type: 'uint64', name: 'idx' },
1091
- { type: 'string', name: 'ingress' },
1092
- { type: 'string', name: 'egress' },
1093
- ],
1243
+ inputs: [{ type: 'address', name: 'recipient' }],
1094
1244
  outputs: [],
1095
1245
  },
1096
1246
  {
1097
- name: 'transferValidatorOwnership',
1247
+ name: 'claimRewards',
1098
1248
  type: 'function',
1099
1249
  stateMutability: 'nonpayable',
1100
- inputs: [
1101
- { type: 'uint64', name: 'idx' },
1102
- { type: 'address', name: 'newAddress' },
1103
- ],
1104
- outputs: [],
1250
+ inputs: [],
1251
+ outputs: [{ type: 'uint256' }],
1105
1252
  },
1106
1253
  {
1107
- name: 'transferOwnership',
1254
+ name: 'optedInSupply',
1108
1255
  type: 'function',
1109
- stateMutability: 'nonpayable',
1110
- inputs: [{ type: 'address', name: 'newOwner' }],
1111
- outputs: [],
1256
+ stateMutability: 'view',
1257
+ inputs: [],
1258
+ outputs: [{ type: 'uint128' }],
1112
1259
  },
1113
1260
  {
1114
- name: 'setNetworkIdentityRotationEpoch',
1261
+ name: 'globalRewardPerToken',
1115
1262
  type: 'function',
1116
- stateMutability: 'nonpayable',
1117
- inputs: [{ type: 'uint64', name: 'epoch' }],
1118
- outputs: [],
1263
+ stateMutability: 'view',
1264
+ inputs: [],
1265
+ outputs: [{ type: 'uint256' }],
1119
1266
  },
1120
1267
  {
1121
- name: 'migrateValidator',
1268
+ name: 'userRewardInfo',
1122
1269
  type: 'function',
1123
- stateMutability: 'nonpayable',
1124
- inputs: [{ type: 'uint64', name: 'idx' }],
1125
- outputs: [],
1270
+ stateMutability: 'view',
1271
+ inputs: [{ type: 'address', name: 'account' }],
1272
+ outputs: [
1273
+ {
1274
+ type: 'tuple',
1275
+ components: [
1276
+ { type: 'address', name: 'rewardRecipient' },
1277
+ { type: 'uint256', name: 'rewardPerToken' },
1278
+ { type: 'uint256', name: 'rewardBalance' },
1279
+ ],
1280
+ },
1281
+ ],
1126
1282
  },
1127
1283
  {
1128
- name: 'initializeIfMigrated',
1284
+ name: 'getPendingRewards',
1129
1285
  type: 'function',
1130
- stateMutability: 'nonpayable',
1131
- inputs: [],
1132
- outputs: [],
1286
+ stateMutability: 'view',
1287
+ inputs: [{ type: 'address', name: 'account' }],
1288
+ outputs: [{ type: 'uint128' }],
1133
1289
  },
1134
1290
  {
1135
- name: 'ValidatorAdded',
1291
+ name: 'Transfer',
1136
1292
  type: 'event',
1137
1293
  inputs: [
1138
- { type: 'uint64', name: 'index', indexed: true },
1139
- { type: 'address', name: 'validatorAddress', indexed: true },
1140
- { type: 'bytes32', name: 'publicKey' },
1141
- { type: 'string', name: 'ingress' },
1142
- { type: 'string', name: 'egress' },
1143
- { type: 'address', name: 'feeRecipient' },
1294
+ { type: 'address', name: 'from', indexed: true },
1295
+ { type: 'address', name: 'to', indexed: true },
1296
+ { type: 'uint256', name: 'amount' },
1144
1297
  ],
1145
1298
  },
1146
1299
  {
1147
- name: 'ValidatorDeactivated',
1300
+ name: 'Approval',
1148
1301
  type: 'event',
1149
1302
  inputs: [
1150
- { type: 'uint64', name: 'index', indexed: true },
1151
- { type: 'address', name: 'validatorAddress', indexed: true },
1303
+ { type: 'address', name: 'owner', indexed: true },
1304
+ { type: 'address', name: 'spender', indexed: true },
1305
+ { type: 'uint256', name: 'amount' },
1152
1306
  ],
1153
1307
  },
1154
1308
  {
1155
- name: 'ValidatorRotated',
1309
+ name: 'Mint',
1156
1310
  type: 'event',
1157
1311
  inputs: [
1158
- { type: 'uint64', name: 'index', indexed: true },
1159
- { type: 'uint64', name: 'deactivatedIndex', indexed: true },
1160
- { type: 'address', name: 'validatorAddress', indexed: true },
1161
- { type: 'bytes32', name: 'oldPublicKey' },
1162
- { type: 'bytes32', name: 'newPublicKey' },
1163
- { type: 'string', name: 'ingress' },
1164
- { type: 'string', name: 'egress' },
1165
- { type: 'address', name: 'caller' },
1312
+ { type: 'address', name: 'to', indexed: true },
1313
+ { type: 'uint256', name: 'amount' },
1166
1314
  ],
1167
1315
  },
1168
1316
  {
1169
- name: 'FeeRecipientUpdated',
1317
+ name: 'Burn',
1170
1318
  type: 'event',
1171
1319
  inputs: [
1172
- { type: 'uint64', name: 'index', indexed: true },
1173
- { type: 'address', name: 'feeRecipient' },
1174
- { type: 'address', name: 'caller' },
1320
+ { type: 'address', name: 'from', indexed: true },
1321
+ { type: 'uint256', name: 'amount' },
1175
1322
  ],
1176
1323
  },
1177
1324
  {
1178
- name: 'IpAddressesUpdated',
1325
+ name: 'BurnBlocked',
1179
1326
  type: 'event',
1180
1327
  inputs: [
1181
- { type: 'uint64', name: 'index', indexed: true },
1182
- { type: 'string', name: 'ingress' },
1183
- { type: 'string', name: 'egress' },
1184
- { type: 'address', name: 'caller' },
1328
+ { type: 'address', name: 'from', indexed: true },
1329
+ { type: 'uint256', name: 'amount' },
1185
1330
  ],
1186
1331
  },
1187
1332
  {
1188
- name: 'ValidatorOwnershipTransferred',
1333
+ name: 'TransferWithMemo',
1189
1334
  type: 'event',
1190
1335
  inputs: [
1191
- { type: 'uint64', name: 'index', indexed: true },
1192
- { type: 'address', name: 'oldAddress', indexed: true },
1193
- { type: 'address', name: 'newAddress', indexed: true },
1194
- { type: 'address', name: 'caller' },
1336
+ { type: 'address', name: 'from', indexed: true },
1337
+ { type: 'address', name: 'to', indexed: true },
1338
+ { type: 'uint256', name: 'amount' },
1339
+ { type: 'bytes32', name: 'memo', indexed: true },
1195
1340
  ],
1196
1341
  },
1197
1342
  {
1198
- name: 'OwnershipTransferred',
1343
+ name: 'TransferPolicyUpdate',
1199
1344
  type: 'event',
1200
1345
  inputs: [
1201
- { type: 'address', name: 'oldOwner', indexed: true },
1202
- { type: 'address', name: 'newOwner', indexed: true },
1346
+ { type: 'address', name: 'updater', indexed: true },
1347
+ { type: 'uint64', name: 'newPolicyId', indexed: true },
1203
1348
  ],
1204
1349
  },
1205
1350
  {
1206
- name: 'ValidatorMigrated',
1351
+ name: 'SupplyCapUpdate',
1207
1352
  type: 'event',
1208
1353
  inputs: [
1209
- { type: 'uint64', name: 'index', indexed: true },
1210
- { type: 'address', name: 'validatorAddress', indexed: true },
1211
- { type: 'bytes32', name: 'publicKey' },
1354
+ { type: 'address', name: 'updater', indexed: true },
1355
+ { type: 'uint256', name: 'newSupplyCap', indexed: true },
1212
1356
  ],
1213
1357
  },
1214
1358
  {
1215
- name: 'NetworkIdentityRotationEpochSet',
1359
+ name: 'PauseStateUpdate',
1216
1360
  type: 'event',
1217
1361
  inputs: [
1218
- { type: 'uint64', name: 'previousEpoch', indexed: true },
1219
- { type: 'uint64', name: 'nextEpoch', indexed: true },
1362
+ { type: 'address', name: 'updater', indexed: true },
1363
+ { type: 'bool', name: 'isPaused' },
1220
1364
  ],
1221
1365
  },
1222
1366
  {
1223
- name: 'Initialized',
1224
- type: 'event',
1225
- inputs: [{ type: 'uint64', name: 'height' }],
1226
- },
1227
- {
1228
- name: 'SkippedValidatorMigration',
1367
+ name: 'NextQuoteTokenSet',
1229
1368
  type: 'event',
1230
1369
  inputs: [
1231
- { type: 'uint64', name: 'index', indexed: true },
1232
- { type: 'address', name: 'validatorAddress', indexed: true },
1233
- { type: 'bytes32', name: 'publicKey' },
1370
+ { type: 'address', name: 'updater', indexed: true },
1371
+ { type: 'address', name: 'nextQuoteToken', indexed: true },
1234
1372
  ],
1235
1373
  },
1236
- { name: 'AlreadyInitialized', type: 'error', inputs: [] },
1237
- {
1238
- name: 'IngressAlreadyExists',
1239
- type: 'error',
1240
- inputs: [{ type: 'string', name: 'ingress' }],
1241
- },
1242
- { name: 'EmptyV1ValidatorSet', type: 'error', inputs: [] },
1243
- { name: 'InvalidMigrationIndex', type: 'error', inputs: [] },
1244
- { name: 'InvalidOwner', type: 'error', inputs: [] },
1245
- { name: 'InvalidPublicKey', type: 'error', inputs: [] },
1246
- { name: 'InvalidSignature', type: 'error', inputs: [] },
1247
- { name: 'InvalidSignatureFormat', type: 'error', inputs: [] },
1248
- { name: 'InvalidValidatorAddress', type: 'error', inputs: [] },
1249
- { name: 'MigrationNotComplete', type: 'error', inputs: [] },
1250
- { name: 'NotInitialized', type: 'error', inputs: [] },
1251
1374
  {
1252
- name: 'NotIp',
1253
- type: 'error',
1375
+ name: 'QuoteTokenUpdate',
1376
+ type: 'event',
1254
1377
  inputs: [
1255
- { type: 'string', name: 'input' },
1256
- { type: 'string', name: 'backtrace' },
1378
+ { type: 'address', name: 'updater', indexed: true },
1379
+ { type: 'address', name: 'newQuoteToken', indexed: true },
1257
1380
  ],
1258
1381
  },
1259
1382
  {
1260
- name: 'NotIpPort',
1261
- type: 'error',
1383
+ name: 'RewardDistributed',
1384
+ type: 'event',
1262
1385
  inputs: [
1263
- { type: 'string', name: 'input' },
1264
- { type: 'string', name: 'backtrace' },
1386
+ { type: 'address', name: 'funder', indexed: true },
1387
+ { type: 'uint256', name: 'amount' },
1265
1388
  ],
1266
1389
  },
1267
- { name: 'PublicKeyAlreadyExists', type: 'error', inputs: [] },
1268
- { name: 'Unauthorized', type: 'error', inputs: [] },
1269
- { name: 'AddressAlreadyHasValidator', type: 'error', inputs: [] },
1270
- { name: 'ValidatorAlreadyDeactivated', type: 'error', inputs: [] },
1271
- { name: 'ValidatorNotFound', type: 'error', inputs: [] },
1272
- ];
1273
- exports.signatureVerifier = [
1274
1390
  {
1275
- name: 'recover',
1276
- type: 'function',
1277
- stateMutability: 'view',
1391
+ name: 'RewardRecipientSet',
1392
+ type: 'event',
1278
1393
  inputs: [
1279
- { type: 'bytes32', name: 'hash' },
1280
- { type: 'bytes', name: 'signature' },
1394
+ { type: 'address', name: 'holder', indexed: true },
1395
+ { type: 'address', name: 'recipient', indexed: true },
1281
1396
  ],
1282
- outputs: [{ type: 'address', name: 'signer' }],
1283
1397
  },
1284
1398
  {
1285
- name: 'verify',
1286
- type: 'function',
1287
- stateMutability: 'view',
1399
+ name: 'LogoURIUpdated',
1400
+ type: 'event',
1288
1401
  inputs: [
1289
- { type: 'address', name: 'signer' },
1290
- { type: 'bytes32', name: 'hash' },
1291
- { type: 'bytes', name: 'signature' },
1402
+ { type: 'address', name: 'updater', indexed: true },
1403
+ { type: 'string', name: 'newLogoURI' },
1292
1404
  ],
1293
- outputs: [{ type: 'bool' }],
1294
1405
  },
1295
1406
  {
1296
- name: 'verifyKeychain',
1297
- type: 'function',
1298
- stateMutability: 'view',
1407
+ name: 'InsufficientBalance',
1408
+ type: 'error',
1299
1409
  inputs: [
1300
- { type: 'address', name: 'account' },
1301
- { type: 'bytes32', name: 'hash' },
1302
- { type: 'bytes', name: 'signature' },
1410
+ { type: 'uint256', name: 'available' },
1411
+ { type: 'uint256', name: 'required' },
1412
+ { type: 'address', name: 'token' },
1303
1413
  ],
1304
- outputs: [{ type: 'bool' }],
1305
1414
  },
1415
+ { name: 'InsufficientAllowance', type: 'error', inputs: [] },
1416
+ { name: 'SupplyCapExceeded', type: 'error', inputs: [] },
1417
+ { name: 'InvalidSupplyCap', type: 'error', inputs: [] },
1418
+ { name: 'InvalidPayload', type: 'error', inputs: [] },
1419
+ { name: 'PolicyForbids', type: 'error', inputs: [] },
1420
+ { name: 'InvalidRecipient', type: 'error', inputs: [] },
1421
+ { name: 'ContractPaused', type: 'error', inputs: [] },
1422
+ { name: 'InvalidCurrency', type: 'error', inputs: [] },
1423
+ { name: 'InvalidQuoteToken', type: 'error', inputs: [] },
1424
+ { name: 'InvalidAmount', type: 'error', inputs: [] },
1425
+ { name: 'NoOptedInSupply', type: 'error', inputs: [] },
1426
+ { name: 'Unauthorized', type: 'error', inputs: [] },
1427
+ { name: 'ProtectedAddress', type: 'error', inputs: [] },
1428
+ { name: 'InvalidToken', type: 'error', inputs: [] },
1429
+ { name: 'Uninitialized', type: 'error', inputs: [] },
1430
+ { name: 'InvalidTransferPolicyId', type: 'error', inputs: [] },
1431
+ { name: 'PermitExpired', type: 'error', inputs: [] },
1432
+ { name: 'InvalidSignature', type: 'error', inputs: [] },
1433
+ { name: 'LogoURITooLong', type: 'error', inputs: [] },
1434
+ { name: 'InvalidLogoURI', type: 'error', inputs: [] },
1306
1435
  {
1307
- name: 'verifyKeychainAdmin',
1436
+ name: 'hasRole',
1308
1437
  type: 'function',
1309
1438
  stateMutability: 'view',
1310
1439
  inputs: [
1311
1440
  { type: 'address', name: 'account' },
1312
- { type: 'bytes32', name: 'hash' },
1313
- { type: 'bytes', name: 'signature' },
1441
+ { type: 'bytes32', name: 'role' },
1314
1442
  ],
1315
1443
  outputs: [{ type: 'bool' }],
1316
1444
  },
1317
- { name: 'InvalidFormat', type: 'error', inputs: [] },
1318
- { name: 'InvalidSignature', type: 'error', inputs: [] },
1319
- ];
1320
- exports.stablecoinDex = [
1321
1445
  {
1322
- name: 'createPair',
1446
+ name: 'getRoleAdmin',
1323
1447
  type: 'function',
1324
- stateMutability: 'nonpayable',
1325
- inputs: [{ type: 'address', name: 'base' }],
1326
- outputs: [{ type: 'bytes32', name: 'key' }],
1448
+ stateMutability: 'view',
1449
+ inputs: [{ type: 'bytes32', name: 'role' }],
1450
+ outputs: [{ type: 'bytes32' }],
1327
1451
  },
1328
1452
  {
1329
- name: 'place',
1453
+ name: 'grantRole',
1330
1454
  type: 'function',
1331
1455
  stateMutability: 'nonpayable',
1332
1456
  inputs: [
1333
- { type: 'address', name: 'token' },
1334
- { type: 'uint128', name: 'amount' },
1335
- { type: 'bool', name: 'isBid' },
1336
- { type: 'int16', name: 'tick' },
1457
+ { type: 'bytes32', name: 'role' },
1458
+ { type: 'address', name: 'account' },
1337
1459
  ],
1338
- outputs: [{ type: 'uint128', name: 'orderId' }],
1460
+ outputs: [],
1339
1461
  },
1340
1462
  {
1341
- name: 'placeFlip',
1463
+ name: 'revokeRole',
1342
1464
  type: 'function',
1343
1465
  stateMutability: 'nonpayable',
1344
1466
  inputs: [
1345
- { type: 'address', name: 'token' },
1346
- { type: 'uint128', name: 'amount' },
1347
- { type: 'bool', name: 'isBid' },
1348
- { type: 'int16', name: 'tick' },
1349
- { type: 'int16', name: 'flipTick' },
1467
+ { type: 'bytes32', name: 'role' },
1468
+ { type: 'address', name: 'account' },
1350
1469
  ],
1351
- outputs: [{ type: 'uint128', name: 'orderId' }],
1352
- },
1353
- {
1354
- name: 'cancel',
1355
- type: 'function',
1356
- stateMutability: 'nonpayable',
1357
- inputs: [{ type: 'uint128', name: 'orderId' }],
1358
1470
  outputs: [],
1359
1471
  },
1360
1472
  {
1361
- name: 'cancelStaleOrder',
1473
+ name: 'renounceRole',
1362
1474
  type: 'function',
1363
1475
  stateMutability: 'nonpayable',
1364
- inputs: [{ type: 'uint128', name: 'orderId' }],
1476
+ inputs: [{ type: 'bytes32', name: 'role' }],
1365
1477
  outputs: [],
1366
1478
  },
1367
1479
  {
1368
- name: 'swapExactAmountIn',
1480
+ name: 'setRoleAdmin',
1369
1481
  type: 'function',
1370
1482
  stateMutability: 'nonpayable',
1371
1483
  inputs: [
1372
- { type: 'address', name: 'tokenIn' },
1373
- { type: 'address', name: 'tokenOut' },
1374
- { type: 'uint128', name: 'amountIn' },
1375
- { type: 'uint128', name: 'minAmountOut' },
1484
+ { type: 'bytes32', name: 'role' },
1485
+ { type: 'bytes32', name: 'adminRole' },
1376
1486
  ],
1377
- outputs: [{ type: 'uint128', name: 'amountOut' }],
1487
+ outputs: [],
1378
1488
  },
1379
1489
  {
1380
- name: 'swapExactAmountOut',
1381
- type: 'function',
1382
- stateMutability: 'nonpayable',
1490
+ name: 'RoleMembershipUpdated',
1491
+ type: 'event',
1383
1492
  inputs: [
1384
- { type: 'address', name: 'tokenIn' },
1385
- { type: 'address', name: 'tokenOut' },
1386
- { type: 'uint128', name: 'amountOut' },
1387
- { type: 'uint128', name: 'maxAmountIn' },
1493
+ { type: 'bytes32', name: 'role', indexed: true },
1494
+ { type: 'address', name: 'account', indexed: true },
1495
+ { type: 'address', name: 'sender', indexed: true },
1496
+ { type: 'bool', name: 'hasRole' },
1388
1497
  ],
1389
- outputs: [{ type: 'uint128', name: 'amountIn' }],
1390
1498
  },
1391
1499
  {
1392
- name: 'quoteSwapExactAmountIn',
1393
- type: 'function',
1394
- stateMutability: 'view',
1500
+ name: 'RoleAdminUpdated',
1501
+ type: 'event',
1395
1502
  inputs: [
1396
- { type: 'address', name: 'tokenIn' },
1397
- { type: 'address', name: 'tokenOut' },
1398
- { type: 'uint128', name: 'amountIn' },
1503
+ { type: 'bytes32', name: 'role', indexed: true },
1504
+ { type: 'bytes32', name: 'newAdminRole', indexed: true },
1505
+ { type: 'address', name: 'sender', indexed: true },
1399
1506
  ],
1400
- outputs: [{ type: 'uint128', name: 'amountOut' }],
1401
1507
  },
1508
+ { name: 'Unauthorized', type: 'error', inputs: [] },
1509
+ ];
1510
+ exports.tip20ChannelReserve = [
1402
1511
  {
1403
- name: 'quoteSwapExactAmountOut',
1512
+ name: 'CLOSE_GRACE_PERIOD',
1404
1513
  type: 'function',
1405
1514
  stateMutability: 'view',
1406
- inputs: [
1407
- { type: 'address', name: 'tokenIn' },
1408
- { type: 'address', name: 'tokenOut' },
1409
- { type: 'uint128', name: 'amountOut' },
1410
- ],
1411
- outputs: [{ type: 'uint128', name: 'amountIn' }],
1515
+ inputs: [],
1516
+ outputs: [{ type: 'uint64' }],
1412
1517
  },
1413
1518
  {
1414
- name: 'balanceOf',
1519
+ name: 'VOUCHER_TYPEHASH',
1415
1520
  type: 'function',
1416
1521
  stateMutability: 'view',
1417
- inputs: [
1418
- { type: 'address', name: 'user' },
1419
- { type: 'address', name: 'token' },
1420
- ],
1421
- outputs: [{ type: 'uint128' }],
1522
+ inputs: [],
1523
+ outputs: [{ type: 'bytes32' }],
1422
1524
  },
1423
1525
  {
1424
- name: 'withdraw',
1526
+ name: 'open',
1425
1527
  type: 'function',
1426
1528
  stateMutability: 'nonpayable',
1427
1529
  inputs: [
1530
+ { type: 'address', name: 'payee' },
1531
+ { type: 'address', name: 'operator' },
1428
1532
  { type: 'address', name: 'token' },
1429
- { type: 'uint128', name: 'amount' },
1533
+ { type: 'uint96', name: 'deposit' },
1534
+ { type: 'bytes32', name: 'salt' },
1535
+ { type: 'address', name: 'authorizedSigner' },
1430
1536
  ],
1431
- outputs: [],
1537
+ outputs: [{ type: 'bytes32', name: 'channelId' }],
1432
1538
  },
1433
1539
  {
1434
- name: 'getOrder',
1540
+ name: 'settle',
1435
1541
  type: 'function',
1436
- stateMutability: 'view',
1437
- inputs: [{ type: 'uint128', name: 'orderId' }],
1438
- outputs: [
1542
+ stateMutability: 'nonpayable',
1543
+ inputs: [
1439
1544
  {
1440
1545
  type: 'tuple',
1546
+ name: 'descriptor',
1441
1547
  components: [
1442
- { type: 'uint128', name: 'orderId' },
1443
- { type: 'address', name: 'maker' },
1444
- { type: 'bytes32', name: 'bookKey' },
1445
- { type: 'bool', name: 'isBid' },
1446
- { type: 'int16', name: 'tick' },
1447
- { type: 'uint128', name: 'amount' },
1448
- { type: 'uint128', name: 'remaining' },
1449
- { type: 'uint128', name: 'prev' },
1450
- { type: 'uint128', name: 'next' },
1451
- { type: 'bool', name: 'isFlip' },
1452
- { type: 'int16', name: 'flipTick' },
1548
+ { type: 'address', name: 'payer' },
1549
+ { type: 'address', name: 'payee' },
1550
+ { type: 'address', name: 'operator' },
1551
+ { type: 'address', name: 'token' },
1552
+ { type: 'bytes32', name: 'salt' },
1553
+ { type: 'address', name: 'authorizedSigner' },
1554
+ { type: 'bytes32', name: 'expiringNonceHash' },
1453
1555
  ],
1454
1556
  },
1557
+ { type: 'uint96', name: 'cumulativeAmount' },
1558
+ { type: 'bytes', name: 'signature' },
1455
1559
  ],
1560
+ outputs: [],
1456
1561
  },
1457
1562
  {
1458
- name: 'getTickLevel',
1563
+ name: 'topUp',
1459
1564
  type: 'function',
1460
- stateMutability: 'view',
1565
+ stateMutability: 'nonpayable',
1461
1566
  inputs: [
1462
- { type: 'address', name: 'base' },
1463
- { type: 'int16', name: 'tick' },
1464
- { type: 'bool', name: 'isBid' },
1465
- ],
1466
- outputs: [
1467
- { type: 'uint128', name: 'head' },
1468
- { type: 'uint128', name: 'tail' },
1469
- { type: 'uint128', name: 'totalLiquidity' },
1567
+ {
1568
+ type: 'tuple',
1569
+ name: 'descriptor',
1570
+ components: [
1571
+ { type: 'address', name: 'payer' },
1572
+ { type: 'address', name: 'payee' },
1573
+ { type: 'address', name: 'operator' },
1574
+ { type: 'address', name: 'token' },
1575
+ { type: 'bytes32', name: 'salt' },
1576
+ { type: 'address', name: 'authorizedSigner' },
1577
+ { type: 'bytes32', name: 'expiringNonceHash' },
1578
+ ],
1579
+ },
1580
+ { type: 'uint96', name: 'additionalDeposit' },
1470
1581
  ],
1582
+ outputs: [],
1471
1583
  },
1472
1584
  {
1473
- name: 'pairKey',
1585
+ name: 'close',
1474
1586
  type: 'function',
1475
- stateMutability: 'pure',
1587
+ stateMutability: 'nonpayable',
1476
1588
  inputs: [
1477
- { type: 'address', name: 'tokenA' },
1478
- { type: 'address', name: 'tokenB' },
1589
+ {
1590
+ type: 'tuple',
1591
+ name: 'descriptor',
1592
+ components: [
1593
+ { type: 'address', name: 'payer' },
1594
+ { type: 'address', name: 'payee' },
1595
+ { type: 'address', name: 'operator' },
1596
+ { type: 'address', name: 'token' },
1597
+ { type: 'bytes32', name: 'salt' },
1598
+ { type: 'address', name: 'authorizedSigner' },
1599
+ { type: 'bytes32', name: 'expiringNonceHash' },
1600
+ ],
1601
+ },
1602
+ { type: 'uint96', name: 'cumulativeAmount' },
1603
+ { type: 'uint96', name: 'captureAmount' },
1604
+ { type: 'bytes', name: 'signature' },
1479
1605
  ],
1480
- outputs: [{ type: 'bytes32' }],
1481
- },
1482
- {
1483
- name: 'nextOrderId',
1484
- type: 'function',
1485
- stateMutability: 'view',
1486
- inputs: [],
1487
- outputs: [{ type: 'uint128' }],
1606
+ outputs: [],
1488
1607
  },
1489
1608
  {
1490
- name: 'books',
1609
+ name: 'requestClose',
1491
1610
  type: 'function',
1492
- stateMutability: 'view',
1493
- inputs: [{ type: 'bytes32', name: 'pairKey' }],
1494
- outputs: [
1611
+ stateMutability: 'nonpayable',
1612
+ inputs: [
1495
1613
  {
1496
1614
  type: 'tuple',
1615
+ name: 'descriptor',
1497
1616
  components: [
1498
- { type: 'address', name: 'base' },
1499
- { type: 'address', name: 'quote' },
1500
- { type: 'int16', name: 'bestBidTick' },
1501
- { type: 'int16', name: 'bestAskTick' },
1617
+ { type: 'address', name: 'payer' },
1618
+ { type: 'address', name: 'payee' },
1619
+ { type: 'address', name: 'operator' },
1620
+ { type: 'address', name: 'token' },
1621
+ { type: 'bytes32', name: 'salt' },
1622
+ { type: 'address', name: 'authorizedSigner' },
1623
+ { type: 'bytes32', name: 'expiringNonceHash' },
1502
1624
  ],
1503
1625
  },
1504
1626
  ],
1627
+ outputs: [],
1505
1628
  },
1506
1629
  {
1507
- name: 'MIN_TICK',
1630
+ name: 'withdraw',
1508
1631
  type: 'function',
1509
- stateMutability: 'pure',
1510
- inputs: [],
1511
- outputs: [{ type: 'int16' }],
1632
+ stateMutability: 'nonpayable',
1633
+ inputs: [
1634
+ {
1635
+ type: 'tuple',
1636
+ name: 'descriptor',
1637
+ components: [
1638
+ { type: 'address', name: 'payer' },
1639
+ { type: 'address', name: 'payee' },
1640
+ { type: 'address', name: 'operator' },
1641
+ { type: 'address', name: 'token' },
1642
+ { type: 'bytes32', name: 'salt' },
1643
+ { type: 'address', name: 'authorizedSigner' },
1644
+ { type: 'bytes32', name: 'expiringNonceHash' },
1645
+ ],
1646
+ },
1647
+ ],
1648
+ outputs: [],
1512
1649
  },
1513
1650
  {
1514
- name: 'MAX_TICK',
1651
+ name: 'getChannel',
1515
1652
  type: 'function',
1516
- stateMutability: 'pure',
1517
- inputs: [],
1518
- outputs: [{ type: 'int16' }],
1653
+ stateMutability: 'view',
1654
+ inputs: [
1655
+ {
1656
+ type: 'tuple',
1657
+ name: 'descriptor',
1658
+ components: [
1659
+ { type: 'address', name: 'payer' },
1660
+ { type: 'address', name: 'payee' },
1661
+ { type: 'address', name: 'operator' },
1662
+ { type: 'address', name: 'token' },
1663
+ { type: 'bytes32', name: 'salt' },
1664
+ { type: 'address', name: 'authorizedSigner' },
1665
+ { type: 'bytes32', name: 'expiringNonceHash' },
1666
+ ],
1667
+ },
1668
+ ],
1669
+ outputs: [
1670
+ {
1671
+ type: 'tuple',
1672
+ components: [
1673
+ {
1674
+ type: 'tuple',
1675
+ name: 'descriptor',
1676
+ components: [
1677
+ { type: 'address', name: 'payer' },
1678
+ { type: 'address', name: 'payee' },
1679
+ { type: 'address', name: 'operator' },
1680
+ { type: 'address', name: 'token' },
1681
+ { type: 'bytes32', name: 'salt' },
1682
+ { type: 'address', name: 'authorizedSigner' },
1683
+ { type: 'bytes32', name: 'expiringNonceHash' },
1684
+ ],
1685
+ },
1686
+ {
1687
+ type: 'tuple',
1688
+ name: 'state',
1689
+ components: [
1690
+ { type: 'uint96', name: 'settled' },
1691
+ { type: 'uint96', name: 'deposit' },
1692
+ { type: 'uint32', name: 'closeRequestedAt' },
1693
+ ],
1694
+ },
1695
+ ],
1696
+ },
1697
+ ],
1519
1698
  },
1520
1699
  {
1521
- name: 'TICK_SPACING',
1700
+ name: 'getChannelState',
1522
1701
  type: 'function',
1523
- stateMutability: 'pure',
1524
- inputs: [],
1525
- outputs: [{ type: 'int16' }],
1702
+ stateMutability: 'view',
1703
+ inputs: [{ type: 'bytes32', name: 'channelId' }],
1704
+ outputs: [
1705
+ {
1706
+ type: 'tuple',
1707
+ components: [
1708
+ { type: 'uint96', name: 'settled' },
1709
+ { type: 'uint96', name: 'deposit' },
1710
+ { type: 'uint32', name: 'closeRequestedAt' },
1711
+ ],
1712
+ },
1713
+ ],
1526
1714
  },
1527
1715
  {
1528
- name: 'PRICE_SCALE',
1716
+ name: 'getChannelStatesBatch',
1529
1717
  type: 'function',
1530
- stateMutability: 'pure',
1531
- inputs: [],
1532
- outputs: [{ type: 'uint32' }],
1718
+ stateMutability: 'view',
1719
+ inputs: [{ type: 'bytes32[]', name: 'channelIds' }],
1720
+ outputs: [
1721
+ {
1722
+ type: 'tuple[]',
1723
+ components: [
1724
+ { type: 'uint96', name: 'settled' },
1725
+ { type: 'uint96', name: 'deposit' },
1726
+ { type: 'uint32', name: 'closeRequestedAt' },
1727
+ ],
1728
+ },
1729
+ ],
1533
1730
  },
1534
1731
  {
1535
- name: 'MIN_ORDER_AMOUNT',
1732
+ name: 'computeChannelId',
1536
1733
  type: 'function',
1537
- stateMutability: 'pure',
1538
- inputs: [],
1539
- outputs: [{ type: 'uint128' }],
1734
+ stateMutability: 'view',
1735
+ inputs: [
1736
+ { type: 'address', name: 'payer' },
1737
+ { type: 'address', name: 'payee' },
1738
+ { type: 'address', name: 'operator' },
1739
+ { type: 'address', name: 'token' },
1740
+ { type: 'bytes32', name: 'salt' },
1741
+ { type: 'address', name: 'authorizedSigner' },
1742
+ { type: 'bytes32', name: 'expiringNonceHash' },
1743
+ ],
1744
+ outputs: [{ type: 'bytes32' }],
1540
1745
  },
1541
1746
  {
1542
- name: 'MIN_PRICE',
1747
+ name: 'getVoucherDigest',
1543
1748
  type: 'function',
1544
- stateMutability: 'pure',
1545
- inputs: [],
1546
- outputs: [{ type: 'uint32' }],
1749
+ stateMutability: 'view',
1750
+ inputs: [
1751
+ { type: 'bytes32', name: 'channelId' },
1752
+ { type: 'uint96', name: 'cumulativeAmount' },
1753
+ ],
1754
+ outputs: [{ type: 'bytes32' }],
1547
1755
  },
1548
1756
  {
1549
- name: 'MAX_PRICE',
1757
+ name: 'domainSeparator',
1550
1758
  type: 'function',
1551
- stateMutability: 'pure',
1759
+ stateMutability: 'view',
1552
1760
  inputs: [],
1553
- outputs: [{ type: 'uint32' }],
1554
- },
1555
- {
1556
- name: 'tickToPrice',
1557
- type: 'function',
1558
- stateMutability: 'pure',
1559
- inputs: [{ type: 'int16', name: 'tick' }],
1560
- outputs: [{ type: 'uint32', name: 'price' }],
1561
- },
1562
- {
1563
- name: 'priceToTick',
1564
- type: 'function',
1565
- stateMutability: 'pure',
1566
- inputs: [{ type: 'uint32', name: 'price' }],
1567
- outputs: [{ type: 'int16', name: 'tick' }],
1761
+ outputs: [{ type: 'bytes32' }],
1568
1762
  },
1569
1763
  {
1570
- name: 'PairCreated',
1764
+ name: 'ChannelOpened',
1571
1765
  type: 'event',
1572
1766
  inputs: [
1573
- { type: 'bytes32', name: 'key', indexed: true },
1574
- { type: 'address', name: 'base', indexed: true },
1575
- { type: 'address', name: 'quote', indexed: true },
1767
+ { type: 'bytes32', name: 'channelId', indexed: true },
1768
+ { type: 'address', name: 'payer', indexed: true },
1769
+ { type: 'address', name: 'payee', indexed: true },
1770
+ { type: 'address', name: 'operator' },
1771
+ { type: 'address', name: 'token' },
1772
+ { type: 'address', name: 'authorizedSigner' },
1773
+ { type: 'bytes32', name: 'salt' },
1774
+ { type: 'bytes32', name: 'expiringNonceHash' },
1775
+ { type: 'uint96', name: 'deposit' },
1576
1776
  ],
1577
1777
  },
1578
1778
  {
1579
- name: 'OrderPlaced',
1779
+ name: 'Settled',
1580
1780
  type: 'event',
1581
1781
  inputs: [
1582
- { type: 'uint128', name: 'orderId', indexed: true },
1583
- { type: 'address', name: 'maker', indexed: true },
1584
- { type: 'address', name: 'token', indexed: true },
1585
- { type: 'uint128', name: 'amount' },
1586
- { type: 'bool', name: 'isBid' },
1587
- { type: 'int16', name: 'tick' },
1588
- { type: 'bool', name: 'isFlipOrder' },
1589
- { type: 'int16', name: 'flipTick' },
1782
+ { type: 'bytes32', name: 'channelId', indexed: true },
1783
+ { type: 'address', name: 'payer', indexed: true },
1784
+ { type: 'address', name: 'payee', indexed: true },
1785
+ { type: 'uint96', name: 'cumulativeAmount' },
1786
+ { type: 'uint96', name: 'deltaPaid' },
1787
+ { type: 'uint96', name: 'newSettled' },
1590
1788
  ],
1591
1789
  },
1592
1790
  {
1593
- name: 'OrderFilled',
1791
+ name: 'TopUp',
1594
1792
  type: 'event',
1595
1793
  inputs: [
1596
- { type: 'uint128', name: 'orderId', indexed: true },
1597
- { type: 'address', name: 'maker', indexed: true },
1598
- { type: 'address', name: 'taker', indexed: true },
1599
- { type: 'uint128', name: 'amountFilled' },
1600
- { type: 'bool', name: 'partialFill' },
1794
+ { type: 'bytes32', name: 'channelId', indexed: true },
1795
+ { type: 'address', name: 'payer', indexed: true },
1796
+ { type: 'address', name: 'payee', indexed: true },
1797
+ { type: 'uint96', name: 'additionalDeposit' },
1798
+ { type: 'uint96', name: 'newDeposit' },
1601
1799
  ],
1602
1800
  },
1603
1801
  {
1604
- name: 'OrderFlipped',
1802
+ name: 'CloseRequested',
1605
1803
  type: 'event',
1606
1804
  inputs: [
1607
- { type: 'uint128', name: 'orderId', indexed: true },
1608
- { type: 'address', name: 'maker', indexed: true },
1609
- { type: 'address', name: 'token', indexed: true },
1610
- { type: 'uint128', name: 'amount' },
1611
- { type: 'bool', name: 'isBid' },
1612
- { type: 'int16', name: 'tick' },
1613
- { type: 'int16', name: 'flipTick' },
1805
+ { type: 'bytes32', name: 'channelId', indexed: true },
1806
+ { type: 'address', name: 'payer', indexed: true },
1807
+ { type: 'address', name: 'payee', indexed: true },
1808
+ { type: 'uint256', name: 'closeGraceEnd' },
1614
1809
  ],
1615
1810
  },
1616
1811
  {
1617
- name: 'FlipFailed',
1812
+ name: 'ChannelClosed',
1618
1813
  type: 'event',
1619
1814
  inputs: [
1620
- { type: 'uint128', name: 'orderId', indexed: true },
1621
- { type: 'address', name: 'maker', indexed: true },
1622
- { type: 'bytes4', name: 'reason' },
1815
+ { type: 'bytes32', name: 'channelId', indexed: true },
1816
+ { type: 'address', name: 'payer', indexed: true },
1817
+ { type: 'address', name: 'payee', indexed: true },
1818
+ { type: 'uint96', name: 'settledToPayee' },
1819
+ { type: 'uint96', name: 'refundedToPayer' },
1623
1820
  ],
1624
1821
  },
1625
1822
  {
1626
- name: 'OrderCancelled',
1823
+ name: 'CloseRequestCancelled',
1627
1824
  type: 'event',
1628
- inputs: [{ type: 'uint128', name: 'orderId', indexed: true }],
1629
- },
1630
- { name: 'Unauthorized', type: 'error', inputs: [] },
1631
- { name: 'PairDoesNotExist', type: 'error', inputs: [] },
1632
- { name: 'PairAlreadyExists', type: 'error', inputs: [] },
1633
- { name: 'OrderDoesNotExist', type: 'error', inputs: [] },
1634
- { name: 'IdenticalTokens', type: 'error', inputs: [] },
1635
- { name: 'InvalidToken', type: 'error', inputs: [] },
1636
- {
1637
- name: 'TickOutOfBounds',
1638
- type: 'error',
1639
- inputs: [{ type: 'int16', name: 'tick' }],
1640
- },
1641
- { name: 'InvalidTick', type: 'error', inputs: [] },
1642
- { name: 'InvalidFlipTick', type: 'error', inputs: [] },
1643
- { name: 'InsufficientBalance', type: 'error', inputs: [] },
1644
- { name: 'InsufficientLiquidity', type: 'error', inputs: [] },
1645
- { name: 'InsufficientOutput', type: 'error', inputs: [] },
1646
- { name: 'MaxInputExceeded', type: 'error', inputs: [] },
1647
- {
1648
- name: 'BelowMinimumOrderSize',
1649
- type: 'error',
1650
- inputs: [{ type: 'uint128', name: 'amount' }],
1825
+ inputs: [
1826
+ { type: 'bytes32', name: 'channelId', indexed: true },
1827
+ { type: 'address', name: 'payer', indexed: true },
1828
+ { type: 'address', name: 'payee', indexed: true },
1829
+ ],
1651
1830
  },
1652
- { name: 'InvalidBaseToken', type: 'error', inputs: [] },
1653
- { name: 'OrderNotStale', type: 'error', inputs: [] },
1831
+ { name: 'ChannelAlreadyExists', type: 'error', inputs: [] },
1832
+ { name: 'ChannelNotFound', type: 'error', inputs: [] },
1833
+ { name: 'NotPayer', type: 'error', inputs: [] },
1834
+ { name: 'NotPayeeOrOperator', type: 'error', inputs: [] },
1835
+ { name: 'InvalidPayee', type: 'error', inputs: [] },
1836
+ { name: 'ZeroDeposit', type: 'error', inputs: [] },
1837
+ { name: 'ExpiringNonceHashNotSet', type: 'error', inputs: [] },
1838
+ { name: 'InvalidSignature', type: 'error', inputs: [] },
1839
+ { name: 'AmountExceedsDeposit', type: 'error', inputs: [] },
1840
+ { name: 'AmountNotIncreasing', type: 'error', inputs: [] },
1841
+ { name: 'CaptureAmountInvalid', type: 'error', inputs: [] },
1842
+ { name: 'CloseNotReady', type: 'error', inputs: [] },
1843
+ { name: 'DepositOverflow', type: 'error', inputs: [] },
1654
1844
  ];
1655
- exports.addressRegistry = [
1845
+ exports.tip20Factory = [
1656
1846
  {
1657
- name: 'registerVirtualMaster',
1847
+ name: 'createToken',
1658
1848
  type: 'function',
1659
1849
  stateMutability: 'nonpayable',
1660
- inputs: [{ type: 'bytes32', name: 'salt' }],
1661
- outputs: [{ type: 'bytes4', name: 'masterId' }],
1662
- },
1663
- {
1664
- name: 'getMaster',
1665
- type: 'function',
1666
- stateMutability: 'view',
1667
- inputs: [{ type: 'bytes4', name: 'masterId' }],
1850
+ inputs: [
1851
+ { type: 'string', name: 'name' },
1852
+ { type: 'string', name: 'symbol' },
1853
+ { type: 'string', name: 'currency' },
1854
+ { type: 'address', name: 'quoteToken' },
1855
+ { type: 'address', name: 'admin' },
1856
+ { type: 'bytes32', name: 'salt' },
1857
+ ],
1668
1858
  outputs: [{ type: 'address' }],
1669
1859
  },
1670
1860
  {
1671
- name: 'resolveRecipient',
1861
+ name: 'createToken',
1672
1862
  type: 'function',
1673
- stateMutability: 'view',
1674
- inputs: [{ type: 'address', name: 'to' }],
1675
- outputs: [{ type: 'address', name: 'effectiveRecipient' }],
1863
+ stateMutability: 'nonpayable',
1864
+ inputs: [
1865
+ { type: 'string', name: 'name' },
1866
+ { type: 'string', name: 'symbol' },
1867
+ { type: 'string', name: 'currency' },
1868
+ { type: 'address', name: 'quoteToken' },
1869
+ { type: 'address', name: 'admin' },
1870
+ { type: 'bytes32', name: 'salt' },
1871
+ { type: 'string', name: 'logoURI' },
1872
+ ],
1873
+ outputs: [{ type: 'address' }],
1676
1874
  },
1677
1875
  {
1678
- name: 'resolveVirtualAddress',
1876
+ name: 'isTIP20',
1679
1877
  type: 'function',
1680
1878
  stateMutability: 'view',
1681
- inputs: [{ type: 'address', name: 'virtualAddr' }],
1682
- outputs: [{ type: 'address', name: 'master' }],
1683
- },
1684
- {
1685
- name: 'isVirtualAddress',
1686
- type: 'function',
1687
- stateMutability: 'pure',
1688
- inputs: [{ type: 'address', name: 'addr' }],
1879
+ inputs: [{ type: 'address', name: 'token' }],
1689
1880
  outputs: [{ type: 'bool' }],
1690
1881
  },
1691
1882
  {
1692
- name: 'decodeVirtualAddress',
1883
+ name: 'getTokenAddress',
1693
1884
  type: 'function',
1694
1885
  stateMutability: 'pure',
1695
- inputs: [{ type: 'address', name: 'addr' }],
1696
- outputs: [
1697
- { type: 'bool', name: 'isVirtual' },
1698
- { type: 'bytes4', name: 'masterId' },
1699
- { type: 'bytes6', name: 'userTag' },
1886
+ inputs: [
1887
+ { type: 'address', name: 'sender' },
1888
+ { type: 'bytes32', name: 'salt' },
1700
1889
  ],
1890
+ outputs: [{ type: 'address' }],
1701
1891
  },
1702
1892
  {
1703
- name: 'isImplicitlyApproved',
1704
- type: 'function',
1705
- stateMutability: 'view',
1706
- inputs: [{ type: 'address', name: 'addr' }],
1707
- outputs: [{ type: 'bool' }],
1708
- },
1709
- {
1710
- name: 'MasterRegistered',
1893
+ name: 'TokenCreated',
1711
1894
  type: 'event',
1712
1895
  inputs: [
1713
- { type: 'bytes4', name: 'masterId', indexed: true },
1714
- { type: 'address', name: 'masterAddress', indexed: true },
1896
+ { type: 'address', name: 'token', indexed: true },
1897
+ { type: 'string', name: 'name' },
1898
+ { type: 'string', name: 'symbol' },
1899
+ { type: 'string', name: 'currency' },
1900
+ { type: 'address', name: 'quoteToken' },
1901
+ { type: 'address', name: 'admin' },
1902
+ { type: 'bytes32', name: 'salt' },
1715
1903
  ],
1716
1904
  },
1905
+ { name: 'AddressReserved', type: 'error', inputs: [] },
1906
+ { name: 'AddressNotReserved', type: 'error', inputs: [] },
1907
+ { name: 'InvalidQuoteToken', type: 'error', inputs: [] },
1717
1908
  {
1718
- name: 'MasterIdCollision',
1909
+ name: 'TokenAlreadyExists',
1719
1910
  type: 'error',
1720
- inputs: [{ type: 'address', name: 'master' }],
1911
+ inputs: [{ type: 'address', name: 'token' }],
1721
1912
  },
1722
- { name: 'InvalidMasterAddress', type: 'error', inputs: [] },
1723
- { name: 'ProofOfWorkFailed', type: 'error', inputs: [] },
1724
- { name: 'VirtualAddressUnregistered', type: 'error', inputs: [] },
1725
1913
  ];
1726
- exports.feeManager = [
1914
+ exports.tip403Registry = [
1727
1915
  {
1728
- name: 'userTokens',
1916
+ name: 'policyIdCounter',
1729
1917
  type: 'function',
1730
1918
  stateMutability: 'view',
1731
- inputs: [{ type: 'address', name: 'user' }],
1732
- outputs: [{ type: 'address' }],
1919
+ inputs: [],
1920
+ outputs: [{ type: 'uint64' }],
1733
1921
  },
1734
1922
  {
1735
- name: 'validatorTokens',
1923
+ name: 'policyExists',
1736
1924
  type: 'function',
1737
1925
  stateMutability: 'view',
1738
- inputs: [{ type: 'address', name: 'validator' }],
1739
- outputs: [{ type: 'address' }],
1740
- },
1741
- {
1742
- name: 'setUserToken',
1743
- type: 'function',
1744
- stateMutability: 'nonpayable',
1745
- inputs: [{ type: 'address', name: 'token' }],
1746
- outputs: [],
1747
- },
1748
- {
1749
- name: 'setValidatorToken',
1750
- type: 'function',
1751
- stateMutability: 'nonpayable',
1752
- inputs: [{ type: 'address', name: 'token' }],
1753
- outputs: [],
1926
+ inputs: [{ type: 'uint64', name: 'policyId' }],
1927
+ outputs: [{ type: 'bool' }],
1754
1928
  },
1755
1929
  {
1756
- name: 'distributeFees',
1930
+ name: 'policyData',
1757
1931
  type: 'function',
1758
- stateMutability: 'nonpayable',
1759
- inputs: [
1760
- { type: 'address', name: 'validator' },
1761
- { type: 'address', name: 'token' },
1932
+ stateMutability: 'view',
1933
+ inputs: [{ type: 'uint64', name: 'policyId' }],
1934
+ outputs: [
1935
+ { type: 'uint8', name: 'policyType' },
1936
+ { type: 'address', name: 'admin' },
1762
1937
  ],
1763
- outputs: [],
1764
1938
  },
1765
1939
  {
1766
- name: 'collectedFees',
1940
+ name: 'isAuthorized',
1767
1941
  type: 'function',
1768
1942
  stateMutability: 'view',
1769
1943
  inputs: [
1770
- { type: 'address', name: 'validator' },
1771
- { type: 'address', name: 'token' },
1772
- ],
1773
- outputs: [{ type: 'uint256' }],
1774
- },
1775
- {
1776
- name: 'UserTokenSet',
1777
- type: 'event',
1778
- inputs: [
1779
- { type: 'address', name: 'user', indexed: true },
1780
- { type: 'address', name: 'token', indexed: true },
1781
- ],
1782
- },
1783
- {
1784
- name: 'ValidatorTokenSet',
1785
- type: 'event',
1786
- inputs: [
1787
- { type: 'address', name: 'validator', indexed: true },
1788
- { type: 'address', name: 'token', indexed: true },
1789
- ],
1790
- },
1791
- {
1792
- name: 'FeesDistributed',
1793
- type: 'event',
1794
- inputs: [
1795
- { type: 'address', name: 'validator', indexed: true },
1796
- { type: 'address', name: 'token', indexed: true },
1797
- { type: 'uint256', name: 'amount' },
1944
+ { type: 'uint64', name: 'policyId' },
1945
+ { type: 'address', name: 'user' },
1798
1946
  ],
1799
- },
1800
- { name: 'InvalidToken', type: 'error', inputs: [] },
1801
- { name: 'InsufficientFeeTokenBalance', type: 'error', inputs: [] },
1802
- { name: 'CannotChangeWithinBlock', type: 'error', inputs: [] },
1803
- ];
1804
- exports.feeAmm = [
1805
- {
1806
- name: 'M',
1807
- type: 'function',
1808
- stateMutability: 'view',
1809
- inputs: [],
1810
- outputs: [{ type: 'uint256' }],
1947
+ outputs: [{ type: 'bool' }],
1811
1948
  },
1812
1949
  {
1813
- name: 'N',
1950
+ name: 'isAuthorizedSender',
1814
1951
  type: 'function',
1815
1952
  stateMutability: 'view',
1816
- inputs: [],
1817
- outputs: [{ type: 'uint256' }],
1953
+ inputs: [
1954
+ { type: 'uint64', name: 'policyId' },
1955
+ { type: 'address', name: 'user' },
1956
+ ],
1957
+ outputs: [{ type: 'bool' }],
1818
1958
  },
1819
1959
  {
1820
- name: 'SCALE',
1960
+ name: 'isAuthorizedRecipient',
1821
1961
  type: 'function',
1822
1962
  stateMutability: 'view',
1823
- inputs: [],
1824
- outputs: [{ type: 'uint256' }],
1825
- },
1826
- {
1827
- name: 'MIN_LIQUIDITY',
1828
- type: 'function',
1829
- stateMutability: 'view',
1830
- inputs: [],
1831
- outputs: [{ type: 'uint256' }],
1832
- },
1833
- {
1834
- name: 'getPoolId',
1835
- type: 'function',
1836
- stateMutability: 'pure',
1837
1963
  inputs: [
1838
- { type: 'address', name: 'userToken' },
1839
- { type: 'address', name: 'validatorToken' },
1840
- ],
1841
- outputs: [{ type: 'bytes32' }],
1842
- },
1843
- {
1844
- name: 'getPool',
1845
- type: 'function',
1846
- stateMutability: 'view',
1847
- inputs: [
1848
- { type: 'address', name: 'userToken' },
1849
- { type: 'address', name: 'validatorToken' },
1850
- ],
1851
- outputs: [
1852
- {
1853
- type: 'tuple',
1854
- components: [
1855
- { type: 'uint128', name: 'reserveUserToken' },
1856
- { type: 'uint128', name: 'reserveValidatorToken' },
1857
- ],
1858
- },
1859
- ],
1860
- },
1861
- {
1862
- name: 'pools',
1863
- type: 'function',
1864
- stateMutability: 'view',
1865
- inputs: [{ type: 'bytes32', name: 'poolId' }],
1866
- outputs: [
1867
- {
1868
- type: 'tuple',
1869
- components: [
1870
- { type: 'uint128', name: 'reserveUserToken' },
1871
- { type: 'uint128', name: 'reserveValidatorToken' },
1872
- ],
1873
- },
1874
- ],
1875
- },
1876
- {
1877
- name: 'mint',
1878
- type: 'function',
1879
- stateMutability: 'nonpayable',
1880
- inputs: [
1881
- { type: 'address', name: 'userToken' },
1882
- { type: 'address', name: 'validatorToken' },
1883
- { type: 'uint256', name: 'amountValidatorToken' },
1884
- { type: 'address', name: 'to' },
1885
- ],
1886
- outputs: [{ type: 'uint256', name: 'liquidity' }],
1887
- },
1888
- {
1889
- name: 'burn',
1890
- type: 'function',
1891
- stateMutability: 'nonpayable',
1892
- inputs: [
1893
- { type: 'address', name: 'userToken' },
1894
- { type: 'address', name: 'validatorToken' },
1895
- { type: 'uint256', name: 'liquidity' },
1896
- { type: 'address', name: 'to' },
1897
- ],
1898
- outputs: [
1899
- { type: 'uint256', name: 'amountUserToken' },
1900
- { type: 'uint256', name: 'amountValidatorToken' },
1901
- ],
1902
- },
1903
- {
1904
- name: 'totalSupply',
1905
- type: 'function',
1906
- stateMutability: 'view',
1907
- inputs: [{ type: 'bytes32', name: 'poolId' }],
1908
- outputs: [{ type: 'uint256' }],
1909
- },
1910
- {
1911
- name: 'liquidityBalances',
1912
- type: 'function',
1913
- stateMutability: 'view',
1914
- inputs: [
1915
- { type: 'bytes32', name: 'poolId' },
1964
+ { type: 'uint64', name: 'policyId' },
1916
1965
  { type: 'address', name: 'user' },
1917
1966
  ],
1918
- outputs: [{ type: 'uint256' }],
1919
- },
1920
- {
1921
- name: 'rebalanceSwap',
1922
- type: 'function',
1923
- stateMutability: 'nonpayable',
1924
- inputs: [
1925
- { type: 'address', name: 'userToken' },
1926
- { type: 'address', name: 'validatorToken' },
1927
- { type: 'uint256', name: 'amountOut' },
1928
- { type: 'address', name: 'to' },
1929
- ],
1930
- outputs: [{ type: 'uint256', name: 'amountIn' }],
1931
- },
1932
- {
1933
- name: 'Mint',
1934
- type: 'event',
1935
- inputs: [
1936
- { type: 'address', name: 'sender' },
1937
- { type: 'address', name: 'to', indexed: true },
1938
- { type: 'address', name: 'userToken', indexed: true },
1939
- { type: 'address', name: 'validatorToken', indexed: true },
1940
- { type: 'uint256', name: 'amountValidatorToken' },
1941
- { type: 'uint256', name: 'liquidity' },
1942
- ],
1943
- },
1944
- {
1945
- name: 'Burn',
1946
- type: 'event',
1947
- inputs: [
1948
- { type: 'address', name: 'sender', indexed: true },
1949
- { type: 'address', name: 'userToken', indexed: true },
1950
- { type: 'address', name: 'validatorToken', indexed: true },
1951
- { type: 'uint256', name: 'amountUserToken' },
1952
- { type: 'uint256', name: 'amountValidatorToken' },
1953
- { type: 'uint256', name: 'liquidity' },
1954
- { type: 'address', name: 'to' },
1955
- ],
1956
- },
1957
- {
1958
- name: 'RebalanceSwap',
1959
- type: 'event',
1960
- inputs: [
1961
- { type: 'address', name: 'userToken', indexed: true },
1962
- { type: 'address', name: 'validatorToken', indexed: true },
1963
- { type: 'address', name: 'swapper', indexed: true },
1964
- { type: 'uint256', name: 'amountIn' },
1965
- { type: 'uint256', name: 'amountOut' },
1966
- ],
1967
- },
1968
- { name: 'IdenticalAddresses', type: 'error', inputs: [] },
1969
- { name: 'InvalidToken', type: 'error', inputs: [] },
1970
- { name: 'InsufficientLiquidity', type: 'error', inputs: [] },
1971
- { name: 'InsufficientReserves', type: 'error', inputs: [] },
1972
- { name: 'InvalidAmount', type: 'error', inputs: [] },
1973
- { name: 'DivisionByZero', type: 'error', inputs: [] },
1974
- { name: 'InvalidSwapCalculation', type: 'error', inputs: [] },
1975
- ];
1976
- exports.receivePolicyGuard = [
1977
- {
1978
- name: 'balanceOf',
1979
- type: 'function',
1980
- stateMutability: 'view',
1981
- inputs: [{ type: 'bytes', name: 'receipt' }],
1982
- outputs: [{ type: 'uint256', name: 'amount' }],
1983
- },
1984
- {
1985
- name: 'claim',
1986
- type: 'function',
1987
- stateMutability: 'nonpayable',
1988
- inputs: [
1989
- { type: 'address', name: 'to' },
1990
- { type: 'bytes', name: 'receipt' },
1991
- ],
1992
- outputs: [],
1993
- },
1994
- {
1995
- name: 'burnBlockedReceipt',
1996
- type: 'function',
1997
- stateMutability: 'nonpayable',
1998
- inputs: [{ type: 'bytes', name: 'receipt' }],
1999
- outputs: [],
2000
- },
2001
- {
2002
- name: 'TransferBlocked',
2003
- type: 'event',
2004
- inputs: [
2005
- { type: 'address', name: 'token', indexed: true },
2006
- { type: 'address', name: 'receiver', indexed: true },
2007
- { type: 'uint64', name: 'blockedNonce', indexed: true },
2008
- { type: 'uint256', name: 'amount' },
2009
- { type: 'uint8', name: 'receiptVersion' },
2010
- { type: 'bytes', name: 'receipt' },
2011
- ],
2012
- },
2013
- {
2014
- name: 'ReceiptClaimed',
2015
- type: 'event',
2016
- inputs: [
2017
- { type: 'address', name: 'token', indexed: true },
2018
- { type: 'address', name: 'receiver', indexed: true },
2019
- { type: 'uint64', name: 'blockedNonce', indexed: true },
2020
- { type: 'uint64', name: 'blockedAt' },
2021
- { type: 'uint8', name: 'receiptVersion' },
2022
- { type: 'address', name: 'originator' },
2023
- { type: 'address', name: 'recipient' },
2024
- { type: 'address', name: 'recoveryAuthority' },
2025
- { type: 'address', name: 'caller' },
2026
- { type: 'address', name: 'to' },
2027
- { type: 'uint256', name: 'amount' },
2028
- ],
2029
- },
2030
- {
2031
- name: 'ReceiptBurned',
2032
- type: 'event',
2033
- inputs: [
2034
- { type: 'address', name: 'token', indexed: true },
2035
- { type: 'address', name: 'receiver', indexed: true },
2036
- { type: 'uint64', name: 'blockedNonce', indexed: true },
2037
- { type: 'uint64', name: 'blockedAt' },
2038
- { type: 'uint8', name: 'receiptVersion' },
2039
- { type: 'address', name: 'originator' },
2040
- { type: 'address', name: 'recipient' },
2041
- { type: 'address', name: 'recoveryAuthority' },
2042
- { type: 'address', name: 'caller' },
2043
- { type: 'uint256', name: 'amount' },
2044
- ],
2045
- },
2046
- { name: 'InvalidReceipt', type: 'error', inputs: [] },
2047
- { name: 'InvalidClaimAddress', type: 'error', inputs: [] },
2048
- { name: 'UnauthorizedClaimer', type: 'error', inputs: [] },
2049
- { name: 'AddressReserved', type: 'error', inputs: [] },
2050
- ];
2051
- exports.accountKeychain = [
2052
- {
2053
- name: 'authorizeKey',
2054
- type: 'function',
2055
- stateMutability: 'nonpayable',
2056
- inputs: [
2057
- { type: 'address', name: 'keyId' },
2058
- { type: 'uint8', name: 'signatureType' },
2059
- { type: 'uint64', name: 'expiry' },
2060
- { type: 'bool', name: 'enforceLimits' },
2061
- {
2062
- type: 'tuple[]',
2063
- name: 'limits',
2064
- components: [
2065
- { type: 'address', name: 'token' },
2066
- { type: 'uint256', name: 'amount' },
2067
- ],
2068
- },
2069
- ],
2070
- outputs: [],
2071
- },
2072
- {
2073
- name: 'authorizeKey',
2074
- type: 'function',
2075
- stateMutability: 'nonpayable',
2076
- inputs: [
2077
- { type: 'address', name: 'keyId' },
2078
- { type: 'uint8', name: 'signatureType' },
2079
- {
2080
- type: 'tuple',
2081
- name: 'config',
2082
- components: [
2083
- { type: 'uint64', name: 'expiry' },
2084
- { type: 'bool', name: 'enforceLimits' },
2085
- {
2086
- type: 'tuple[]',
2087
- name: 'limits',
2088
- components: [
2089
- { type: 'address', name: 'token' },
2090
- { type: 'uint256', name: 'amount' },
2091
- { type: 'uint64', name: 'period' },
2092
- ],
2093
- },
2094
- { type: 'bool', name: 'allowAnyCalls' },
2095
- {
2096
- type: 'tuple[]',
2097
- name: 'allowedCalls',
2098
- components: [
2099
- { type: 'address', name: 'target' },
2100
- {
2101
- type: 'tuple[]',
2102
- name: 'selectorRules',
2103
- components: [
2104
- { type: 'bytes4', name: 'selector' },
2105
- { type: 'address[]', name: 'recipients' },
2106
- ],
2107
- },
2108
- ],
2109
- },
2110
- ],
2111
- },
2112
- ],
2113
- outputs: [],
2114
- },
2115
- {
2116
- name: 'authorizeKey',
2117
- type: 'function',
2118
- stateMutability: 'nonpayable',
2119
- inputs: [
2120
- { type: 'address', name: 'keyId' },
2121
- { type: 'uint8', name: 'signatureType' },
2122
- {
2123
- type: 'tuple',
2124
- name: 'config',
2125
- components: [
2126
- { type: 'uint64', name: 'expiry' },
2127
- { type: 'bool', name: 'enforceLimits' },
2128
- {
2129
- type: 'tuple[]',
2130
- name: 'limits',
2131
- components: [
2132
- { type: 'address', name: 'token' },
2133
- { type: 'uint256', name: 'amount' },
2134
- { type: 'uint64', name: 'period' },
2135
- ],
2136
- },
2137
- { type: 'bool', name: 'allowAnyCalls' },
2138
- {
2139
- type: 'tuple[]',
2140
- name: 'allowedCalls',
2141
- components: [
2142
- { type: 'address', name: 'target' },
2143
- {
2144
- type: 'tuple[]',
2145
- name: 'selectorRules',
2146
- components: [
2147
- { type: 'bytes4', name: 'selector' },
2148
- { type: 'address[]', name: 'recipients' },
2149
- ],
2150
- },
2151
- ],
2152
- },
2153
- ],
2154
- },
2155
- { type: 'bytes32', name: 'witness' },
2156
- ],
2157
- outputs: [],
2158
- },
2159
- {
2160
- name: 'authorizeAdminKey',
2161
- type: 'function',
2162
- stateMutability: 'nonpayable',
2163
- inputs: [
2164
- { type: 'address', name: 'keyId' },
2165
- { type: 'uint8', name: 'signatureType' },
2166
- { type: 'bytes32', name: 'witness' },
2167
- ],
2168
- outputs: [],
2169
- },
2170
- {
2171
- name: 'burnKeyAuthorizationWitness',
2172
- type: 'function',
2173
- stateMutability: 'nonpayable',
2174
- inputs: [{ type: 'bytes32', name: 'witness' }],
2175
- outputs: [],
2176
- },
2177
- {
2178
- name: 'revokeKey',
2179
- type: 'function',
2180
- stateMutability: 'nonpayable',
2181
- inputs: [{ type: 'address', name: 'keyId' }],
2182
- outputs: [],
2183
- },
2184
- {
2185
- name: 'updateSpendingLimit',
2186
- type: 'function',
2187
- stateMutability: 'nonpayable',
2188
- inputs: [
2189
- { type: 'address', name: 'keyId' },
2190
- { type: 'address', name: 'token' },
2191
- { type: 'uint256', name: 'newLimit' },
2192
- ],
2193
- outputs: [],
2194
- },
2195
- {
2196
- name: 'setAllowedCalls',
2197
- type: 'function',
2198
- stateMutability: 'nonpayable',
2199
- inputs: [
2200
- { type: 'address', name: 'keyId' },
2201
- {
2202
- type: 'tuple[]',
2203
- name: 'scopes',
2204
- components: [
2205
- { type: 'address', name: 'target' },
2206
- {
2207
- type: 'tuple[]',
2208
- name: 'selectorRules',
2209
- components: [
2210
- { type: 'bytes4', name: 'selector' },
2211
- { type: 'address[]', name: 'recipients' },
2212
- ],
2213
- },
2214
- ],
2215
- },
2216
- ],
2217
- outputs: [],
2218
- },
2219
- {
2220
- name: 'removeAllowedCalls',
2221
- type: 'function',
2222
- stateMutability: 'nonpayable',
2223
- inputs: [
2224
- { type: 'address', name: 'keyId' },
2225
- { type: 'address', name: 'target' },
2226
- ],
2227
- outputs: [],
1967
+ outputs: [{ type: 'bool' }],
2228
1968
  },
2229
1969
  {
2230
- name: 'getKey',
1970
+ name: 'isAuthorizedMintRecipient',
2231
1971
  type: 'function',
2232
1972
  stateMutability: 'view',
2233
1973
  inputs: [
2234
- { type: 'address', name: 'account' },
2235
- { type: 'address', name: 'keyId' },
1974
+ { type: 'uint64', name: 'policyId' },
1975
+ { type: 'address', name: 'user' },
2236
1976
  ],
1977
+ outputs: [{ type: 'bool' }],
1978
+ },
1979
+ {
1980
+ name: 'compoundPolicyData',
1981
+ type: 'function',
1982
+ stateMutability: 'view',
1983
+ inputs: [{ type: 'uint64', name: 'policyId' }],
2237
1984
  outputs: [
2238
- {
2239
- type: 'tuple',
2240
- components: [
2241
- { type: 'uint8', name: 'signatureType' },
2242
- { type: 'address', name: 'keyId' },
2243
- { type: 'uint64', name: 'expiry' },
2244
- { type: 'bool', name: 'enforceLimits' },
2245
- { type: 'bool', name: 'isRevoked' },
2246
- ],
2247
- },
1985
+ { type: 'uint64', name: 'senderPolicyId' },
1986
+ { type: 'uint64', name: 'recipientPolicyId' },
1987
+ { type: 'uint64', name: 'mintRecipientPolicyId' },
2248
1988
  ],
2249
1989
  },
2250
1990
  {
2251
- name: 'getRemainingLimit',
1991
+ name: 'receivePolicy',
2252
1992
  type: 'function',
2253
1993
  stateMutability: 'view',
2254
- inputs: [
2255
- { type: 'address', name: 'account' },
2256
- { type: 'address', name: 'keyId' },
2257
- { type: 'address', name: 'token' },
1994
+ inputs: [{ type: 'address', name: 'account' }],
1995
+ outputs: [
1996
+ { type: 'bool', name: 'hasReceivePolicy' },
1997
+ { type: 'uint64', name: 'senderPolicyId' },
1998
+ { type: 'uint8', name: 'senderPolicyType' },
1999
+ { type: 'uint64', name: 'tokenFilterId' },
2000
+ { type: 'uint8', name: 'tokenFilterType' },
2001
+ { type: 'address', name: 'recoveryAuthority' },
2258
2002
  ],
2259
- outputs: [{ type: 'uint256', name: 'remaining' }],
2260
2003
  },
2261
2004
  {
2262
- name: 'getRemainingLimitWithPeriod',
2005
+ name: 'validateReceivePolicy',
2263
2006
  type: 'function',
2264
2007
  stateMutability: 'view',
2265
2008
  inputs: [
2266
- { type: 'address', name: 'account' },
2267
- { type: 'address', name: 'keyId' },
2268
2009
  { type: 'address', name: 'token' },
2010
+ { type: 'address', name: 'sender' },
2011
+ { type: 'address', name: 'receiver' },
2269
2012
  ],
2270
2013
  outputs: [
2271
- { type: 'uint256', name: 'remaining' },
2272
- { type: 'uint64', name: 'periodEnd' },
2014
+ { type: 'bool', name: 'authorized' },
2015
+ { type: 'uint8', name: 'blockedReason' },
2273
2016
  ],
2274
2017
  },
2275
2018
  {
2276
- name: 'getAllowedCalls',
2019
+ name: 'createPolicy',
2277
2020
  type: 'function',
2278
- stateMutability: 'view',
2021
+ stateMutability: 'nonpayable',
2279
2022
  inputs: [
2280
- { type: 'address', name: 'account' },
2281
- { type: 'address', name: 'keyId' },
2023
+ { type: 'address', name: 'admin' },
2024
+ { type: 'uint8', name: 'policyType' },
2282
2025
  ],
2283
- outputs: [
2284
- { type: 'bool', name: 'isScoped' },
2285
- {
2286
- type: 'tuple[]',
2287
- name: 'scopes',
2288
- components: [
2289
- { type: 'address', name: 'target' },
2290
- {
2291
- type: 'tuple[]',
2292
- name: 'selectorRules',
2293
- components: [
2294
- { type: 'bytes4', name: 'selector' },
2295
- { type: 'address[]', name: 'recipients' },
2296
- ],
2297
- },
2298
- ],
2299
- },
2026
+ outputs: [{ type: 'uint64' }],
2027
+ },
2028
+ {
2029
+ name: 'createPolicyWithAccounts',
2030
+ type: 'function',
2031
+ stateMutability: 'nonpayable',
2032
+ inputs: [
2033
+ { type: 'address', name: 'admin' },
2034
+ { type: 'uint8', name: 'policyType' },
2035
+ { type: 'address[]', name: 'accounts' },
2300
2036
  ],
2037
+ outputs: [{ type: 'uint64' }],
2301
2038
  },
2302
2039
  {
2303
- name: 'isKeyAuthorizationWitnessBurned',
2040
+ name: 'setPolicyAdmin',
2304
2041
  type: 'function',
2305
- stateMutability: 'view',
2042
+ stateMutability: 'nonpayable',
2306
2043
  inputs: [
2307
- { type: 'address', name: 'account' },
2308
- { type: 'bytes32', name: 'witness' },
2044
+ { type: 'uint64', name: 'policyId' },
2045
+ { type: 'address', name: 'admin' },
2309
2046
  ],
2310
- outputs: [{ type: 'bool' }],
2047
+ outputs: [],
2311
2048
  },
2312
2049
  {
2313
- name: 'isAdminKey',
2050
+ name: 'modifyPolicyWhitelist',
2314
2051
  type: 'function',
2315
- stateMutability: 'view',
2052
+ stateMutability: 'nonpayable',
2316
2053
  inputs: [
2054
+ { type: 'uint64', name: 'policyId' },
2317
2055
  { type: 'address', name: 'account' },
2318
- { type: 'address', name: 'keyId' },
2056
+ { type: 'bool', name: 'allowed' },
2319
2057
  ],
2320
- outputs: [{ type: 'bool' }],
2058
+ outputs: [],
2321
2059
  },
2322
2060
  {
2323
- name: 'getTransactionKey',
2061
+ name: 'modifyPolicyBlacklist',
2324
2062
  type: 'function',
2325
- stateMutability: 'view',
2326
- inputs: [],
2327
- outputs: [{ type: 'address' }],
2063
+ stateMutability: 'nonpayable',
2064
+ inputs: [
2065
+ { type: 'uint64', name: 'policyId' },
2066
+ { type: 'address', name: 'account' },
2067
+ { type: 'bool', name: 'restricted' },
2068
+ ],
2069
+ outputs: [],
2328
2070
  },
2329
2071
  {
2330
- name: 'KeyAuthorized',
2331
- type: 'event',
2072
+ name: 'createCompoundPolicy',
2073
+ type: 'function',
2074
+ stateMutability: 'nonpayable',
2332
2075
  inputs: [
2333
- { type: 'address', name: 'account', indexed: true },
2334
- { type: 'address', name: 'publicKey', indexed: true },
2335
- { type: 'uint8', name: 'signatureType' },
2336
- { type: 'uint64', name: 'expiry' },
2076
+ { type: 'uint64', name: 'senderPolicyId' },
2077
+ { type: 'uint64', name: 'recipientPolicyId' },
2078
+ { type: 'uint64', name: 'mintRecipientPolicyId' },
2337
2079
  ],
2080
+ outputs: [{ type: 'uint64' }],
2338
2081
  },
2339
2082
  {
2340
- name: 'AdminKeyAuthorized',
2341
- type: 'event',
2083
+ name: 'setReceivePolicy',
2084
+ type: 'function',
2085
+ stateMutability: 'nonpayable',
2342
2086
  inputs: [
2343
- { type: 'address', name: 'account', indexed: true },
2344
- { type: 'address', name: 'publicKey', indexed: true },
2087
+ { type: 'uint64', name: 'senderPolicyId' },
2088
+ { type: 'uint64', name: 'tokenFilterId' },
2089
+ { type: 'address', name: 'recoveryAuthority' },
2345
2090
  ],
2091
+ outputs: [],
2346
2092
  },
2347
2093
  {
2348
- name: 'KeyRevoked',
2094
+ name: 'PolicyAdminUpdated',
2349
2095
  type: 'event',
2350
2096
  inputs: [
2351
- { type: 'address', name: 'account', indexed: true },
2352
- { type: 'address', name: 'publicKey', indexed: true },
2097
+ { type: 'uint64', name: 'policyId', indexed: true },
2098
+ { type: 'address', name: 'updater', indexed: true },
2099
+ { type: 'address', name: 'admin', indexed: true },
2353
2100
  ],
2354
2101
  },
2355
2102
  {
2356
- name: 'SpendingLimitUpdated',
2103
+ name: 'PolicyCreated',
2357
2104
  type: 'event',
2358
2105
  inputs: [
2359
- { type: 'address', name: 'account', indexed: true },
2360
- { type: 'address', name: 'publicKey', indexed: true },
2361
- { type: 'address', name: 'token', indexed: true },
2362
- { type: 'uint256', name: 'newLimit' },
2106
+ { type: 'uint64', name: 'policyId', indexed: true },
2107
+ { type: 'address', name: 'updater', indexed: true },
2108
+ { type: 'uint8', name: 'policyType' },
2363
2109
  ],
2364
2110
  },
2365
2111
  {
2366
- name: 'AccessKeySpend',
2112
+ name: 'WhitelistUpdated',
2367
2113
  type: 'event',
2368
2114
  inputs: [
2115
+ { type: 'uint64', name: 'policyId', indexed: true },
2116
+ { type: 'address', name: 'updater', indexed: true },
2369
2117
  { type: 'address', name: 'account', indexed: true },
2370
- { type: 'address', name: 'publicKey', indexed: true },
2371
- { type: 'address', name: 'token', indexed: true },
2372
- { type: 'uint256', name: 'amount' },
2373
- { type: 'uint256', name: 'remainingLimit' },
2118
+ { type: 'bool', name: 'allowed' },
2374
2119
  ],
2375
2120
  },
2376
2121
  {
2377
- name: 'KeyAuthorizationWitness',
2122
+ name: 'BlacklistUpdated',
2378
2123
  type: 'event',
2379
2124
  inputs: [
2125
+ { type: 'uint64', name: 'policyId', indexed: true },
2126
+ { type: 'address', name: 'updater', indexed: true },
2380
2127
  { type: 'address', name: 'account', indexed: true },
2381
- { type: 'bytes32', name: 'witness', indexed: true },
2128
+ { type: 'bool', name: 'restricted' },
2382
2129
  ],
2383
2130
  },
2384
2131
  {
2385
- name: 'KeyAuthorizationWitnessBurned',
2132
+ name: 'CompoundPolicyCreated',
2386
2133
  type: 'event',
2387
2134
  inputs: [
2388
- { type: 'address', name: 'account', indexed: true },
2389
- { type: 'bytes32', name: 'witness', indexed: true },
2135
+ { type: 'uint64', name: 'policyId', indexed: true },
2136
+ { type: 'address', name: 'creator', indexed: true },
2137
+ { type: 'uint64', name: 'senderPolicyId' },
2138
+ { type: 'uint64', name: 'recipientPolicyId' },
2139
+ { type: 'uint64', name: 'mintRecipientPolicyId' },
2390
2140
  ],
2391
2141
  },
2392
- { name: 'UnauthorizedCaller', type: 'error', inputs: [] },
2393
- { name: 'KeyAlreadyExists', type: 'error', inputs: [] },
2394
- { name: 'KeyNotFound', type: 'error', inputs: [] },
2395
- { name: 'KeyExpired', type: 'error', inputs: [] },
2396
- { name: 'SpendingLimitExceeded', type: 'error', inputs: [] },
2397
- { name: 'InvalidSpendingLimit', type: 'error', inputs: [] },
2398
- { name: 'InvalidSignatureType', type: 'error', inputs: [] },
2399
- { name: 'ZeroPublicKey', type: 'error', inputs: [] },
2400
- { name: 'ExpiryInPast', type: 'error', inputs: [] },
2401
- { name: 'KeyAlreadyRevoked', type: 'error', inputs: [] },
2402
2142
  {
2403
- name: 'SignatureTypeMismatch',
2404
- type: 'error',
2143
+ name: 'ReceivePolicyUpdated',
2144
+ type: 'event',
2405
2145
  inputs: [
2406
- { type: 'uint8', name: 'expected' },
2407
- { type: 'uint8', name: 'actual' },
2146
+ { type: 'address', name: 'account', indexed: true },
2147
+ { type: 'uint64', name: 'senderPolicyId' },
2148
+ { type: 'uint64', name: 'tokenFilterId' },
2149
+ { type: 'address', name: 'recoveryAuthority' },
2408
2150
  ],
2409
2151
  },
2410
- { name: 'CallNotAllowed', type: 'error', inputs: [] },
2411
- { name: 'InvalidCallScope', type: 'error', inputs: [] },
2412
- { name: 'InvalidKeyId', type: 'error', inputs: [] },
2413
- { name: 'InvalidKeyAuthorizationWitness', type: 'error', inputs: [] },
2414
- { name: 'KeyAuthorizationWitnessAlreadyBurned', type: 'error', inputs: [] },
2415
- {
2416
- name: 'LegacyAuthorizeKeySelectorChanged',
2417
- type: 'error',
2418
- inputs: [{ type: 'bytes4', name: 'newSelector' }],
2419
- },
2152
+ { name: 'Unauthorized', type: 'error', inputs: [] },
2153
+ { name: 'PolicyNotFound', type: 'error', inputs: [] },
2154
+ { name: 'PolicyNotSimple', type: 'error', inputs: [] },
2155
+ { name: 'InvalidPolicyType', type: 'error', inputs: [] },
2156
+ { name: 'IncompatiblePolicyType', type: 'error', inputs: [] },
2157
+ { name: 'VirtualAddressNotAllowed', type: 'error', inputs: [] },
2158
+ { name: 'InvalidReceivePolicyType', type: 'error', inputs: [] },
2159
+ { name: 'InvalidRecoveryAuthority', type: 'error', inputs: [] },
2420
2160
  ];
2421
- exports.nonce = [
2161
+ exports.feeManager = [
2422
2162
  {
2423
- name: 'getNonce',
2163
+ name: 'userTokens',
2424
2164
  type: 'function',
2425
2165
  stateMutability: 'view',
2426
- inputs: [
2427
- { type: 'address', name: 'account' },
2428
- { type: 'uint256', name: 'nonceKey' },
2429
- ],
2430
- outputs: [{ type: 'uint64', name: 'nonce' }],
2166
+ inputs: [{ type: 'address', name: 'user' }],
2167
+ outputs: [{ type: 'address' }],
2431
2168
  },
2432
2169
  {
2433
- name: 'NonceIncremented',
2434
- type: 'event',
2435
- inputs: [
2436
- { type: 'address', name: 'account', indexed: true },
2437
- { type: 'uint256', name: 'nonceKey', indexed: true },
2438
- { type: 'uint64', name: 'newNonce' },
2439
- ],
2170
+ name: 'validatorTokens',
2171
+ type: 'function',
2172
+ stateMutability: 'view',
2173
+ inputs: [{ type: 'address', name: 'validator' }],
2174
+ outputs: [{ type: 'address' }],
2175
+ },
2176
+ {
2177
+ name: 'setUserToken',
2178
+ type: 'function',
2179
+ stateMutability: 'nonpayable',
2180
+ inputs: [{ type: 'address', name: 'token' }],
2181
+ outputs: [],
2440
2182
  },
2441
- { name: 'ProtocolNonceNotSupported', type: 'error', inputs: [] },
2442
- { name: 'InvalidNonceKey', type: 'error', inputs: [] },
2443
- { name: 'NonceOverflow', type: 'error', inputs: [] },
2444
- { name: 'ExpiringNonceReplay', type: 'error', inputs: [] },
2445
- { name: 'ExpiringNonceSetFull', type: 'error', inputs: [] },
2446
- { name: 'InvalidExpiringNonceExpiry', type: 'error', inputs: [] },
2447
- ];
2448
- exports.tip20Factory = [
2449
2183
  {
2450
- name: 'createToken',
2184
+ name: 'setValidatorToken',
2451
2185
  type: 'function',
2452
2186
  stateMutability: 'nonpayable',
2453
- inputs: [
2454
- { type: 'string', name: 'name' },
2455
- { type: 'string', name: 'symbol' },
2456
- { type: 'string', name: 'currency' },
2457
- { type: 'address', name: 'quoteToken' },
2458
- { type: 'address', name: 'admin' },
2459
- { type: 'bytes32', name: 'salt' },
2460
- ],
2461
- outputs: [{ type: 'address' }],
2187
+ inputs: [{ type: 'address', name: 'token' }],
2188
+ outputs: [],
2462
2189
  },
2463
2190
  {
2464
- name: 'createToken',
2191
+ name: 'distributeFees',
2465
2192
  type: 'function',
2466
2193
  stateMutability: 'nonpayable',
2467
2194
  inputs: [
2468
- { type: 'string', name: 'name' },
2469
- { type: 'string', name: 'symbol' },
2470
- { type: 'string', name: 'currency' },
2471
- { type: 'address', name: 'quoteToken' },
2472
- { type: 'address', name: 'admin' },
2473
- { type: 'bytes32', name: 'salt' },
2474
- { type: 'string', name: 'logoURI' },
2195
+ { type: 'address', name: 'validator' },
2196
+ { type: 'address', name: 'token' },
2475
2197
  ],
2476
- outputs: [{ type: 'address' }],
2198
+ outputs: [],
2477
2199
  },
2478
2200
  {
2479
- name: 'isTIP20',
2201
+ name: 'collectedFees',
2480
2202
  type: 'function',
2481
2203
  stateMutability: 'view',
2482
- inputs: [{ type: 'address', name: 'token' }],
2483
- outputs: [{ type: 'bool' }],
2204
+ inputs: [
2205
+ { type: 'address', name: 'validator' },
2206
+ { type: 'address', name: 'token' },
2207
+ ],
2208
+ outputs: [{ type: 'uint256' }],
2484
2209
  },
2485
2210
  {
2486
- name: 'getTokenAddress',
2487
- type: 'function',
2488
- stateMutability: 'pure',
2211
+ name: 'UserTokenSet',
2212
+ type: 'event',
2489
2213
  inputs: [
2490
- { type: 'address', name: 'sender' },
2491
- { type: 'bytes32', name: 'salt' },
2214
+ { type: 'address', name: 'user', indexed: true },
2215
+ { type: 'address', name: 'token', indexed: true },
2492
2216
  ],
2493
- outputs: [{ type: 'address' }],
2494
2217
  },
2495
2218
  {
2496
- name: 'TokenCreated',
2219
+ name: 'ValidatorTokenSet',
2497
2220
  type: 'event',
2498
2221
  inputs: [
2222
+ { type: 'address', name: 'validator', indexed: true },
2499
2223
  { type: 'address', name: 'token', indexed: true },
2500
- { type: 'string', name: 'name' },
2501
- { type: 'string', name: 'symbol' },
2502
- { type: 'string', name: 'currency' },
2503
- { type: 'address', name: 'quoteToken' },
2504
- { type: 'address', name: 'admin' },
2505
- { type: 'bytes32', name: 'salt' },
2506
2224
  ],
2507
2225
  },
2508
- { name: 'AddressReserved', type: 'error', inputs: [] },
2509
- { name: 'AddressNotReserved', type: 'error', inputs: [] },
2510
- { name: 'InvalidQuoteToken', type: 'error', inputs: [] },
2511
2226
  {
2512
- name: 'TokenAlreadyExists',
2513
- type: 'error',
2514
- inputs: [{ type: 'address', name: 'token' }],
2227
+ name: 'FeesDistributed',
2228
+ type: 'event',
2229
+ inputs: [
2230
+ { type: 'address', name: 'validator', indexed: true },
2231
+ { type: 'address', name: 'token', indexed: true },
2232
+ { type: 'uint256', name: 'amount' },
2233
+ ],
2515
2234
  },
2235
+ { name: 'InvalidToken', type: 'error', inputs: [] },
2236
+ { name: 'InsufficientFeeTokenBalance', type: 'error', inputs: [] },
2237
+ { name: 'CannotChangeWithinBlock', type: 'error', inputs: [] },
2516
2238
  ];
2517
- exports.tip403Registry = [
2239
+ exports.feeAmm = [
2518
2240
  {
2519
- name: 'policyIdCounter',
2241
+ name: 'M',
2520
2242
  type: 'function',
2521
2243
  stateMutability: 'view',
2522
2244
  inputs: [],
2523
- outputs: [{ type: 'uint64' }],
2245
+ outputs: [{ type: 'uint256' }],
2524
2246
  },
2525
2247
  {
2526
- name: 'policyExists',
2248
+ name: 'N',
2527
2249
  type: 'function',
2528
2250
  stateMutability: 'view',
2529
- inputs: [{ type: 'uint64', name: 'policyId' }],
2530
- outputs: [{ type: 'bool' }],
2251
+ inputs: [],
2252
+ outputs: [{ type: 'uint256' }],
2531
2253
  },
2532
2254
  {
2533
- name: 'policyData',
2255
+ name: 'SCALE',
2534
2256
  type: 'function',
2535
2257
  stateMutability: 'view',
2536
- inputs: [{ type: 'uint64', name: 'policyId' }],
2537
- outputs: [
2538
- { type: 'uint8', name: 'policyType' },
2539
- { type: 'address', name: 'admin' },
2540
- ],
2258
+ inputs: [],
2259
+ outputs: [{ type: 'uint256' }],
2541
2260
  },
2542
2261
  {
2543
- name: 'isAuthorized',
2262
+ name: 'MIN_LIQUIDITY',
2544
2263
  type: 'function',
2545
2264
  stateMutability: 'view',
2265
+ inputs: [],
2266
+ outputs: [{ type: 'uint256' }],
2267
+ },
2268
+ {
2269
+ name: 'getPoolId',
2270
+ type: 'function',
2271
+ stateMutability: 'pure',
2546
2272
  inputs: [
2547
- { type: 'uint64', name: 'policyId' },
2548
- { type: 'address', name: 'user' },
2273
+ { type: 'address', name: 'userToken' },
2274
+ { type: 'address', name: 'validatorToken' },
2549
2275
  ],
2550
- outputs: [{ type: 'bool' }],
2276
+ outputs: [{ type: 'bytes32' }],
2551
2277
  },
2552
2278
  {
2553
- name: 'isAuthorizedSender',
2279
+ name: 'getPool',
2554
2280
  type: 'function',
2555
2281
  stateMutability: 'view',
2556
2282
  inputs: [
2557
- { type: 'uint64', name: 'policyId' },
2558
- { type: 'address', name: 'user' },
2283
+ { type: 'address', name: 'userToken' },
2284
+ { type: 'address', name: 'validatorToken' },
2285
+ ],
2286
+ outputs: [
2287
+ {
2288
+ type: 'tuple',
2289
+ components: [
2290
+ { type: 'uint128', name: 'reserveUserToken' },
2291
+ { type: 'uint128', name: 'reserveValidatorToken' },
2292
+ ],
2293
+ },
2559
2294
  ],
2560
- outputs: [{ type: 'bool' }],
2561
2295
  },
2562
2296
  {
2563
- name: 'isAuthorizedRecipient',
2297
+ name: 'pools',
2564
2298
  type: 'function',
2565
2299
  stateMutability: 'view',
2566
- inputs: [
2567
- { type: 'uint64', name: 'policyId' },
2568
- { type: 'address', name: 'user' },
2300
+ inputs: [{ type: 'bytes32', name: 'poolId' }],
2301
+ outputs: [
2302
+ {
2303
+ type: 'tuple',
2304
+ components: [
2305
+ { type: 'uint128', name: 'reserveUserToken' },
2306
+ { type: 'uint128', name: 'reserveValidatorToken' },
2307
+ ],
2308
+ },
2569
2309
  ],
2570
- outputs: [{ type: 'bool' }],
2571
2310
  },
2572
2311
  {
2573
- name: 'isAuthorizedMintRecipient',
2312
+ name: 'mint',
2574
2313
  type: 'function',
2575
- stateMutability: 'view',
2314
+ stateMutability: 'nonpayable',
2576
2315
  inputs: [
2577
- { type: 'uint64', name: 'policyId' },
2578
- { type: 'address', name: 'user' },
2316
+ { type: 'address', name: 'userToken' },
2317
+ { type: 'address', name: 'validatorToken' },
2318
+ { type: 'uint256', name: 'amountValidatorToken' },
2319
+ { type: 'address', name: 'to' },
2579
2320
  ],
2580
- outputs: [{ type: 'bool' }],
2321
+ outputs: [{ type: 'uint256', name: 'liquidity' }],
2581
2322
  },
2582
2323
  {
2583
- name: 'compoundPolicyData',
2324
+ name: 'burn',
2584
2325
  type: 'function',
2585
- stateMutability: 'view',
2586
- inputs: [{ type: 'uint64', name: 'policyId' }],
2326
+ stateMutability: 'nonpayable',
2327
+ inputs: [
2328
+ { type: 'address', name: 'userToken' },
2329
+ { type: 'address', name: 'validatorToken' },
2330
+ { type: 'uint256', name: 'liquidity' },
2331
+ { type: 'address', name: 'to' },
2332
+ ],
2587
2333
  outputs: [
2588
- { type: 'uint64', name: 'senderPolicyId' },
2589
- { type: 'uint64', name: 'recipientPolicyId' },
2590
- { type: 'uint64', name: 'mintRecipientPolicyId' },
2334
+ { type: 'uint256', name: 'amountUserToken' },
2335
+ { type: 'uint256', name: 'amountValidatorToken' },
2591
2336
  ],
2592
2337
  },
2593
2338
  {
2594
- name: 'receivePolicy',
2339
+ name: 'totalSupply',
2595
2340
  type: 'function',
2596
2341
  stateMutability: 'view',
2597
- inputs: [{ type: 'address', name: 'account' }],
2598
- outputs: [
2599
- { type: 'bool', name: 'hasReceivePolicy' },
2600
- { type: 'uint64', name: 'senderPolicyId' },
2601
- { type: 'uint8', name: 'senderPolicyType' },
2602
- { type: 'uint64', name: 'tokenFilterId' },
2603
- { type: 'uint8', name: 'tokenFilterType' },
2604
- { type: 'address', name: 'recoveryAuthority' },
2605
- ],
2342
+ inputs: [{ type: 'bytes32', name: 'poolId' }],
2343
+ outputs: [{ type: 'uint256' }],
2606
2344
  },
2607
2345
  {
2608
- name: 'validateReceivePolicy',
2346
+ name: 'liquidityBalances',
2609
2347
  type: 'function',
2610
2348
  stateMutability: 'view',
2611
2349
  inputs: [
2612
- { type: 'address', name: 'token' },
2350
+ { type: 'bytes32', name: 'poolId' },
2351
+ { type: 'address', name: 'user' },
2352
+ ],
2353
+ outputs: [{ type: 'uint256' }],
2354
+ },
2355
+ {
2356
+ name: 'rebalanceSwap',
2357
+ type: 'function',
2358
+ stateMutability: 'nonpayable',
2359
+ inputs: [
2360
+ { type: 'address', name: 'userToken' },
2361
+ { type: 'address', name: 'validatorToken' },
2362
+ { type: 'uint256', name: 'amountOut' },
2363
+ { type: 'address', name: 'to' },
2364
+ ],
2365
+ outputs: [{ type: 'uint256', name: 'amountIn' }],
2366
+ },
2367
+ {
2368
+ name: 'Mint',
2369
+ type: 'event',
2370
+ inputs: [
2613
2371
  { type: 'address', name: 'sender' },
2614
- { type: 'address', name: 'receiver' },
2372
+ { type: 'address', name: 'to', indexed: true },
2373
+ { type: 'address', name: 'userToken', indexed: true },
2374
+ { type: 'address', name: 'validatorToken', indexed: true },
2375
+ { type: 'uint256', name: 'amountValidatorToken' },
2376
+ { type: 'uint256', name: 'liquidity' },
2377
+ ],
2378
+ },
2379
+ {
2380
+ name: 'Burn',
2381
+ type: 'event',
2382
+ inputs: [
2383
+ { type: 'address', name: 'sender', indexed: true },
2384
+ { type: 'address', name: 'userToken', indexed: true },
2385
+ { type: 'address', name: 'validatorToken', indexed: true },
2386
+ { type: 'uint256', name: 'amountUserToken' },
2387
+ { type: 'uint256', name: 'amountValidatorToken' },
2388
+ { type: 'uint256', name: 'liquidity' },
2389
+ { type: 'address', name: 'to' },
2390
+ ],
2391
+ },
2392
+ {
2393
+ name: 'RebalanceSwap',
2394
+ type: 'event',
2395
+ inputs: [
2396
+ { type: 'address', name: 'userToken', indexed: true },
2397
+ { type: 'address', name: 'validatorToken', indexed: true },
2398
+ { type: 'address', name: 'swapper', indexed: true },
2399
+ { type: 'uint256', name: 'amountIn' },
2400
+ { type: 'uint256', name: 'amountOut' },
2615
2401
  ],
2402
+ },
2403
+ { name: 'IdenticalAddresses', type: 'error', inputs: [] },
2404
+ { name: 'InvalidToken', type: 'error', inputs: [] },
2405
+ { name: 'InsufficientLiquidity', type: 'error', inputs: [] },
2406
+ { name: 'InsufficientReserves', type: 'error', inputs: [] },
2407
+ { name: 'InvalidAmount', type: 'error', inputs: [] },
2408
+ { name: 'DivisionByZero', type: 'error', inputs: [] },
2409
+ { name: 'InvalidSwapCalculation', type: 'error', inputs: [] },
2410
+ ];
2411
+ exports.validatorConfig = [
2412
+ {
2413
+ name: 'getValidators',
2414
+ type: 'function',
2415
+ stateMutability: 'view',
2416
+ inputs: [],
2616
2417
  outputs: [
2617
- { type: 'bool', name: 'authorized' },
2618
- { type: 'uint8', name: 'blockedReason' },
2418
+ {
2419
+ type: 'tuple[]',
2420
+ name: 'validators',
2421
+ components: [
2422
+ { type: 'bytes32', name: 'publicKey' },
2423
+ { type: 'bool', name: 'active' },
2424
+ { type: 'uint64', name: 'index' },
2425
+ { type: 'address', name: 'validatorAddress' },
2426
+ { type: 'string', name: 'inboundAddress' },
2427
+ { type: 'string', name: 'outboundAddress' },
2428
+ ],
2429
+ },
2619
2430
  ],
2620
2431
  },
2621
2432
  {
2622
- name: 'createPolicy',
2433
+ name: 'addValidator',
2623
2434
  type: 'function',
2624
2435
  stateMutability: 'nonpayable',
2625
2436
  inputs: [
2626
- { type: 'address', name: 'admin' },
2627
- { type: 'uint8', name: 'policyType' },
2437
+ { type: 'address', name: 'newValidatorAddress' },
2438
+ { type: 'bytes32', name: 'publicKey' },
2439
+ { type: 'bool', name: 'active' },
2440
+ { type: 'string', name: 'inboundAddress' },
2441
+ { type: 'string', name: 'outboundAddress' },
2628
2442
  ],
2629
- outputs: [{ type: 'uint64' }],
2443
+ outputs: [],
2630
2444
  },
2631
2445
  {
2632
- name: 'createPolicyWithAccounts',
2446
+ name: 'updateValidator',
2633
2447
  type: 'function',
2634
2448
  stateMutability: 'nonpayable',
2635
2449
  inputs: [
2636
- { type: 'address', name: 'admin' },
2637
- { type: 'uint8', name: 'policyType' },
2638
- { type: 'address[]', name: 'accounts' },
2450
+ { type: 'address', name: 'newValidatorAddress' },
2451
+ { type: 'bytes32', name: 'publicKey' },
2452
+ { type: 'string', name: 'inboundAddress' },
2453
+ { type: 'string', name: 'outboundAddress' },
2639
2454
  ],
2640
- outputs: [{ type: 'uint64' }],
2455
+ outputs: [],
2641
2456
  },
2642
2457
  {
2643
- name: 'setPolicyAdmin',
2458
+ name: 'changeValidatorStatus',
2644
2459
  type: 'function',
2645
2460
  stateMutability: 'nonpayable',
2646
2461
  inputs: [
2647
- { type: 'uint64', name: 'policyId' },
2648
- { type: 'address', name: 'admin' },
2462
+ { type: 'address', name: 'validator' },
2463
+ { type: 'bool', name: 'active' },
2649
2464
  ],
2650
2465
  outputs: [],
2651
2466
  },
2652
2467
  {
2653
- name: 'modifyPolicyWhitelist',
2468
+ name: 'changeValidatorStatusByIndex',
2654
2469
  type: 'function',
2655
2470
  stateMutability: 'nonpayable',
2656
2471
  inputs: [
2657
- { type: 'uint64', name: 'policyId' },
2658
- { type: 'address', name: 'account' },
2659
- { type: 'bool', name: 'allowed' },
2472
+ { type: 'uint64', name: 'index' },
2473
+ { type: 'bool', name: 'active' },
2660
2474
  ],
2661
2475
  outputs: [],
2662
2476
  },
2663
2477
  {
2664
- name: 'modifyPolicyBlacklist',
2478
+ name: 'owner',
2479
+ type: 'function',
2480
+ stateMutability: 'view',
2481
+ inputs: [],
2482
+ outputs: [{ type: 'address' }],
2483
+ },
2484
+ {
2485
+ name: 'changeOwner',
2665
2486
  type: 'function',
2666
2487
  stateMutability: 'nonpayable',
2667
- inputs: [
2668
- { type: 'uint64', name: 'policyId' },
2669
- { type: 'address', name: 'account' },
2670
- { type: 'bool', name: 'restricted' },
2671
- ],
2488
+ inputs: [{ type: 'address', name: 'newOwner' }],
2672
2489
  outputs: [],
2673
2490
  },
2674
2491
  {
2675
- name: 'createCompoundPolicy',
2492
+ name: 'getNextFullDkgCeremony',
2676
2493
  type: 'function',
2677
- stateMutability: 'nonpayable',
2678
- inputs: [
2679
- { type: 'uint64', name: 'senderPolicyId' },
2680
- { type: 'uint64', name: 'recipientPolicyId' },
2681
- { type: 'uint64', name: 'mintRecipientPolicyId' },
2682
- ],
2494
+ stateMutability: 'view',
2495
+ inputs: [],
2683
2496
  outputs: [{ type: 'uint64' }],
2684
2497
  },
2685
2498
  {
2686
- name: 'setReceivePolicy',
2499
+ name: 'setNextFullDkgCeremony',
2687
2500
  type: 'function',
2688
2501
  stateMutability: 'nonpayable',
2689
- inputs: [
2690
- { type: 'uint64', name: 'senderPolicyId' },
2691
- { type: 'uint64', name: 'tokenFilterId' },
2692
- { type: 'address', name: 'recoveryAuthority' },
2693
- ],
2502
+ inputs: [{ type: 'uint64', name: 'epoch' }],
2694
2503
  outputs: [],
2695
2504
  },
2696
2505
  {
2697
- name: 'PolicyAdminUpdated',
2698
- type: 'event',
2699
- inputs: [
2700
- { type: 'uint64', name: 'policyId', indexed: true },
2701
- { type: 'address', name: 'updater', indexed: true },
2702
- { type: 'address', name: 'admin', indexed: true },
2703
- ],
2704
- },
2705
- {
2706
- name: 'PolicyCreated',
2707
- type: 'event',
2708
- inputs: [
2709
- { type: 'uint64', name: 'policyId', indexed: true },
2710
- { type: 'address', name: 'updater', indexed: true },
2711
- { type: 'uint8', name: 'policyType' },
2712
- ],
2506
+ name: 'validatorsArray',
2507
+ type: 'function',
2508
+ stateMutability: 'view',
2509
+ inputs: [{ type: 'uint256', name: 'index' }],
2510
+ outputs: [{ type: 'address' }],
2713
2511
  },
2714
2512
  {
2715
- name: 'WhitelistUpdated',
2716
- type: 'event',
2717
- inputs: [
2718
- { type: 'uint64', name: 'policyId', indexed: true },
2719
- { type: 'address', name: 'updater', indexed: true },
2720
- { type: 'address', name: 'account', indexed: true },
2721
- { type: 'bool', name: 'allowed' },
2513
+ name: 'validators',
2514
+ type: 'function',
2515
+ stateMutability: 'view',
2516
+ inputs: [{ type: 'address', name: 'validator' }],
2517
+ outputs: [
2518
+ {
2519
+ type: 'tuple',
2520
+ components: [
2521
+ { type: 'bytes32', name: 'publicKey' },
2522
+ { type: 'bool', name: 'active' },
2523
+ { type: 'uint64', name: 'index' },
2524
+ { type: 'address', name: 'validatorAddress' },
2525
+ { type: 'string', name: 'inboundAddress' },
2526
+ { type: 'string', name: 'outboundAddress' },
2527
+ ],
2528
+ },
2722
2529
  ],
2723
2530
  },
2724
2531
  {
2725
- name: 'BlacklistUpdated',
2726
- type: 'event',
2727
- inputs: [
2728
- { type: 'uint64', name: 'policyId', indexed: true },
2729
- { type: 'address', name: 'updater', indexed: true },
2730
- { type: 'address', name: 'account', indexed: true },
2731
- { type: 'bool', name: 'restricted' },
2732
- ],
2532
+ name: 'validatorCount',
2533
+ type: 'function',
2534
+ stateMutability: 'view',
2535
+ inputs: [],
2536
+ outputs: [{ type: 'uint64' }],
2733
2537
  },
2538
+ { name: 'Unauthorized', type: 'error', inputs: [] },
2539
+ { name: 'ValidatorAlreadyExists', type: 'error', inputs: [] },
2540
+ { name: 'ValidatorNotFound', type: 'error', inputs: [] },
2541
+ { name: 'InvalidPublicKey', type: 'error', inputs: [] },
2734
2542
  {
2735
- name: 'CompoundPolicyCreated',
2736
- type: 'event',
2543
+ name: 'NotHostPort',
2544
+ type: 'error',
2737
2545
  inputs: [
2738
- { type: 'uint64', name: 'policyId', indexed: true },
2739
- { type: 'address', name: 'creator', indexed: true },
2740
- { type: 'uint64', name: 'senderPolicyId' },
2741
- { type: 'uint64', name: 'recipientPolicyId' },
2742
- { type: 'uint64', name: 'mintRecipientPolicyId' },
2546
+ { type: 'string', name: 'field' },
2547
+ { type: 'string', name: 'input' },
2548
+ { type: 'string', name: 'backtrace' },
2743
2549
  ],
2744
2550
  },
2745
2551
  {
2746
- name: 'ReceivePolicyUpdated',
2747
- type: 'event',
2552
+ name: 'NotIpPort',
2553
+ type: 'error',
2748
2554
  inputs: [
2749
- { type: 'address', name: 'account', indexed: true },
2750
- { type: 'uint64', name: 'senderPolicyId' },
2751
- { type: 'uint64', name: 'tokenFilterId' },
2752
- { type: 'address', name: 'recoveryAuthority' },
2555
+ { type: 'string', name: 'field' },
2556
+ { type: 'string', name: 'input' },
2557
+ { type: 'string', name: 'backtrace' },
2753
2558
  ],
2754
2559
  },
2755
- { name: 'Unauthorized', type: 'error', inputs: [] },
2756
- { name: 'PolicyNotFound', type: 'error', inputs: [] },
2757
- { name: 'PolicyNotSimple', type: 'error', inputs: [] },
2758
- { name: 'InvalidPolicyType', type: 'error', inputs: [] },
2759
- { name: 'IncompatiblePolicyType', type: 'error', inputs: [] },
2760
- { name: 'VirtualAddressNotAllowed', type: 'error', inputs: [] },
2761
- { name: 'InvalidReceivePolicyType', type: 'error', inputs: [] },
2762
- { name: 'InvalidRecoveryAuthority', type: 'error', inputs: [] },
2763
2560
  ];
2764
- exports.validatorConfig = [
2561
+ exports.validatorConfigV2 = [
2765
2562
  {
2766
- name: 'getValidators',
2563
+ name: 'getActiveValidators',
2767
2564
  type: 'function',
2768
2565
  stateMutability: 'view',
2769
2566
  inputs: [],
@@ -2773,130 +2570,329 @@ exports.validatorConfig = [
2773
2570
  name: 'validators',
2774
2571
  components: [
2775
2572
  { type: 'bytes32', name: 'publicKey' },
2776
- { type: 'bool', name: 'active' },
2573
+ { type: 'address', name: 'validatorAddress' },
2574
+ { type: 'string', name: 'ingress' },
2575
+ { type: 'string', name: 'egress' },
2576
+ { type: 'address', name: 'feeRecipient' },
2577
+ { type: 'uint64', name: 'index' },
2578
+ { type: 'uint64', name: 'addedAtHeight' },
2579
+ { type: 'uint64', name: 'deactivatedAtHeight' },
2580
+ ],
2581
+ },
2582
+ ],
2583
+ },
2584
+ {
2585
+ name: 'getInitializedAtHeight',
2586
+ type: 'function',
2587
+ stateMutability: 'view',
2588
+ inputs: [],
2589
+ outputs: [{ type: 'uint64' }],
2590
+ },
2591
+ {
2592
+ name: 'owner',
2593
+ type: 'function',
2594
+ stateMutability: 'view',
2595
+ inputs: [],
2596
+ outputs: [{ type: 'address' }],
2597
+ },
2598
+ {
2599
+ name: 'validatorCount',
2600
+ type: 'function',
2601
+ stateMutability: 'view',
2602
+ inputs: [],
2603
+ outputs: [{ type: 'uint64' }],
2604
+ },
2605
+ {
2606
+ name: 'validatorByIndex',
2607
+ type: 'function',
2608
+ stateMutability: 'view',
2609
+ inputs: [{ type: 'uint64', name: 'index' }],
2610
+ outputs: [
2611
+ {
2612
+ type: 'tuple',
2613
+ components: [
2614
+ { type: 'bytes32', name: 'publicKey' },
2615
+ { type: 'address', name: 'validatorAddress' },
2616
+ { type: 'string', name: 'ingress' },
2617
+ { type: 'string', name: 'egress' },
2618
+ { type: 'address', name: 'feeRecipient' },
2619
+ { type: 'uint64', name: 'index' },
2620
+ { type: 'uint64', name: 'addedAtHeight' },
2621
+ { type: 'uint64', name: 'deactivatedAtHeight' },
2622
+ ],
2623
+ },
2624
+ ],
2625
+ },
2626
+ {
2627
+ name: 'validatorByAddress',
2628
+ type: 'function',
2629
+ stateMutability: 'view',
2630
+ inputs: [{ type: 'address', name: 'validatorAddress' }],
2631
+ outputs: [
2632
+ {
2633
+ type: 'tuple',
2634
+ components: [
2635
+ { type: 'bytes32', name: 'publicKey' },
2636
+ { type: 'address', name: 'validatorAddress' },
2637
+ { type: 'string', name: 'ingress' },
2638
+ { type: 'string', name: 'egress' },
2639
+ { type: 'address', name: 'feeRecipient' },
2777
2640
  { type: 'uint64', name: 'index' },
2641
+ { type: 'uint64', name: 'addedAtHeight' },
2642
+ { type: 'uint64', name: 'deactivatedAtHeight' },
2643
+ ],
2644
+ },
2645
+ ],
2646
+ },
2647
+ {
2648
+ name: 'validatorByPublicKey',
2649
+ type: 'function',
2650
+ stateMutability: 'view',
2651
+ inputs: [{ type: 'bytes32', name: 'publicKey' }],
2652
+ outputs: [
2653
+ {
2654
+ type: 'tuple',
2655
+ components: [
2656
+ { type: 'bytes32', name: 'publicKey' },
2778
2657
  { type: 'address', name: 'validatorAddress' },
2779
- { type: 'string', name: 'inboundAddress' },
2780
- { type: 'string', name: 'outboundAddress' },
2658
+ { type: 'string', name: 'ingress' },
2659
+ { type: 'string', name: 'egress' },
2660
+ { type: 'address', name: 'feeRecipient' },
2661
+ { type: 'uint64', name: 'index' },
2662
+ { type: 'uint64', name: 'addedAtHeight' },
2663
+ { type: 'uint64', name: 'deactivatedAtHeight' },
2781
2664
  ],
2782
2665
  },
2783
2666
  ],
2784
2667
  },
2668
+ {
2669
+ name: 'getNextNetworkIdentityRotationEpoch',
2670
+ type: 'function',
2671
+ stateMutability: 'view',
2672
+ inputs: [],
2673
+ outputs: [{ type: 'uint64' }],
2674
+ },
2675
+ {
2676
+ name: 'isInitialized',
2677
+ type: 'function',
2678
+ stateMutability: 'view',
2679
+ inputs: [],
2680
+ outputs: [{ type: 'bool' }],
2681
+ },
2785
2682
  {
2786
2683
  name: 'addValidator',
2787
2684
  type: 'function',
2788
2685
  stateMutability: 'nonpayable',
2789
2686
  inputs: [
2790
- { type: 'address', name: 'newValidatorAddress' },
2687
+ { type: 'address', name: 'validatorAddress' },
2791
2688
  { type: 'bytes32', name: 'publicKey' },
2792
- { type: 'bool', name: 'active' },
2793
- { type: 'string', name: 'inboundAddress' },
2794
- { type: 'string', name: 'outboundAddress' },
2689
+ { type: 'string', name: 'ingress' },
2690
+ { type: 'string', name: 'egress' },
2691
+ { type: 'address', name: 'feeRecipient' },
2692
+ { type: 'bytes', name: 'signature' },
2795
2693
  ],
2694
+ outputs: [{ type: 'uint64', name: 'index' }],
2695
+ },
2696
+ {
2697
+ name: 'deactivateValidator',
2698
+ type: 'function',
2699
+ stateMutability: 'nonpayable',
2700
+ inputs: [{ type: 'uint64', name: 'idx' }],
2796
2701
  outputs: [],
2797
2702
  },
2798
2703
  {
2799
- name: 'updateValidator',
2704
+ name: 'rotateValidator',
2800
2705
  type: 'function',
2801
2706
  stateMutability: 'nonpayable',
2802
2707
  inputs: [
2803
- { type: 'address', name: 'newValidatorAddress' },
2708
+ { type: 'uint64', name: 'idx' },
2804
2709
  { type: 'bytes32', name: 'publicKey' },
2805
- { type: 'string', name: 'inboundAddress' },
2806
- { type: 'string', name: 'outboundAddress' },
2710
+ { type: 'string', name: 'ingress' },
2711
+ { type: 'string', name: 'egress' },
2712
+ { type: 'bytes', name: 'signature' },
2807
2713
  ],
2808
2714
  outputs: [],
2809
2715
  },
2810
2716
  {
2811
- name: 'changeValidatorStatus',
2717
+ name: 'setFeeRecipient',
2812
2718
  type: 'function',
2813
2719
  stateMutability: 'nonpayable',
2814
2720
  inputs: [
2815
- { type: 'address', name: 'validator' },
2816
- { type: 'bool', name: 'active' },
2721
+ { type: 'uint64', name: 'idx' },
2722
+ { type: 'address', name: 'feeRecipient' },
2817
2723
  ],
2818
2724
  outputs: [],
2819
2725
  },
2820
2726
  {
2821
- name: 'changeValidatorStatusByIndex',
2727
+ name: 'setIpAddresses',
2822
2728
  type: 'function',
2823
2729
  stateMutability: 'nonpayable',
2824
2730
  inputs: [
2825
- { type: 'uint64', name: 'index' },
2826
- { type: 'bool', name: 'active' },
2731
+ { type: 'uint64', name: 'idx' },
2732
+ { type: 'string', name: 'ingress' },
2733
+ { type: 'string', name: 'egress' },
2827
2734
  ],
2828
2735
  outputs: [],
2829
2736
  },
2830
2737
  {
2831
- name: 'owner',
2738
+ name: 'transferValidatorOwnership',
2832
2739
  type: 'function',
2833
- stateMutability: 'view',
2834
- inputs: [],
2835
- outputs: [{ type: 'address' }],
2740
+ stateMutability: 'nonpayable',
2741
+ inputs: [
2742
+ { type: 'uint64', name: 'idx' },
2743
+ { type: 'address', name: 'newAddress' },
2744
+ ],
2745
+ outputs: [],
2836
2746
  },
2837
2747
  {
2838
- name: 'changeOwner',
2748
+ name: 'transferOwnership',
2839
2749
  type: 'function',
2840
2750
  stateMutability: 'nonpayable',
2841
2751
  inputs: [{ type: 'address', name: 'newOwner' }],
2842
2752
  outputs: [],
2843
2753
  },
2844
2754
  {
2845
- name: 'getNextFullDkgCeremony',
2755
+ name: 'setNetworkIdentityRotationEpoch',
2846
2756
  type: 'function',
2847
- stateMutability: 'view',
2848
- inputs: [],
2849
- outputs: [{ type: 'uint64' }],
2757
+ stateMutability: 'nonpayable',
2758
+ inputs: [{ type: 'uint64', name: 'epoch' }],
2759
+ outputs: [],
2850
2760
  },
2851
2761
  {
2852
- name: 'setNextFullDkgCeremony',
2762
+ name: 'migrateValidator',
2853
2763
  type: 'function',
2854
2764
  stateMutability: 'nonpayable',
2855
- inputs: [{ type: 'uint64', name: 'epoch' }],
2765
+ inputs: [{ type: 'uint64', name: 'idx' }],
2856
2766
  outputs: [],
2857
2767
  },
2858
2768
  {
2859
- name: 'validatorsArray',
2769
+ name: 'initializeIfMigrated',
2860
2770
  type: 'function',
2861
- stateMutability: 'view',
2862
- inputs: [{ type: 'uint256', name: 'index' }],
2863
- outputs: [{ type: 'address' }],
2771
+ stateMutability: 'nonpayable',
2772
+ inputs: [],
2773
+ outputs: [],
2864
2774
  },
2865
2775
  {
2866
- name: 'validators',
2867
- type: 'function',
2868
- stateMutability: 'view',
2869
- inputs: [{ type: 'address', name: 'validator' }],
2870
- outputs: [
2871
- {
2872
- type: 'tuple',
2873
- components: [
2874
- { type: 'bytes32', name: 'publicKey' },
2875
- { type: 'bool', name: 'active' },
2876
- { type: 'uint64', name: 'index' },
2877
- { type: 'address', name: 'validatorAddress' },
2878
- { type: 'string', name: 'inboundAddress' },
2879
- { type: 'string', name: 'outboundAddress' },
2880
- ],
2881
- },
2776
+ name: 'ValidatorAdded',
2777
+ type: 'event',
2778
+ inputs: [
2779
+ { type: 'uint64', name: 'index', indexed: true },
2780
+ { type: 'address', name: 'validatorAddress', indexed: true },
2781
+ { type: 'bytes32', name: 'publicKey' },
2782
+ { type: 'string', name: 'ingress' },
2783
+ { type: 'string', name: 'egress' },
2784
+ { type: 'address', name: 'feeRecipient' },
2882
2785
  ],
2883
2786
  },
2884
2787
  {
2885
- name: 'validatorCount',
2886
- type: 'function',
2887
- stateMutability: 'view',
2888
- inputs: [],
2889
- outputs: [{ type: 'uint64' }],
2788
+ name: 'ValidatorDeactivated',
2789
+ type: 'event',
2790
+ inputs: [
2791
+ { type: 'uint64', name: 'index', indexed: true },
2792
+ { type: 'address', name: 'validatorAddress', indexed: true },
2793
+ ],
2890
2794
  },
2891
- { name: 'Unauthorized', type: 'error', inputs: [] },
2892
- { name: 'ValidatorAlreadyExists', type: 'error', inputs: [] },
2893
- { name: 'ValidatorNotFound', type: 'error', inputs: [] },
2795
+ {
2796
+ name: 'ValidatorRotated',
2797
+ type: 'event',
2798
+ inputs: [
2799
+ { type: 'uint64', name: 'index', indexed: true },
2800
+ { type: 'uint64', name: 'deactivatedIndex', indexed: true },
2801
+ { type: 'address', name: 'validatorAddress', indexed: true },
2802
+ { type: 'bytes32', name: 'oldPublicKey' },
2803
+ { type: 'bytes32', name: 'newPublicKey' },
2804
+ { type: 'string', name: 'ingress' },
2805
+ { type: 'string', name: 'egress' },
2806
+ { type: 'address', name: 'caller' },
2807
+ ],
2808
+ },
2809
+ {
2810
+ name: 'FeeRecipientUpdated',
2811
+ type: 'event',
2812
+ inputs: [
2813
+ { type: 'uint64', name: 'index', indexed: true },
2814
+ { type: 'address', name: 'feeRecipient' },
2815
+ { type: 'address', name: 'caller' },
2816
+ ],
2817
+ },
2818
+ {
2819
+ name: 'IpAddressesUpdated',
2820
+ type: 'event',
2821
+ inputs: [
2822
+ { type: 'uint64', name: 'index', indexed: true },
2823
+ { type: 'string', name: 'ingress' },
2824
+ { type: 'string', name: 'egress' },
2825
+ { type: 'address', name: 'caller' },
2826
+ ],
2827
+ },
2828
+ {
2829
+ name: 'ValidatorOwnershipTransferred',
2830
+ type: 'event',
2831
+ inputs: [
2832
+ { type: 'uint64', name: 'index', indexed: true },
2833
+ { type: 'address', name: 'oldAddress', indexed: true },
2834
+ { type: 'address', name: 'newAddress', indexed: true },
2835
+ { type: 'address', name: 'caller' },
2836
+ ],
2837
+ },
2838
+ {
2839
+ name: 'OwnershipTransferred',
2840
+ type: 'event',
2841
+ inputs: [
2842
+ { type: 'address', name: 'oldOwner', indexed: true },
2843
+ { type: 'address', name: 'newOwner', indexed: true },
2844
+ ],
2845
+ },
2846
+ {
2847
+ name: 'ValidatorMigrated',
2848
+ type: 'event',
2849
+ inputs: [
2850
+ { type: 'uint64', name: 'index', indexed: true },
2851
+ { type: 'address', name: 'validatorAddress', indexed: true },
2852
+ { type: 'bytes32', name: 'publicKey' },
2853
+ ],
2854
+ },
2855
+ {
2856
+ name: 'NetworkIdentityRotationEpochSet',
2857
+ type: 'event',
2858
+ inputs: [
2859
+ { type: 'uint64', name: 'previousEpoch', indexed: true },
2860
+ { type: 'uint64', name: 'nextEpoch', indexed: true },
2861
+ ],
2862
+ },
2863
+ {
2864
+ name: 'Initialized',
2865
+ type: 'event',
2866
+ inputs: [{ type: 'uint64', name: 'height' }],
2867
+ },
2868
+ {
2869
+ name: 'SkippedValidatorMigration',
2870
+ type: 'event',
2871
+ inputs: [
2872
+ { type: 'uint64', name: 'index', indexed: true },
2873
+ { type: 'address', name: 'validatorAddress', indexed: true },
2874
+ { type: 'bytes32', name: 'publicKey' },
2875
+ ],
2876
+ },
2877
+ { name: 'AlreadyInitialized', type: 'error', inputs: [] },
2878
+ {
2879
+ name: 'IngressAlreadyExists',
2880
+ type: 'error',
2881
+ inputs: [{ type: 'string', name: 'ingress' }],
2882
+ },
2883
+ { name: 'EmptyV1ValidatorSet', type: 'error', inputs: [] },
2884
+ { name: 'InvalidMigrationIndex', type: 'error', inputs: [] },
2885
+ { name: 'InvalidOwner', type: 'error', inputs: [] },
2894
2886
  { name: 'InvalidPublicKey', type: 'error', inputs: [] },
2887
+ { name: 'InvalidSignature', type: 'error', inputs: [] },
2888
+ { name: 'InvalidSignatureFormat', type: 'error', inputs: [] },
2889
+ { name: 'InvalidValidatorAddress', type: 'error', inputs: [] },
2890
+ { name: 'MigrationNotComplete', type: 'error', inputs: [] },
2891
+ { name: 'NotInitialized', type: 'error', inputs: [] },
2895
2892
  {
2896
- name: 'NotHostPort',
2893
+ name: 'NotIp',
2897
2894
  type: 'error',
2898
2895
  inputs: [
2899
- { type: 'string', name: 'field' },
2900
2896
  { type: 'string', name: 'input' },
2901
2897
  { type: 'string', name: 'backtrace' },
2902
2898
  ],
@@ -2905,26 +2901,30 @@ exports.validatorConfig = [
2905
2901
  name: 'NotIpPort',
2906
2902
  type: 'error',
2907
2903
  inputs: [
2908
- { type: 'string', name: 'field' },
2909
2904
  { type: 'string', name: 'input' },
2910
2905
  { type: 'string', name: 'backtrace' },
2911
2906
  ],
2912
2907
  },
2908
+ { name: 'PublicKeyAlreadyExists', type: 'error', inputs: [] },
2909
+ { name: 'Unauthorized', type: 'error', inputs: [] },
2910
+ { name: 'AddressAlreadyHasValidator', type: 'error', inputs: [] },
2911
+ { name: 'ValidatorAlreadyDeactivated', type: 'error', inputs: [] },
2912
+ { name: 'ValidatorNotFound', type: 'error', inputs: [] },
2913
2913
  ];
2914
2914
  exports.abis = [
2915
- ...exports.tip20ChannelReserve,
2916
- ...exports.tip20,
2917
- ...exports.validatorConfigV2,
2918
- ...exports.signatureVerifier,
2919
- ...exports.stablecoinDex,
2920
- ...exports.addressRegistry,
2921
- ...exports.feeManager,
2922
- ...exports.feeAmm,
2923
- ...exports.receivePolicyGuard,
2924
2915
  ...exports.accountKeychain,
2916
+ ...exports.addressRegistry,
2925
2917
  ...exports.nonce,
2918
+ ...exports.receivePolicyGuard,
2919
+ ...exports.signatureVerifier,
2920
+ ...exports.stablecoinDex,
2921
+ ...exports.tip20,
2922
+ ...exports.tip20ChannelReserve,
2926
2923
  ...exports.tip20Factory,
2927
2924
  ...exports.tip403Registry,
2925
+ ...exports.feeManager,
2926
+ ...exports.feeAmm,
2928
2927
  ...exports.validatorConfig,
2928
+ ...exports.validatorConfigV2,
2929
2929
  ];
2930
2930
  //# sourceMappingURL=Abis.js.map