@typemove/sui 1.0.0-rc.21 → 1.0.0-rc.23

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 (147) hide show
  1. package/Readme.md +128 -0
  2. package/builtin/package.json +5 -0
  3. package/dist/cjs/builtin/0x1.d.ts.map +1 -0
  4. package/dist/cjs/builtin/0x1.js +2083 -0
  5. package/dist/cjs/builtin/0x1.js.map +1 -0
  6. package/dist/cjs/builtin/0x2.d.ts.map +1 -0
  7. package/dist/cjs/builtin/0x2.js +9641 -0
  8. package/dist/cjs/builtin/0x2.js.map +1 -0
  9. package/dist/cjs/builtin/0x3.d.ts.map +1 -0
  10. package/dist/cjs/builtin/0x3.js +2625 -0
  11. package/dist/cjs/builtin/0x3.js.map +1 -0
  12. package/dist/cjs/builtin/index.d.ts.map +1 -0
  13. package/dist/cjs/builtin/index.js +11 -0
  14. package/dist/cjs/builtin/index.js.map +1 -0
  15. package/dist/cjs/index.d.ts.map +1 -0
  16. package/dist/cjs/index.js +10 -0
  17. package/dist/cjs/index.js.map +1 -0
  18. package/dist/cjs/models.d.ts.map +1 -0
  19. package/dist/cjs/models.js +8 -0
  20. package/dist/cjs/models.js.map +1 -0
  21. package/dist/cjs/move-coder.d.ts.map +1 -0
  22. package/dist/cjs/move-coder.js +104 -0
  23. package/dist/cjs/move-coder.js.map +1 -0
  24. package/dist/cjs/package.json +3 -0
  25. package/dist/cjs/sui-chain-adapter.d.ts.map +1 -0
  26. package/dist/cjs/sui-chain-adapter.js +86 -0
  27. package/dist/cjs/sui-chain-adapter.js.map +1 -0
  28. package/dist/cjs/to-internal.d.ts.map +1 -0
  29. package/dist/cjs/to-internal.js +85 -0
  30. package/dist/cjs/to-internal.js.map +1 -0
  31. package/dist/cjs/utils.d.ts.map +1 -0
  32. package/dist/cjs/utils.js +49 -0
  33. package/dist/cjs/utils.js.map +1 -0
  34. package/dist/esm/builtin/0x1.d.ts +495 -0
  35. package/dist/esm/builtin/0x1.d.ts.map +1 -0
  36. package/dist/esm/builtin/0x1.js.map +1 -0
  37. package/dist/esm/builtin/0x2.d.ts +2929 -0
  38. package/dist/esm/builtin/0x2.d.ts.map +1 -0
  39. package/dist/esm/builtin/0x2.js.map +1 -0
  40. package/dist/esm/builtin/0x3.d.ts +1207 -0
  41. package/dist/esm/builtin/0x3.d.ts.map +1 -0
  42. package/dist/esm/builtin/0x3.js.map +1 -0
  43. package/dist/esm/builtin/index.d.ts +4 -0
  44. package/dist/esm/builtin/index.d.ts.map +1 -0
  45. package/dist/esm/builtin/index.js.map +1 -0
  46. package/dist/esm/codegen/codegen.d.ts.map +1 -0
  47. package/dist/esm/codegen/codegen.js.map +1 -0
  48. package/dist/esm/codegen/index.d.ts.map +1 -0
  49. package/dist/esm/codegen/index.js.map +1 -0
  50. package/dist/{codegen → esm/codegen}/run.d.ts.map +1 -1
  51. package/dist/esm/codegen/run.js.map +1 -0
  52. package/dist/esm/index.d.ts +4 -0
  53. package/dist/esm/index.d.ts.map +1 -0
  54. package/dist/esm/index.js.map +1 -0
  55. package/dist/esm/models.d.ts +12 -0
  56. package/dist/esm/models.d.ts.map +1 -0
  57. package/dist/esm/models.js.map +1 -0
  58. package/dist/esm/move-coder.d.ts +16 -0
  59. package/dist/esm/move-coder.d.ts.map +1 -0
  60. package/dist/esm/move-coder.js.map +1 -0
  61. package/dist/esm/sui-chain-adapter.d.ts +12 -0
  62. package/dist/esm/sui-chain-adapter.d.ts.map +1 -0
  63. package/dist/esm/sui-chain-adapter.js.map +1 -0
  64. package/dist/esm/to-internal.d.ts +4 -0
  65. package/dist/esm/to-internal.d.ts.map +1 -0
  66. package/dist/esm/to-internal.js.map +1 -0
  67. package/dist/esm/utils.d.ts +15 -0
  68. package/dist/esm/utils.d.ts.map +1 -0
  69. package/dist/esm/utils.js.map +1 -0
  70. package/package.json +16 -8
  71. package/dist/builtin/0x1.d.ts.map +0 -1
  72. package/dist/builtin/0x1.js.map +0 -1
  73. package/dist/builtin/0x2.d.ts.map +0 -1
  74. package/dist/builtin/0x2.js.map +0 -1
  75. package/dist/builtin/0x3.d.ts.map +0 -1
  76. package/dist/builtin/0x3.js.map +0 -1
  77. package/dist/builtin/index.d.ts.map +0 -1
  78. package/dist/builtin/index.js.map +0 -1
  79. package/dist/codegen/codegen.d.ts.map +0 -1
  80. package/dist/codegen/codegen.js.map +0 -1
  81. package/dist/codegen/index.d.ts.map +0 -1
  82. package/dist/codegen/index.js.map +0 -1
  83. package/dist/codegen/run.js.map +0 -1
  84. package/dist/index.d.ts.map +0 -1
  85. package/dist/index.js.map +0 -1
  86. package/dist/models.d.ts.map +0 -1
  87. package/dist/models.js.map +0 -1
  88. package/dist/move-coder.d.ts.map +0 -1
  89. package/dist/move-coder.js.map +0 -1
  90. package/dist/sui-chain-adapter.d.ts.map +0 -1
  91. package/dist/sui-chain-adapter.js.map +0 -1
  92. package/dist/tests/move-call.test.d.ts +0 -2
  93. package/dist/tests/move-call.test.d.ts.map +0 -1
  94. package/dist/tests/move-call.test.js.map +0 -1
  95. package/dist/tests/move-coder.test.d.ts +0 -2
  96. package/dist/tests/move-coder.test.d.ts.map +0 -1
  97. package/dist/tests/move-coder.test.js.map +0 -1
  98. package/dist/tests/types/testnet/0x1e2b124f746a339b3cf99b9f969393a96594519aafb1d06517aacfeeae20e7a5.d.ts +0 -96
  99. package/dist/tests/types/testnet/0x1e2b124f746a339b3cf99b9f969393a96594519aafb1d06517aacfeeae20e7a5.d.ts.map +0 -1
  100. package/dist/tests/types/testnet/0x1e2b124f746a339b3cf99b9f969393a96594519aafb1d06517aacfeeae20e7a5.js +0 -165
  101. package/dist/tests/types/testnet/0x1e2b124f746a339b3cf99b9f969393a96594519aafb1d06517aacfeeae20e7a5.js.map +0 -1
  102. package/dist/tests/types/testnet/0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a.d.ts +0 -769
  103. package/dist/tests/types/testnet/0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a.d.ts.map +0 -1
  104. package/dist/tests/types/testnet/0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a.js +0 -1544
  105. package/dist/tests/types/testnet/0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a.js.map +0 -1
  106. package/dist/tests/types/testnet/0xdee9.d.ts +0 -1053
  107. package/dist/tests/types/testnet/0xdee9.d.ts.map +0 -1
  108. package/dist/tests/types/testnet/0xdee9.js +0 -1697
  109. package/dist/tests/types/testnet/0xdee9.js.map +0 -1
  110. package/dist/tests/types/testnet/0xebaa2ad3eacc230f309cd933958cc52684df0a41ae7ac214d186b80f830867d2.d.ts +0 -3249
  111. package/dist/tests/types/testnet/0xebaa2ad3eacc230f309cd933958cc52684df0a41ae7ac214d186b80f830867d2.d.ts.map +0 -1
  112. package/dist/tests/types/testnet/0xebaa2ad3eacc230f309cd933958cc52684df0a41ae7ac214d186b80f830867d2.js +0 -5476
  113. package/dist/tests/types/testnet/0xebaa2ad3eacc230f309cd933958cc52684df0a41ae7ac214d186b80f830867d2.js.map +0 -1
  114. package/dist/tests/types/testnet/index.d.ts +0 -5
  115. package/dist/tests/types/testnet/index.d.ts.map +0 -1
  116. package/dist/tests/types/testnet/index.js +0 -8
  117. package/dist/tests/types/testnet/index.js.map +0 -1
  118. package/dist/to-internal.d.ts.map +0 -1
  119. package/dist/to-internal.js.map +0 -1
  120. package/dist/utils.d.ts.map +0 -1
  121. package/dist/utils.js.map +0 -1
  122. /package/dist/{builtin → cjs/builtin}/0x1.d.ts +0 -0
  123. /package/dist/{builtin → cjs/builtin}/0x2.d.ts +0 -0
  124. /package/dist/{builtin → cjs/builtin}/0x3.d.ts +0 -0
  125. /package/dist/{builtin → cjs/builtin}/index.d.ts +0 -0
  126. /package/dist/{index.d.ts → cjs/index.d.ts} +0 -0
  127. /package/dist/{models.d.ts → cjs/models.d.ts} +0 -0
  128. /package/dist/{move-coder.d.ts → cjs/move-coder.d.ts} +0 -0
  129. /package/dist/{sui-chain-adapter.d.ts → cjs/sui-chain-adapter.d.ts} +0 -0
  130. /package/dist/{to-internal.d.ts → cjs/to-internal.d.ts} +0 -0
  131. /package/dist/{utils.d.ts → cjs/utils.d.ts} +0 -0
  132. /package/dist/{builtin → esm/builtin}/0x1.js +0 -0
  133. /package/dist/{builtin → esm/builtin}/0x2.js +0 -0
  134. /package/dist/{builtin → esm/builtin}/0x3.js +0 -0
  135. /package/dist/{builtin → esm/builtin}/index.js +0 -0
  136. /package/dist/{codegen → esm/codegen}/codegen.d.ts +0 -0
  137. /package/dist/{codegen → esm/codegen}/codegen.js +0 -0
  138. /package/dist/{codegen → esm/codegen}/index.d.ts +0 -0
  139. /package/dist/{codegen → esm/codegen}/index.js +0 -0
  140. /package/dist/{codegen → esm/codegen}/run.d.ts +0 -0
  141. /package/dist/{codegen → esm/codegen}/run.js +0 -0
  142. /package/dist/{index.js → esm/index.js} +0 -0
  143. /package/dist/{models.js → esm/models.js} +0 -0
  144. /package/dist/{move-coder.js → esm/move-coder.js} +0 -0
  145. /package/dist/{sui-chain-adapter.js → esm/sui-chain-adapter.js} +0 -0
  146. /package/dist/{to-internal.js → esm/to-internal.js} +0 -0
  147. /package/dist/{utils.js → esm/utils.js} +0 -0
