@allbridge/bridge-core-sdk 3.27.0-beta.7 → 3.27.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.
- package/dist/browser/index.js +1 -6
- package/dist/browser/index.js.map +4 -4
- package/dist/cjs/index.js +1 -6
- package/dist/cjs/index.js.map +4 -4
- package/dist/esm/index.js +1 -6
- package/dist/esm/index.js.map +4 -4
- package/dist/src/chains/chain.enums.d.ts +2 -12
- package/dist/src/chains/chain.enums.js +0 -10
- package/dist/src/chains/chain.enums.js.map +1 -1
- package/dist/src/chains/index.js +0 -12
- package/dist/src/chains/index.js.map +1 -1
- package/dist/src/client/core-api/api-client.js +0 -1
- package/dist/src/client/core-api/api-client.js.map +1 -1
- package/dist/src/client/core-api/core-api-mapper.js +0 -33
- package/dist/src/client/core-api/core-api-mapper.js.map +1 -1
- package/dist/src/client/core-api/core-api.model.d.ts +2 -14
- package/dist/src/client/core-api/core-api.model.js.map +1 -1
- package/dist/src/configs/mainnet.js +0 -1
- package/dist/src/configs/mainnet.js.map +1 -1
- package/dist/src/index.d.ts +4 -12
- package/dist/src/index.js +11 -11
- package/dist/src/index.js.map +1 -1
- package/dist/src/models/index.d.ts +4 -12
- package/dist/src/models/index.js +0 -4
- package/dist/src/models/index.js.map +1 -1
- package/dist/src/services/bridge/evm/index.d.ts +0 -1
- package/dist/src/services/bridge/evm/index.js +33 -103
- package/dist/src/services/bridge/evm/index.js.map +1 -1
- package/dist/src/services/bridge/index.d.ts +2 -2
- package/dist/src/services/bridge/index.js +4 -31
- package/dist/src/services/bridge/index.js.map +1 -1
- package/dist/src/services/bridge/models/bridge.model.d.ts +4 -13
- package/dist/src/services/bridge/models/bridge.model.js.map +1 -1
- package/dist/src/services/bridge/raw-bridge-transaction-builder.js +1 -1
- package/dist/src/services/bridge/raw-bridge-transaction-builder.js.map +1 -1
- package/dist/src/services/bridge/srb/index.js +28 -36
- package/dist/src/services/bridge/srb/index.js.map +1 -1
- package/dist/src/services/bridge/sui/index.js +138 -166
- package/dist/src/services/bridge/sui/index.js.map +1 -1
- package/dist/src/services/bridge/trx/index.js +70 -98
- package/dist/src/services/bridge/trx/index.js.map +1 -1
- package/dist/src/services/bridge/utils.d.ts +1 -5
- package/dist/src/services/bridge/utils.js +23 -164
- package/dist/src/services/bridge/utils.js.map +1 -1
- package/dist/src/services/liquidity-pool/index.js +0 -21
- package/dist/src/services/liquidity-pool/index.js.map +1 -1
- package/dist/src/services/liquidity-pool/sui/index.js.map +1 -1
- package/dist/src/services/liquidity-pool/trx/index.js.map +1 -1
- package/dist/src/services/models/index.d.ts +5 -7
- package/dist/src/services/models/index.js.map +1 -1
- package/dist/src/services/token/index.js +2 -23
- package/dist/src/services/token/index.js.map +1 -1
- package/dist/src/services/token/models/token.model.d.ts +4 -4
- package/dist/src/services/token/models/token.model.js.map +1 -1
- package/dist/src/services/token/sui/index.js.map +1 -1
- package/dist/src/services/utils/trx/index.js.map +1 -1
- package/dist/src/services/yield/index.js +0 -8
- package/dist/src/services/yield/index.js.map +1 -1
- package/dist/src/tokens-info/tokens-info.model.d.ts +0 -25
- package/dist/src/tokens-info/tokens-info.model.js.map +1 -1
- package/dist/src/utils/index.d.ts +0 -3
- package/dist/src/utils/index.js +0 -3
- package/dist/src/utils/index.js.map +1 -1
- package/dist/src/utils/utils.d.ts +0 -2
- package/dist/src/utils/utils.js +0 -11
- package/dist/src/utils/utils.js.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/package.json +2 -9
- package/dist/src/services/bridge/alg/index.d.ts +0 -16
- package/dist/src/services/bridge/alg/index.js +0 -191
- package/dist/src/services/bridge/alg/index.js.map +0 -1
- package/dist/src/services/bridge/stx/index.d.ts +0 -16
- package/dist/src/services/bridge/stx/index.js +0 -136
- package/dist/src/services/bridge/stx/index.js.map +0 -1
- package/dist/src/services/liquidity-pool/alg/index.d.ts +0 -19
- package/dist/src/services/liquidity-pool/alg/index.js +0 -135
- package/dist/src/services/liquidity-pool/alg/index.js.map +0 -1
- package/dist/src/services/liquidity-pool/stx/index.d.ts +0 -21
- package/dist/src/services/liquidity-pool/stx/index.js +0 -141
- package/dist/src/services/liquidity-pool/stx/index.js.map +0 -1
- package/dist/src/services/models/abi/PayerWithAbr.d.ts +0 -203
- package/dist/src/services/models/abi/PayerWithAbr.js +0 -266
- package/dist/src/services/models/abi/PayerWithAbr.js.map +0 -1
- package/dist/src/services/models/alg/BridgeClient.d.ts +0 -2751
- package/dist/src/services/models/alg/BridgeClient.js +0 -2685
- package/dist/src/services/models/alg/BridgeClient.js.map +0 -1
- package/dist/src/services/models/alg/PaddingUtilClient.d.ts +0 -654
- package/dist/src/services/models/alg/PaddingUtilClient.js +0 -425
- package/dist/src/services/models/alg/PaddingUtilClient.js.map +0 -1
- package/dist/src/services/models/alg/PoolClient.d.ts +0 -2276
- package/dist/src/services/models/alg/PoolClient.js +0 -2195
- package/dist/src/services/models/alg/PoolClient.js.map +0 -1
- package/dist/src/services/models/stx/clarigen-types.d.ts +0 -657
- package/dist/src/services/models/stx/clarigen-types.js +0 -2296
- package/dist/src/services/models/stx/clarigen-types.js.map +0 -1
- package/dist/src/services/token/alg/index.d.ts +0 -17
- package/dist/src/services/token/alg/index.js +0 -47
- package/dist/src/services/token/alg/index.js.map +0 -1
- package/dist/src/services/token/stx/index.d.ts +0 -20
- package/dist/src/services/token/stx/index.js +0 -59
- package/dist/src/services/token/stx/index.js.map +0 -1
- package/dist/src/services/utils/alg/index.d.ts +0 -9
- package/dist/src/services/utils/alg/index.js +0 -74
- package/dist/src/services/utils/alg/index.js.map +0 -1
- package/dist/src/services/utils/stx/get-token-name.d.ts +0 -2
- package/dist/src/services/utils/stx/get-token-name.js +0 -15
- package/dist/src/services/utils/stx/get-token-name.js.map +0 -1
- package/dist/src/services/utils/stx/post-conditions.d.ts +0 -3
- package/dist/src/services/utils/stx/post-conditions.js +0 -27
- package/dist/src/services/utils/stx/post-conditions.js.map +0 -1
- package/dist/src/utils/alg/index.d.ts +0 -21
- package/dist/src/utils/alg/index.js +0 -71
- package/dist/src/utils/alg/index.js.map +0 -1
|
@@ -1,2296 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.stacksContracts = void 0;
|
|
4
|
-
exports.stacksContracts = {
|
|
5
|
-
bridge: {
|
|
6
|
-
functions: {
|
|
7
|
-
assertCanSwap: {
|
|
8
|
-
name: "assert-can-swap",
|
|
9
|
-
access: "private",
|
|
10
|
-
args: [],
|
|
11
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
12
|
-
},
|
|
13
|
-
assertGasOracle: {
|
|
14
|
-
name: "assert-gas-oracle",
|
|
15
|
-
access: "private",
|
|
16
|
-
args: [{ name: "gas-oracle-ref", type: "trait_reference" }],
|
|
17
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
18
|
-
},
|
|
19
|
-
assertMessenger: {
|
|
20
|
-
name: "assert-messenger",
|
|
21
|
-
access: "private",
|
|
22
|
-
args: [
|
|
23
|
-
{ name: "messenger-ref", type: "trait_reference" },
|
|
24
|
-
{ name: "messenger-id", type: "uint128" },
|
|
25
|
-
],
|
|
26
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
27
|
-
},
|
|
28
|
-
convertBridgingFeeInTokensToNative: {
|
|
29
|
-
name: "convert-bridging-fee-in-tokens-to-native",
|
|
30
|
-
access: "private",
|
|
31
|
-
args: [
|
|
32
|
-
{ name: "ft-ref", type: "trait_reference" },
|
|
33
|
-
{ name: "gas-oracle-ref", type: "trait_reference" },
|
|
34
|
-
{ name: "fee-token-amount", type: "uint128" },
|
|
35
|
-
],
|
|
36
|
-
outputs: { type: { response: { ok: "uint128", error: "uint128" } } },
|
|
37
|
-
},
|
|
38
|
-
onlyOwner: {
|
|
39
|
-
name: "only-owner",
|
|
40
|
-
access: "private",
|
|
41
|
-
args: [],
|
|
42
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
43
|
-
},
|
|
44
|
-
onlyStopAuthority: {
|
|
45
|
-
name: "only-stop-authority",
|
|
46
|
-
access: "private",
|
|
47
|
-
args: [],
|
|
48
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
49
|
-
},
|
|
50
|
-
receiveAndSwapFromVusd: {
|
|
51
|
-
name: "receive-and-swap-from-vusd",
|
|
52
|
-
access: "private",
|
|
53
|
-
args: [
|
|
54
|
-
{ name: "pool-ref", type: "trait_reference" },
|
|
55
|
-
{ name: "ft-ref", type: "trait_reference" },
|
|
56
|
-
{ name: "recipient", type: "principal" },
|
|
57
|
-
{ name: "vusd-amount", type: "uint128" },
|
|
58
|
-
{ name: "receive-amount-min", type: "uint128" },
|
|
59
|
-
],
|
|
60
|
-
outputs: { type: { response: { ok: "uint128", error: "uint128" } } },
|
|
61
|
-
},
|
|
62
|
-
sendAndSwapToVusd: {
|
|
63
|
-
name: "send-and-swap-to-vusd",
|
|
64
|
-
access: "private",
|
|
65
|
-
args: [
|
|
66
|
-
{ name: "pool-ref", type: "trait_reference" },
|
|
67
|
-
{ name: "ft-ref", type: "trait_reference" },
|
|
68
|
-
{ name: "user", type: "principal" },
|
|
69
|
-
{ name: "amount", type: "uint128" },
|
|
70
|
-
],
|
|
71
|
-
outputs: { type: { response: { ok: "uint128", error: "uint128" } } },
|
|
72
|
-
},
|
|
73
|
-
sendTokens: {
|
|
74
|
-
name: "send-tokens",
|
|
75
|
-
access: "private",
|
|
76
|
-
args: [
|
|
77
|
-
{ name: "messenger-ref", type: "trait_reference" },
|
|
78
|
-
{ name: "gas-oracle-ref", type: "trait_reference" },
|
|
79
|
-
{ name: "amount", type: "uint128" },
|
|
80
|
-
{ name: "recipient", type: { buffer: { length: 32 } } },
|
|
81
|
-
{ name: "destination-chain-id", type: "uint128" },
|
|
82
|
-
{ name: "receive-token", type: { buffer: { length: 32 } } },
|
|
83
|
-
{ name: "nonce", type: { buffer: { length: 32 } } },
|
|
84
|
-
{ name: "messenger-id", type: "uint128" },
|
|
85
|
-
{ name: "bridging-fee", type: "uint128" },
|
|
86
|
-
],
|
|
87
|
-
outputs: {
|
|
88
|
-
type: {
|
|
89
|
-
response: {
|
|
90
|
-
ok: {
|
|
91
|
-
tuple: [
|
|
92
|
-
{ name: "bridge-tx-cost", type: "uint128" },
|
|
93
|
-
{ name: "message-tx-cost", type: "uint128" },
|
|
94
|
-
],
|
|
95
|
-
},
|
|
96
|
-
error: "uint128",
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
addBridgeToken: {
|
|
102
|
-
name: "add-bridge-token",
|
|
103
|
-
access: "public",
|
|
104
|
-
args: [
|
|
105
|
-
{ name: "chain-id_", type: "uint128" },
|
|
106
|
-
{ name: "token-address", type: { buffer: { length: 32 } } },
|
|
107
|
-
],
|
|
108
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
109
|
-
},
|
|
110
|
-
addPool: {
|
|
111
|
-
name: "add-pool",
|
|
112
|
-
access: "public",
|
|
113
|
-
args: [
|
|
114
|
-
{ name: "pool-ref", type: "trait_reference" },
|
|
115
|
-
{ name: "ft-ref", type: "trait_reference" },
|
|
116
|
-
],
|
|
117
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
118
|
-
},
|
|
119
|
-
getTransactionCost: {
|
|
120
|
-
name: "get-transaction-cost",
|
|
121
|
-
access: "public",
|
|
122
|
-
args: [
|
|
123
|
-
{ name: "gas-oracle-ref", type: "trait_reference" },
|
|
124
|
-
{ name: "chain-id_", type: "uint128" },
|
|
125
|
-
],
|
|
126
|
-
outputs: { type: { response: { ok: "uint128", error: "uint128" } } },
|
|
127
|
-
},
|
|
128
|
-
init: {
|
|
129
|
-
name: "init",
|
|
130
|
-
access: "public",
|
|
131
|
-
args: [
|
|
132
|
-
{ name: "this-chain-id_", type: "uint128" },
|
|
133
|
-
{ name: "gas-oracle", type: "principal" },
|
|
134
|
-
],
|
|
135
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
136
|
-
},
|
|
137
|
-
receiveTokens: {
|
|
138
|
-
name: "receive-tokens",
|
|
139
|
-
access: "public",
|
|
140
|
-
args: [
|
|
141
|
-
{ name: "messenger-ref", type: "trait_reference" },
|
|
142
|
-
{ name: "amount", type: "uint128" },
|
|
143
|
-
{ name: "recipient", type: "principal" },
|
|
144
|
-
{ name: "source-chain-id", type: "uint128" },
|
|
145
|
-
{ name: "pool-ref", type: "trait_reference" },
|
|
146
|
-
{ name: "ft-ref", type: "trait_reference" },
|
|
147
|
-
{ name: "nonce", type: { buffer: { length: 32 } } },
|
|
148
|
-
{ name: "messenger-id", type: "uint128" },
|
|
149
|
-
{ name: "receive-amount-min", type: "uint128" },
|
|
150
|
-
{ name: "extra-gas", type: "uint128" },
|
|
151
|
-
],
|
|
152
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
153
|
-
},
|
|
154
|
-
registerBridge: {
|
|
155
|
-
name: "register-bridge",
|
|
156
|
-
access: "public",
|
|
157
|
-
args: [
|
|
158
|
-
{ name: "chain-id_", type: "uint128" },
|
|
159
|
-
{ name: "bridge-address", type: { buffer: { length: 32 } } },
|
|
160
|
-
],
|
|
161
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
162
|
-
},
|
|
163
|
-
removeBridge: {
|
|
164
|
-
name: "remove-bridge",
|
|
165
|
-
access: "public",
|
|
166
|
-
args: [{ name: "chain-id_", type: "uint128" }],
|
|
167
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
168
|
-
},
|
|
169
|
-
removeBridgeToken: {
|
|
170
|
-
name: "remove-bridge-token",
|
|
171
|
-
access: "public",
|
|
172
|
-
args: [
|
|
173
|
-
{ name: "chain-id_", type: "uint128" },
|
|
174
|
-
{ name: "token-address", type: { buffer: { length: 32 } } },
|
|
175
|
-
],
|
|
176
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
177
|
-
},
|
|
178
|
-
removeMessenger: {
|
|
179
|
-
name: "remove-messenger",
|
|
180
|
-
access: "public",
|
|
181
|
-
args: [{ name: "messenger-id", type: "uint128" }],
|
|
182
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
183
|
-
},
|
|
184
|
-
setGasUsage: {
|
|
185
|
-
name: "set-gas-usage",
|
|
186
|
-
access: "public",
|
|
187
|
-
args: [
|
|
188
|
-
{ name: "chain-id_", type: "uint128" },
|
|
189
|
-
{ name: "gas", type: "uint128" },
|
|
190
|
-
],
|
|
191
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
192
|
-
},
|
|
193
|
-
setMessenger: {
|
|
194
|
-
name: "set-messenger",
|
|
195
|
-
access: "public",
|
|
196
|
-
args: [
|
|
197
|
-
{ name: "messenger-id", type: "uint128" },
|
|
198
|
-
{ name: "new-messenger", type: "principal" },
|
|
199
|
-
],
|
|
200
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
201
|
-
},
|
|
202
|
-
setOwner: {
|
|
203
|
-
name: "set-owner",
|
|
204
|
-
access: "public",
|
|
205
|
-
args: [{ name: "new-owner", type: "principal" }],
|
|
206
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
207
|
-
},
|
|
208
|
-
setRebalancer: {
|
|
209
|
-
name: "set-rebalancer",
|
|
210
|
-
access: "public",
|
|
211
|
-
args: [{ name: "new-rebalancer", type: "principal" }],
|
|
212
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
213
|
-
},
|
|
214
|
-
setStopAuthority: {
|
|
215
|
-
name: "set-stop-authority",
|
|
216
|
-
access: "public",
|
|
217
|
-
args: [{ name: "new-authority", type: "principal" }],
|
|
218
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
219
|
-
},
|
|
220
|
-
startSwap: {
|
|
221
|
-
name: "start-swap",
|
|
222
|
-
access: "public",
|
|
223
|
-
args: [],
|
|
224
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
225
|
-
},
|
|
226
|
-
stopSwap: {
|
|
227
|
-
name: "stop-swap",
|
|
228
|
-
access: "public",
|
|
229
|
-
args: [],
|
|
230
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
231
|
-
},
|
|
232
|
-
swap: {
|
|
233
|
-
name: "swap",
|
|
234
|
-
access: "public",
|
|
235
|
-
args: [
|
|
236
|
-
{ name: "amount", type: "uint128" },
|
|
237
|
-
{ name: "send-pool-ref", type: "trait_reference" },
|
|
238
|
-
{ name: "send-ft-ref", type: "trait_reference" },
|
|
239
|
-
{ name: "receive-pool-ref", type: "trait_reference" },
|
|
240
|
-
{ name: "receive-ft-ref", type: "trait_reference" },
|
|
241
|
-
{ name: "recipient", type: "principal" },
|
|
242
|
-
{ name: "receive-amount-min", type: "uint128" },
|
|
243
|
-
],
|
|
244
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
245
|
-
},
|
|
246
|
-
swapAndBridge: {
|
|
247
|
-
name: "swap-and-bridge",
|
|
248
|
-
access: "public",
|
|
249
|
-
args: [
|
|
250
|
-
{ name: "pool-ref", type: "trait_reference" },
|
|
251
|
-
{ name: "ft-ref", type: "trait_reference" },
|
|
252
|
-
{ name: "messenger-ref", type: "trait_reference" },
|
|
253
|
-
{ name: "gas-oracle-ref", type: "trait_reference" },
|
|
254
|
-
{ name: "amount", type: "uint128" },
|
|
255
|
-
{ name: "recipient", type: { buffer: { length: 32 } } },
|
|
256
|
-
{ name: "destination-chain-id", type: "uint128" },
|
|
257
|
-
{ name: "receive-token", type: { buffer: { length: 32 } } },
|
|
258
|
-
{ name: "nonce", type: { buffer: { length: 32 } } },
|
|
259
|
-
{ name: "messenger-id", type: "uint128" },
|
|
260
|
-
{ name: "fee-native-amount", type: "uint128" },
|
|
261
|
-
{ name: "fee-token-amount", type: "uint128" },
|
|
262
|
-
],
|
|
263
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
264
|
-
},
|
|
265
|
-
withdrawBridgingFeeInTokens: {
|
|
266
|
-
name: "withdraw-bridging-fee-in-tokens",
|
|
267
|
-
access: "public",
|
|
268
|
-
args: [
|
|
269
|
-
{ name: "ft-ref", type: "trait_reference" },
|
|
270
|
-
{ name: "amount", type: "uint128" },
|
|
271
|
-
],
|
|
272
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
273
|
-
},
|
|
274
|
-
withdrawGasTokens: {
|
|
275
|
-
name: "withdraw-gas-tokens",
|
|
276
|
-
access: "public",
|
|
277
|
-
args: [{ name: "amount", type: "uint128" }],
|
|
278
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
279
|
-
},
|
|
280
|
-
getGasOracleAddress: {
|
|
281
|
-
name: "get-gas-oracle-address",
|
|
282
|
-
access: "read_only",
|
|
283
|
-
args: [],
|
|
284
|
-
outputs: { type: "principal" },
|
|
285
|
-
},
|
|
286
|
-
getGasUsage: {
|
|
287
|
-
name: "get-gas-usage",
|
|
288
|
-
access: "read_only",
|
|
289
|
-
args: [{ name: "chain-id_", type: "uint128" }],
|
|
290
|
-
outputs: { type: { response: { ok: "uint128", error: "uint128" } } },
|
|
291
|
-
},
|
|
292
|
-
getMessenger: {
|
|
293
|
-
name: "get-messenger",
|
|
294
|
-
access: "read_only",
|
|
295
|
-
args: [{ name: "messenger-id", type: "uint128" }],
|
|
296
|
-
outputs: { type: { response: { ok: "principal", error: "uint128" } } },
|
|
297
|
-
},
|
|
298
|
-
getOtherBridge: {
|
|
299
|
-
name: "get-other-bridge",
|
|
300
|
-
access: "read_only",
|
|
301
|
-
args: [{ name: "chain-id_", type: "uint128" }],
|
|
302
|
-
outputs: { type: { response: { ok: { buffer: { length: 32 } }, error: "uint128" } } },
|
|
303
|
-
},
|
|
304
|
-
getOwner: {
|
|
305
|
-
name: "get-owner",
|
|
306
|
-
access: "read_only",
|
|
307
|
-
args: [],
|
|
308
|
-
outputs: { type: "principal" },
|
|
309
|
-
},
|
|
310
|
-
getProcessedMessageStatus: {
|
|
311
|
-
name: "get-processed-message-status",
|
|
312
|
-
access: "read_only",
|
|
313
|
-
args: [{ name: "message-hash", type: { buffer: { length: 32 } } }],
|
|
314
|
-
outputs: { type: { response: { ok: "bool", error: "none" } } },
|
|
315
|
-
},
|
|
316
|
-
getRebalancer: {
|
|
317
|
-
name: "get-rebalancer",
|
|
318
|
-
access: "read_only",
|
|
319
|
-
args: [],
|
|
320
|
-
outputs: { type: "principal" },
|
|
321
|
-
},
|
|
322
|
-
getSentMessageStatus: {
|
|
323
|
-
name: "get-sent-message-status",
|
|
324
|
-
access: "read_only",
|
|
325
|
-
args: [{ name: "message-hash", type: { buffer: { length: 32 } } }],
|
|
326
|
-
outputs: { type: { response: { ok: "bool", error: "none" } } },
|
|
327
|
-
},
|
|
328
|
-
getStopAuthority: {
|
|
329
|
-
name: "get-stop-authority",
|
|
330
|
-
access: "read_only",
|
|
331
|
-
args: [],
|
|
332
|
-
outputs: { type: "principal" },
|
|
333
|
-
},
|
|
334
|
-
getThisChainId: {
|
|
335
|
-
name: "get-this-chain-id",
|
|
336
|
-
access: "read_only",
|
|
337
|
-
args: [],
|
|
338
|
-
outputs: { type: "uint128" },
|
|
339
|
-
},
|
|
340
|
-
getTokenInfo: {
|
|
341
|
-
name: "get-token-info",
|
|
342
|
-
access: "read_only",
|
|
343
|
-
args: [{ name: "token-principal-hash", type: { buffer: { length: 32 } } }],
|
|
344
|
-
outputs: {
|
|
345
|
-
type: {
|
|
346
|
-
response: {
|
|
347
|
-
ok: {
|
|
348
|
-
tuple: [
|
|
349
|
-
{ name: "bridging-fee-conversion-scaling-factor", type: "uint128" },
|
|
350
|
-
{ name: "from-gas-oracle-scaling-factor", type: "uint128" },
|
|
351
|
-
{ name: "pool", type: "principal" },
|
|
352
|
-
{ name: "token", type: "principal" },
|
|
353
|
-
],
|
|
354
|
-
},
|
|
355
|
-
error: "uint128",
|
|
356
|
-
},
|
|
357
|
-
},
|
|
358
|
-
},
|
|
359
|
-
},
|
|
360
|
-
isBridgeTokenSupported: {
|
|
361
|
-
name: "is-bridge-token-supported",
|
|
362
|
-
access: "read_only",
|
|
363
|
-
args: [
|
|
364
|
-
{ name: "chain-id_", type: "uint128" },
|
|
365
|
-
{ name: "token-address", type: { buffer: { length: 32 } } },
|
|
366
|
-
],
|
|
367
|
-
outputs: { type: { response: { ok: "bool", error: "none" } } },
|
|
368
|
-
},
|
|
369
|
-
isSwapEnabled: {
|
|
370
|
-
name: "is-swap-enabled",
|
|
371
|
-
access: "read_only",
|
|
372
|
-
args: [],
|
|
373
|
-
outputs: { type: "bool" },
|
|
374
|
-
},
|
|
375
|
-
},
|
|
376
|
-
maps: {
|
|
377
|
-
gasUsageMap: { name: "gas-usage-map", key: "uint128", value: "uint128" },
|
|
378
|
-
messengers: { name: "messengers", key: "uint128", value: "principal" },
|
|
379
|
-
otherBridgeTokens: {
|
|
380
|
-
name: "other-bridge-tokens",
|
|
381
|
-
key: {
|
|
382
|
-
tuple: [
|
|
383
|
-
{ name: "chain-id", type: "uint128" },
|
|
384
|
-
{ name: "token-address", type: { buffer: { length: 32 } } },
|
|
385
|
-
],
|
|
386
|
-
},
|
|
387
|
-
value: "bool",
|
|
388
|
-
},
|
|
389
|
-
otherBridges: { name: "other-bridges", key: "uint128", value: { buffer: { length: 32 } } },
|
|
390
|
-
processedMessages: { name: "processed-messages", key: { buffer: { length: 32 } }, value: "bool" },
|
|
391
|
-
sentMessages: { name: "sent-messages", key: { buffer: { length: 32 } }, value: "bool" },
|
|
392
|
-
tokenInfos: {
|
|
393
|
-
name: "token-infos",
|
|
394
|
-
key: { buffer: { length: 32 } },
|
|
395
|
-
value: {
|
|
396
|
-
tuple: [
|
|
397
|
-
{ name: "bridging-fee-conversion-scaling-factor", type: "uint128" },
|
|
398
|
-
{ name: "from-gas-oracle-scaling-factor", type: "uint128" },
|
|
399
|
-
{ name: "pool", type: "principal" },
|
|
400
|
-
{ name: "token", type: "principal" },
|
|
401
|
-
],
|
|
402
|
-
},
|
|
403
|
-
},
|
|
404
|
-
},
|
|
405
|
-
variables: {
|
|
406
|
-
chainPrecision: {
|
|
407
|
-
name: "chain-precision",
|
|
408
|
-
type: "uint128",
|
|
409
|
-
access: "constant",
|
|
410
|
-
},
|
|
411
|
-
errAlreadyInitialized: {
|
|
412
|
-
name: "err-already-initialized",
|
|
413
|
-
type: {
|
|
414
|
-
response: {
|
|
415
|
-
ok: "none",
|
|
416
|
-
error: "uint128",
|
|
417
|
-
},
|
|
418
|
-
},
|
|
419
|
-
access: "constant",
|
|
420
|
-
},
|
|
421
|
-
errAlreadyProcessed: {
|
|
422
|
-
name: "err-already-processed",
|
|
423
|
-
type: {
|
|
424
|
-
response: {
|
|
425
|
-
ok: "none",
|
|
426
|
-
error: "uint128",
|
|
427
|
-
},
|
|
428
|
-
},
|
|
429
|
-
access: "constant",
|
|
430
|
-
},
|
|
431
|
-
errAlreadySent: {
|
|
432
|
-
name: "err-already-sent",
|
|
433
|
-
type: {
|
|
434
|
-
response: {
|
|
435
|
-
ok: "none",
|
|
436
|
-
error: "uint128",
|
|
437
|
-
},
|
|
438
|
-
},
|
|
439
|
-
access: "constant",
|
|
440
|
-
},
|
|
441
|
-
errBridgeSourceNotRegistered: {
|
|
442
|
-
name: "err-bridge-source-not-registered",
|
|
443
|
-
type: {
|
|
444
|
-
response: {
|
|
445
|
-
ok: "none",
|
|
446
|
-
error: "uint128",
|
|
447
|
-
},
|
|
448
|
-
},
|
|
449
|
-
access: "constant",
|
|
450
|
-
},
|
|
451
|
-
errDepositAmountTooSmall: {
|
|
452
|
-
name: "err-deposit-amount-too-small",
|
|
453
|
-
type: {
|
|
454
|
-
response: {
|
|
455
|
-
ok: "none",
|
|
456
|
-
error: "uint128",
|
|
457
|
-
},
|
|
458
|
-
},
|
|
459
|
-
access: "constant",
|
|
460
|
-
},
|
|
461
|
-
errGasUsageNotSet: {
|
|
462
|
-
name: "err-gas-usage-not-set",
|
|
463
|
-
type: {
|
|
464
|
-
response: {
|
|
465
|
-
ok: "none",
|
|
466
|
-
error: "uint128",
|
|
467
|
-
},
|
|
468
|
-
},
|
|
469
|
-
access: "constant",
|
|
470
|
-
},
|
|
471
|
-
errMessengerNotRegistered: {
|
|
472
|
-
name: "err-messenger-not-registered",
|
|
473
|
-
type: {
|
|
474
|
-
response: {
|
|
475
|
-
ok: "none",
|
|
476
|
-
error: "uint128",
|
|
477
|
-
},
|
|
478
|
-
},
|
|
479
|
-
access: "constant",
|
|
480
|
-
},
|
|
481
|
-
errNoMessage: {
|
|
482
|
-
name: "err-no-message",
|
|
483
|
-
type: {
|
|
484
|
-
response: {
|
|
485
|
-
ok: "none",
|
|
486
|
-
error: "uint128",
|
|
487
|
-
},
|
|
488
|
-
},
|
|
489
|
-
access: "constant",
|
|
490
|
-
},
|
|
491
|
-
errNotEnoughFee: {
|
|
492
|
-
name: "err-not-enough-fee",
|
|
493
|
-
type: {
|
|
494
|
-
response: {
|
|
495
|
-
ok: "none",
|
|
496
|
-
error: "uint128",
|
|
497
|
-
},
|
|
498
|
-
},
|
|
499
|
-
access: "constant",
|
|
500
|
-
},
|
|
501
|
-
errNotInitialized: {
|
|
502
|
-
name: "err-not-initialized",
|
|
503
|
-
type: {
|
|
504
|
-
response: {
|
|
505
|
-
ok: "none",
|
|
506
|
-
error: "uint128",
|
|
507
|
-
},
|
|
508
|
-
},
|
|
509
|
-
access: "constant",
|
|
510
|
-
},
|
|
511
|
-
errSwapProhibited: {
|
|
512
|
-
name: "err-swap-prohibited",
|
|
513
|
-
type: {
|
|
514
|
-
response: {
|
|
515
|
-
ok: "none",
|
|
516
|
-
error: "uint128",
|
|
517
|
-
},
|
|
518
|
-
},
|
|
519
|
-
access: "constant",
|
|
520
|
-
},
|
|
521
|
-
errTokenNotSupported: {
|
|
522
|
-
name: "err-token-not-supported",
|
|
523
|
-
type: {
|
|
524
|
-
response: {
|
|
525
|
-
ok: "none",
|
|
526
|
-
error: "uint128",
|
|
527
|
-
},
|
|
528
|
-
},
|
|
529
|
-
access: "constant",
|
|
530
|
-
},
|
|
531
|
-
errUnauthorized: {
|
|
532
|
-
name: "err-unauthorized",
|
|
533
|
-
type: {
|
|
534
|
-
response: {
|
|
535
|
-
ok: "none",
|
|
536
|
-
error: "uint128",
|
|
537
|
-
},
|
|
538
|
-
},
|
|
539
|
-
access: "constant",
|
|
540
|
-
},
|
|
541
|
-
errWrongGasOracle: {
|
|
542
|
-
name: "err-wrong-gas-oracle",
|
|
543
|
-
type: {
|
|
544
|
-
response: {
|
|
545
|
-
ok: "none",
|
|
546
|
-
error: "uint128",
|
|
547
|
-
},
|
|
548
|
-
},
|
|
549
|
-
access: "constant",
|
|
550
|
-
},
|
|
551
|
-
errWrongMessenger: {
|
|
552
|
-
name: "err-wrong-messenger",
|
|
553
|
-
type: {
|
|
554
|
-
response: {
|
|
555
|
-
ok: "none",
|
|
556
|
-
error: "uint128",
|
|
557
|
-
},
|
|
558
|
-
},
|
|
559
|
-
access: "constant",
|
|
560
|
-
},
|
|
561
|
-
errWrongTokenForPool: {
|
|
562
|
-
name: "err-wrong-token-for-pool",
|
|
563
|
-
type: {
|
|
564
|
-
response: {
|
|
565
|
-
ok: "none",
|
|
566
|
-
error: "uint128",
|
|
567
|
-
},
|
|
568
|
-
},
|
|
569
|
-
access: "constant",
|
|
570
|
-
},
|
|
571
|
-
oraclePrecision: {
|
|
572
|
-
name: "oracle-precision",
|
|
573
|
-
type: "uint128",
|
|
574
|
-
access: "constant",
|
|
575
|
-
},
|
|
576
|
-
canSwap: {
|
|
577
|
-
name: "can-swap",
|
|
578
|
-
type: "bool",
|
|
579
|
-
access: "variable",
|
|
580
|
-
},
|
|
581
|
-
gasOraclePrincipal: {
|
|
582
|
-
name: "gas-oracle-principal",
|
|
583
|
-
type: {
|
|
584
|
-
optional: "principal",
|
|
585
|
-
},
|
|
586
|
-
access: "variable",
|
|
587
|
-
},
|
|
588
|
-
owner: {
|
|
589
|
-
name: "owner",
|
|
590
|
-
type: "principal",
|
|
591
|
-
access: "variable",
|
|
592
|
-
},
|
|
593
|
-
rebalancer: {
|
|
594
|
-
name: "rebalancer",
|
|
595
|
-
type: "principal",
|
|
596
|
-
access: "variable",
|
|
597
|
-
},
|
|
598
|
-
stopAuthority: {
|
|
599
|
-
name: "stop-authority",
|
|
600
|
-
type: "principal",
|
|
601
|
-
access: "variable",
|
|
602
|
-
},
|
|
603
|
-
thisChainId: {
|
|
604
|
-
name: "this-chain-id",
|
|
605
|
-
type: {
|
|
606
|
-
optional: "uint128",
|
|
607
|
-
},
|
|
608
|
-
access: "variable",
|
|
609
|
-
},
|
|
610
|
-
},
|
|
611
|
-
constants: {
|
|
612
|
-
canSwap: false,
|
|
613
|
-
chainPrecision: 6n,
|
|
614
|
-
errAlreadyInitialized: {
|
|
615
|
-
isOk: false,
|
|
616
|
-
value: 1004n,
|
|
617
|
-
},
|
|
618
|
-
errAlreadyProcessed: {
|
|
619
|
-
isOk: false,
|
|
620
|
-
value: 1010n,
|
|
621
|
-
},
|
|
622
|
-
errAlreadySent: {
|
|
623
|
-
isOk: false,
|
|
624
|
-
value: 1005n,
|
|
625
|
-
},
|
|
626
|
-
errBridgeSourceNotRegistered: {
|
|
627
|
-
isOk: false,
|
|
628
|
-
value: 1009n,
|
|
629
|
-
},
|
|
630
|
-
errDepositAmountTooSmall: {
|
|
631
|
-
isOk: false,
|
|
632
|
-
value: 1001n,
|
|
633
|
-
},
|
|
634
|
-
errGasUsageNotSet: {
|
|
635
|
-
isOk: false,
|
|
636
|
-
value: 1008n,
|
|
637
|
-
},
|
|
638
|
-
errMessengerNotRegistered: {
|
|
639
|
-
isOk: false,
|
|
640
|
-
value: 1014n,
|
|
641
|
-
},
|
|
642
|
-
errNoMessage: {
|
|
643
|
-
isOk: false,
|
|
644
|
-
value: 1011n,
|
|
645
|
-
},
|
|
646
|
-
errNotEnoughFee: {
|
|
647
|
-
isOk: false,
|
|
648
|
-
value: 1007n,
|
|
649
|
-
},
|
|
650
|
-
errNotInitialized: {
|
|
651
|
-
isOk: false,
|
|
652
|
-
value: 1006n,
|
|
653
|
-
},
|
|
654
|
-
errSwapProhibited: {
|
|
655
|
-
isOk: false,
|
|
656
|
-
value: 1012n,
|
|
657
|
-
},
|
|
658
|
-
errTokenNotSupported: {
|
|
659
|
-
isOk: false,
|
|
660
|
-
value: 1002n,
|
|
661
|
-
},
|
|
662
|
-
errUnauthorized: {
|
|
663
|
-
isOk: false,
|
|
664
|
-
value: 1000n,
|
|
665
|
-
},
|
|
666
|
-
errWrongGasOracle: {
|
|
667
|
-
isOk: false,
|
|
668
|
-
value: 1013n,
|
|
669
|
-
},
|
|
670
|
-
errWrongMessenger: {
|
|
671
|
-
isOk: false,
|
|
672
|
-
value: 1015n,
|
|
673
|
-
},
|
|
674
|
-
errWrongTokenForPool: {
|
|
675
|
-
isOk: false,
|
|
676
|
-
value: 1003n,
|
|
677
|
-
},
|
|
678
|
-
gasOraclePrincipal: null,
|
|
679
|
-
oraclePrecision: 18n,
|
|
680
|
-
owner: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM",
|
|
681
|
-
rebalancer: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM",
|
|
682
|
-
stopAuthority: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM",
|
|
683
|
-
thisChainId: null,
|
|
684
|
-
},
|
|
685
|
-
non_fungible_tokens: [],
|
|
686
|
-
fungible_tokens: [],
|
|
687
|
-
epoch: "Epoch31",
|
|
688
|
-
clarity_version: "Clarity3",
|
|
689
|
-
contractName: "bridge",
|
|
690
|
-
},
|
|
691
|
-
ftToken: {
|
|
692
|
-
functions: {
|
|
693
|
-
getTokenUri: {
|
|
694
|
-
name: "get-token-uri",
|
|
695
|
-
access: "public",
|
|
696
|
-
args: [],
|
|
697
|
-
outputs: { type: { response: { ok: { optional: { "string-utf8": { length: 19 } } }, error: "none" } } },
|
|
698
|
-
},
|
|
699
|
-
mint: {
|
|
700
|
-
name: "mint",
|
|
701
|
-
access: "public",
|
|
702
|
-
args: [
|
|
703
|
-
{ name: "amount", type: "uint128" },
|
|
704
|
-
{ name: "recipient", type: "principal" },
|
|
705
|
-
],
|
|
706
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
707
|
-
},
|
|
708
|
-
transfer: {
|
|
709
|
-
name: "transfer",
|
|
710
|
-
access: "public",
|
|
711
|
-
args: [
|
|
712
|
-
{ name: "amount", type: "uint128" },
|
|
713
|
-
{ name: "sender", type: "principal" },
|
|
714
|
-
{ name: "recipient", type: "principal" },
|
|
715
|
-
{ name: "memo", type: { optional: { buffer: { length: 34 } } } },
|
|
716
|
-
],
|
|
717
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
718
|
-
},
|
|
719
|
-
getBalance: {
|
|
720
|
-
name: "get-balance",
|
|
721
|
-
access: "read_only",
|
|
722
|
-
args: [{ name: "owner", type: "principal" }],
|
|
723
|
-
outputs: { type: { response: { ok: "uint128", error: "none" } } },
|
|
724
|
-
},
|
|
725
|
-
getDecimals: {
|
|
726
|
-
name: "get-decimals",
|
|
727
|
-
access: "read_only",
|
|
728
|
-
args: [],
|
|
729
|
-
outputs: { type: { response: { ok: "uint128", error: "none" } } },
|
|
730
|
-
},
|
|
731
|
-
getName: {
|
|
732
|
-
name: "get-name",
|
|
733
|
-
access: "read_only",
|
|
734
|
-
args: [],
|
|
735
|
-
outputs: { type: { response: { ok: { "string-ascii": { length: 13 } }, error: "none" } } },
|
|
736
|
-
},
|
|
737
|
-
getSymbol: {
|
|
738
|
-
name: "get-symbol",
|
|
739
|
-
access: "read_only",
|
|
740
|
-
args: [],
|
|
741
|
-
outputs: { type: { response: { ok: { "string-ascii": { length: 7 } }, error: "none" } } },
|
|
742
|
-
},
|
|
743
|
-
getTotalSupply: {
|
|
744
|
-
name: "get-total-supply",
|
|
745
|
-
access: "read_only",
|
|
746
|
-
args: [],
|
|
747
|
-
outputs: { type: { response: { ok: "uint128", error: "none" } } },
|
|
748
|
-
},
|
|
749
|
-
},
|
|
750
|
-
maps: {},
|
|
751
|
-
variables: {},
|
|
752
|
-
constants: {},
|
|
753
|
-
non_fungible_tokens: [],
|
|
754
|
-
fungible_tokens: [{ name: "example-token" }],
|
|
755
|
-
epoch: "Epoch31",
|
|
756
|
-
clarity_version: "Clarity3",
|
|
757
|
-
contractName: "ft-token",
|
|
758
|
-
},
|
|
759
|
-
gasOracle: {
|
|
760
|
-
functions: {
|
|
761
|
-
setChainData: {
|
|
762
|
-
name: "set-chain-data",
|
|
763
|
-
access: "public",
|
|
764
|
-
args: [
|
|
765
|
-
{ name: "chain-id_", type: "uint128" },
|
|
766
|
-
{ name: "new-price", type: "uint128" },
|
|
767
|
-
{ name: "new-gas-price", type: "uint128" },
|
|
768
|
-
],
|
|
769
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
770
|
-
},
|
|
771
|
-
setGasPrice: {
|
|
772
|
-
name: "set-gas-price",
|
|
773
|
-
access: "public",
|
|
774
|
-
args: [
|
|
775
|
-
{ name: "chain-id_", type: "uint128" },
|
|
776
|
-
{ name: "new-gas-price", type: "uint128" },
|
|
777
|
-
],
|
|
778
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
779
|
-
},
|
|
780
|
-
setPrice: {
|
|
781
|
-
name: "set-price",
|
|
782
|
-
access: "public",
|
|
783
|
-
args: [
|
|
784
|
-
{ name: "chain-id_", type: "uint128" },
|
|
785
|
-
{ name: "new-price", type: "uint128" },
|
|
786
|
-
],
|
|
787
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
788
|
-
},
|
|
789
|
-
crossRate: {
|
|
790
|
-
name: "cross-rate",
|
|
791
|
-
access: "read_only",
|
|
792
|
-
args: [{ name: "other-chain-id", type: "uint128" }],
|
|
793
|
-
outputs: { type: { response: { ok: "uint128", error: "uint128" } } },
|
|
794
|
-
},
|
|
795
|
-
getChainData: {
|
|
796
|
-
name: "get-chain-data",
|
|
797
|
-
access: "read_only",
|
|
798
|
-
args: [{ name: "chain-id_", type: "uint128" }],
|
|
799
|
-
outputs: {
|
|
800
|
-
type: {
|
|
801
|
-
response: {
|
|
802
|
-
ok: {
|
|
803
|
-
tuple: [
|
|
804
|
-
{ name: "gas-price", type: "uint128" },
|
|
805
|
-
{ name: "price", type: "uint128" },
|
|
806
|
-
],
|
|
807
|
-
},
|
|
808
|
-
error: "uint128",
|
|
809
|
-
},
|
|
810
|
-
},
|
|
811
|
-
},
|
|
812
|
-
},
|
|
813
|
-
getGasPrice: {
|
|
814
|
-
name: "get-gas-price",
|
|
815
|
-
access: "read_only",
|
|
816
|
-
args: [{ name: "chain-id_", type: "uint128" }],
|
|
817
|
-
outputs: { type: { response: { ok: "uint128", error: "uint128" } } },
|
|
818
|
-
},
|
|
819
|
-
getPrice: {
|
|
820
|
-
name: "get-price",
|
|
821
|
-
access: "read_only",
|
|
822
|
-
args: [{ name: "chain-id_", type: "uint128" }],
|
|
823
|
-
outputs: { type: { response: { ok: "uint128", error: "uint128" } } },
|
|
824
|
-
},
|
|
825
|
-
getTransactionGasCostInNativeToken: {
|
|
826
|
-
name: "get-transaction-gas-cost-in-native-token",
|
|
827
|
-
access: "read_only",
|
|
828
|
-
args: [
|
|
829
|
-
{ name: "other-chain-id", type: "uint128" },
|
|
830
|
-
{ name: "gas-amount", type: "uint128" },
|
|
831
|
-
],
|
|
832
|
-
outputs: { type: { response: { ok: "uint128", error: "uint128" } } },
|
|
833
|
-
},
|
|
834
|
-
getTransactionGasCostInUsd: {
|
|
835
|
-
name: "get-transaction-gas-cost-in-usd",
|
|
836
|
-
access: "read_only",
|
|
837
|
-
args: [
|
|
838
|
-
{ name: "other-chain-id", type: "uint128" },
|
|
839
|
-
{ name: "gas-amount", type: "uint128" },
|
|
840
|
-
],
|
|
841
|
-
outputs: { type: { response: { ok: "uint128", error: "uint128" } } },
|
|
842
|
-
},
|
|
843
|
-
},
|
|
844
|
-
maps: {
|
|
845
|
-
chainData: {
|
|
846
|
-
name: "chain-data",
|
|
847
|
-
key: "uint128",
|
|
848
|
-
value: {
|
|
849
|
-
tuple: [
|
|
850
|
-
{ name: "gas-price", type: "uint128" },
|
|
851
|
-
{ name: "price", type: "uint128" },
|
|
852
|
-
],
|
|
853
|
-
},
|
|
854
|
-
},
|
|
855
|
-
},
|
|
856
|
-
variables: {
|
|
857
|
-
errNotFound: {
|
|
858
|
-
name: "err-not-found",
|
|
859
|
-
type: {
|
|
860
|
-
response: {
|
|
861
|
-
ok: "none",
|
|
862
|
-
error: "uint128",
|
|
863
|
-
},
|
|
864
|
-
},
|
|
865
|
-
access: "constant",
|
|
866
|
-
},
|
|
867
|
-
errUnauthorized: {
|
|
868
|
-
name: "err-unauthorized",
|
|
869
|
-
type: {
|
|
870
|
-
response: {
|
|
871
|
-
ok: "none",
|
|
872
|
-
error: "uint128",
|
|
873
|
-
},
|
|
874
|
-
},
|
|
875
|
-
access: "constant",
|
|
876
|
-
},
|
|
877
|
-
oracleScalingFactor: {
|
|
878
|
-
name: "oracle-scaling-factor",
|
|
879
|
-
type: "uint128",
|
|
880
|
-
access: "constant",
|
|
881
|
-
},
|
|
882
|
-
contractOwner: {
|
|
883
|
-
name: "contract-owner",
|
|
884
|
-
type: "principal",
|
|
885
|
-
access: "variable",
|
|
886
|
-
},
|
|
887
|
-
fromOracleToChainScalingFactor: {
|
|
888
|
-
name: "from-oracle-to-chain-scaling-factor",
|
|
889
|
-
type: "uint128",
|
|
890
|
-
access: "variable",
|
|
891
|
-
},
|
|
892
|
-
thisChainId: {
|
|
893
|
-
name: "this-chain-id",
|
|
894
|
-
type: "uint128",
|
|
895
|
-
access: "variable",
|
|
896
|
-
},
|
|
897
|
-
},
|
|
898
|
-
constants: {
|
|
899
|
-
contractOwner: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM",
|
|
900
|
-
errNotFound: {
|
|
901
|
-
isOk: false,
|
|
902
|
-
value: 4001n,
|
|
903
|
-
},
|
|
904
|
-
errUnauthorized: {
|
|
905
|
-
isOk: false,
|
|
906
|
-
value: 4000n,
|
|
907
|
-
},
|
|
908
|
-
fromOracleToChainScalingFactor: 1000000000000n,
|
|
909
|
-
oracleScalingFactor: 1000000000000000000n,
|
|
910
|
-
thisChainId: 16n,
|
|
911
|
-
},
|
|
912
|
-
non_fungible_tokens: [],
|
|
913
|
-
fungible_tokens: [],
|
|
914
|
-
epoch: "Epoch31",
|
|
915
|
-
clarity_version: "Clarity3",
|
|
916
|
-
contractName: "gas-oracle",
|
|
917
|
-
},
|
|
918
|
-
gasOracleTrait: {
|
|
919
|
-
functions: {},
|
|
920
|
-
maps: {},
|
|
921
|
-
variables: {},
|
|
922
|
-
constants: {},
|
|
923
|
-
non_fungible_tokens: [],
|
|
924
|
-
fungible_tokens: [],
|
|
925
|
-
epoch: "Epoch31",
|
|
926
|
-
clarity_version: "Clarity3",
|
|
927
|
-
contractName: "gas-oracle-trait",
|
|
928
|
-
},
|
|
929
|
-
messenger: {
|
|
930
|
-
functions: {
|
|
931
|
-
assertGasOracle: {
|
|
932
|
-
name: "assert-gas-oracle",
|
|
933
|
-
access: "private",
|
|
934
|
-
args: [{ name: "gas-oracle-ref", type: "trait_reference" }],
|
|
935
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
936
|
-
},
|
|
937
|
-
onlyOwner: {
|
|
938
|
-
name: "only-owner",
|
|
939
|
-
access: "private",
|
|
940
|
-
args: [],
|
|
941
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
942
|
-
},
|
|
943
|
-
addSecondaryValidator: {
|
|
944
|
-
name: "add-secondary-validator",
|
|
945
|
-
access: "public",
|
|
946
|
-
args: [{ name: "val", type: { buffer: { length: 33 } } }],
|
|
947
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
948
|
-
},
|
|
949
|
-
getTransactionCost: {
|
|
950
|
-
name: "get-transaction-cost",
|
|
951
|
-
access: "public",
|
|
952
|
-
args: [
|
|
953
|
-
{ name: "gas-oracle-ref", type: "trait_reference" },
|
|
954
|
-
{ name: "chain-id_", type: "uint128" },
|
|
955
|
-
],
|
|
956
|
-
outputs: { type: { response: { ok: "uint128", error: "uint128" } } },
|
|
957
|
-
},
|
|
958
|
-
init: {
|
|
959
|
-
name: "init",
|
|
960
|
-
access: "public",
|
|
961
|
-
args: [
|
|
962
|
-
{ name: "this-chain-id_", type: "uint128" },
|
|
963
|
-
{ name: "gas-oracle", type: "principal" },
|
|
964
|
-
],
|
|
965
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
966
|
-
},
|
|
967
|
-
receiveMessage: {
|
|
968
|
-
name: "receive-message",
|
|
969
|
-
access: "public",
|
|
970
|
-
args: [
|
|
971
|
-
{ name: "message", type: { buffer: { length: 32 } } },
|
|
972
|
-
{ name: "signature1", type: { buffer: { length: 65 } } },
|
|
973
|
-
{ name: "signature2", type: { buffer: { length: 65 } } },
|
|
974
|
-
],
|
|
975
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
976
|
-
},
|
|
977
|
-
removeSecondaryValidator: {
|
|
978
|
-
name: "remove-secondary-validator",
|
|
979
|
-
access: "public",
|
|
980
|
-
args: [{ name: "val", type: { buffer: { length: 33 } } }],
|
|
981
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
982
|
-
},
|
|
983
|
-
sendMessage: {
|
|
984
|
-
name: "send-message",
|
|
985
|
-
access: "public",
|
|
986
|
-
args: [
|
|
987
|
-
{ name: "gas-oracle-ref", type: "trait_reference" },
|
|
988
|
-
{ name: "message", type: { buffer: { length: 32 } } },
|
|
989
|
-
],
|
|
990
|
-
outputs: { type: { response: { ok: "uint128", error: "uint128" } } },
|
|
991
|
-
},
|
|
992
|
-
setGasUsage: {
|
|
993
|
-
name: "set-gas-usage",
|
|
994
|
-
access: "public",
|
|
995
|
-
args: [
|
|
996
|
-
{ name: "chain-id_", type: "uint128" },
|
|
997
|
-
{ name: "gas", type: "uint128" },
|
|
998
|
-
],
|
|
999
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
1000
|
-
},
|
|
1001
|
-
setOtherChainIds: {
|
|
1002
|
-
name: "set-other-chain-ids",
|
|
1003
|
-
access: "public",
|
|
1004
|
-
args: [{ name: "value", type: { buffer: { length: 32 } } }],
|
|
1005
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
1006
|
-
},
|
|
1007
|
-
setPrimaryValidator: {
|
|
1008
|
-
name: "set-primary-validator",
|
|
1009
|
-
access: "public",
|
|
1010
|
-
args: [{ name: "val", type: { buffer: { length: 33 } } }],
|
|
1011
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
1012
|
-
},
|
|
1013
|
-
withdrawGasTokens: {
|
|
1014
|
-
name: "withdraw-gas-tokens",
|
|
1015
|
-
access: "public",
|
|
1016
|
-
args: [{ name: "amount", type: "uint128" }],
|
|
1017
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
1018
|
-
},
|
|
1019
|
-
getGasOracle: {
|
|
1020
|
-
name: "get-gas-oracle",
|
|
1021
|
-
access: "read_only",
|
|
1022
|
-
args: [],
|
|
1023
|
-
outputs: { type: { response: { ok: "principal", error: "uint128" } } },
|
|
1024
|
-
},
|
|
1025
|
-
getGasUsage: {
|
|
1026
|
-
name: "get-gas-usage",
|
|
1027
|
-
access: "read_only",
|
|
1028
|
-
args: [{ name: "chain-id_", type: "uint128" }],
|
|
1029
|
-
outputs: { type: { response: { ok: "uint128", error: "uint128" } } },
|
|
1030
|
-
},
|
|
1031
|
-
getOtherChainIds: {
|
|
1032
|
-
name: "get-other-chain-ids",
|
|
1033
|
-
access: "read_only",
|
|
1034
|
-
args: [],
|
|
1035
|
-
outputs: { type: { response: { ok: { buffer: { length: 32 } }, error: "none" } } },
|
|
1036
|
-
},
|
|
1037
|
-
getSentMessageBlock: {
|
|
1038
|
-
name: "get-sent-message-block",
|
|
1039
|
-
access: "read_only",
|
|
1040
|
-
args: [{ name: "message", type: { buffer: { length: 32 } } }],
|
|
1041
|
-
outputs: { type: { response: { ok: "uint128", error: "uint128" } } },
|
|
1042
|
-
},
|
|
1043
|
-
getThisChainId: {
|
|
1044
|
-
name: "get-this-chain-id",
|
|
1045
|
-
access: "read_only",
|
|
1046
|
-
args: [],
|
|
1047
|
-
outputs: { type: { response: { ok: "uint128", error: "uint128" } } },
|
|
1048
|
-
},
|
|
1049
|
-
isMessageReceived: {
|
|
1050
|
-
name: "is-message-received",
|
|
1051
|
-
access: "read_only",
|
|
1052
|
-
args: [{ name: "message", type: { buffer: { length: 32 } } }],
|
|
1053
|
-
outputs: { type: { response: { ok: "bool", error: "none" } } },
|
|
1054
|
-
},
|
|
1055
|
-
},
|
|
1056
|
-
maps: {
|
|
1057
|
-
gasUsageMap: { name: "gas-usage-map", key: "uint128", value: "uint128" },
|
|
1058
|
-
receivedMessages: { name: "received-messages", key: { buffer: { length: 32 } }, value: "bool" },
|
|
1059
|
-
secondaryValidators: {
|
|
1060
|
-
name: "secondary-validators",
|
|
1061
|
-
key: { buffer: { length: 33 } },
|
|
1062
|
-
value: "bool",
|
|
1063
|
-
},
|
|
1064
|
-
sentMessagesBlock: {
|
|
1065
|
-
name: "sent-messages-block",
|
|
1066
|
-
key: { buffer: { length: 32 } },
|
|
1067
|
-
value: "uint128",
|
|
1068
|
-
},
|
|
1069
|
-
},
|
|
1070
|
-
variables: {
|
|
1071
|
-
errAlreadyInitialized: {
|
|
1072
|
-
name: "err-already-initialized",
|
|
1073
|
-
type: {
|
|
1074
|
-
response: {
|
|
1075
|
-
ok: "none",
|
|
1076
|
-
error: "uint128",
|
|
1077
|
-
},
|
|
1078
|
-
},
|
|
1079
|
-
access: "constant",
|
|
1080
|
-
},
|
|
1081
|
-
errAlreadySent: {
|
|
1082
|
-
name: "err-already-sent",
|
|
1083
|
-
type: {
|
|
1084
|
-
response: {
|
|
1085
|
-
ok: "none",
|
|
1086
|
-
error: "uint128",
|
|
1087
|
-
},
|
|
1088
|
-
},
|
|
1089
|
-
access: "constant",
|
|
1090
|
-
},
|
|
1091
|
-
errGasUsageNotSet: {
|
|
1092
|
-
name: "err-gas-usage-not-set",
|
|
1093
|
-
type: {
|
|
1094
|
-
response: {
|
|
1095
|
-
ok: "none",
|
|
1096
|
-
error: "uint128",
|
|
1097
|
-
},
|
|
1098
|
-
},
|
|
1099
|
-
access: "constant",
|
|
1100
|
-
},
|
|
1101
|
-
errInvalidChainId: {
|
|
1102
|
-
name: "err-invalid-chain-id",
|
|
1103
|
-
type: {
|
|
1104
|
-
response: {
|
|
1105
|
-
ok: "none",
|
|
1106
|
-
error: "uint128",
|
|
1107
|
-
},
|
|
1108
|
-
},
|
|
1109
|
-
access: "constant",
|
|
1110
|
-
},
|
|
1111
|
-
errInvalidDestination: {
|
|
1112
|
-
name: "err-invalid-destination",
|
|
1113
|
-
type: {
|
|
1114
|
-
response: {
|
|
1115
|
-
ok: "none",
|
|
1116
|
-
error: "uint128",
|
|
1117
|
-
},
|
|
1118
|
-
},
|
|
1119
|
-
access: "constant",
|
|
1120
|
-
},
|
|
1121
|
-
errInvalidPrimary: {
|
|
1122
|
-
name: "err-invalid-primary",
|
|
1123
|
-
type: {
|
|
1124
|
-
response: {
|
|
1125
|
-
ok: "none",
|
|
1126
|
-
error: "uint128",
|
|
1127
|
-
},
|
|
1128
|
-
},
|
|
1129
|
-
access: "constant",
|
|
1130
|
-
},
|
|
1131
|
-
errInvalidSecondary: {
|
|
1132
|
-
name: "err-invalid-secondary",
|
|
1133
|
-
type: {
|
|
1134
|
-
response: {
|
|
1135
|
-
ok: "none",
|
|
1136
|
-
error: "uint128",
|
|
1137
|
-
},
|
|
1138
|
-
},
|
|
1139
|
-
access: "constant",
|
|
1140
|
-
},
|
|
1141
|
-
errMessageNotFound: {
|
|
1142
|
-
name: "err-message-not-found",
|
|
1143
|
-
type: {
|
|
1144
|
-
response: {
|
|
1145
|
-
ok: "none",
|
|
1146
|
-
error: "uint128",
|
|
1147
|
-
},
|
|
1148
|
-
},
|
|
1149
|
-
access: "constant",
|
|
1150
|
-
},
|
|
1151
|
-
errNotInitialized: {
|
|
1152
|
-
name: "err-not-initialized",
|
|
1153
|
-
type: {
|
|
1154
|
-
response: {
|
|
1155
|
-
ok: "none",
|
|
1156
|
-
error: "uint128",
|
|
1157
|
-
},
|
|
1158
|
-
},
|
|
1159
|
-
access: "constant",
|
|
1160
|
-
},
|
|
1161
|
-
errUnauthorized: {
|
|
1162
|
-
name: "err-unauthorized",
|
|
1163
|
-
type: {
|
|
1164
|
-
response: {
|
|
1165
|
-
ok: "none",
|
|
1166
|
-
error: "uint128",
|
|
1167
|
-
},
|
|
1168
|
-
},
|
|
1169
|
-
access: "constant",
|
|
1170
|
-
},
|
|
1171
|
-
errWrongBufferLength: {
|
|
1172
|
-
name: "err-wrong-buffer-length",
|
|
1173
|
-
type: {
|
|
1174
|
-
response: {
|
|
1175
|
-
ok: "none",
|
|
1176
|
-
error: "uint128",
|
|
1177
|
-
},
|
|
1178
|
-
},
|
|
1179
|
-
access: "constant",
|
|
1180
|
-
},
|
|
1181
|
-
errWrongGasOracle: {
|
|
1182
|
-
name: "err-wrong-gas-oracle",
|
|
1183
|
-
type: {
|
|
1184
|
-
response: {
|
|
1185
|
-
ok: "none",
|
|
1186
|
-
error: "uint128",
|
|
1187
|
-
},
|
|
1188
|
-
},
|
|
1189
|
-
access: "constant",
|
|
1190
|
-
},
|
|
1191
|
-
gasOraclePrincipal: {
|
|
1192
|
-
name: "gas-oracle-principal",
|
|
1193
|
-
type: {
|
|
1194
|
-
optional: "principal",
|
|
1195
|
-
},
|
|
1196
|
-
access: "variable",
|
|
1197
|
-
},
|
|
1198
|
-
otherChainIds: {
|
|
1199
|
-
name: "other-chain-ids",
|
|
1200
|
-
type: {
|
|
1201
|
-
buffer: {
|
|
1202
|
-
length: 32,
|
|
1203
|
-
},
|
|
1204
|
-
},
|
|
1205
|
-
access: "variable",
|
|
1206
|
-
},
|
|
1207
|
-
owner: {
|
|
1208
|
-
name: "owner",
|
|
1209
|
-
type: "principal",
|
|
1210
|
-
access: "variable",
|
|
1211
|
-
},
|
|
1212
|
-
primaryValidator: {
|
|
1213
|
-
name: "primary-validator",
|
|
1214
|
-
type: {
|
|
1215
|
-
buffer: {
|
|
1216
|
-
length: 33,
|
|
1217
|
-
},
|
|
1218
|
-
},
|
|
1219
|
-
access: "variable",
|
|
1220
|
-
},
|
|
1221
|
-
thisChainId: {
|
|
1222
|
-
name: "this-chain-id",
|
|
1223
|
-
type: {
|
|
1224
|
-
optional: "uint128",
|
|
1225
|
-
},
|
|
1226
|
-
access: "variable",
|
|
1227
|
-
},
|
|
1228
|
-
},
|
|
1229
|
-
constants: {
|
|
1230
|
-
errAlreadyInitialized: {
|
|
1231
|
-
isOk: false,
|
|
1232
|
-
value: 3008n,
|
|
1233
|
-
},
|
|
1234
|
-
errAlreadySent: {
|
|
1235
|
-
isOk: false,
|
|
1236
|
-
value: 3003n,
|
|
1237
|
-
},
|
|
1238
|
-
errGasUsageNotSet: {
|
|
1239
|
-
isOk: false,
|
|
1240
|
-
value: 3010n,
|
|
1241
|
-
},
|
|
1242
|
-
errInvalidChainId: {
|
|
1243
|
-
isOk: false,
|
|
1244
|
-
value: 3002n,
|
|
1245
|
-
},
|
|
1246
|
-
errInvalidDestination: {
|
|
1247
|
-
isOk: false,
|
|
1248
|
-
value: 3004n,
|
|
1249
|
-
},
|
|
1250
|
-
errInvalidPrimary: {
|
|
1251
|
-
isOk: false,
|
|
1252
|
-
value: 3005n,
|
|
1253
|
-
},
|
|
1254
|
-
errInvalidSecondary: {
|
|
1255
|
-
isOk: false,
|
|
1256
|
-
value: 3006n,
|
|
1257
|
-
},
|
|
1258
|
-
errMessageNotFound: {
|
|
1259
|
-
isOk: false,
|
|
1260
|
-
value: 3001n,
|
|
1261
|
-
},
|
|
1262
|
-
errNotInitialized: {
|
|
1263
|
-
isOk: false,
|
|
1264
|
-
value: 3011n,
|
|
1265
|
-
},
|
|
1266
|
-
errUnauthorized: {
|
|
1267
|
-
isOk: false,
|
|
1268
|
-
value: 3000n,
|
|
1269
|
-
},
|
|
1270
|
-
errWrongBufferLength: {
|
|
1271
|
-
isOk: false,
|
|
1272
|
-
value: 3009n,
|
|
1273
|
-
},
|
|
1274
|
-
errWrongGasOracle: {
|
|
1275
|
-
isOk: false,
|
|
1276
|
-
value: 3007n,
|
|
1277
|
-
},
|
|
1278
|
-
gasOraclePrincipal: null,
|
|
1279
|
-
otherChainIds: Uint8Array.from([
|
|
1280
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
1281
|
-
]),
|
|
1282
|
-
owner: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM",
|
|
1283
|
-
primaryValidator: Uint8Array.from([
|
|
1284
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
1285
|
-
]),
|
|
1286
|
-
thisChainId: null,
|
|
1287
|
-
},
|
|
1288
|
-
non_fungible_tokens: [],
|
|
1289
|
-
fungible_tokens: [],
|
|
1290
|
-
epoch: "Epoch31",
|
|
1291
|
-
clarity_version: "Clarity3",
|
|
1292
|
-
contractName: "messenger",
|
|
1293
|
-
},
|
|
1294
|
-
messengerTrait: {
|
|
1295
|
-
functions: {},
|
|
1296
|
-
maps: {},
|
|
1297
|
-
variables: {},
|
|
1298
|
-
constants: {},
|
|
1299
|
-
non_fungible_tokens: [],
|
|
1300
|
-
fungible_tokens: [],
|
|
1301
|
-
epoch: "Epoch31",
|
|
1302
|
-
clarity_version: "Clarity3",
|
|
1303
|
-
contractName: "messenger-trait",
|
|
1304
|
-
},
|
|
1305
|
-
pool: {
|
|
1306
|
-
functions: {
|
|
1307
|
-
addRewards: {
|
|
1308
|
-
name: "add-rewards",
|
|
1309
|
-
access: "private",
|
|
1310
|
-
args: [{ name: "amount", type: "uint128" }],
|
|
1311
|
-
outputs: { type: { response: { ok: "bool", error: "none" } } },
|
|
1312
|
-
},
|
|
1313
|
-
assertBalanceReatio: {
|
|
1314
|
-
name: "assert-balance-reatio",
|
|
1315
|
-
access: "private",
|
|
1316
|
-
args: [],
|
|
1317
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
1318
|
-
},
|
|
1319
|
-
assertCanDeposit: {
|
|
1320
|
-
name: "assert-can-deposit",
|
|
1321
|
-
access: "private",
|
|
1322
|
-
args: [],
|
|
1323
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
1324
|
-
},
|
|
1325
|
-
assertCanSwap: {
|
|
1326
|
-
name: "assert-can-swap",
|
|
1327
|
-
access: "private",
|
|
1328
|
-
args: [],
|
|
1329
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
1330
|
-
},
|
|
1331
|
-
assertCanWithdraw: {
|
|
1332
|
-
name: "assert-can-withdraw",
|
|
1333
|
-
access: "private",
|
|
1334
|
-
args: [],
|
|
1335
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
1336
|
-
},
|
|
1337
|
-
assertToken: {
|
|
1338
|
-
name: "assert-token",
|
|
1339
|
-
access: "private",
|
|
1340
|
-
args: [{ name: "ft-ref", type: "trait_reference" }],
|
|
1341
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
1342
|
-
},
|
|
1343
|
-
depositLp: {
|
|
1344
|
-
name: "deposit-lp",
|
|
1345
|
-
access: "private",
|
|
1346
|
-
args: [
|
|
1347
|
-
{ name: "ft-ref", type: "trait_reference" },
|
|
1348
|
-
{ name: "to", type: "principal" },
|
|
1349
|
-
{ name: "lp-amount", type: "uint128" },
|
|
1350
|
-
],
|
|
1351
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
1352
|
-
},
|
|
1353
|
-
leCube_q: {
|
|
1354
|
-
name: "le-cube?",
|
|
1355
|
-
access: "private",
|
|
1356
|
-
args: [
|
|
1357
|
-
{ name: "x", type: "uint128" },
|
|
1358
|
-
{ name: "n", type: "uint128" },
|
|
1359
|
-
],
|
|
1360
|
-
outputs: { type: "bool" },
|
|
1361
|
-
},
|
|
1362
|
-
newtonStep: {
|
|
1363
|
-
name: "newton-step",
|
|
1364
|
-
access: "private",
|
|
1365
|
-
args: [
|
|
1366
|
-
{ name: "n", type: "uint128" },
|
|
1367
|
-
{ name: "x", type: "uint128" },
|
|
1368
|
-
],
|
|
1369
|
-
outputs: { type: "uint128" },
|
|
1370
|
-
},
|
|
1371
|
-
onlyBridge: {
|
|
1372
|
-
name: "only-bridge",
|
|
1373
|
-
access: "private",
|
|
1374
|
-
args: [],
|
|
1375
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
1376
|
-
},
|
|
1377
|
-
onlyOwner: {
|
|
1378
|
-
name: "only-owner",
|
|
1379
|
-
access: "private",
|
|
1380
|
-
args: [],
|
|
1381
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
1382
|
-
},
|
|
1383
|
-
onlyStopAuthority: {
|
|
1384
|
-
name: "only-stop-authority",
|
|
1385
|
-
access: "private",
|
|
1386
|
-
args: [],
|
|
1387
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
1388
|
-
},
|
|
1389
|
-
refine: {
|
|
1390
|
-
name: "refine",
|
|
1391
|
-
access: "private",
|
|
1392
|
-
args: [
|
|
1393
|
-
{ name: "n", type: "uint128" },
|
|
1394
|
-
{ name: "x", type: "uint128" },
|
|
1395
|
-
],
|
|
1396
|
-
outputs: { type: "uint128" },
|
|
1397
|
-
},
|
|
1398
|
-
withdrawLp: {
|
|
1399
|
-
name: "withdraw-lp",
|
|
1400
|
-
access: "private",
|
|
1401
|
-
args: [
|
|
1402
|
-
{ name: "ft-ref", type: "trait_reference" },
|
|
1403
|
-
{ name: "from", type: "principal" },
|
|
1404
|
-
{ name: "lp-amount", type: "uint128" },
|
|
1405
|
-
],
|
|
1406
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
1407
|
-
},
|
|
1408
|
-
adjustTotalLpAmount: {
|
|
1409
|
-
name: "adjust-total-lp-amount",
|
|
1410
|
-
access: "public",
|
|
1411
|
-
args: [{ name: "ft-ref", type: "trait_reference" }],
|
|
1412
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
1413
|
-
},
|
|
1414
|
-
claimAdminFee: {
|
|
1415
|
-
name: "claim-admin-fee",
|
|
1416
|
-
access: "public",
|
|
1417
|
-
args: [{ name: "ft-ref", type: "trait_reference" }],
|
|
1418
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
1419
|
-
},
|
|
1420
|
-
claimRewards: {
|
|
1421
|
-
name: "claim-rewards",
|
|
1422
|
-
access: "public",
|
|
1423
|
-
args: [{ name: "ft-ref", type: "trait_reference" }],
|
|
1424
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
1425
|
-
},
|
|
1426
|
-
deposit: {
|
|
1427
|
-
name: "deposit",
|
|
1428
|
-
access: "public",
|
|
1429
|
-
args: [
|
|
1430
|
-
{ name: "amount", type: "uint128" },
|
|
1431
|
-
{ name: "ft-ref", type: "trait_reference" },
|
|
1432
|
-
],
|
|
1433
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
1434
|
-
},
|
|
1435
|
-
init: {
|
|
1436
|
-
name: "init",
|
|
1437
|
-
access: "public",
|
|
1438
|
-
args: [
|
|
1439
|
-
{ name: "token", type: "trait_reference" },
|
|
1440
|
-
{ name: "bridge-address", type: "principal" },
|
|
1441
|
-
{ name: "fee-share-bp-arg", type: "uint128" },
|
|
1442
|
-
{ name: "balance-ratio-min-bp-arg", type: "uint128" },
|
|
1443
|
-
],
|
|
1444
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
1445
|
-
},
|
|
1446
|
-
serBalanceRetioMinBp: {
|
|
1447
|
-
name: "ser-balance-retio-min-bp",
|
|
1448
|
-
access: "public",
|
|
1449
|
-
args: [{ name: "new-balance-ratio-min-bp", type: "uint128" }],
|
|
1450
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
1451
|
-
},
|
|
1452
|
-
setAdminFeeSahreBp: {
|
|
1453
|
-
name: "set-admin-fee-sahre-bp",
|
|
1454
|
-
access: "public",
|
|
1455
|
-
args: [{ name: "new-admin-fee-share-bp", type: "uint128" }],
|
|
1456
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
1457
|
-
},
|
|
1458
|
-
setBridge: {
|
|
1459
|
-
name: "set-bridge",
|
|
1460
|
-
access: "public",
|
|
1461
|
-
args: [{ name: "new-bridge", type: "principal" }],
|
|
1462
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
1463
|
-
},
|
|
1464
|
-
setFeeShare: {
|
|
1465
|
-
name: "set-fee-share",
|
|
1466
|
-
access: "public",
|
|
1467
|
-
args: [{ name: "fee-share-bp_", type: "uint128" }],
|
|
1468
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
1469
|
-
},
|
|
1470
|
-
setOwner: {
|
|
1471
|
-
name: "set-owner",
|
|
1472
|
-
access: "public",
|
|
1473
|
-
args: [{ name: "new-owner", type: "principal" }],
|
|
1474
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
1475
|
-
},
|
|
1476
|
-
setStopAuthority: {
|
|
1477
|
-
name: "set-stop-authority",
|
|
1478
|
-
access: "public",
|
|
1479
|
-
args: [{ name: "new-stop-authority", type: "principal" }],
|
|
1480
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
1481
|
-
},
|
|
1482
|
-
startDeposit: {
|
|
1483
|
-
name: "start-deposit",
|
|
1484
|
-
access: "public",
|
|
1485
|
-
args: [],
|
|
1486
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
1487
|
-
},
|
|
1488
|
-
startSwap: {
|
|
1489
|
-
name: "start-swap",
|
|
1490
|
-
access: "public",
|
|
1491
|
-
args: [],
|
|
1492
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
1493
|
-
},
|
|
1494
|
-
startWithdraw: {
|
|
1495
|
-
name: "start-withdraw",
|
|
1496
|
-
access: "public",
|
|
1497
|
-
args: [],
|
|
1498
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
1499
|
-
},
|
|
1500
|
-
stopDeposit: {
|
|
1501
|
-
name: "stop-deposit",
|
|
1502
|
-
access: "public",
|
|
1503
|
-
args: [],
|
|
1504
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
1505
|
-
},
|
|
1506
|
-
stopSwap: {
|
|
1507
|
-
name: "stop-swap",
|
|
1508
|
-
access: "public",
|
|
1509
|
-
args: [],
|
|
1510
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
1511
|
-
},
|
|
1512
|
-
stopWithdraw: {
|
|
1513
|
-
name: "stop-withdraw",
|
|
1514
|
-
access: "public",
|
|
1515
|
-
args: [],
|
|
1516
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
1517
|
-
},
|
|
1518
|
-
swapFromVusd: {
|
|
1519
|
-
name: "swap-from-vusd",
|
|
1520
|
-
access: "public",
|
|
1521
|
-
args: [
|
|
1522
|
-
{ name: "ft-ref", type: "trait_reference" },
|
|
1523
|
-
{ name: "user", type: "principal" },
|
|
1524
|
-
{ name: "amount", type: "uint128" },
|
|
1525
|
-
{ name: "receive-amount-min", type: "uint128" },
|
|
1526
|
-
{ name: "zero-fee", type: "bool" },
|
|
1527
|
-
],
|
|
1528
|
-
outputs: { type: { response: { ok: "uint128", error: "uint128" } } },
|
|
1529
|
-
},
|
|
1530
|
-
swapToVusd: {
|
|
1531
|
-
name: "swap-to-vusd",
|
|
1532
|
-
access: "public",
|
|
1533
|
-
args: [
|
|
1534
|
-
{ name: "ft-ref", type: "trait_reference" },
|
|
1535
|
-
{ name: "user", type: "principal" },
|
|
1536
|
-
{ name: "amount", type: "uint128" },
|
|
1537
|
-
{ name: "zero-fee", type: "bool" },
|
|
1538
|
-
],
|
|
1539
|
-
outputs: { type: { response: { ok: "uint128", error: "uint128" } } },
|
|
1540
|
-
},
|
|
1541
|
-
withdraw: {
|
|
1542
|
-
name: "withdraw",
|
|
1543
|
-
access: "public",
|
|
1544
|
-
args: [
|
|
1545
|
-
{ name: "amount-lp", type: "uint128" },
|
|
1546
|
-
{ name: "ft-ref", type: "trait_reference" },
|
|
1547
|
-
],
|
|
1548
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
1549
|
-
},
|
|
1550
|
-
calcD: {
|
|
1551
|
-
name: "calc-d",
|
|
1552
|
-
access: "read_only",
|
|
1553
|
-
args: [
|
|
1554
|
-
{ name: "x", type: "uint128" },
|
|
1555
|
-
{ name: "y", type: "uint128" },
|
|
1556
|
-
],
|
|
1557
|
-
outputs: { type: "uint128" },
|
|
1558
|
-
},
|
|
1559
|
-
calcY: {
|
|
1560
|
-
name: "calc-y",
|
|
1561
|
-
access: "read_only",
|
|
1562
|
-
args: [
|
|
1563
|
-
{ name: "x", type: "uint128" },
|
|
1564
|
-
{ name: "d_", type: "uint128" },
|
|
1565
|
-
],
|
|
1566
|
-
outputs: { type: "uint128" },
|
|
1567
|
-
},
|
|
1568
|
-
cbrt: {
|
|
1569
|
-
name: "cbrt",
|
|
1570
|
-
access: "read_only",
|
|
1571
|
-
args: [{ name: "n", type: "uint128" }],
|
|
1572
|
-
outputs: { type: "uint128" },
|
|
1573
|
-
},
|
|
1574
|
-
fromSystemPrecision: {
|
|
1575
|
-
name: "from-system-precision",
|
|
1576
|
-
access: "read_only",
|
|
1577
|
-
args: [{ name: "amount", type: "uint128" }],
|
|
1578
|
-
outputs: { type: "uint128" },
|
|
1579
|
-
},
|
|
1580
|
-
getAccRewardPerShareP: {
|
|
1581
|
-
name: "get-acc-reward-per-share-p",
|
|
1582
|
-
access: "read_only",
|
|
1583
|
-
args: [],
|
|
1584
|
-
outputs: { type: "uint128" },
|
|
1585
|
-
},
|
|
1586
|
-
getAdminFeeAmount: {
|
|
1587
|
-
name: "get-admin-fee-amount",
|
|
1588
|
-
access: "read_only",
|
|
1589
|
-
args: [],
|
|
1590
|
-
outputs: { type: "uint128" },
|
|
1591
|
-
},
|
|
1592
|
-
getAdminFeeShareBp: {
|
|
1593
|
-
name: "get-admin-fee-share-bp",
|
|
1594
|
-
access: "read_only",
|
|
1595
|
-
args: [],
|
|
1596
|
-
outputs: { type: "uint128" },
|
|
1597
|
-
},
|
|
1598
|
-
getBalanceRatioMinBp: {
|
|
1599
|
-
name: "get-balance-ratio-min-bp",
|
|
1600
|
-
access: "read_only",
|
|
1601
|
-
args: [],
|
|
1602
|
-
outputs: { type: "uint128" },
|
|
1603
|
-
},
|
|
1604
|
-
getBridge: {
|
|
1605
|
-
name: "get-bridge",
|
|
1606
|
-
access: "read_only",
|
|
1607
|
-
args: [],
|
|
1608
|
-
outputs: { type: { optional: "principal" } },
|
|
1609
|
-
},
|
|
1610
|
-
getCanDeposit: {
|
|
1611
|
-
name: "get-can-deposit",
|
|
1612
|
-
access: "read_only",
|
|
1613
|
-
args: [],
|
|
1614
|
-
outputs: { type: "bool" },
|
|
1615
|
-
},
|
|
1616
|
-
getCanSwap: {
|
|
1617
|
-
name: "get-can-swap",
|
|
1618
|
-
access: "read_only",
|
|
1619
|
-
args: [],
|
|
1620
|
-
outputs: { type: "bool" },
|
|
1621
|
-
},
|
|
1622
|
-
getCanWithdraw: {
|
|
1623
|
-
name: "get-can-withdraw",
|
|
1624
|
-
access: "read_only",
|
|
1625
|
-
args: [],
|
|
1626
|
-
outputs: { type: "bool" },
|
|
1627
|
-
},
|
|
1628
|
-
getD: { name: "get-d", access: "read_only", args: [], outputs: { type: "uint128" } },
|
|
1629
|
-
getFeeShareBp: {
|
|
1630
|
-
name: "get-fee-share-bp",
|
|
1631
|
-
access: "read_only",
|
|
1632
|
-
args: [],
|
|
1633
|
-
outputs: { type: "uint128" },
|
|
1634
|
-
},
|
|
1635
|
-
getLpBalance: {
|
|
1636
|
-
name: "get-lp-balance",
|
|
1637
|
-
access: "read_only",
|
|
1638
|
-
args: [{ name: "user", type: "principal" }],
|
|
1639
|
-
outputs: { type: "uint128" },
|
|
1640
|
-
},
|
|
1641
|
-
getLpTotalSupply: {
|
|
1642
|
-
name: "get-lp-total-supply",
|
|
1643
|
-
access: "read_only",
|
|
1644
|
-
args: [],
|
|
1645
|
-
outputs: { type: "uint128" },
|
|
1646
|
-
},
|
|
1647
|
-
getOwner: {
|
|
1648
|
-
name: "get-owner",
|
|
1649
|
-
access: "read_only",
|
|
1650
|
-
args: [],
|
|
1651
|
-
outputs: { type: "principal" },
|
|
1652
|
-
},
|
|
1653
|
-
getReserves: {
|
|
1654
|
-
name: "get-reserves",
|
|
1655
|
-
access: "read_only",
|
|
1656
|
-
args: [],
|
|
1657
|
-
outputs: { type: "uint128" },
|
|
1658
|
-
},
|
|
1659
|
-
getStopAuthority: {
|
|
1660
|
-
name: "get-stop-authority",
|
|
1661
|
-
access: "read_only",
|
|
1662
|
-
args: [],
|
|
1663
|
-
outputs: { type: "principal" },
|
|
1664
|
-
},
|
|
1665
|
-
getTokenAddress: {
|
|
1666
|
-
name: "get-token-address",
|
|
1667
|
-
access: "read_only",
|
|
1668
|
-
args: [],
|
|
1669
|
-
outputs: { type: { response: { ok: "principal", error: "uint128" } } },
|
|
1670
|
-
},
|
|
1671
|
-
getTokenBalance: {
|
|
1672
|
-
name: "get-token-balance",
|
|
1673
|
-
access: "read_only",
|
|
1674
|
-
args: [],
|
|
1675
|
-
outputs: { type: "uint128" },
|
|
1676
|
-
},
|
|
1677
|
-
getUserRewardDebt: {
|
|
1678
|
-
name: "get-user-reward-debt",
|
|
1679
|
-
access: "read_only",
|
|
1680
|
-
args: [{ name: "user", type: "principal" }],
|
|
1681
|
-
outputs: { type: "uint128" },
|
|
1682
|
-
},
|
|
1683
|
-
getVusdBalance: {
|
|
1684
|
-
name: "get-vusd-balance",
|
|
1685
|
-
access: "read_only",
|
|
1686
|
-
args: [],
|
|
1687
|
-
outputs: { type: "uint128" },
|
|
1688
|
-
},
|
|
1689
|
-
pendingRewards: {
|
|
1690
|
-
name: "pending-rewards",
|
|
1691
|
-
access: "read_only",
|
|
1692
|
-
args: [{ name: "user", type: "principal" }],
|
|
1693
|
-
outputs: { type: { response: { ok: "uint128", error: "none" } } },
|
|
1694
|
-
},
|
|
1695
|
-
toSystemPrecision: {
|
|
1696
|
-
name: "to-system-precision",
|
|
1697
|
-
access: "read_only",
|
|
1698
|
-
args: [{ name: "amount", type: "uint128" }],
|
|
1699
|
-
outputs: { type: "uint128" },
|
|
1700
|
-
},
|
|
1701
|
-
},
|
|
1702
|
-
maps: {
|
|
1703
|
-
lpBalances: { name: "lp-balances", key: "principal", value: "uint128" },
|
|
1704
|
-
userRewardDebt: { name: "user-reward-debt", key: "principal", value: "uint128" },
|
|
1705
|
-
},
|
|
1706
|
-
variables: {
|
|
1707
|
-
BP: {
|
|
1708
|
-
name: "BP",
|
|
1709
|
-
type: "uint128",
|
|
1710
|
-
access: "constant",
|
|
1711
|
-
},
|
|
1712
|
-
P: {
|
|
1713
|
-
name: "P",
|
|
1714
|
-
type: "uint128",
|
|
1715
|
-
access: "constant",
|
|
1716
|
-
},
|
|
1717
|
-
a: {
|
|
1718
|
-
name: "a",
|
|
1719
|
-
type: "uint128",
|
|
1720
|
-
access: "constant",
|
|
1721
|
-
},
|
|
1722
|
-
errAlreadyInitialized: {
|
|
1723
|
-
name: "err-already-initialized",
|
|
1724
|
-
type: {
|
|
1725
|
-
response: {
|
|
1726
|
-
ok: "none",
|
|
1727
|
-
error: "uint128",
|
|
1728
|
-
},
|
|
1729
|
-
},
|
|
1730
|
-
access: "constant",
|
|
1731
|
-
},
|
|
1732
|
-
errDepositAmountTooSmall: {
|
|
1733
|
-
name: "err-deposit-amount-too-small",
|
|
1734
|
-
type: {
|
|
1735
|
-
response: {
|
|
1736
|
-
ok: "none",
|
|
1737
|
-
error: "uint128",
|
|
1738
|
-
},
|
|
1739
|
-
},
|
|
1740
|
-
access: "constant",
|
|
1741
|
-
},
|
|
1742
|
-
errDepositProhibited: {
|
|
1743
|
-
name: "err-deposit-prohibited",
|
|
1744
|
-
type: {
|
|
1745
|
-
response: {
|
|
1746
|
-
ok: "none",
|
|
1747
|
-
error: "uint128",
|
|
1748
|
-
},
|
|
1749
|
-
},
|
|
1750
|
-
access: "constant",
|
|
1751
|
-
},
|
|
1752
|
-
errLowTokenBalance: {
|
|
1753
|
-
name: "err-low-token-balance",
|
|
1754
|
-
type: {
|
|
1755
|
-
response: {
|
|
1756
|
-
ok: "none",
|
|
1757
|
-
error: "uint128",
|
|
1758
|
-
},
|
|
1759
|
-
},
|
|
1760
|
-
access: "constant",
|
|
1761
|
-
},
|
|
1762
|
-
errLowVusdBalance: {
|
|
1763
|
-
name: "err-low-vusd-balance",
|
|
1764
|
-
type: {
|
|
1765
|
-
response: {
|
|
1766
|
-
ok: "none",
|
|
1767
|
-
error: "uint128",
|
|
1768
|
-
},
|
|
1769
|
-
},
|
|
1770
|
-
access: "constant",
|
|
1771
|
-
},
|
|
1772
|
-
errNotEnoughLp: {
|
|
1773
|
-
name: "err-not-enough-lp",
|
|
1774
|
-
type: {
|
|
1775
|
-
response: {
|
|
1776
|
-
ok: "none",
|
|
1777
|
-
error: "uint128",
|
|
1778
|
-
},
|
|
1779
|
-
},
|
|
1780
|
-
access: "constant",
|
|
1781
|
-
},
|
|
1782
|
-
errNotEnoughReserves: {
|
|
1783
|
-
name: "err-not-enough-reserves",
|
|
1784
|
-
type: {
|
|
1785
|
-
response: {
|
|
1786
|
-
ok: "none",
|
|
1787
|
-
error: "uint128",
|
|
1788
|
-
},
|
|
1789
|
-
},
|
|
1790
|
-
access: "constant",
|
|
1791
|
-
},
|
|
1792
|
-
errNotInitialized: {
|
|
1793
|
-
name: "err-not-initialized",
|
|
1794
|
-
type: {
|
|
1795
|
-
response: {
|
|
1796
|
-
ok: "none",
|
|
1797
|
-
error: "uint128",
|
|
1798
|
-
},
|
|
1799
|
-
},
|
|
1800
|
-
access: "constant",
|
|
1801
|
-
},
|
|
1802
|
-
errPoolBalanceTooBig: {
|
|
1803
|
-
name: "err-pool-balance-too-big",
|
|
1804
|
-
type: {
|
|
1805
|
-
response: {
|
|
1806
|
-
ok: "none",
|
|
1807
|
-
error: "uint128",
|
|
1808
|
-
},
|
|
1809
|
-
},
|
|
1810
|
-
access: "constant",
|
|
1811
|
-
},
|
|
1812
|
-
errSlippage: {
|
|
1813
|
-
name: "err-slippage",
|
|
1814
|
-
type: {
|
|
1815
|
-
response: {
|
|
1816
|
-
ok: "none",
|
|
1817
|
-
error: "uint128",
|
|
1818
|
-
},
|
|
1819
|
-
},
|
|
1820
|
-
access: "constant",
|
|
1821
|
-
},
|
|
1822
|
-
errSwapProhibited: {
|
|
1823
|
-
name: "err-swap-prohibited",
|
|
1824
|
-
type: {
|
|
1825
|
-
response: {
|
|
1826
|
-
ok: "none",
|
|
1827
|
-
error: "uint128",
|
|
1828
|
-
},
|
|
1829
|
-
},
|
|
1830
|
-
access: "constant",
|
|
1831
|
-
},
|
|
1832
|
-
errTooLarge: {
|
|
1833
|
-
name: "err-too-large",
|
|
1834
|
-
type: {
|
|
1835
|
-
response: {
|
|
1836
|
-
ok: "none",
|
|
1837
|
-
error: "uint128",
|
|
1838
|
-
},
|
|
1839
|
-
},
|
|
1840
|
-
access: "constant",
|
|
1841
|
-
},
|
|
1842
|
-
errUnauthorized: {
|
|
1843
|
-
name: "err-unauthorized",
|
|
1844
|
-
type: {
|
|
1845
|
-
response: {
|
|
1846
|
-
ok: "none",
|
|
1847
|
-
error: "uint128",
|
|
1848
|
-
},
|
|
1849
|
-
},
|
|
1850
|
-
access: "constant",
|
|
1851
|
-
},
|
|
1852
|
-
errWithdrawProhibited: {
|
|
1853
|
-
name: "err-withdraw-prohibited",
|
|
1854
|
-
type: {
|
|
1855
|
-
response: {
|
|
1856
|
-
ok: "none",
|
|
1857
|
-
error: "uint128",
|
|
1858
|
-
},
|
|
1859
|
-
},
|
|
1860
|
-
access: "constant",
|
|
1861
|
-
},
|
|
1862
|
-
errWrongToken: {
|
|
1863
|
-
name: "err-wrong-token",
|
|
1864
|
-
type: {
|
|
1865
|
-
response: {
|
|
1866
|
-
ok: "none",
|
|
1867
|
-
error: "uint128",
|
|
1868
|
-
},
|
|
1869
|
-
},
|
|
1870
|
-
access: "constant",
|
|
1871
|
-
},
|
|
1872
|
-
errZeroChanges: {
|
|
1873
|
-
name: "err-zero-changes",
|
|
1874
|
-
type: {
|
|
1875
|
-
response: {
|
|
1876
|
-
ok: "none",
|
|
1877
|
-
error: "uint128",
|
|
1878
|
-
},
|
|
1879
|
-
},
|
|
1880
|
-
access: "constant",
|
|
1881
|
-
},
|
|
1882
|
-
errZeroDChanges: {
|
|
1883
|
-
name: "err-zero-d-changes",
|
|
1884
|
-
type: {
|
|
1885
|
-
response: {
|
|
1886
|
-
ok: "none",
|
|
1887
|
-
error: "uint128",
|
|
1888
|
-
},
|
|
1889
|
-
},
|
|
1890
|
-
access: "constant",
|
|
1891
|
-
},
|
|
1892
|
-
maxTokenBalance: {
|
|
1893
|
-
name: "max-token-balance",
|
|
1894
|
-
type: "uint128",
|
|
1895
|
-
access: "constant",
|
|
1896
|
-
},
|
|
1897
|
-
systemPrecision: {
|
|
1898
|
-
name: "system-precision",
|
|
1899
|
-
type: "uint128",
|
|
1900
|
-
access: "constant",
|
|
1901
|
-
},
|
|
1902
|
-
accRewardPerShareP: {
|
|
1903
|
-
name: "acc-reward-per-share-p",
|
|
1904
|
-
type: "uint128",
|
|
1905
|
-
access: "variable",
|
|
1906
|
-
},
|
|
1907
|
-
adminFeeAmount: {
|
|
1908
|
-
name: "admin-fee-amount",
|
|
1909
|
-
type: "uint128",
|
|
1910
|
-
access: "variable",
|
|
1911
|
-
},
|
|
1912
|
-
adminFeeShareBp: {
|
|
1913
|
-
name: "admin-fee-share-bp",
|
|
1914
|
-
type: "uint128",
|
|
1915
|
-
access: "variable",
|
|
1916
|
-
},
|
|
1917
|
-
balanceRatioMinBp: {
|
|
1918
|
-
name: "balance-ratio-min-bp",
|
|
1919
|
-
type: "uint128",
|
|
1920
|
-
access: "variable",
|
|
1921
|
-
},
|
|
1922
|
-
bridge: {
|
|
1923
|
-
name: "bridge",
|
|
1924
|
-
type: {
|
|
1925
|
-
optional: "principal",
|
|
1926
|
-
},
|
|
1927
|
-
access: "variable",
|
|
1928
|
-
},
|
|
1929
|
-
canDeposit: {
|
|
1930
|
-
name: "can-deposit",
|
|
1931
|
-
type: "bool",
|
|
1932
|
-
access: "variable",
|
|
1933
|
-
},
|
|
1934
|
-
canSwap: {
|
|
1935
|
-
name: "can-swap",
|
|
1936
|
-
type: "bool",
|
|
1937
|
-
access: "variable",
|
|
1938
|
-
},
|
|
1939
|
-
canWithdraw: {
|
|
1940
|
-
name: "can-withdraw",
|
|
1941
|
-
type: "bool",
|
|
1942
|
-
access: "variable",
|
|
1943
|
-
},
|
|
1944
|
-
d: {
|
|
1945
|
-
name: "d",
|
|
1946
|
-
type: "uint128",
|
|
1947
|
-
access: "variable",
|
|
1948
|
-
},
|
|
1949
|
-
feeShareBp: {
|
|
1950
|
-
name: "fee-share-bp",
|
|
1951
|
-
type: "uint128",
|
|
1952
|
-
access: "variable",
|
|
1953
|
-
},
|
|
1954
|
-
lpTotalSupply: {
|
|
1955
|
-
name: "lp-total-supply",
|
|
1956
|
-
type: "uint128",
|
|
1957
|
-
access: "variable",
|
|
1958
|
-
},
|
|
1959
|
-
owner: {
|
|
1960
|
-
name: "owner",
|
|
1961
|
-
type: "principal",
|
|
1962
|
-
access: "variable",
|
|
1963
|
-
},
|
|
1964
|
-
reserves: {
|
|
1965
|
-
name: "reserves",
|
|
1966
|
-
type: "uint128",
|
|
1967
|
-
access: "variable",
|
|
1968
|
-
},
|
|
1969
|
-
stopAuthority: {
|
|
1970
|
-
name: "stop-authority",
|
|
1971
|
-
type: "principal",
|
|
1972
|
-
access: "variable",
|
|
1973
|
-
},
|
|
1974
|
-
tokenAmountIncrease: {
|
|
1975
|
-
name: "token-amount-increase",
|
|
1976
|
-
type: "uint128",
|
|
1977
|
-
access: "variable",
|
|
1978
|
-
},
|
|
1979
|
-
tokenAmountReduce: {
|
|
1980
|
-
name: "token-amount-reduce",
|
|
1981
|
-
type: "uint128",
|
|
1982
|
-
access: "variable",
|
|
1983
|
-
},
|
|
1984
|
-
tokenBalance: {
|
|
1985
|
-
name: "token-balance",
|
|
1986
|
-
type: "uint128",
|
|
1987
|
-
access: "variable",
|
|
1988
|
-
},
|
|
1989
|
-
tokenPrincipal: {
|
|
1990
|
-
name: "token-principal",
|
|
1991
|
-
type: {
|
|
1992
|
-
optional: "principal",
|
|
1993
|
-
},
|
|
1994
|
-
access: "variable",
|
|
1995
|
-
},
|
|
1996
|
-
vusdBalance: {
|
|
1997
|
-
name: "vusd-balance",
|
|
1998
|
-
type: "uint128",
|
|
1999
|
-
access: "variable",
|
|
2000
|
-
},
|
|
2001
|
-
},
|
|
2002
|
-
constants: {
|
|
2003
|
-
BP: 10000n,
|
|
2004
|
-
P: 48n,
|
|
2005
|
-
a: 20n,
|
|
2006
|
-
accRewardPerShareP: 0n,
|
|
2007
|
-
adminFeeAmount: 0n,
|
|
2008
|
-
adminFeeShareBp: 0n,
|
|
2009
|
-
balanceRatioMinBp: 0n,
|
|
2010
|
-
bridge: null,
|
|
2011
|
-
canDeposit: true,
|
|
2012
|
-
canSwap: true,
|
|
2013
|
-
canWithdraw: true,
|
|
2014
|
-
d: 0n,
|
|
2015
|
-
errAlreadyInitialized: {
|
|
2016
|
-
isOk: false,
|
|
2017
|
-
value: 2007n,
|
|
2018
|
-
},
|
|
2019
|
-
errDepositAmountTooSmall: {
|
|
2020
|
-
isOk: false,
|
|
2021
|
-
value: 2001n,
|
|
2022
|
-
},
|
|
2023
|
-
errDepositProhibited: {
|
|
2024
|
-
isOk: false,
|
|
2025
|
-
value: 2013n,
|
|
2026
|
-
},
|
|
2027
|
-
errLowTokenBalance: {
|
|
2028
|
-
isOk: false,
|
|
2029
|
-
value: 2012n,
|
|
2030
|
-
},
|
|
2031
|
-
errLowVusdBalance: {
|
|
2032
|
-
isOk: false,
|
|
2033
|
-
value: 2011n,
|
|
2034
|
-
},
|
|
2035
|
-
errNotEnoughLp: {
|
|
2036
|
-
isOk: false,
|
|
2037
|
-
value: 2010n,
|
|
2038
|
-
},
|
|
2039
|
-
errNotEnoughReserves: {
|
|
2040
|
-
isOk: false,
|
|
2041
|
-
value: 2005n,
|
|
2042
|
-
},
|
|
2043
|
-
errNotInitialized: {
|
|
2044
|
-
isOk: false,
|
|
2045
|
-
value: 2006n,
|
|
2046
|
-
},
|
|
2047
|
-
errPoolBalanceTooBig: {
|
|
2048
|
-
isOk: false,
|
|
2049
|
-
value: 2002n,
|
|
2050
|
-
},
|
|
2051
|
-
errSlippage: {
|
|
2052
|
-
isOk: false,
|
|
2053
|
-
value: 2009n,
|
|
2054
|
-
},
|
|
2055
|
-
errSwapProhibited: {
|
|
2056
|
-
isOk: false,
|
|
2057
|
-
value: 2015n,
|
|
2058
|
-
},
|
|
2059
|
-
errTooLarge: {
|
|
2060
|
-
isOk: false,
|
|
2061
|
-
value: 2016n,
|
|
2062
|
-
},
|
|
2063
|
-
errUnauthorized: {
|
|
2064
|
-
isOk: false,
|
|
2065
|
-
value: 2000n,
|
|
2066
|
-
},
|
|
2067
|
-
errWithdrawProhibited: {
|
|
2068
|
-
isOk: false,
|
|
2069
|
-
value: 2014n,
|
|
2070
|
-
},
|
|
2071
|
-
errWrongToken: {
|
|
2072
|
-
isOk: false,
|
|
2073
|
-
value: 2008n,
|
|
2074
|
-
},
|
|
2075
|
-
errZeroChanges: {
|
|
2076
|
-
isOk: false,
|
|
2077
|
-
value: 2003n,
|
|
2078
|
-
},
|
|
2079
|
-
errZeroDChanges: {
|
|
2080
|
-
isOk: false,
|
|
2081
|
-
value: 2004n,
|
|
2082
|
-
},
|
|
2083
|
-
feeShareBp: 0n,
|
|
2084
|
-
lpTotalSupply: 0n,
|
|
2085
|
-
maxTokenBalance: 1000000000000n,
|
|
2086
|
-
owner: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM",
|
|
2087
|
-
reserves: 0n,
|
|
2088
|
-
stopAuthority: "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM",
|
|
2089
|
-
systemPrecision: 3n,
|
|
2090
|
-
tokenAmountIncrease: 0n,
|
|
2091
|
-
tokenAmountReduce: 0n,
|
|
2092
|
-
tokenBalance: 0n,
|
|
2093
|
-
tokenPrincipal: null,
|
|
2094
|
-
vusdBalance: 0n,
|
|
2095
|
-
},
|
|
2096
|
-
non_fungible_tokens: [],
|
|
2097
|
-
fungible_tokens: [],
|
|
2098
|
-
epoch: "Epoch31",
|
|
2099
|
-
clarity_version: "Clarity3",
|
|
2100
|
-
contractName: "pool",
|
|
2101
|
-
},
|
|
2102
|
-
poolTrait: {
|
|
2103
|
-
functions: {},
|
|
2104
|
-
maps: {},
|
|
2105
|
-
variables: {},
|
|
2106
|
-
constants: {},
|
|
2107
|
-
non_fungible_tokens: [],
|
|
2108
|
-
fungible_tokens: [],
|
|
2109
|
-
epoch: "Epoch31",
|
|
2110
|
-
clarity_version: "Clarity3",
|
|
2111
|
-
contractName: "pool-trait",
|
|
2112
|
-
},
|
|
2113
|
-
sip010TraitFtStandard: {
|
|
2114
|
-
functions: {},
|
|
2115
|
-
maps: {},
|
|
2116
|
-
variables: {},
|
|
2117
|
-
constants: {},
|
|
2118
|
-
non_fungible_tokens: [],
|
|
2119
|
-
fungible_tokens: [],
|
|
2120
|
-
epoch: "Epoch21",
|
|
2121
|
-
clarity_version: "Clarity1",
|
|
2122
|
-
contractName: "sip-010-trait-ft-standard",
|
|
2123
|
-
},
|
|
2124
|
-
utils: {
|
|
2125
|
-
functions: {
|
|
2126
|
-
assertNotEmptyBuff32: {
|
|
2127
|
-
name: "assert-not-empty-buff-32",
|
|
2128
|
-
access: "read_only",
|
|
2129
|
-
args: [{ name: "b", type: { buffer: { length: 32 } } }],
|
|
2130
|
-
outputs: { type: { response: { ok: "bool", error: "uint128" } } },
|
|
2131
|
-
},
|
|
2132
|
-
bufferByte: {
|
|
2133
|
-
name: "buffer-byte",
|
|
2134
|
-
access: "read_only",
|
|
2135
|
-
args: [
|
|
2136
|
-
{ name: "b", type: { buffer: { length: 32 } } },
|
|
2137
|
-
{ name: "i", type: "uint128" },
|
|
2138
|
-
],
|
|
2139
|
-
outputs: { type: { response: { ok: { buffer: { length: 1 } }, error: "uint128" } } },
|
|
2140
|
-
},
|
|
2141
|
-
bufferByteUint: {
|
|
2142
|
-
name: "buffer-byte-uint",
|
|
2143
|
-
access: "read_only",
|
|
2144
|
-
args: [
|
|
2145
|
-
{ name: "b", type: { buffer: { length: 32 } } },
|
|
2146
|
-
{ name: "i", type: "uint128" },
|
|
2147
|
-
],
|
|
2148
|
-
outputs: { type: { response: { ok: "uint128", error: "uint128" } } },
|
|
2149
|
-
},
|
|
2150
|
-
hashMessage: {
|
|
2151
|
-
name: "hash-message",
|
|
2152
|
-
access: "read_only",
|
|
2153
|
-
args: [
|
|
2154
|
-
{ name: "amount", type: "uint128" },
|
|
2155
|
-
{ name: "recipient", type: { buffer: { length: 32 } } },
|
|
2156
|
-
{ name: "source-chain-id", type: "uint128" },
|
|
2157
|
-
{ name: "destination-chain-id", type: "uint128" },
|
|
2158
|
-
{ name: "receive-token", type: { buffer: { length: 32 } } },
|
|
2159
|
-
{ name: "nonce", type: { buffer: { length: 32 } } },
|
|
2160
|
-
{ name: "messenger-id", type: "uint128" },
|
|
2161
|
-
],
|
|
2162
|
-
outputs: { type: { response: { ok: { buffer: { length: 32 } }, error: "uint128" } } },
|
|
2163
|
-
},
|
|
2164
|
-
hashWithSenderAddress: {
|
|
2165
|
-
name: "hash-with-sender-address",
|
|
2166
|
-
access: "read_only",
|
|
2167
|
-
args: [
|
|
2168
|
-
{ name: "message", type: { buffer: { length: 32 } } },
|
|
2169
|
-
{ name: "sender", type: { buffer: { length: 32 } } },
|
|
2170
|
-
],
|
|
2171
|
-
outputs: { type: { response: { ok: { buffer: { length: 32 } }, error: "uint128" } } },
|
|
2172
|
-
},
|
|
2173
|
-
principalHash: {
|
|
2174
|
-
name: "principal-hash",
|
|
2175
|
-
access: "read_only",
|
|
2176
|
-
args: [{ name: "value", type: "principal" }],
|
|
2177
|
-
outputs: { type: { buffer: { length: 32 } } },
|
|
2178
|
-
},
|
|
2179
|
-
principalToBuff32: {
|
|
2180
|
-
name: "principal-to-buff32",
|
|
2181
|
-
access: "read_only",
|
|
2182
|
-
args: [{ name: "value", type: "principal" }],
|
|
2183
|
-
outputs: { type: { buffer: { length: 32 } } },
|
|
2184
|
-
},
|
|
2185
|
-
stringToBuff: {
|
|
2186
|
-
name: "string-to-buff",
|
|
2187
|
-
access: "read_only",
|
|
2188
|
-
args: [{ name: "str", type: { "string-ascii": { length: 40 } } }],
|
|
2189
|
-
outputs: { type: { buffer: { length: 45 } } },
|
|
2190
|
-
},
|
|
2191
|
-
uintToBuff1: {
|
|
2192
|
-
name: "uint-to-buff-1",
|
|
2193
|
-
access: "read_only",
|
|
2194
|
-
args: [{ name: "value", type: "uint128" }],
|
|
2195
|
-
outputs: { type: { buffer: { length: 17 } } },
|
|
2196
|
-
},
|
|
2197
|
-
uintToBuff32: {
|
|
2198
|
-
name: "uint-to-buff-32",
|
|
2199
|
-
access: "read_only",
|
|
2200
|
-
args: [{ name: "value", type: "uint128" }],
|
|
2201
|
-
outputs: { type: { buffer: { length: 33 } } },
|
|
2202
|
-
},
|
|
2203
|
-
},
|
|
2204
|
-
maps: {},
|
|
2205
|
-
variables: {
|
|
2206
|
-
errEmptyBuffer: {
|
|
2207
|
-
name: "err-empty-buffer",
|
|
2208
|
-
type: {
|
|
2209
|
-
response: {
|
|
2210
|
-
ok: "none",
|
|
2211
|
-
error: "uint128",
|
|
2212
|
-
},
|
|
2213
|
-
},
|
|
2214
|
-
access: "constant",
|
|
2215
|
-
},
|
|
2216
|
-
errWrongBufferLength: {
|
|
2217
|
-
name: "err-wrong-buffer-length",
|
|
2218
|
-
type: {
|
|
2219
|
-
response: {
|
|
2220
|
-
ok: "none",
|
|
2221
|
-
error: "uint128",
|
|
2222
|
-
},
|
|
2223
|
-
},
|
|
2224
|
-
access: "constant",
|
|
2225
|
-
},
|
|
2226
|
-
errWrongMsgLength: {
|
|
2227
|
-
name: "err-wrong-msg-length",
|
|
2228
|
-
type: {
|
|
2229
|
-
response: {
|
|
2230
|
-
ok: "none",
|
|
2231
|
-
error: "uint128",
|
|
2232
|
-
},
|
|
2233
|
-
},
|
|
2234
|
-
access: "constant",
|
|
2235
|
-
},
|
|
2236
|
-
thisChainId: {
|
|
2237
|
-
name: "this-chain-id",
|
|
2238
|
-
type: "uint128",
|
|
2239
|
-
access: "constant",
|
|
2240
|
-
},
|
|
2241
|
-
zeroBytes12: {
|
|
2242
|
-
name: "zero-bytes-12",
|
|
2243
|
-
type: {
|
|
2244
|
-
buffer: {
|
|
2245
|
-
length: 12,
|
|
2246
|
-
},
|
|
2247
|
-
},
|
|
2248
|
-
access: "constant",
|
|
2249
|
-
},
|
|
2250
|
-
zeroBytes16: {
|
|
2251
|
-
name: "zero-bytes-16",
|
|
2252
|
-
type: {
|
|
2253
|
-
buffer: {
|
|
2254
|
-
length: 16,
|
|
2255
|
-
},
|
|
2256
|
-
},
|
|
2257
|
-
access: "constant",
|
|
2258
|
-
},
|
|
2259
|
-
zeroBytes32: {
|
|
2260
|
-
name: "zero-bytes-32",
|
|
2261
|
-
type: {
|
|
2262
|
-
buffer: {
|
|
2263
|
-
length: 32,
|
|
2264
|
-
},
|
|
2265
|
-
},
|
|
2266
|
-
access: "constant",
|
|
2267
|
-
},
|
|
2268
|
-
},
|
|
2269
|
-
constants: {
|
|
2270
|
-
errEmptyBuffer: {
|
|
2271
|
-
isOk: false,
|
|
2272
|
-
value: 5002n,
|
|
2273
|
-
},
|
|
2274
|
-
errWrongBufferLength: {
|
|
2275
|
-
isOk: false,
|
|
2276
|
-
value: 5000n,
|
|
2277
|
-
},
|
|
2278
|
-
errWrongMsgLength: {
|
|
2279
|
-
isOk: false,
|
|
2280
|
-
value: 5001n,
|
|
2281
|
-
},
|
|
2282
|
-
thisChainId: 16n,
|
|
2283
|
-
zeroBytes12: Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),
|
|
2284
|
-
zeroBytes16: Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),
|
|
2285
|
-
zeroBytes32: Uint8Array.from([
|
|
2286
|
-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
2287
|
-
]),
|
|
2288
|
-
},
|
|
2289
|
-
non_fungible_tokens: [],
|
|
2290
|
-
fungible_tokens: [],
|
|
2291
|
-
epoch: "Epoch31",
|
|
2292
|
-
clarity_version: "Clarity3",
|
|
2293
|
-
contractName: "utils",
|
|
2294
|
-
},
|
|
2295
|
-
};
|
|
2296
|
-
//# sourceMappingURL=clarigen-types.js.map
|