@@ -1,1544 +0,0 @@
1
- /* Autogenerated file. Do not edit manually. */
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /* Generated modules for account 0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a */
5
- import { TypeDescriptor, ANY_TYPE } from "@typemove/move";
6
- import { defaultMoveCoder } from "@typemove/sui";
7
- import { ZERO_ADDRESS } from "@typemove/sui";
8
- import { TransactionBlock } from "@mysten/sui.js/transactions";
9
- import { TransactionArgument } from "@mysten/sui.js";
10
- import { _0x2 } from "@typemove/sui/builtin";
11
- import { _0x1 } from "@typemove/sui/builtin";
12
- export var comparator;
13
- (function (comparator) {
14
- let Result;
15
- (function (Result) {
16
- Result.TYPE_QNAME = "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::comparator::Result";
17
- const TYPE = new TypeDescriptor(Result.TYPE_QNAME);
18
- function type() {
19
- return TYPE.apply();
20
- }
21
- Result.type = type;
22
- })(Result = comparator.Result || (comparator.Result = {}));
23
- let builder;
24
- (function (builder) {
25
- function compare(tx, args, typeArguments) {
26
- const _args = [];
27
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
28
- _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.object(args[1]));
29
- // @ts-ignore
30
- return tx.moveCall({
31
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::comparator::compare",
32
- arguments: _args,
33
- typeArguments: [
34
- typeof typeArguments[0] === "string"
35
- ? typeArguments[0]
36
- : typeArguments[0].getSignature(),
37
- ],
38
- });
39
- }
40
- builder.compare = compare;
41
- function compareU8Vector(tx, args) {
42
- const _args = [];
43
- _args.push(TransactionArgument.is(args[0])
44
- ? args[0]
45
- : tx.makeMoveVec({
46
- objects: args[0].map((a) => tx.object(a)),
47
- // type: TODO
48
- }));
49
- _args.push(TransactionArgument.is(args[1])
50
- ? args[1]
51
- : tx.makeMoveVec({
52
- objects: args[1].map((a) => tx.object(a)),
53
- // type: TODO
54
- }));
55
- // @ts-ignore
56
- return tx.moveCall({
57
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::comparator::compare_u8_vector",
58
- arguments: _args,
59
- });
60
- }
61
- builder.compareU8Vector = compareU8Vector;
62
- function isEqual(tx, args) {
63
- const _args = [];
64
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
65
- // @ts-ignore
66
- return tx.moveCall({
67
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::comparator::is_equal",
68
- arguments: _args,
69
- });
70
- }
71
- builder.isEqual = isEqual;
72
- function isGreaterThan(tx, args) {
73
- const _args = [];
74
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
75
- // @ts-ignore
76
- return tx.moveCall({
77
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::comparator::is_greater_than",
78
- arguments: _args,
79
- });
80
- }
81
- builder.isGreaterThan = isGreaterThan;
82
- function isSmallerThan(tx, args) {
83
- const _args = [];
84
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
85
- // @ts-ignore
86
- return tx.moveCall({
87
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::comparator::is_smaller_than",
88
- arguments: _args,
89
- });
90
- }
91
- builder.isSmallerThan = isSmallerThan;
92
- })(builder = comparator.builder || (comparator.builder = {}));
93
- let view;
94
- (function (view) {
95
- async function compare(client, args, typeArguments) {
96
- const tx = new TransactionBlock();
97
- builder.compare(tx, args, typeArguments);
98
- const res = await client.devInspectTransactionBlock({
99
- transactionBlock: tx,
100
- sender: ZERO_ADDRESS,
101
- });
102
- return res;
103
- }
104
- view.compare = compare;
105
- async function compareU8Vector(client, args) {
106
- const tx = new TransactionBlock();
107
- builder.compareU8Vector(tx, args);
108
- const res = await client.devInspectTransactionBlock({
109
- transactionBlock: tx,
110
- sender: ZERO_ADDRESS,
111
- });
112
- return res;
113
- }
114
- view.compareU8Vector = compareU8Vector;
115
- async function isEqual(client, args) {
116
- const tx = new TransactionBlock();
117
- builder.isEqual(tx, args);
118
- const res = await client.devInspectTransactionBlock({
119
- transactionBlock: tx,
120
- sender: ZERO_ADDRESS,
121
- });
122
- return res;
123
- }
124
- view.isEqual = isEqual;
125
- async function isGreaterThan(client, args) {
126
- const tx = new TransactionBlock();
127
- builder.isGreaterThan(tx, args);
128
- const res = await client.devInspectTransactionBlock({
129
- transactionBlock: tx,
130
- sender: ZERO_ADDRESS,
131
- });
132
- return res;
133
- }
134
- view.isGreaterThan = isGreaterThan;
135
- async function isSmallerThan(client, args) {
136
- const tx = new TransactionBlock();
137
- builder.isSmallerThan(tx, args);
138
- const res = await client.devInspectTransactionBlock({
139
- transactionBlock: tx,
140
- sender: ZERO_ADDRESS,
141
- });
142
- return res;
143
- }
144
- view.isSmallerThan = isSmallerThan;
145
- })(view = comparator.view || (comparator.view = {}));
146
- })(comparator || (comparator = {}));
147
- export var math_utils;
148
- (function (math_utils) {
149
- let builder;
150
- (function (builder) {
151
- function max(tx, args) {
152
- const _args = [];
153
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
154
- _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
155
- // @ts-ignore
156
- return tx.moveCall({
157
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::math_utils::max",
158
- arguments: _args,
159
- });
160
- }
161
- builder.max = max;
162
- function maxU64(tx, args) {
163
- const _args = [];
164
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
165
- _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
166
- // @ts-ignore
167
- return tx.moveCall({
168
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::math_utils::max_u64",
169
- arguments: _args,
170
- });
171
- }
172
- builder.maxU64 = maxU64;
173
- function min(tx, args) {
174
- const _args = [];
175
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
176
- _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
177
- // @ts-ignore
178
- return tx.moveCall({
179
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::math_utils::min",
180
- arguments: _args,
181
- });
182
- }
183
- builder.min = min;
184
- function pow(tx, args) {
185
- const _args = [];
186
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
187
- _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
188
- // @ts-ignore
189
- return tx.moveCall({
190
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::math_utils::pow",
191
- arguments: _args,
192
- });
193
- }
194
- builder.pow = pow;
195
- function sqrt(tx, args) {
196
- const _args = [];
197
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
198
- // @ts-ignore
199
- return tx.moveCall({
200
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::math_utils::sqrt",
201
- arguments: _args,
202
- });
203
- }
204
- builder.sqrt = sqrt;
205
- function sqrtU256(tx, args) {
206
- const _args = [];
207
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
208
- // @ts-ignore
209
- return tx.moveCall({
210
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::math_utils::sqrt_u256",
211
- arguments: _args,
212
- });
213
- }
214
- builder.sqrtU256 = sqrtU256;
215
- })(builder = math_utils.builder || (math_utils.builder = {}));
216
- let view;
217
- (function (view) {
218
- async function max(client, args) {
219
- const tx = new TransactionBlock();
220
- builder.max(tx, args);
221
- const res = await client.devInspectTransactionBlock({
222
- transactionBlock: tx,
223
- sender: ZERO_ADDRESS,
224
- });
225
- return res;
226
- }
227
- view.max = max;
228
- async function maxU64(client, args) {
229
- const tx = new TransactionBlock();
230
- builder.maxU64(tx, args);
231
- const res = await client.devInspectTransactionBlock({
232
- transactionBlock: tx,
233
- sender: ZERO_ADDRESS,
234
- });
235
- return res;
236
- }
237
- view.maxU64 = maxU64;
238
- async function min(client, args) {
239
- const tx = new TransactionBlock();
240
- builder.min(tx, args);
241
- const res = await client.devInspectTransactionBlock({
242
- transactionBlock: tx,
243
- sender: ZERO_ADDRESS,
244
- });
245
- return res;
246
- }
247
- view.min = min;
248
- async function pow(client, args) {
249
- const tx = new TransactionBlock();
250
- builder.pow(tx, args);
251
- const res = await client.devInspectTransactionBlock({
252
- transactionBlock: tx,
253
- sender: ZERO_ADDRESS,
254
- });
255
- return res;
256
- }
257
- view.pow = pow;
258
- async function sqrt(client, args) {
259
- const tx = new TransactionBlock();
260
- builder.sqrt(tx, args);
261
- const res = await client.devInspectTransactionBlock({
262
- transactionBlock: tx,
263
- sender: ZERO_ADDRESS,
264
- });
265
- return res;
266
- }
267
- view.sqrt = sqrt;
268
- async function sqrtU256(client, args) {
269
- const tx = new TransactionBlock();
270
- builder.sqrtU256(tx, args);
271
- const res = await client.devInspectTransactionBlock({
272
- transactionBlock: tx,
273
- sender: ZERO_ADDRESS,
274
- });
275
- return res;
276
- }
277
- view.sqrtU256 = sqrtU256;
278
- })(view = math_utils.view || (math_utils.view = {}));
279
- })(math_utils || (math_utils = {}));
280
- export var pool;
281
- (function (pool) {
282
- let ControllerCap;
283
- (function (ControllerCap) {
284
- ControllerCap.TYPE_QNAME = "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::ControllerCap";
285
- const TYPE = new TypeDescriptor(ControllerCap.TYPE_QNAME);
286
- function type() {
287
- return TYPE.apply();
288
- }
289
- ControllerCap.type = type;
290
- })(ControllerCap = pool.ControllerCap || (pool.ControllerCap = {}));
291
- let FeeToSet;
292
- (function (FeeToSet) {
293
- FeeToSet.TYPE_QNAME = "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::FeeToSet";
294
- const TYPE = new TypeDescriptor(FeeToSet.TYPE_QNAME);
295
- function type() {
296
- return TYPE.apply();
297
- }
298
- FeeToSet.type = type;
299
- })(FeeToSet = pool.FeeToSet || (pool.FeeToSet = {}));
300
- let LiquidityAdded;
301
- (function (LiquidityAdded) {
302
- LiquidityAdded.TYPE_QNAME = "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::LiquidityAdded";
303
- const TYPE = new TypeDescriptor(LiquidityAdded.TYPE_QNAME);
304
- function type(arg0 = ANY_TYPE, arg1 = ANY_TYPE) {
305
- return TYPE.apply(arg0, arg1);
306
- }
307
- LiquidityAdded.type = type;
308
- })(LiquidityAdded = pool.LiquidityAdded || (pool.LiquidityAdded = {}));
309
- let LiquidityRemoved;
310
- (function (LiquidityRemoved) {
311
- LiquidityRemoved.TYPE_QNAME = "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::LiquidityRemoved";
312
- const TYPE = new TypeDescriptor(LiquidityRemoved.TYPE_QNAME);
313
- function type(arg0 = ANY_TYPE, arg1 = ANY_TYPE) {
314
- return TYPE.apply(arg0, arg1);
315
- }
316
- LiquidityRemoved.type = type;
317
- })(LiquidityRemoved = pool.LiquidityRemoved || (pool.LiquidityRemoved = {}));
318
- let Pool;
319
- (function (Pool) {
320
- Pool.TYPE_QNAME = "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::Pool";
321
- const TYPE = new TypeDescriptor(Pool.TYPE_QNAME);
322
- function type(arg0 = ANY_TYPE, arg1 = ANY_TYPE) {
323
- return TYPE.apply(arg0, arg1);
324
- }
325
- Pool.type = type;
326
- })(Pool = pool.Pool || (pool.Pool = {}));
327
- let PoolCreated;
328
- (function (PoolCreated) {
329
- PoolCreated.TYPE_QNAME = "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::PoolCreated";
330
- const TYPE = new TypeDescriptor(PoolCreated.TYPE_QNAME);
331
- function type(arg0 = ANY_TYPE, arg1 = ANY_TYPE) {
332
- return TYPE.apply(arg0, arg1);
333
- }
334
- PoolCreated.type = type;
335
- })(PoolCreated = pool.PoolCreated || (pool.PoolCreated = {}));
336
- let PoolName;
337
- (function (PoolName) {
338
- PoolName.TYPE_QNAME = "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::PoolName";
339
- const TYPE = new TypeDescriptor(PoolName.TYPE_QNAME);
340
- function type() {
341
- return TYPE.apply();
342
- }
343
- PoolName.type = type;
344
- })(PoolName = pool.PoolName || (pool.PoolName = {}));
345
- let PoolRegistry;
346
- (function (PoolRegistry) {
347
- PoolRegistry.TYPE_QNAME = "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::PoolRegistry";
348
- const TYPE = new TypeDescriptor(PoolRegistry.TYPE_QNAME);
349
- function type() {
350
- return TYPE.apply();
351
- }
352
- PoolRegistry.type = type;
353
- })(PoolRegistry = pool.PoolRegistry || (pool.PoolRegistry = {}));
354
- let TokenSwapped;
355
- (function (TokenSwapped) {
356
- TokenSwapped.TYPE_QNAME = "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::TokenSwapped";
357
- const TYPE = new TypeDescriptor(TokenSwapped.TYPE_QNAME);
358
- function type(arg0 = ANY_TYPE, arg1 = ANY_TYPE) {
359
- return TYPE.apply(arg0, arg1);
360
- }
361
- TokenSwapped.type = type;
362
- })(TokenSwapped = pool.TokenSwapped || (pool.TokenSwapped = {}));
363
- let WISPLP;
364
- (function (WISPLP) {
365
- WISPLP.TYPE_QNAME = "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::WISPLP";
366
- const TYPE = new TypeDescriptor(WISPLP.TYPE_QNAME);
367
- function type(arg0 = ANY_TYPE, arg1 = ANY_TYPE) {
368
- return TYPE.apply(arg0, arg1);
369
- }
370
- WISPLP.type = type;
371
- })(WISPLP = pool.WISPLP || (pool.WISPLP = {}));
372
- let builder;
373
- (function (builder) {
374
- function addLiquidity(tx, args, typeArguments) {
375
- const _args = [];
376
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
377
- _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.object(args[1]));
378
- _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.object(args[2]));
379
- _args.push(TransactionArgument.is(args[3]) ? args[3] : tx.pure(args[3]));
380
- _args.push(TransactionArgument.is(args[4]) ? args[4] : tx.pure(args[4]));
381
- _args.push(TransactionArgument.is(args[5]) ? args[5] : tx.pure(args[5]));
382
- _args.push(TransactionArgument.is(args[6]) ? args[6] : tx.pure(args[6]));
383
- _args.push(TransactionArgument.is(args[7]) ? args[7] : tx.object(args[7]));
384
- // @ts-ignore
385
- return tx.moveCall({
386
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::add_liquidity",
387
- arguments: _args,
388
- typeArguments: [
389
- typeof typeArguments[0] === "string"
390
- ? typeArguments[0]
391
- : typeArguments[0].getSignature(),
392
- typeof typeArguments[1] === "string"
393
- ? typeArguments[1]
394
- : typeArguments[1].getSignature(),
395
- ],
396
- });
397
- }
398
- builder.addLiquidity = addLiquidity;
399
- function borrowMutPool(tx, args, typeArguments) {
400
- const _args = [];
401
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
402
- // @ts-ignore
403
- return tx.moveCall({
404
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::borrow_mut_pool",
405
- arguments: _args,
406
- typeArguments: [
407
- typeof typeArguments[0] === "string"
408
- ? typeArguments[0]
409
- : typeArguments[0].getSignature(),
410
- typeof typeArguments[1] === "string"
411
- ? typeArguments[1]
412
- : typeArguments[1].getSignature(),
413
- ],
414
- });
415
- }
416
- builder.borrowMutPool = borrowMutPool;
417
- function borrowPool(tx, args, typeArguments) {
418
- const _args = [];
419
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
420
- // @ts-ignore
421
- return tx.moveCall({
422
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::borrow_pool",
423
- arguments: _args,
424
- typeArguments: [
425
- typeof typeArguments[0] === "string"
426
- ? typeArguments[0]
427
- : typeArguments[0].getSignature(),
428
- typeof typeArguments[1] === "string"
429
- ? typeArguments[1]
430
- : typeArguments[1].getSignature(),
431
- ],
432
- });
433
- }
434
- builder.borrowPool = borrowPool;
435
- function createPool(tx, args, typeArguments) {
436
- const _args = [];
437
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
438
- _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.object(args[1]));
439
- _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.object(args[2]));
440
- _args.push(TransactionArgument.is(args[3]) ? args[3] : tx.pure(args[3]));
441
- _args.push(TransactionArgument.is(args[4]) ? args[4] : tx.pure(args[4]));
442
- _args.push(TransactionArgument.is(args[5]) ? args[5] : tx.object(args[5]));
443
- // @ts-ignore
444
- return tx.moveCall({
445
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::create_pool",
446
- arguments: _args,
447
- typeArguments: [
448
- typeof typeArguments[0] === "string"
449
- ? typeArguments[0]
450
- : typeArguments[0].getSignature(),
451
- typeof typeArguments[1] === "string"
452
- ? typeArguments[1]
453
- : typeArguments[1].getSignature(),
454
- ],
455
- });
456
- }
457
- builder.createPool = createPool;
458
- function createPoolName(tx, args) {
459
- const _args = [];
460
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
461
- _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
462
- // @ts-ignore
463
- return tx.moveCall({
464
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::create_pool_name",
465
- arguments: _args,
466
- });
467
- }
468
- builder.createPoolName = createPoolName;
469
- function getAmounts(tx, args, typeArguments) {
470
- const _args = [];
471
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
472
- // @ts-ignore
473
- return tx.moveCall({
474
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::get_amounts",
475
- arguments: _args,
476
- typeArguments: [
477
- typeof typeArguments[0] === "string"
478
- ? typeArguments[0]
479
- : typeArguments[0].getSignature(),
480
- typeof typeArguments[1] === "string"
481
- ? typeArguments[1]
482
- : typeArguments[1].getSignature(),
483
- ],
484
- });
485
- }
486
- builder.getAmounts = getAmounts;
487
- function getInputAmount(tx, args, typeArguments) {
488
- const _args = [];
489
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
490
- _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
491
- _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
492
- // @ts-ignore
493
- return tx.moveCall({
494
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::get_input_amount",
495
- arguments: _args,
496
- typeArguments: [
497
- typeof typeArguments[0] === "string"
498
- ? typeArguments[0]
499
- : typeArguments[0].getSignature(),
500
- typeof typeArguments[1] === "string"
501
- ? typeArguments[1]
502
- : typeArguments[1].getSignature(),
503
- ],
504
- });
505
- }
506
- builder.getInputAmount = getInputAmount;
507
- function getOutputAmount(tx, args, typeArguments) {
508
- const _args = [];
509
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
510
- _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
511
- _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
512
- // @ts-ignore
513
- return tx.moveCall({
514
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::get_output_amount",
515
- arguments: _args,
516
- typeArguments: [
517
- typeof typeArguments[0] === "string"
518
- ? typeArguments[0]
519
- : typeArguments[0].getSignature(),
520
- typeof typeArguments[1] === "string"
521
- ? typeArguments[1]
522
- : typeArguments[1].getSignature(),
523
- ],
524
- });
525
- }
526
- builder.getOutputAmount = getOutputAmount;
527
- function getPoolData(tx, args, typeArguments) {
528
- const _args = [];
529
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
530
- // @ts-ignore
531
- return tx.moveCall({
532
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::get_pool_data",
533
- arguments: _args,
534
- typeArguments: [
535
- typeof typeArguments[0] === "string"
536
- ? typeArguments[0]
537
- : typeArguments[0].getSignature(),
538
- typeof typeArguments[1] === "string"
539
- ? typeArguments[1]
540
- : typeArguments[1].getSignature(),
541
- ],
542
- });
543
- }
544
- builder.getPoolData = getPoolData;
545
- function isPoolCreated(tx, args, typeArguments) {
546
- const _args = [];
547
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
548
- // @ts-ignore
549
- return tx.moveCall({
550
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::is_pool_created",
551
- arguments: _args,
552
- typeArguments: [
553
- typeof typeArguments[0] === "string"
554
- ? typeArguments[0]
555
- : typeArguments[0].getSignature(),
556
- typeof typeArguments[1] === "string"
557
- ? typeArguments[1]
558
- : typeArguments[1].getSignature(),
559
- ],
560
- });
561
- }
562
- builder.isPoolCreated = isPoolCreated;
563
- function isPoolCreatedSorted(tx, args, typeArguments) {
564
- const _args = [];
565
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
566
- // @ts-ignore
567
- return tx.moveCall({
568
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::is_pool_created_sorted",
569
- arguments: _args,
570
- typeArguments: [
571
- typeof typeArguments[0] === "string"
572
- ? typeArguments[0]
573
- : typeArguments[0].getSignature(),
574
- typeof typeArguments[1] === "string"
575
- ? typeArguments[1]
576
- : typeArguments[1].getSignature(),
577
- ],
578
- });
579
- }
580
- builder.isPoolCreatedSorted = isPoolCreatedSorted;
581
- function processSwapExactInput(tx, args, typeArguments) {
582
- const _args = [];
583
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
584
- _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.object(args[1]));
585
- _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.object(args[2]));
586
- _args.push(TransactionArgument.is(args[3]) ? args[3] : tx.pure(args[3]));
587
- _args.push(TransactionArgument.is(args[4]) ? args[4] : tx.pure(args[4]));
588
- _args.push(TransactionArgument.is(args[5]) ? args[5] : tx.object(args[5]));
589
- // @ts-ignore
590
- return tx.moveCall({
591
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::process_swap_exact_input",
592
- arguments: _args,
593
- typeArguments: [
594
- typeof typeArguments[0] === "string"
595
- ? typeArguments[0]
596
- : typeArguments[0].getSignature(),
597
- typeof typeArguments[1] === "string"
598
- ? typeArguments[1]
599
- : typeArguments[1].getSignature(),
600
- ],
601
- });
602
- }
603
- builder.processSwapExactInput = processSwapExactInput;
604
- function processSwapExactOutput(tx, args, typeArguments) {
605
- const _args = [];
606
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
607
- _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.object(args[1]));
608
- _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.object(args[2]));
609
- _args.push(TransactionArgument.is(args[3]) ? args[3] : tx.pure(args[3]));
610
- _args.push(TransactionArgument.is(args[4]) ? args[4] : tx.pure(args[4]));
611
- _args.push(TransactionArgument.is(args[5]) ? args[5] : tx.object(args[5]));
612
- // @ts-ignore
613
- return tx.moveCall({
614
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::process_swap_exact_output",
615
- arguments: _args,
616
- typeArguments: [
617
- typeof typeArguments[0] === "string"
618
- ? typeArguments[0]
619
- : typeArguments[0].getSignature(),
620
- typeof typeArguments[1] === "string"
621
- ? typeArguments[1]
622
- : typeArguments[1].getSignature(),
623
- ],
624
- });
625
- }
626
- builder.processSwapExactOutput = processSwapExactOutput;
627
- function removeLiquidity(tx, args, typeArguments) {
628
- const _args = [];
629
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
630
- _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.object(args[1]));
631
- _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
632
- _args.push(TransactionArgument.is(args[3]) ? args[3] : tx.pure(args[3]));
633
- _args.push(TransactionArgument.is(args[4]) ? args[4] : tx.pure(args[4]));
634
- _args.push(TransactionArgument.is(args[5]) ? args[5] : tx.object(args[5]));
635
- // @ts-ignore
636
- return tx.moveCall({
637
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::remove_liquidity",
638
- arguments: _args,
639
- typeArguments: [
640
- typeof typeArguments[0] === "string"
641
- ? typeArguments[0]
642
- : typeArguments[0].getSignature(),
643
- typeof typeArguments[1] === "string"
644
- ? typeArguments[1]
645
- : typeArguments[1].getSignature(),
646
- ],
647
- });
648
- }
649
- builder.removeLiquidity = removeLiquidity;
650
- function setFeeTo_(tx, args) {
651
- const _args = [];
652
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
653
- _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.object(args[1]));
654
- _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
655
- _args.push(TransactionArgument.is(args[3]) ? args[3] : tx.object(args[3]));
656
- // @ts-ignore
657
- return tx.moveCall({
658
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::set_fee_to_",
659
- arguments: _args,
660
- });
661
- }
662
- builder.setFeeTo_ = setFeeTo_;
663
- function swapExactFirstToSecond(tx, args, typeArguments) {
664
- const _args = [];
665
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
666
- _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.object(args[1]));
667
- _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
668
- _args.push(TransactionArgument.is(args[3]) ? args[3] : tx.pure(args[3]));
669
- _args.push(TransactionArgument.is(args[4]) ? args[4] : tx.object(args[4]));
670
- // @ts-ignore
671
- return tx.moveCall({
672
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::swap_exact_first_to_second",
673
- arguments: _args,
674
- typeArguments: [
675
- typeof typeArguments[0] === "string"
676
- ? typeArguments[0]
677
- : typeArguments[0].getSignature(),
678
- typeof typeArguments[1] === "string"
679
- ? typeArguments[1]
680
- : typeArguments[1].getSignature(),
681
- ],
682
- });
683
- }
684
- builder.swapExactFirstToSecond = swapExactFirstToSecond;
685
- function swapExactSecondToFirst(tx, args, typeArguments) {
686
- const _args = [];
687
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
688
- _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.object(args[1]));
689
- _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
690
- _args.push(TransactionArgument.is(args[3]) ? args[3] : tx.pure(args[3]));
691
- _args.push(TransactionArgument.is(args[4]) ? args[4] : tx.object(args[4]));
692
- // @ts-ignore
693
- return tx.moveCall({
694
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::swap_exact_second_to_first",
695
- arguments: _args,
696
- typeArguments: [
697
- typeof typeArguments[0] === "string"
698
- ? typeArguments[0]
699
- : typeArguments[0].getSignature(),
700
- typeof typeArguments[1] === "string"
701
- ? typeArguments[1]
702
- : typeArguments[1].getSignature(),
703
- ],
704
- });
705
- }
706
- builder.swapExactSecondToFirst = swapExactSecondToFirst;
707
- function swapFirstToExactSecond(tx, args, typeArguments) {
708
- const _args = [];
709
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
710
- _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.object(args[1]));
711
- _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
712
- _args.push(TransactionArgument.is(args[3]) ? args[3] : tx.pure(args[3]));
713
- _args.push(TransactionArgument.is(args[4]) ? args[4] : tx.object(args[4]));
714
- // @ts-ignore
715
- return tx.moveCall({
716
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::swap_first_to_exact_second",
717
- arguments: _args,
718
- typeArguments: [
719
- typeof typeArguments[0] === "string"
720
- ? typeArguments[0]
721
- : typeArguments[0].getSignature(),
722
- typeof typeArguments[1] === "string"
723
- ? typeArguments[1]
724
- : typeArguments[1].getSignature(),
725
- ],
726
- });
727
- }
728
- builder.swapFirstToExactSecond = swapFirstToExactSecond;
729
- function swapSecondToExactFirst(tx, args, typeArguments) {
730
- const _args = [];
731
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
732
- _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.object(args[1]));
733
- _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
734
- _args.push(TransactionArgument.is(args[3]) ? args[3] : tx.pure(args[3]));
735
- _args.push(TransactionArgument.is(args[4]) ? args[4] : tx.object(args[4]));
736
- // @ts-ignore
737
- return tx.moveCall({
738
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::swap_second_to_exact_first",
739
- arguments: _args,
740
- typeArguments: [
741
- typeof typeArguments[0] === "string"
742
- ? typeArguments[0]
743
- : typeArguments[0].getSignature(),
744
- typeof typeArguments[1] === "string"
745
- ? typeArguments[1]
746
- : typeArguments[1].getSignature(),
747
- ],
748
- });
749
- }
750
- builder.swapSecondToExactFirst = swapSecondToExactFirst;
751
- function zapInFirst(tx, args, typeArguments) {
752
- const _args = [];
753
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
754
- _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.object(args[1]));
755
- _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
756
- _args.push(TransactionArgument.is(args[3]) ? args[3] : tx.object(args[3]));
757
- // @ts-ignore
758
- return tx.moveCall({
759
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::zap_in_first",
760
- arguments: _args,
761
- typeArguments: [
762
- typeof typeArguments[0] === "string"
763
- ? typeArguments[0]
764
- : typeArguments[0].getSignature(),
765
- typeof typeArguments[1] === "string"
766
- ? typeArguments[1]
767
- : typeArguments[1].getSignature(),
768
- ],
769
- });
770
- }
771
- builder.zapInFirst = zapInFirst;
772
- function zapInSecond(tx, args, typeArguments) {
773
- const _args = [];
774
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
775
- _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.object(args[1]));
776
- _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
777
- _args.push(TransactionArgument.is(args[3]) ? args[3] : tx.object(args[3]));
778
- // @ts-ignore
779
- return tx.moveCall({
780
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool::zap_in_second",
781
- arguments: _args,
782
- typeArguments: [
783
- typeof typeArguments[0] === "string"
784
- ? typeArguments[0]
785
- : typeArguments[0].getSignature(),
786
- typeof typeArguments[1] === "string"
787
- ? typeArguments[1]
788
- : typeArguments[1].getSignature(),
789
- ],
790
- });
791
- }
792
- builder.zapInSecond = zapInSecond;
793
- })(builder = pool.builder || (pool.builder = {}));
794
- let view;
795
- (function (view) {
796
- async function addLiquidity(client, args, typeArguments) {
797
- const tx = new TransactionBlock();
798
- builder.addLiquidity(tx, args, typeArguments);
799
- const res = await client.devInspectTransactionBlock({
800
- transactionBlock: tx,
801
- sender: ZERO_ADDRESS,
802
- });
803
- return res;
804
- }
805
- view.addLiquidity = addLiquidity;
806
- async function borrowMutPool(client, args, typeArguments) {
807
- const tx = new TransactionBlock();
808
- builder.borrowMutPool(tx, args, typeArguments);
809
- const res = await client.devInspectTransactionBlock({
810
- transactionBlock: tx,
811
- sender: ZERO_ADDRESS,
812
- });
813
- return res;
814
- }
815
- view.borrowMutPool = borrowMutPool;
816
- async function borrowPool(client, args, typeArguments) {
817
- const tx = new TransactionBlock();
818
- builder.borrowPool(tx, args, typeArguments);
819
- const res = await client.devInspectTransactionBlock({
820
- transactionBlock: tx,
821
- sender: ZERO_ADDRESS,
822
- });
823
- return res;
824
- }
825
- view.borrowPool = borrowPool;
826
- async function createPool(client, args, typeArguments) {
827
- const tx = new TransactionBlock();
828
- builder.createPool(tx, args, typeArguments);
829
- const res = await client.devInspectTransactionBlock({
830
- transactionBlock: tx,
831
- sender: ZERO_ADDRESS,
832
- });
833
- return res;
834
- }
835
- view.createPool = createPool;
836
- async function createPoolName(client, args) {
837
- const tx = new TransactionBlock();
838
- builder.createPoolName(tx, args);
839
- const res = await client.devInspectTransactionBlock({
840
- transactionBlock: tx,
841
- sender: ZERO_ADDRESS,
842
- });
843
- return res;
844
- }
845
- view.createPoolName = createPoolName;
846
- async function getAmounts(client, args, typeArguments) {
847
- const tx = new TransactionBlock();
848
- builder.getAmounts(tx, args, typeArguments);
849
- const res = await client.devInspectTransactionBlock({
850
- transactionBlock: tx,
851
- sender: ZERO_ADDRESS,
852
- });
853
- return res;
854
- }
855
- view.getAmounts = getAmounts;
856
- async function getInputAmount(client, args, typeArguments) {
857
- const tx = new TransactionBlock();
858
- builder.getInputAmount(tx, args, typeArguments);
859
- const res = await client.devInspectTransactionBlock({
860
- transactionBlock: tx,
861
- sender: ZERO_ADDRESS,
862
- });
863
- return res;
864
- }
865
- view.getInputAmount = getInputAmount;
866
- async function getOutputAmount(client, args, typeArguments) {
867
- const tx = new TransactionBlock();
868
- builder.getOutputAmount(tx, args, typeArguments);
869
- const res = await client.devInspectTransactionBlock({
870
- transactionBlock: tx,
871
- sender: ZERO_ADDRESS,
872
- });
873
- return res;
874
- }
875
- view.getOutputAmount = getOutputAmount;
876
- async function getPoolData(client, args, typeArguments) {
877
- const tx = new TransactionBlock();
878
- builder.getPoolData(tx, args, typeArguments);
879
- const res = await client.devInspectTransactionBlock({
880
- transactionBlock: tx,
881
- sender: ZERO_ADDRESS,
882
- });
883
- return res;
884
- }
885
- view.getPoolData = getPoolData;
886
- async function isPoolCreated(client, args, typeArguments) {
887
- const tx = new TransactionBlock();
888
- builder.isPoolCreated(tx, args, typeArguments);
889
- const res = await client.devInspectTransactionBlock({
890
- transactionBlock: tx,
891
- sender: ZERO_ADDRESS,
892
- });
893
- return res;
894
- }
895
- view.isPoolCreated = isPoolCreated;
896
- async function isPoolCreatedSorted(client, args, typeArguments) {
897
- const tx = new TransactionBlock();
898
- builder.isPoolCreatedSorted(tx, args, typeArguments);
899
- const res = await client.devInspectTransactionBlock({
900
- transactionBlock: tx,
901
- sender: ZERO_ADDRESS,
902
- });
903
- return res;
904
- }
905
- view.isPoolCreatedSorted = isPoolCreatedSorted;
906
- async function processSwapExactInput(client, args, typeArguments) {
907
- const tx = new TransactionBlock();
908
- builder.processSwapExactInput(tx, args, typeArguments);
909
- const res = await client.devInspectTransactionBlock({
910
- transactionBlock: tx,
911
- sender: ZERO_ADDRESS,
912
- });
913
- return res;
914
- }
915
- view.processSwapExactInput = processSwapExactInput;
916
- async function processSwapExactOutput(client, args, typeArguments) {
917
- const tx = new TransactionBlock();
918
- builder.processSwapExactOutput(tx, args, typeArguments);
919
- const res = await client.devInspectTransactionBlock({
920
- transactionBlock: tx,
921
- sender: ZERO_ADDRESS,
922
- });
923
- return res;
924
- }
925
- view.processSwapExactOutput = processSwapExactOutput;
926
- async function removeLiquidity(client, args, typeArguments) {
927
- const tx = new TransactionBlock();
928
- builder.removeLiquidity(tx, args, typeArguments);
929
- const res = await client.devInspectTransactionBlock({
930
- transactionBlock: tx,
931
- sender: ZERO_ADDRESS,
932
- });
933
- return res;
934
- }
935
- view.removeLiquidity = removeLiquidity;
936
- async function setFeeTo_(client, args) {
937
- const tx = new TransactionBlock();
938
- builder.setFeeTo_(tx, args);
939
- const res = await client.devInspectTransactionBlock({
940
- transactionBlock: tx,
941
- sender: ZERO_ADDRESS,
942
- });
943
- return res;
944
- }
945
- view.setFeeTo_ = setFeeTo_;
946
- async function swapExactFirstToSecond(client, args, typeArguments) {
947
- const tx = new TransactionBlock();
948
- builder.swapExactFirstToSecond(tx, args, typeArguments);
949
- const res = await client.devInspectTransactionBlock({
950
- transactionBlock: tx,
951
- sender: ZERO_ADDRESS,
952
- });
953
- return res;
954
- }
955
- view.swapExactFirstToSecond = swapExactFirstToSecond;
956
- async function swapExactSecondToFirst(client, args, typeArguments) {
957
- const tx = new TransactionBlock();
958
- builder.swapExactSecondToFirst(tx, args, typeArguments);
959
- const res = await client.devInspectTransactionBlock({
960
- transactionBlock: tx,
961
- sender: ZERO_ADDRESS,
962
- });
963
- return res;
964
- }
965
- view.swapExactSecondToFirst = swapExactSecondToFirst;
966
- async function swapFirstToExactSecond(client, args, typeArguments) {
967
- const tx = new TransactionBlock();
968
- builder.swapFirstToExactSecond(tx, args, typeArguments);
969
- const res = await client.devInspectTransactionBlock({
970
- transactionBlock: tx,
971
- sender: ZERO_ADDRESS,
972
- });
973
- return res;
974
- }
975
- view.swapFirstToExactSecond = swapFirstToExactSecond;
976
- async function swapSecondToExactFirst(client, args, typeArguments) {
977
- const tx = new TransactionBlock();
978
- builder.swapSecondToExactFirst(tx, args, typeArguments);
979
- const res = await client.devInspectTransactionBlock({
980
- transactionBlock: tx,
981
- sender: ZERO_ADDRESS,
982
- });
983
- return res;
984
- }
985
- view.swapSecondToExactFirst = swapSecondToExactFirst;
986
- async function zapInFirst(client, args, typeArguments) {
987
- const tx = new TransactionBlock();
988
- builder.zapInFirst(tx, args, typeArguments);
989
- const res = await client.devInspectTransactionBlock({
990
- transactionBlock: tx,
991
- sender: ZERO_ADDRESS,
992
- });
993
- return res;
994
- }
995
- view.zapInFirst = zapInFirst;
996
- async function zapInSecond(client, args, typeArguments) {
997
- const tx = new TransactionBlock();
998
- builder.zapInSecond(tx, args, typeArguments);
999
- const res = await client.devInspectTransactionBlock({
1000
- transactionBlock: tx,
1001
- sender: ZERO_ADDRESS,
1002
- });
1003
- return res;
1004
- }
1005
- view.zapInSecond = zapInSecond;
1006
- })(view = pool.view || (pool.view = {}));
1007
- })(pool || (pool = {}));
1008
- export var pool_utils;
1009
- (function (pool_utils) {
1010
- let builder;
1011
- (function (builder) {
1012
- function executeReturnToken(tx, args, typeArguments) {
1013
- const _args = [];
1014
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
1015
- _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.object(args[1]));
1016
- // @ts-ignore
1017
- return tx.moveCall({
1018
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool_utils::execute_return_token",
1019
- arguments: _args,
1020
- typeArguments: [
1021
- typeof typeArguments[0] === "string"
1022
- ? typeArguments[0]
1023
- : typeArguments[0].getSignature(),
1024
- ],
1025
- });
1026
- }
1027
- builder.executeReturnToken = executeReturnToken;
1028
- function getInputPrice(tx, args) {
1029
- const _args = [];
1030
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
1031
- _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
1032
- _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
1033
- _args.push(TransactionArgument.is(args[3]) ? args[3] : tx.pure(args[3]));
1034
- // @ts-ignore
1035
- return tx.moveCall({
1036
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool_utils::get_input_price",
1037
- arguments: _args,
1038
- });
1039
- }
1040
- builder.getInputPrice = getInputPrice;
1041
- function getOptimalZapInAmount(tx, args) {
1042
- const _args = [];
1043
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
1044
- _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
1045
- // @ts-ignore
1046
- return tx.moveCall({
1047
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool_utils::get_optimal_zap_in_amount",
1048
- arguments: _args,
1049
- });
1050
- }
1051
- builder.getOptimalZapInAmount = getOptimalZapInAmount;
1052
- function getOutputPrice(tx, args) {
1053
- const _args = [];
1054
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
1055
- _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
1056
- _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
1057
- _args.push(TransactionArgument.is(args[3]) ? args[3] : tx.pure(args[3]));
1058
- // @ts-ignore
1059
- return tx.moveCall({
1060
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool_utils::get_output_price",
1061
- arguments: _args,
1062
- });
1063
- }
1064
- builder.getOutputPrice = getOutputPrice;
1065
- function getTripleType(tx, args, typeArguments) {
1066
- const _args = [];
1067
- // @ts-ignore
1068
- return tx.moveCall({
1069
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool_utils::get_triple_type",
1070
- arguments: _args,
1071
- typeArguments: [
1072
- typeof typeArguments[0] === "string"
1073
- ? typeArguments[0]
1074
- : typeArguments[0].getSignature(),
1075
- typeof typeArguments[1] === "string"
1076
- ? typeArguments[1]
1077
- : typeArguments[1].getSignature(),
1078
- typeof typeArguments[2] === "string"
1079
- ? typeArguments[2]
1080
- : typeArguments[2].getSignature(),
1081
- ],
1082
- });
1083
- }
1084
- builder.getTripleType = getTripleType;
1085
- function getType(tx, args, typeArguments) {
1086
- const _args = [];
1087
- // @ts-ignore
1088
- return tx.moveCall({
1089
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool_utils::get_type",
1090
- arguments: _args,
1091
- typeArguments: [
1092
- typeof typeArguments[0] === "string"
1093
- ? typeArguments[0]
1094
- : typeArguments[0].getSignature(),
1095
- typeof typeArguments[1] === "string"
1096
- ? typeArguments[1]
1097
- : typeArguments[1].getSignature(),
1098
- ],
1099
- });
1100
- }
1101
- builder.getType = getType;
1102
- function quote(tx, args) {
1103
- const _args = [];
1104
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.pure(args[0]));
1105
- _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.pure(args[1]));
1106
- _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
1107
- // @ts-ignore
1108
- return tx.moveCall({
1109
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool_utils::quote",
1110
- arguments: _args,
1111
- });
1112
- }
1113
- builder.quote = quote;
1114
- function sortTokenType(tx, args) {
1115
- const _args = [];
1116
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
1117
- _args.push(TransactionArgument.is(args[1]) ? args[1] : tx.object(args[1]));
1118
- // @ts-ignore
1119
- return tx.moveCall({
1120
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::pool_utils::sort_token_type",
1121
- arguments: _args,
1122
- });
1123
- }
1124
- builder.sortTokenType = sortTokenType;
1125
- })(builder = pool_utils.builder || (pool_utils.builder = {}));
1126
- let view;
1127
- (function (view) {
1128
- async function executeReturnToken(client, args, typeArguments) {
1129
- const tx = new TransactionBlock();
1130
- builder.executeReturnToken(tx, args, typeArguments);
1131
- const res = await client.devInspectTransactionBlock({
1132
- transactionBlock: tx,
1133
- sender: ZERO_ADDRESS,
1134
- });
1135
- return res;
1136
- }
1137
- view.executeReturnToken = executeReturnToken;
1138
- async function getInputPrice(client, args) {
1139
- const tx = new TransactionBlock();
1140
- builder.getInputPrice(tx, args);
1141
- const res = await client.devInspectTransactionBlock({
1142
- transactionBlock: tx,
1143
- sender: ZERO_ADDRESS,
1144
- });
1145
- return res;
1146
- }
1147
- view.getInputPrice = getInputPrice;
1148
- async function getOptimalZapInAmount(client, args) {
1149
- const tx = new TransactionBlock();
1150
- builder.getOptimalZapInAmount(tx, args);
1151
- const res = await client.devInspectTransactionBlock({
1152
- transactionBlock: tx,
1153
- sender: ZERO_ADDRESS,
1154
- });
1155
- return res;
1156
- }
1157
- view.getOptimalZapInAmount = getOptimalZapInAmount;
1158
- async function getOutputPrice(client, args) {
1159
- const tx = new TransactionBlock();
1160
- builder.getOutputPrice(tx, args);
1161
- const res = await client.devInspectTransactionBlock({
1162
- transactionBlock: tx,
1163
- sender: ZERO_ADDRESS,
1164
- });
1165
- return res;
1166
- }
1167
- view.getOutputPrice = getOutputPrice;
1168
- async function getTripleType(client, args, typeArguments) {
1169
- const tx = new TransactionBlock();
1170
- builder.getTripleType(tx, args, typeArguments);
1171
- const res = await client.devInspectTransactionBlock({
1172
- transactionBlock: tx,
1173
- sender: ZERO_ADDRESS,
1174
- });
1175
- return res;
1176
- }
1177
- view.getTripleType = getTripleType;
1178
- async function getType(client, args, typeArguments) {
1179
- const tx = new TransactionBlock();
1180
- builder.getType(tx, args, typeArguments);
1181
- const res = await client.devInspectTransactionBlock({
1182
- transactionBlock: tx,
1183
- sender: ZERO_ADDRESS,
1184
- });
1185
- return res;
1186
- }
1187
- view.getType = getType;
1188
- async function quote(client, args) {
1189
- const tx = new TransactionBlock();
1190
- builder.quote(tx, args);
1191
- const res = await client.devInspectTransactionBlock({
1192
- transactionBlock: tx,
1193
- sender: ZERO_ADDRESS,
1194
- });
1195
- return res;
1196
- }
1197
- view.quote = quote;
1198
- async function sortTokenType(client, args) {
1199
- const tx = new TransactionBlock();
1200
- builder.sortTokenType(tx, args);
1201
- const res = await client.devInspectTransactionBlock({
1202
- transactionBlock: tx,
1203
- sender: ZERO_ADDRESS,
1204
- });
1205
- return res;
1206
- }
1207
- view.sortTokenType = sortTokenType;
1208
- })(view = pool_utils.view || (pool_utils.view = {}));
1209
- })(pool_utils || (pool_utils = {}));
1210
- export var router;
1211
- (function (router) {
1212
- let builder;
1213
- (function (builder) {
1214
- function addLiquidity_(tx, args, typeArguments) {
1215
- const _args = [];
1216
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
1217
- _args.push(TransactionArgument.is(args[1])
1218
- ? args[1]
1219
- : tx.makeMoveVec({
1220
- objects: args[1].map((a) => tx.object(a)),
1221
- // type: TODO
1222
- }));
1223
- _args.push(TransactionArgument.is(args[2])
1224
- ? args[2]
1225
- : tx.makeMoveVec({
1226
- objects: args[2].map((a) => tx.object(a)),
1227
- // type: TODO
1228
- }));
1229
- _args.push(TransactionArgument.is(args[3]) ? args[3] : tx.pure(args[3]));
1230
- _args.push(TransactionArgument.is(args[4]) ? args[4] : tx.pure(args[4]));
1231
- _args.push(TransactionArgument.is(args[5]) ? args[5] : tx.pure(args[5]));
1232
- _args.push(TransactionArgument.is(args[6]) ? args[6] : tx.pure(args[6]));
1233
- _args.push(TransactionArgument.is(args[7]) ? args[7] : tx.object(args[7]));
1234
- // @ts-ignore
1235
- return tx.moveCall({
1236
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::router::add_liquidity_",
1237
- arguments: _args,
1238
- typeArguments: [
1239
- typeof typeArguments[0] === "string"
1240
- ? typeArguments[0]
1241
- : typeArguments[0].getSignature(),
1242
- typeof typeArguments[1] === "string"
1243
- ? typeArguments[1]
1244
- : typeArguments[1].getSignature(),
1245
- ],
1246
- });
1247
- }
1248
- builder.addLiquidity_ = addLiquidity_;
1249
- function createPool_(tx, args, typeArguments) {
1250
- const _args = [];
1251
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
1252
- _args.push(TransactionArgument.is(args[1])
1253
- ? args[1]
1254
- : tx.makeMoveVec({
1255
- objects: args[1].map((a) => tx.object(a)),
1256
- // type: TODO
1257
- }));
1258
- _args.push(TransactionArgument.is(args[2])
1259
- ? args[2]
1260
- : tx.makeMoveVec({
1261
- objects: args[2].map((a) => tx.object(a)),
1262
- // type: TODO
1263
- }));
1264
- _args.push(TransactionArgument.is(args[3]) ? args[3] : tx.pure(args[3]));
1265
- _args.push(TransactionArgument.is(args[4]) ? args[4] : tx.pure(args[4]));
1266
- _args.push(TransactionArgument.is(args[5]) ? args[5] : tx.object(args[5]));
1267
- // @ts-ignore
1268
- return tx.moveCall({
1269
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::router::create_pool_",
1270
- arguments: _args,
1271
- typeArguments: [
1272
- typeof typeArguments[0] === "string"
1273
- ? typeArguments[0]
1274
- : typeArguments[0].getSignature(),
1275
- typeof typeArguments[1] === "string"
1276
- ? typeArguments[1]
1277
- : typeArguments[1].getSignature(),
1278
- ],
1279
- });
1280
- }
1281
- builder.createPool_ = createPool_;
1282
- function removeLiquidity_(tx, args, typeArguments) {
1283
- const _args = [];
1284
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
1285
- _args.push(TransactionArgument.is(args[1])
1286
- ? args[1]
1287
- : tx.makeMoveVec({
1288
- objects: args[1].map((a) => tx.object(a)),
1289
- // type: TODO
1290
- }));
1291
- _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
1292
- _args.push(TransactionArgument.is(args[3]) ? args[3] : tx.pure(args[3]));
1293
- _args.push(TransactionArgument.is(args[4]) ? args[4] : tx.pure(args[4]));
1294
- _args.push(TransactionArgument.is(args[5]) ? args[5] : tx.object(args[5]));
1295
- // @ts-ignore
1296
- return tx.moveCall({
1297
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::router::remove_liquidity_",
1298
- arguments: _args,
1299
- typeArguments: [
1300
- typeof typeArguments[0] === "string"
1301
- ? typeArguments[0]
1302
- : typeArguments[0].getSignature(),
1303
- typeof typeArguments[1] === "string"
1304
- ? typeArguments[1]
1305
- : typeArguments[1].getSignature(),
1306
- ],
1307
- });
1308
- }
1309
- builder.removeLiquidity_ = removeLiquidity_;
1310
- function swapExactInput_(tx, args, typeArguments) {
1311
- const _args = [];
1312
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
1313
- _args.push(TransactionArgument.is(args[1])
1314
- ? args[1]
1315
- : tx.makeMoveVec({
1316
- objects: args[1].map((a) => tx.object(a)),
1317
- // type: TODO
1318
- }));
1319
- _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
1320
- _args.push(TransactionArgument.is(args[3]) ? args[3] : tx.pure(args[3]));
1321
- _args.push(TransactionArgument.is(args[4]) ? args[4] : tx.object(args[4]));
1322
- // @ts-ignore
1323
- return tx.moveCall({
1324
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::router::swap_exact_input_",
1325
- arguments: _args,
1326
- typeArguments: [
1327
- typeof typeArguments[0] === "string"
1328
- ? typeArguments[0]
1329
- : typeArguments[0].getSignature(),
1330
- typeof typeArguments[1] === "string"
1331
- ? typeArguments[1]
1332
- : typeArguments[1].getSignature(),
1333
- ],
1334
- });
1335
- }
1336
- builder.swapExactInput_ = swapExactInput_;
1337
- function swapExactInputDoublehop_(tx, args, typeArguments) {
1338
- const _args = [];
1339
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
1340
- _args.push(TransactionArgument.is(args[1])
1341
- ? args[1]
1342
- : tx.makeMoveVec({
1343
- objects: args[1].map((a) => tx.object(a)),
1344
- // type: TODO
1345
- }));
1346
- _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
1347
- _args.push(TransactionArgument.is(args[3]) ? args[3] : tx.pure(args[3]));
1348
- _args.push(TransactionArgument.is(args[4]) ? args[4] : tx.object(args[4]));
1349
- // @ts-ignore
1350
- return tx.moveCall({
1351
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::router::swap_exact_input_doublehop_",
1352
- arguments: _args,
1353
- typeArguments: [
1354
- typeof typeArguments[0] === "string"
1355
- ? typeArguments[0]
1356
- : typeArguments[0].getSignature(),
1357
- typeof typeArguments[1] === "string"
1358
- ? typeArguments[1]
1359
- : typeArguments[1].getSignature(),
1360
- typeof typeArguments[2] === "string"
1361
- ? typeArguments[2]
1362
- : typeArguments[2].getSignature(),
1363
- ],
1364
- });
1365
- }
1366
- builder.swapExactInputDoublehop_ = swapExactInputDoublehop_;
1367
- function swapExactOutput_(tx, args, typeArguments) {
1368
- const _args = [];
1369
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
1370
- _args.push(TransactionArgument.is(args[1])
1371
- ? args[1]
1372
- : tx.makeMoveVec({
1373
- objects: args[1].map((a) => tx.object(a)),
1374
- // type: TODO
1375
- }));
1376
- _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
1377
- _args.push(TransactionArgument.is(args[3]) ? args[3] : tx.pure(args[3]));
1378
- _args.push(TransactionArgument.is(args[4]) ? args[4] : tx.object(args[4]));
1379
- // @ts-ignore
1380
- return tx.moveCall({
1381
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::router::swap_exact_output_",
1382
- arguments: _args,
1383
- typeArguments: [
1384
- typeof typeArguments[0] === "string"
1385
- ? typeArguments[0]
1386
- : typeArguments[0].getSignature(),
1387
- typeof typeArguments[1] === "string"
1388
- ? typeArguments[1]
1389
- : typeArguments[1].getSignature(),
1390
- ],
1391
- });
1392
- }
1393
- builder.swapExactOutput_ = swapExactOutput_;
1394
- function swapExactOutputDoublehop_(tx, args, typeArguments) {
1395
- const _args = [];
1396
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
1397
- _args.push(TransactionArgument.is(args[1])
1398
- ? args[1]
1399
- : tx.makeMoveVec({
1400
- objects: args[1].map((a) => tx.object(a)),
1401
- // type: TODO
1402
- }));
1403
- _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
1404
- _args.push(TransactionArgument.is(args[3]) ? args[3] : tx.pure(args[3]));
1405
- _args.push(TransactionArgument.is(args[4]) ? args[4] : tx.object(args[4]));
1406
- // @ts-ignore
1407
- return tx.moveCall({
1408
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::router::swap_exact_output_doublehop_",
1409
- arguments: _args,
1410
- typeArguments: [
1411
- typeof typeArguments[0] === "string"
1412
- ? typeArguments[0]
1413
- : typeArguments[0].getSignature(),
1414
- typeof typeArguments[1] === "string"
1415
- ? typeArguments[1]
1416
- : typeArguments[1].getSignature(),
1417
- typeof typeArguments[2] === "string"
1418
- ? typeArguments[2]
1419
- : typeArguments[2].getSignature(),
1420
- ],
1421
- });
1422
- }
1423
- builder.swapExactOutputDoublehop_ = swapExactOutputDoublehop_;
1424
- function zapIn_(tx, args, typeArguments) {
1425
- const _args = [];
1426
- _args.push(TransactionArgument.is(args[0]) ? args[0] : tx.object(args[0]));
1427
- _args.push(TransactionArgument.is(args[1])
1428
- ? args[1]
1429
- : tx.makeMoveVec({
1430
- objects: args[1].map((a) => tx.object(a)),
1431
- // type: TODO
1432
- }));
1433
- _args.push(TransactionArgument.is(args[2]) ? args[2] : tx.pure(args[2]));
1434
- _args.push(TransactionArgument.is(args[3]) ? args[3] : tx.object(args[3]));
1435
- // @ts-ignore
1436
- return tx.moveCall({
1437
- target: "0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a::router::zap_in_",
1438
- arguments: _args,
1439
- typeArguments: [
1440
- typeof typeArguments[0] === "string"
1441
- ? typeArguments[0]
1442
- : typeArguments[0].getSignature(),
1443
- typeof typeArguments[1] === "string"
1444
- ? typeArguments[1]
1445
- : typeArguments[1].getSignature(),
1446
- ],
1447
- });
1448
- }
1449
- builder.zapIn_ = zapIn_;
1450
- })(builder = router.builder || (router.builder = {}));
1451
- let view;
1452
- (function (view) {
1453
- async function addLiquidity_(client, args, typeArguments) {
1454
- const tx = new TransactionBlock();
1455
- builder.addLiquidity_(tx, args, typeArguments);
1456
- const res = await client.devInspectTransactionBlock({
1457
- transactionBlock: tx,
1458
- sender: ZERO_ADDRESS,
1459
- });
1460
- return res;
1461
- }
1462
- view.addLiquidity_ = addLiquidity_;
1463
- async function createPool_(client, args, typeArguments) {
1464
- const tx = new TransactionBlock();
1465
- builder.createPool_(tx, args, typeArguments);
1466
- const res = await client.devInspectTransactionBlock({
1467
- transactionBlock: tx,
1468
- sender: ZERO_ADDRESS,
1469
- });
1470
- return res;
1471
- }
1472
- view.createPool_ = createPool_;
1473
- async function removeLiquidity_(client, args, typeArguments) {
1474
- const tx = new TransactionBlock();
1475
- builder.removeLiquidity_(tx, args, typeArguments);
1476
- const res = await client.devInspectTransactionBlock({
1477
- transactionBlock: tx,
1478
- sender: ZERO_ADDRESS,
1479
- });
1480
- return res;
1481
- }
1482
- view.removeLiquidity_ = removeLiquidity_;
1483
- async function swapExactInput_(client, args, typeArguments) {
1484
- const tx = new TransactionBlock();
1485
- builder.swapExactInput_(tx, args, typeArguments);
1486
- const res = await client.devInspectTransactionBlock({
1487
- transactionBlock: tx,
1488
- sender: ZERO_ADDRESS,
1489
- });
1490
- return res;
1491
- }
1492
- view.swapExactInput_ = swapExactInput_;
1493
- async function swapExactInputDoublehop_(client, args, typeArguments) {
1494
- const tx = new TransactionBlock();
1495
- builder.swapExactInputDoublehop_(tx, args, typeArguments);
1496
- const res = await client.devInspectTransactionBlock({
1497
- transactionBlock: tx,
1498
- sender: ZERO_ADDRESS,
1499
- });
1500
- return res;
1501
- }
1502
- view.swapExactInputDoublehop_ = swapExactInputDoublehop_;
1503
- async function swapExactOutput_(client, args, typeArguments) {
1504
- const tx = new TransactionBlock();
1505
- builder.swapExactOutput_(tx, args, typeArguments);
1506
- const res = await client.devInspectTransactionBlock({
1507
- transactionBlock: tx,
1508
- sender: ZERO_ADDRESS,
1509
- });
1510
- return res;
1511
- }
1512
- view.swapExactOutput_ = swapExactOutput_;
1513
- async function swapExactOutputDoublehop_(client, args, typeArguments) {
1514
- const tx = new TransactionBlock();
1515
- builder.swapExactOutputDoublehop_(tx, args, typeArguments);
1516
- const res = await client.devInspectTransactionBlock({
1517
- transactionBlock: tx,
1518
- sender: ZERO_ADDRESS,
1519
- });
1520
- return res;
1521
- }
1522
- view.swapExactOutputDoublehop_ = swapExactOutputDoublehop_;
1523
- async function zapIn_(client, args, typeArguments) {
1524
- const tx = new TransactionBlock();
1525
- builder.zapIn_(tx, args, typeArguments);
1526
- const res = await client.devInspectTransactionBlock({
1527
- transactionBlock: tx,
1528
- sender: ZERO_ADDRESS,
1529
- });
1530
- return res;
1531
- }
1532
- view.zapIn_ = zapIn_;
1533
- })(view = router.view || (router.view = {}));
1534
- })(router || (router = {}));
1535
- const MODULES = JSON.parse('{"comparator":{"fileFormatVersion":6,"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","name":"comparator","friends":[],"structs":{"Result":{"abilities":{"abilities":["Drop"]},"typeParameters":[],"fields":[{"name":"inner","type":"U8"}]}},"exposedFunctions":{"compare":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"Reference":{"TypeParameter":0}},{"Reference":{"TypeParameter":0}}],"return":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"comparator","name":"Result","typeArguments":[]}}]},"compare_u8_vector":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Vector":"U8"},{"Vector":"U8"}],"return":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"comparator","name":"Result","typeArguments":[]}}]},"is_equal":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"comparator","name":"Result","typeArguments":[]}}}],"return":["Bool"]},"is_greater_than":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"comparator","name":"Result","typeArguments":[]}}}],"return":["Bool"]},"is_smaller_than":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"comparator","name":"Result","typeArguments":[]}}}],"return":["Bool"]}}},"math_utils":{"fileFormatVersion":6,"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","name":"math_utils","friends":[],"structs":{},"exposedFunctions":{"max":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U128","U128"],"return":["U128"]},"max_u64":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64","U64"],"return":["U64"]},"min":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U128","U128"],"return":["U128"]},"pow":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U128","U8"],"return":["U128"]},"sqrt":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U128"],"return":["U128"]},"sqrt_u256":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U256"],"return":["U256"]}}},"pool":{"fileFormatVersion":6,"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","name":"pool","friends":[],"structs":{"ControllerCap":{"abilities":{"abilities":["Store","Key"]},"typeParameters":[],"fields":[{"name":"id","type":{"Struct":{"address":"0x2","module":"object","name":"UID","typeArguments":[]}}}]},"FeeToSet":{"abilities":{"abilities":["Copy","Drop"]},"typeParameters":[],"fields":[{"name":"fee_to","type":"Address"},{"name":"caller","type":"Address"}]},"LiquidityAdded":{"abilities":{"abilities":["Copy","Drop"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true},{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"user","type":"Address"},{"name":"first_amount","type":"U64"},{"name":"second_amount","type":"U64"},{"name":"first_reserve","type":"U64"},{"name":"second_reserve","type":"U64"},{"name":"wisp_lp_amount","type":"U64"},{"name":"fee_amount","type":"U64"}]},"LiquidityRemoved":{"abilities":{"abilities":["Copy","Drop"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true},{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"user","type":"Address"},{"name":"first_amount","type":"U64"},{"name":"second_amount","type":"U64"},{"name":"first_reserve","type":"U64"},{"name":"second_reserve","type":"U64"},{"name":"wisp_lp_amount","type":"U64"},{"name":"fee_amount","type":"U64"}]},"Pool":{"abilities":{"abilities":["Store","Key"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true},{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"id","type":{"Struct":{"address":"0x2","module":"object","name":"UID","typeArguments":[]}}},{"name":"first_token","type":{"Struct":{"address":"0x2","module":"balance","name":"Balance","typeArguments":[{"TypeParameter":0}]}}},{"name":"second_token","type":{"Struct":{"address":"0x2","module":"balance","name":"Balance","typeArguments":[{"TypeParameter":1}]}}},{"name":"wisp_lp_supply","type":{"Struct":{"address":"0x2","module":"balance","name":"Supply","typeArguments":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"WISPLP","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}]}}},{"name":"k_last","type":"U128"}]},"PoolCreated":{"abilities":{"abilities":["Copy","Drop"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true},{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"pool","type":"Address"},{"name":"first_amount","type":"U64"},{"name":"second_amount","type":"U64"},{"name":"wisp_lp_amount","type":"U64"}]},"PoolName":{"abilities":{"abilities":["Copy","Drop","Store"]},"typeParameters":[],"fields":[{"name":"first_type","type":{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}}},{"name":"second_type","type":{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}}}]},"PoolRegistry":{"abilities":{"abilities":["Key"]},"typeParameters":[],"fields":[{"name":"id","type":{"Struct":{"address":"0x2","module":"object","name":"UID","typeArguments":[]}}},{"name":"fee_to","type":"Address"},{"name":"pools","type":{"Struct":{"address":"0x2","module":"object_bag","name":"ObjectBag","typeArguments":[]}}}]},"TokenSwapped":{"abilities":{"abilities":["Copy","Drop"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true},{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"user","type":"Address"},{"name":"first_amount_in","type":"U64"},{"name":"second_amount_in","type":"U64"},{"name":"first_amount_out","type":"U64"},{"name":"second_amount_out","type":"U64"},{"name":"first_reserve","type":"U64"},{"name":"second_reserve","type":"U64"}]},"WISPLP":{"abilities":{"abilities":["Drop"]},"typeParameters":[{"constraints":{"abilities":[]},"isPhantom":true},{"constraints":{"abilities":[]},"isPhantom":true}],"fields":[{"name":"dummy_field","type":"Bool"}]}},"exposedFunctions":{"add_liquidity":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}},"U64","U64","U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"WISPLP","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}]}}]},"borrow_mut_pool":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}}],"return":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}}]},"borrow_pool":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}}],"return":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}}]},"create_pool":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"WISPLP","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}]}}]},"create_pool_name":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}},{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}}],"return":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolName","typeArguments":[]}}]},"get_amounts":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}}],"return":["U64","U64","U64"]},"get_input_amount":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},"U64","Bool"],"return":["U64"]},"get_output_amount":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},"U64","Bool"],"return":["U64"]},"get_pool_data":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}}],"return":["U64","U64","U64","U64","U128"]},"is_pool_created":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}}],"return":["Bool"]},"is_pool_created_sorted":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}}],"return":["Bool"]},"process_swap_exact_input":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}},"U64","Bool",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"process_swap_exact_output":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"Pool","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}},"U64","Bool",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"remove_liquidity":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"WISPLP","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}]}}},"U64","U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}]},"set_fee_to_":{"visibility":"Public","isEntry":true,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"ControllerCap","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},"Address",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"swap_exact_first_to_second":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}]},"swap_exact_second_to_first":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}]},"swap_first_to_exact_second":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}]},"swap_second_to_exact_first":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}]},"zap_in_first":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},"U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"WISPLP","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}]}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}]},"zap_in_second":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}},"U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"WISPLP","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}]}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}]}}},"pool_utils":{"fileFormatVersion":6,"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","name":"pool_utils","friends":[],"structs":{},"exposedFunctions":{"execute_return_token":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]}],"parameters":[{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}},{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"get_input_price":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64","U64","U64","U64"],"return":["U64"]},"get_optimal_zap_in_amount":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64","U64"],"return":["U64"]},"get_output_price":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64","U64","U64","U64"],"return":["U64"]},"get_triple_type":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]},{"abilities":[]}],"parameters":[],"return":[{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}},{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}},{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}}]},"get_type":{"visibility":"Public","isEntry":false,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[],"return":[{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}},{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}}]},"quote":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":["U64","U64","U64"],"return":["U64"]},"sort_token_type":{"visibility":"Public","isEntry":false,"typeParameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}}},{"Reference":{"Struct":{"address":"0x1","module":"type_name","name":"TypeName","typeArguments":[]}}}],"return":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"comparator","name":"Result","typeArguments":[]}}]}}},"router":{"fileFormatVersion":6,"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","name":"router","friends":[],"structs":{},"exposedFunctions":{"add_liquidity_":{"visibility":"Public","isEntry":true,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"Vector":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},{"Vector":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}},"U64","U64","U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"create_pool_":{"visibility":"Public","isEntry":true,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"Vector":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},{"Vector":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":1}]}}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"remove_liquidity_":{"visibility":"Public","isEntry":true,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"Vector":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"WISPLP","typeArguments":[{"TypeParameter":0},{"TypeParameter":1}]}}]}}},"U64","U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"swap_exact_input_":{"visibility":"Public","isEntry":true,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"Vector":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"swap_exact_input_doublehop_":{"visibility":"Public","isEntry":true,"typeParameters":[{"abilities":[]},{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"Vector":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"swap_exact_output_":{"visibility":"Public","isEntry":true,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"Vector":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"swap_exact_output_doublehop_":{"visibility":"Public","isEntry":true,"typeParameters":[{"abilities":[]},{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"Vector":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]},"zap_in_":{"visibility":"Public","isEntry":true,"typeParameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a","module":"pool","name":"PoolRegistry","typeArguments":[]}}},{"Vector":{"Struct":{"address":"0x2","module":"coin","name":"Coin","typeArguments":[{"TypeParameter":0}]}}},"U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","typeArguments":[]}}}],"return":[]}}}}');
1536
- export function loadAllTypes(coder) {
1537
- _0x2.loadAllTypes(coder);
1538
- _0x1.loadAllTypes(coder);
1539
- for (const m of Object.values(MODULES)) {
1540
- coder.load(m);
1541
- }
1542
- }
1543
- loadAllTypes(defaultMoveCoder());
1544
- //# sourceMappingURL=0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a.js.map