@sentio/sdk 2.4.0 → 2.5.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/aptos/aptos-processor.d.ts +1 -1
- package/lib/aptos/aptos-processor.js +1 -1
- package/lib/aptos/aptos-processor.js.map +1 -1
- package/lib/aptos/builtin/0x1.d.ts +16 -177
- package/lib/aptos/builtin/0x1.js +56 -538
- package/lib/aptos/builtin/0x1.js.map +1 -1
- package/lib/aptos/builtin/0x3.d.ts +2 -13
- package/lib/aptos/builtin/0x3.js +20 -48
- package/lib/aptos/builtin/0x3.js.map +1 -1
- package/lib/aptos/codegen/codegen.d.ts +0 -20
- package/lib/aptos/codegen/codegen.js +37 -357
- package/lib/aptos/codegen/codegen.js.map +1 -1
- package/lib/aptos/{types.test.d.ts → codegen/types.test.d.ts} +0 -0
- package/lib/aptos/codegen/types.test.js.map +1 -0
- package/lib/aptos/models.d.ts +0 -8
- package/lib/aptos/models.js.map +1 -1
- package/lib/aptos/move-coder.d.ts +4 -13
- package/lib/aptos/move-coder.js +13 -124
- package/lib/aptos/move-coder.js.map +1 -1
- package/lib/aptos/move-types.d.ts +6 -0
- package/lib/aptos/move-types.js +52 -1
- package/lib/aptos/move-types.js.map +1 -1
- package/lib/aptos/tests/souffl3.js +1 -1
- package/lib/aptos/tests/souffl3.js.map +1 -1
- package/lib/aptos/tests/types/reserved.d.ts +2 -8
- package/lib/aptos/tests/types/reserved.js +11 -24
- package/lib/aptos/tests/types/reserved.js.map +1 -1
- package/lib/aptos/tests/types/soffl3.d.ts +2 -14
- package/lib/aptos/tests/types/soffl3.js +15 -48
- package/lib/aptos/tests/types/soffl3.js.map +1 -1
- package/lib/aptos/tests/types/souffle.d.ts +2 -8
- package/lib/aptos/tests/types/souffle.js +11 -24
- package/lib/aptos/tests/types/souffle.js.map +1 -1
- package/lib/aptos/utils.d.ts +2 -7
- package/lib/aptos/utils.js +2 -15
- package/lib/aptos/utils.js.map +1 -1
- package/lib/eth/tests/codegen.test.js.map +1 -1
- package/lib/eth/tests/erc20.js +1 -1
- package/lib/eth/tests/erc20.js.map +1 -1
- package/lib/eth/tests/logger.test.js.map +1 -1
- package/lib/move/abstract-codegen.d.ts +44 -0
- package/lib/move/abstract-codegen.js +341 -0
- package/lib/move/abstract-codegen.js.map +1 -0
- package/lib/move/abstract-move-coder.d.ts +24 -0
- package/lib/move/abstract-move-coder.js +141 -0
- package/lib/move/abstract-move-coder.js.map +1 -0
- package/lib/move/account.d.ts +18 -0
- package/lib/{aptos/codegen/typegen.js → move/account.js} +20 -82
- package/lib/move/account.js.map +1 -0
- package/lib/move/filter.d.ts +25 -0
- package/lib/move/filter.js +11 -0
- package/lib/move/filter.js.map +1 -0
- package/lib/move/index.d.ts +5 -25
- package/lib/move/index.js +5 -10
- package/lib/move/index.js.map +1 -1
- package/lib/move/neutral-models.d.ts +34 -0
- package/lib/move/neutral-models.js +7 -0
- package/lib/move/neutral-models.js.map +1 -0
- package/lib/move/ts-type.d.ts +2 -0
- package/lib/move/ts-type.js +77 -0
- package/lib/move/ts-type.js.map +1 -0
- package/lib/{aptos/codegen/typegen.test.d.ts → move/ts-type.test.d.ts} +0 -0
- package/lib/move/ts-type.test.js.map +1 -0
- package/lib/{aptos → move}/types.d.ts +1 -0
- package/lib/{aptos → move}/types.js +26 -3
- package/lib/move/types.js.map +1 -0
- package/lib/move/utils.d.ts +9 -0
- package/lib/move/utils.js +20 -0
- package/lib/move/utils.js.map +1 -0
- package/lib/sui/builtin/0x1.d.ts +114 -0
- package/lib/sui/builtin/0x1.js +174 -0
- package/lib/sui/builtin/0x1.js.map +1 -0
- package/lib/sui/builtin/0x2.d.ts +1047 -0
- package/lib/sui/builtin/0x2.js +1295 -0
- package/lib/sui/builtin/0x2.js.map +1 -0
- package/lib/sui/builtin/index.d.ts +2 -0
- package/lib/sui/builtin/index.js +6 -0
- package/lib/sui/builtin/index.js.map +1 -0
- package/lib/sui/codegen/codegen.d.ts +1 -0
- package/lib/sui/codegen/codegen.js +61 -0
- package/lib/sui/codegen/codegen.js.map +1 -0
- package/lib/sui/codegen/index.d.ts +1 -0
- package/lib/sui/codegen/index.js +2 -0
- package/lib/sui/codegen/index.js.map +1 -0
- package/lib/sui/codegen/run.d.ts +1 -0
- package/lib/sui/codegen/run.js +12 -0
- package/lib/sui/codegen/run.js.map +1 -0
- package/lib/sui/index.d.ts +2 -0
- package/lib/sui/index.js +1 -0
- package/lib/sui/index.js.map +1 -1
- package/lib/sui/models.d.ts +7 -1
- package/lib/sui/models.js +0 -23
- package/lib/sui/models.js.map +1 -1
- package/lib/sui/move-coder.d.ts +11 -0
- package/lib/sui/move-coder.js +53 -0
- package/lib/sui/move-coder.js.map +1 -0
- package/lib/sui/move-types.d.ts +9 -0
- package/lib/sui/move-types.js +81 -0
- package/lib/sui/move-types.js.map +1 -0
- package/lib/sui/sui-processor.js +3 -3
- package/lib/sui/sui-processor.js.map +1 -1
- package/lib/sui/tests/sui.test.js.map +1 -1
- package/lib/sui/tests/types/index.d.ts +1 -0
- package/lib/sui/tests/types/index.js +5 -0
- package/lib/sui/tests/types/index.js.map +1 -0
- package/lib/sui/tests/types/testnet/index.d.ts +1 -0
- package/lib/sui/tests/types/testnet/index.js +5 -0
- package/lib/sui/tests/types/testnet/index.js.map +1 -0
- package/lib/sui/tests/types/testnet/swap.d.ts +249 -0
- package/lib/sui/tests/types/testnet/swap.js +310 -0
- package/lib/sui/tests/types/testnet/swap.js.map +1 -0
- package/lib/testing/aptos-facet.js +1 -1
- package/lib/testing/aptos-facet.js.map +1 -1
- package/lib/testing/sui-facet.js +3 -2
- package/lib/testing/sui-facet.js.map +1 -1
- package/package.json +8 -5
- package/src/aptos/aptos-processor.ts +1 -1
- package/src/aptos/builtin/0x1.ts +70 -652
- package/src/aptos/builtin/0x3.ts +24 -59
- package/src/aptos/codegen/codegen.ts +35 -421
- package/src/aptos/models.ts +0 -10
- package/src/aptos/move-coder.ts +16 -150
- package/src/aptos/move-types.ts +62 -0
- package/src/aptos/tests/souffl3.ts +1 -1
- package/src/aptos/tests/types/reserved.ts +15 -30
- package/src/aptos/tests/types/soffl3.ts +19 -58
- package/src/aptos/tests/types/souffle.ts +15 -30
- package/src/aptos/utils.ts +3 -21
- package/src/eth/tests/erc20.ts +1 -1
- package/src/move/abstract-codegen.ts +426 -0
- package/src/move/abstract-move-coder.ts +170 -0
- package/src/move/account.ts +96 -0
- package/src/move/filter.ts +33 -0
- package/src/move/index.ts +5 -33
- package/src/move/neutral-models.ts +45 -0
- package/src/move/ts-type.ts +86 -0
- package/src/{aptos → move}/types.ts +28 -3
- package/src/move/utils.ts +25 -0
- package/src/sui/abis/0x1.json +1729 -1733
- package/src/sui/abis/0x2.json +13279 -13283
- package/src/sui/builtin/0x1.ts +307 -0
- package/src/sui/builtin/0x2.ts +2578 -0
- package/src/sui/builtin/index.ts +5 -0
- package/src/sui/codegen/codegen.ts +71 -0
- package/src/sui/codegen/index.ts +1 -0
- package/src/sui/codegen/run.ts +13 -0
- package/src/sui/index.ts +4 -0
- package/src/sui/models.ts +7 -28
- package/src/sui/move-coder.ts +63 -0
- package/src/sui/move-types.ts +109 -0
- package/src/sui/sui-processor.ts +3 -3
- package/src/sui/tests/abis/testnet/swap.json +1752 -0
- package/src/sui/tests/types/index.ts +3 -0
- package/src/sui/tests/types/testnet/index.ts +4 -0
- package/src/sui/tests/types/testnet/swap.ts +698 -0
- package/src/testing/aptos-facet.ts +1 -1
- package/src/testing/sui-facet.ts +3 -2
- package/lib/aptos/codegen/typegen.d.ts +0 -18
- package/lib/aptos/codegen/typegen.js.map +0 -1
- package/lib/aptos/codegen/typegen.test.js.map +0 -1
- package/lib/aptos/types.js.map +0 -1
- package/lib/aptos/types.test.js.map +0 -1
- package/lib/jest.config.d.ts +0 -9
- package/lib/jest.config.js +0 -9
- package/lib/jest.config.js.map +0 -1
- package/src/aptos/codegen/typegen.ts +0 -165
- package/src/jest.config.ts +0 -8
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import { CallFilter } from "@sentio/sdk/move";
|
|
2
|
+
import { MoveCoder, SuiBindOptions, SuiBaseProcessor, TypedEventInstance, TypedEntryFunctionPayload, SuiContext } from "@sentio/sdk/sui";
|
|
3
|
+
import { MoveFetchConfig } from "@sentio/protos";
|
|
4
|
+
import { SuiAddress } from "@sentio/sdk/sui";
|
|
5
|
+
import { _0x2 } from "@sentio/sdk/sui/builtin";
|
|
6
|
+
export declare class pool extends SuiBaseProcessor {
|
|
7
|
+
constructor(options: SuiBindOptions);
|
|
8
|
+
static DEFAULT_OPTIONS: SuiBindOptions;
|
|
9
|
+
static bind(options?: Partial<SuiBindOptions>): pool;
|
|
10
|
+
onEntryAddLiquidity(func: (call: pool.AddLiquidityPayload, ctx: SuiContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): pool;
|
|
11
|
+
onEntryBurnToken(func: (call: pool.BurnTokenPayload, ctx: SuiContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): pool;
|
|
12
|
+
onEntryCreatePool(func: (call: pool.CreatePoolPayload, ctx: SuiContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): pool;
|
|
13
|
+
onEntryFreezePool(func: (call: pool.FreezePoolPayload, ctx: SuiContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): pool;
|
|
14
|
+
onEntryMintTestToken(func: (call: pool.MintTestTokenPayload, ctx: SuiContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): pool;
|
|
15
|
+
onEntryMintTestTokenBnb(func: (call: pool.MintTestTokenBnbPayload, ctx: SuiContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): pool;
|
|
16
|
+
onEntryMintTestTokenBtc(func: (call: pool.MintTestTokenBtcPayload, ctx: SuiContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): pool;
|
|
17
|
+
onEntryMintTestTokenDai(func: (call: pool.MintTestTokenDaiPayload, ctx: SuiContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): pool;
|
|
18
|
+
onEntryMintTestTokenEth(func: (call: pool.MintTestTokenEthPayload, ctx: SuiContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): pool;
|
|
19
|
+
onEntryMintTestTokenMerge(func: (call: pool.MintTestTokenMergePayload, ctx: SuiContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): pool;
|
|
20
|
+
onEntryMintTestTokenSol(func: (call: pool.MintTestTokenSolPayload, ctx: SuiContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): pool;
|
|
21
|
+
onEntryMintTestTokenUsdc(func: (call: pool.MintTestTokenUsdcPayload, ctx: SuiContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): pool;
|
|
22
|
+
onEntryMintTestTokenUsdt(func: (call: pool.MintTestTokenUsdtPayload, ctx: SuiContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): pool;
|
|
23
|
+
onEntryMintToken(func: (call: pool.MintTokenPayload, ctx: SuiContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): pool;
|
|
24
|
+
onEntryMintTokenMerge(func: (call: pool.MintTokenMergePayload, ctx: SuiContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): pool;
|
|
25
|
+
onEntryRedeemAdminBalance(func: (call: pool.RedeemAdminBalancePayload, ctx: SuiContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): pool;
|
|
26
|
+
onEntryRemoveLiquidity(func: (call: pool.RemoveLiquidityPayload, ctx: SuiContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): pool;
|
|
27
|
+
onEntrySwapXToY(func: (call: pool.SwapXToYPayload, ctx: SuiContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): pool;
|
|
28
|
+
onEntrySwapYToX(func: (call: pool.SwapYToXPayload, ctx: SuiContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): pool;
|
|
29
|
+
onEntryUnfreezePool(func: (call: pool.UnfreezePoolPayload, ctx: SuiContext) => void, filter?: CallFilter, fetchConfig?: MoveFetchConfig): pool;
|
|
30
|
+
onEventLiquidityEvent(func: (event: pool.LiquidityEventInstance, ctx: SuiContext) => void, fetchConfig?: MoveFetchConfig): pool;
|
|
31
|
+
onEventPoolCreateEvent(func: (event: pool.PoolCreateEventInstance, ctx: SuiContext) => void, fetchConfig?: MoveFetchConfig): pool;
|
|
32
|
+
onEventSwapTokenEvent(func: (event: pool.SwapTokenEventInstance, ctx: SuiContext) => void, fetchConfig?: MoveFetchConfig): pool;
|
|
33
|
+
}
|
|
34
|
+
export declare namespace pool {
|
|
35
|
+
class ComputeShareStruct {
|
|
36
|
+
static TYPE_QNAME: string;
|
|
37
|
+
remain: bigint;
|
|
38
|
+
admin: bigint;
|
|
39
|
+
lp: bigint;
|
|
40
|
+
}
|
|
41
|
+
class LSP<T0, T1> {
|
|
42
|
+
static TYPE_QNAME: string;
|
|
43
|
+
dummy_field: Boolean;
|
|
44
|
+
}
|
|
45
|
+
class LiquidityEvent {
|
|
46
|
+
static TYPE_QNAME: string;
|
|
47
|
+
pool_id: string;
|
|
48
|
+
is_added: Boolean;
|
|
49
|
+
x_amount: bigint;
|
|
50
|
+
y_amount: bigint;
|
|
51
|
+
lsp_amount: bigint;
|
|
52
|
+
}
|
|
53
|
+
interface LiquidityEventInstance extends TypedEventInstance<LiquidityEvent> {
|
|
54
|
+
fields_decoded: LiquidityEvent;
|
|
55
|
+
type_arguments: [];
|
|
56
|
+
}
|
|
57
|
+
class Pool<T0, T1> {
|
|
58
|
+
static TYPE_QNAME: string;
|
|
59
|
+
id: _0x2.object_.UID;
|
|
60
|
+
index: bigint;
|
|
61
|
+
x: _0x2.balance.Balance<T0>;
|
|
62
|
+
y: _0x2.balance.Balance<T1>;
|
|
63
|
+
x_admin: _0x2.balance.Balance<T0>;
|
|
64
|
+
y_admin: _0x2.balance.Balance<T1>;
|
|
65
|
+
lsp_supply: _0x2.balance.Supply<pool.LSP<T0, T1>>;
|
|
66
|
+
admin_fee: bigint;
|
|
67
|
+
lp_fee: bigint;
|
|
68
|
+
freeze: Boolean;
|
|
69
|
+
}
|
|
70
|
+
class PoolCreateEvent {
|
|
71
|
+
static TYPE_QNAME: string;
|
|
72
|
+
pool_id: string;
|
|
73
|
+
}
|
|
74
|
+
interface PoolCreateEventInstance extends TypedEventInstance<PoolCreateEvent> {
|
|
75
|
+
fields_decoded: PoolCreateEvent;
|
|
76
|
+
type_arguments: [];
|
|
77
|
+
}
|
|
78
|
+
class PoolCreateInfo {
|
|
79
|
+
static TYPE_QNAME: string;
|
|
80
|
+
id: _0x2.object_.UID;
|
|
81
|
+
pool_id: string;
|
|
82
|
+
}
|
|
83
|
+
class SwapCap {
|
|
84
|
+
static TYPE_QNAME: string;
|
|
85
|
+
id: _0x2.object_.UID;
|
|
86
|
+
pool_create_counter: bigint;
|
|
87
|
+
}
|
|
88
|
+
class SwapTokenEvent {
|
|
89
|
+
static TYPE_QNAME: string;
|
|
90
|
+
pool_id: string;
|
|
91
|
+
x_to_y: Boolean;
|
|
92
|
+
in_amount: bigint;
|
|
93
|
+
out_amount: bigint;
|
|
94
|
+
}
|
|
95
|
+
interface SwapTokenEventInstance extends TypedEventInstance<SwapTokenEvent> {
|
|
96
|
+
fields_decoded: SwapTokenEvent;
|
|
97
|
+
type_arguments: [];
|
|
98
|
+
}
|
|
99
|
+
class TestBNB {
|
|
100
|
+
static TYPE_QNAME: string;
|
|
101
|
+
dummy_field: Boolean;
|
|
102
|
+
}
|
|
103
|
+
class TestBTC {
|
|
104
|
+
static TYPE_QNAME: string;
|
|
105
|
+
dummy_field: Boolean;
|
|
106
|
+
}
|
|
107
|
+
class TestDAI {
|
|
108
|
+
static TYPE_QNAME: string;
|
|
109
|
+
dummy_field: Boolean;
|
|
110
|
+
}
|
|
111
|
+
class TestETH {
|
|
112
|
+
static TYPE_QNAME: string;
|
|
113
|
+
dummy_field: Boolean;
|
|
114
|
+
}
|
|
115
|
+
class TestSOL {
|
|
116
|
+
static TYPE_QNAME: string;
|
|
117
|
+
dummy_field: Boolean;
|
|
118
|
+
}
|
|
119
|
+
class TestToken {
|
|
120
|
+
static TYPE_QNAME: string;
|
|
121
|
+
dummy_field: Boolean;
|
|
122
|
+
}
|
|
123
|
+
class TestTokenSupply {
|
|
124
|
+
static TYPE_QNAME: string;
|
|
125
|
+
id: _0x2.object_.UID;
|
|
126
|
+
supply: _0x2.balance.Supply<pool.TestToken>;
|
|
127
|
+
supply_bnb: _0x2.balance.Supply<pool.TestBNB>;
|
|
128
|
+
supply_btc: _0x2.balance.Supply<pool.TestBTC>;
|
|
129
|
+
supply_dai: _0x2.balance.Supply<pool.TestDAI>;
|
|
130
|
+
supply_eth: _0x2.balance.Supply<pool.TestETH>;
|
|
131
|
+
supply_sol: _0x2.balance.Supply<pool.TestSOL>;
|
|
132
|
+
supply_usdc: _0x2.balance.Supply<pool.TestUSDC>;
|
|
133
|
+
supply_usdt: _0x2.balance.Supply<pool.TestUSDT>;
|
|
134
|
+
}
|
|
135
|
+
class TestUSDC {
|
|
136
|
+
static TYPE_QNAME: string;
|
|
137
|
+
dummy_field: Boolean;
|
|
138
|
+
}
|
|
139
|
+
class TestUSDT {
|
|
140
|
+
static TYPE_QNAME: string;
|
|
141
|
+
dummy_field: Boolean;
|
|
142
|
+
}
|
|
143
|
+
class Token {
|
|
144
|
+
static TYPE_QNAME: string;
|
|
145
|
+
dummy_field: Boolean;
|
|
146
|
+
}
|
|
147
|
+
class TokenSupply {
|
|
148
|
+
static TYPE_QNAME: string;
|
|
149
|
+
id: _0x2.object_.UID;
|
|
150
|
+
supply: _0x2.balance.Supply<pool.Token>;
|
|
151
|
+
}
|
|
152
|
+
interface AddLiquidityPayload<T0 = any, T1 = any> extends TypedEntryFunctionPayload<[
|
|
153
|
+
SuiAddress,
|
|
154
|
+
string,
|
|
155
|
+
string,
|
|
156
|
+
bigint,
|
|
157
|
+
bigint
|
|
158
|
+
]> {
|
|
159
|
+
arguments_decoded: [SuiAddress, string, string, bigint, bigint];
|
|
160
|
+
type_arguments: [string, string];
|
|
161
|
+
}
|
|
162
|
+
interface BurnTokenPayload extends TypedEntryFunctionPayload<[SuiAddress, SuiAddress, string]> {
|
|
163
|
+
arguments_decoded: [SuiAddress, SuiAddress, string];
|
|
164
|
+
type_arguments: [];
|
|
165
|
+
}
|
|
166
|
+
interface CreatePoolPayload<T0 = any, T1 = any> extends TypedEntryFunctionPayload<[SuiAddress, bigint, bigint]> {
|
|
167
|
+
arguments_decoded: [SuiAddress, bigint, bigint];
|
|
168
|
+
type_arguments: [string, string];
|
|
169
|
+
}
|
|
170
|
+
interface FreezePoolPayload<T0 = any, T1 = any> extends TypedEntryFunctionPayload<[SuiAddress]> {
|
|
171
|
+
arguments_decoded: [SuiAddress];
|
|
172
|
+
type_arguments: [string, string];
|
|
173
|
+
}
|
|
174
|
+
interface MintTestTokenPayload extends TypedEntryFunctionPayload<[SuiAddress, bigint, SuiAddress]> {
|
|
175
|
+
arguments_decoded: [SuiAddress, bigint, SuiAddress];
|
|
176
|
+
type_arguments: [];
|
|
177
|
+
}
|
|
178
|
+
interface MintTestTokenBnbPayload extends TypedEntryFunctionPayload<[SuiAddress, bigint, SuiAddress]> {
|
|
179
|
+
arguments_decoded: [SuiAddress, bigint, SuiAddress];
|
|
180
|
+
type_arguments: [];
|
|
181
|
+
}
|
|
182
|
+
interface MintTestTokenBtcPayload extends TypedEntryFunctionPayload<[SuiAddress, bigint, SuiAddress]> {
|
|
183
|
+
arguments_decoded: [SuiAddress, bigint, SuiAddress];
|
|
184
|
+
type_arguments: [];
|
|
185
|
+
}
|
|
186
|
+
interface MintTestTokenDaiPayload extends TypedEntryFunctionPayload<[SuiAddress, bigint, SuiAddress]> {
|
|
187
|
+
arguments_decoded: [SuiAddress, bigint, SuiAddress];
|
|
188
|
+
type_arguments: [];
|
|
189
|
+
}
|
|
190
|
+
interface MintTestTokenEthPayload extends TypedEntryFunctionPayload<[SuiAddress, bigint, SuiAddress]> {
|
|
191
|
+
arguments_decoded: [SuiAddress, bigint, SuiAddress];
|
|
192
|
+
type_arguments: [];
|
|
193
|
+
}
|
|
194
|
+
interface MintTestTokenMergePayload extends TypedEntryFunctionPayload<[SuiAddress, bigint, SuiAddress]> {
|
|
195
|
+
arguments_decoded: [SuiAddress, bigint, SuiAddress];
|
|
196
|
+
type_arguments: [];
|
|
197
|
+
}
|
|
198
|
+
interface MintTestTokenSolPayload extends TypedEntryFunctionPayload<[SuiAddress, bigint, SuiAddress]> {
|
|
199
|
+
arguments_decoded: [SuiAddress, bigint, SuiAddress];
|
|
200
|
+
type_arguments: [];
|
|
201
|
+
}
|
|
202
|
+
interface MintTestTokenUsdcPayload extends TypedEntryFunctionPayload<[SuiAddress, bigint, SuiAddress]> {
|
|
203
|
+
arguments_decoded: [SuiAddress, bigint, SuiAddress];
|
|
204
|
+
type_arguments: [];
|
|
205
|
+
}
|
|
206
|
+
interface MintTestTokenUsdtPayload extends TypedEntryFunctionPayload<[SuiAddress, bigint, SuiAddress]> {
|
|
207
|
+
arguments_decoded: [SuiAddress, bigint, SuiAddress];
|
|
208
|
+
type_arguments: [];
|
|
209
|
+
}
|
|
210
|
+
interface MintTokenPayload extends TypedEntryFunctionPayload<[
|
|
211
|
+
SuiAddress,
|
|
212
|
+
SuiAddress,
|
|
213
|
+
bigint,
|
|
214
|
+
SuiAddress
|
|
215
|
+
]> {
|
|
216
|
+
arguments_decoded: [SuiAddress, SuiAddress, bigint, SuiAddress];
|
|
217
|
+
type_arguments: [];
|
|
218
|
+
}
|
|
219
|
+
interface MintTokenMergePayload extends TypedEntryFunctionPayload<[
|
|
220
|
+
SuiAddress,
|
|
221
|
+
SuiAddress,
|
|
222
|
+
bigint,
|
|
223
|
+
SuiAddress
|
|
224
|
+
]> {
|
|
225
|
+
arguments_decoded: [SuiAddress, SuiAddress, bigint, SuiAddress];
|
|
226
|
+
type_arguments: [];
|
|
227
|
+
}
|
|
228
|
+
interface RedeemAdminBalancePayload<T0 = any, T1 = any> extends TypedEntryFunctionPayload<[SuiAddress, SuiAddress]> {
|
|
229
|
+
arguments_decoded: [SuiAddress, SuiAddress];
|
|
230
|
+
type_arguments: [string, string];
|
|
231
|
+
}
|
|
232
|
+
interface RemoveLiquidityPayload<T0 = any, T1 = any> extends TypedEntryFunctionPayload<[SuiAddress, string, bigint]> {
|
|
233
|
+
arguments_decoded: [SuiAddress, string, bigint];
|
|
234
|
+
type_arguments: [string, string];
|
|
235
|
+
}
|
|
236
|
+
interface SwapXToYPayload<T0 = any, T1 = any> extends TypedEntryFunctionPayload<[SuiAddress, string, bigint, bigint]> {
|
|
237
|
+
arguments_decoded: [SuiAddress, string, bigint, bigint];
|
|
238
|
+
type_arguments: [string, string];
|
|
239
|
+
}
|
|
240
|
+
interface SwapYToXPayload<T0 = any, T1 = any> extends TypedEntryFunctionPayload<[SuiAddress, string, bigint, bigint]> {
|
|
241
|
+
arguments_decoded: [SuiAddress, string, bigint, bigint];
|
|
242
|
+
type_arguments: [string, string];
|
|
243
|
+
}
|
|
244
|
+
interface UnfreezePoolPayload<T0 = any, T1 = any> extends TypedEntryFunctionPayload<[SuiAddress]> {
|
|
245
|
+
arguments_decoded: [SuiAddress];
|
|
246
|
+
type_arguments: [string, string];
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
export declare function loadAllTypes(coder: MoveCoder): void;
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import { defaultMoveCoder, SuiBaseProcessor, SuiNetwork, } from "@sentio/sdk/sui";
|
|
5
|
+
import { _0x2 } from "@sentio/sdk/sui/builtin";
|
|
6
|
+
export class pool extends SuiBaseProcessor {
|
|
7
|
+
constructor(options) {
|
|
8
|
+
super("pool", options);
|
|
9
|
+
}
|
|
10
|
+
static DEFAULT_OPTIONS = {
|
|
11
|
+
address: "0x8235459df815e77668b4a49bb36e229f3321f432",
|
|
12
|
+
network: SuiNetwork.TEST_NET,
|
|
13
|
+
};
|
|
14
|
+
static bind(options = {}) {
|
|
15
|
+
return new pool({ ...pool.DEFAULT_OPTIONS, ...options });
|
|
16
|
+
}
|
|
17
|
+
onEntryAddLiquidity(func, filter, fetchConfig) {
|
|
18
|
+
this.onEntryFunctionCall(func, {
|
|
19
|
+
...filter,
|
|
20
|
+
function: "pool::add_liquidity",
|
|
21
|
+
}, fetchConfig);
|
|
22
|
+
return this;
|
|
23
|
+
}
|
|
24
|
+
onEntryBurnToken(func, filter, fetchConfig) {
|
|
25
|
+
this.onEntryFunctionCall(func, {
|
|
26
|
+
...filter,
|
|
27
|
+
function: "pool::burn_token",
|
|
28
|
+
}, fetchConfig);
|
|
29
|
+
return this;
|
|
30
|
+
}
|
|
31
|
+
onEntryCreatePool(func, filter, fetchConfig) {
|
|
32
|
+
this.onEntryFunctionCall(func, {
|
|
33
|
+
...filter,
|
|
34
|
+
function: "pool::create_pool",
|
|
35
|
+
}, fetchConfig);
|
|
36
|
+
return this;
|
|
37
|
+
}
|
|
38
|
+
onEntryFreezePool(func, filter, fetchConfig) {
|
|
39
|
+
this.onEntryFunctionCall(func, {
|
|
40
|
+
...filter,
|
|
41
|
+
function: "pool::freeze_pool",
|
|
42
|
+
}, fetchConfig);
|
|
43
|
+
return this;
|
|
44
|
+
}
|
|
45
|
+
onEntryMintTestToken(func, filter, fetchConfig) {
|
|
46
|
+
this.onEntryFunctionCall(func, {
|
|
47
|
+
...filter,
|
|
48
|
+
function: "pool::mint_test_token",
|
|
49
|
+
}, fetchConfig);
|
|
50
|
+
return this;
|
|
51
|
+
}
|
|
52
|
+
onEntryMintTestTokenBnb(func, filter, fetchConfig) {
|
|
53
|
+
this.onEntryFunctionCall(func, {
|
|
54
|
+
...filter,
|
|
55
|
+
function: "pool::mint_test_token_bnb",
|
|
56
|
+
}, fetchConfig);
|
|
57
|
+
return this;
|
|
58
|
+
}
|
|
59
|
+
onEntryMintTestTokenBtc(func, filter, fetchConfig) {
|
|
60
|
+
this.onEntryFunctionCall(func, {
|
|
61
|
+
...filter,
|
|
62
|
+
function: "pool::mint_test_token_btc",
|
|
63
|
+
}, fetchConfig);
|
|
64
|
+
return this;
|
|
65
|
+
}
|
|
66
|
+
onEntryMintTestTokenDai(func, filter, fetchConfig) {
|
|
67
|
+
this.onEntryFunctionCall(func, {
|
|
68
|
+
...filter,
|
|
69
|
+
function: "pool::mint_test_token_dai",
|
|
70
|
+
}, fetchConfig);
|
|
71
|
+
return this;
|
|
72
|
+
}
|
|
73
|
+
onEntryMintTestTokenEth(func, filter, fetchConfig) {
|
|
74
|
+
this.onEntryFunctionCall(func, {
|
|
75
|
+
...filter,
|
|
76
|
+
function: "pool::mint_test_token_eth",
|
|
77
|
+
}, fetchConfig);
|
|
78
|
+
return this;
|
|
79
|
+
}
|
|
80
|
+
onEntryMintTestTokenMerge(func, filter, fetchConfig) {
|
|
81
|
+
this.onEntryFunctionCall(func, {
|
|
82
|
+
...filter,
|
|
83
|
+
function: "pool::mint_test_token_merge",
|
|
84
|
+
}, fetchConfig);
|
|
85
|
+
return this;
|
|
86
|
+
}
|
|
87
|
+
onEntryMintTestTokenSol(func, filter, fetchConfig) {
|
|
88
|
+
this.onEntryFunctionCall(func, {
|
|
89
|
+
...filter,
|
|
90
|
+
function: "pool::mint_test_token_sol",
|
|
91
|
+
}, fetchConfig);
|
|
92
|
+
return this;
|
|
93
|
+
}
|
|
94
|
+
onEntryMintTestTokenUsdc(func, filter, fetchConfig) {
|
|
95
|
+
this.onEntryFunctionCall(func, {
|
|
96
|
+
...filter,
|
|
97
|
+
function: "pool::mint_test_token_usdc",
|
|
98
|
+
}, fetchConfig);
|
|
99
|
+
return this;
|
|
100
|
+
}
|
|
101
|
+
onEntryMintTestTokenUsdt(func, filter, fetchConfig) {
|
|
102
|
+
this.onEntryFunctionCall(func, {
|
|
103
|
+
...filter,
|
|
104
|
+
function: "pool::mint_test_token_usdt",
|
|
105
|
+
}, fetchConfig);
|
|
106
|
+
return this;
|
|
107
|
+
}
|
|
108
|
+
onEntryMintToken(func, filter, fetchConfig) {
|
|
109
|
+
this.onEntryFunctionCall(func, {
|
|
110
|
+
...filter,
|
|
111
|
+
function: "pool::mint_token",
|
|
112
|
+
}, fetchConfig);
|
|
113
|
+
return this;
|
|
114
|
+
}
|
|
115
|
+
onEntryMintTokenMerge(func, filter, fetchConfig) {
|
|
116
|
+
this.onEntryFunctionCall(func, {
|
|
117
|
+
...filter,
|
|
118
|
+
function: "pool::mint_token_merge",
|
|
119
|
+
}, fetchConfig);
|
|
120
|
+
return this;
|
|
121
|
+
}
|
|
122
|
+
onEntryRedeemAdminBalance(func, filter, fetchConfig) {
|
|
123
|
+
this.onEntryFunctionCall(func, {
|
|
124
|
+
...filter,
|
|
125
|
+
function: "pool::redeem_admin_balance",
|
|
126
|
+
}, fetchConfig);
|
|
127
|
+
return this;
|
|
128
|
+
}
|
|
129
|
+
onEntryRemoveLiquidity(func, filter, fetchConfig) {
|
|
130
|
+
this.onEntryFunctionCall(func, {
|
|
131
|
+
...filter,
|
|
132
|
+
function: "pool::remove_liquidity",
|
|
133
|
+
}, fetchConfig);
|
|
134
|
+
return this;
|
|
135
|
+
}
|
|
136
|
+
onEntrySwapXToY(func, filter, fetchConfig) {
|
|
137
|
+
this.onEntryFunctionCall(func, {
|
|
138
|
+
...filter,
|
|
139
|
+
function: "pool::swap_x_to_y",
|
|
140
|
+
}, fetchConfig);
|
|
141
|
+
return this;
|
|
142
|
+
}
|
|
143
|
+
onEntrySwapYToX(func, filter, fetchConfig) {
|
|
144
|
+
this.onEntryFunctionCall(func, {
|
|
145
|
+
...filter,
|
|
146
|
+
function: "pool::swap_y_to_x",
|
|
147
|
+
}, fetchConfig);
|
|
148
|
+
return this;
|
|
149
|
+
}
|
|
150
|
+
onEntryUnfreezePool(func, filter, fetchConfig) {
|
|
151
|
+
this.onEntryFunctionCall(func, {
|
|
152
|
+
...filter,
|
|
153
|
+
function: "pool::unfreeze_pool",
|
|
154
|
+
}, fetchConfig);
|
|
155
|
+
return this;
|
|
156
|
+
}
|
|
157
|
+
onEventLiquidityEvent(func, fetchConfig) {
|
|
158
|
+
this.onMoveEvent(func, {
|
|
159
|
+
type: "pool::LiquidityEvent",
|
|
160
|
+
}, fetchConfig);
|
|
161
|
+
return this;
|
|
162
|
+
}
|
|
163
|
+
onEventPoolCreateEvent(func, fetchConfig) {
|
|
164
|
+
this.onMoveEvent(func, {
|
|
165
|
+
type: "pool::PoolCreateEvent",
|
|
166
|
+
}, fetchConfig);
|
|
167
|
+
return this;
|
|
168
|
+
}
|
|
169
|
+
onEventSwapTokenEvent(func, fetchConfig) {
|
|
170
|
+
this.onMoveEvent(func, {
|
|
171
|
+
type: "pool::SwapTokenEvent",
|
|
172
|
+
}, fetchConfig);
|
|
173
|
+
return this;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
(function (pool) {
|
|
177
|
+
class ComputeShareStruct {
|
|
178
|
+
static TYPE_QNAME = "0x8235459df815e77668b4a49bb36e229f3321f432::pool::ComputeShareStruct";
|
|
179
|
+
remain;
|
|
180
|
+
admin;
|
|
181
|
+
lp;
|
|
182
|
+
}
|
|
183
|
+
pool.ComputeShareStruct = ComputeShareStruct;
|
|
184
|
+
class LSP {
|
|
185
|
+
static TYPE_QNAME = "0x8235459df815e77668b4a49bb36e229f3321f432::pool::LSP";
|
|
186
|
+
dummy_field;
|
|
187
|
+
}
|
|
188
|
+
pool.LSP = LSP;
|
|
189
|
+
class LiquidityEvent {
|
|
190
|
+
static TYPE_QNAME = "0x8235459df815e77668b4a49bb36e229f3321f432::pool::LiquidityEvent";
|
|
191
|
+
pool_id;
|
|
192
|
+
is_added;
|
|
193
|
+
x_amount;
|
|
194
|
+
y_amount;
|
|
195
|
+
lsp_amount;
|
|
196
|
+
}
|
|
197
|
+
pool.LiquidityEvent = LiquidityEvent;
|
|
198
|
+
class Pool {
|
|
199
|
+
static TYPE_QNAME = "0x8235459df815e77668b4a49bb36e229f3321f432::pool::Pool";
|
|
200
|
+
id;
|
|
201
|
+
index;
|
|
202
|
+
x;
|
|
203
|
+
y;
|
|
204
|
+
x_admin;
|
|
205
|
+
y_admin;
|
|
206
|
+
lsp_supply;
|
|
207
|
+
admin_fee;
|
|
208
|
+
lp_fee;
|
|
209
|
+
freeze;
|
|
210
|
+
}
|
|
211
|
+
pool.Pool = Pool;
|
|
212
|
+
class PoolCreateEvent {
|
|
213
|
+
static TYPE_QNAME = "0x8235459df815e77668b4a49bb36e229f3321f432::pool::PoolCreateEvent";
|
|
214
|
+
pool_id;
|
|
215
|
+
}
|
|
216
|
+
pool.PoolCreateEvent = PoolCreateEvent;
|
|
217
|
+
class PoolCreateInfo {
|
|
218
|
+
static TYPE_QNAME = "0x8235459df815e77668b4a49bb36e229f3321f432::pool::PoolCreateInfo";
|
|
219
|
+
id;
|
|
220
|
+
pool_id;
|
|
221
|
+
}
|
|
222
|
+
pool.PoolCreateInfo = PoolCreateInfo;
|
|
223
|
+
class SwapCap {
|
|
224
|
+
static TYPE_QNAME = "0x8235459df815e77668b4a49bb36e229f3321f432::pool::SwapCap";
|
|
225
|
+
id;
|
|
226
|
+
pool_create_counter;
|
|
227
|
+
}
|
|
228
|
+
pool.SwapCap = SwapCap;
|
|
229
|
+
class SwapTokenEvent {
|
|
230
|
+
static TYPE_QNAME = "0x8235459df815e77668b4a49bb36e229f3321f432::pool::SwapTokenEvent";
|
|
231
|
+
pool_id;
|
|
232
|
+
x_to_y;
|
|
233
|
+
in_amount;
|
|
234
|
+
out_amount;
|
|
235
|
+
}
|
|
236
|
+
pool.SwapTokenEvent = SwapTokenEvent;
|
|
237
|
+
class TestBNB {
|
|
238
|
+
static TYPE_QNAME = "0x8235459df815e77668b4a49bb36e229f3321f432::pool::TestBNB";
|
|
239
|
+
dummy_field;
|
|
240
|
+
}
|
|
241
|
+
pool.TestBNB = TestBNB;
|
|
242
|
+
class TestBTC {
|
|
243
|
+
static TYPE_QNAME = "0x8235459df815e77668b4a49bb36e229f3321f432::pool::TestBTC";
|
|
244
|
+
dummy_field;
|
|
245
|
+
}
|
|
246
|
+
pool.TestBTC = TestBTC;
|
|
247
|
+
class TestDAI {
|
|
248
|
+
static TYPE_QNAME = "0x8235459df815e77668b4a49bb36e229f3321f432::pool::TestDAI";
|
|
249
|
+
dummy_field;
|
|
250
|
+
}
|
|
251
|
+
pool.TestDAI = TestDAI;
|
|
252
|
+
class TestETH {
|
|
253
|
+
static TYPE_QNAME = "0x8235459df815e77668b4a49bb36e229f3321f432::pool::TestETH";
|
|
254
|
+
dummy_field;
|
|
255
|
+
}
|
|
256
|
+
pool.TestETH = TestETH;
|
|
257
|
+
class TestSOL {
|
|
258
|
+
static TYPE_QNAME = "0x8235459df815e77668b4a49bb36e229f3321f432::pool::TestSOL";
|
|
259
|
+
dummy_field;
|
|
260
|
+
}
|
|
261
|
+
pool.TestSOL = TestSOL;
|
|
262
|
+
class TestToken {
|
|
263
|
+
static TYPE_QNAME = "0x8235459df815e77668b4a49bb36e229f3321f432::pool::TestToken";
|
|
264
|
+
dummy_field;
|
|
265
|
+
}
|
|
266
|
+
pool.TestToken = TestToken;
|
|
267
|
+
class TestTokenSupply {
|
|
268
|
+
static TYPE_QNAME = "0x8235459df815e77668b4a49bb36e229f3321f432::pool::TestTokenSupply";
|
|
269
|
+
id;
|
|
270
|
+
supply;
|
|
271
|
+
supply_bnb;
|
|
272
|
+
supply_btc;
|
|
273
|
+
supply_dai;
|
|
274
|
+
supply_eth;
|
|
275
|
+
supply_sol;
|
|
276
|
+
supply_usdc;
|
|
277
|
+
supply_usdt;
|
|
278
|
+
}
|
|
279
|
+
pool.TestTokenSupply = TestTokenSupply;
|
|
280
|
+
class TestUSDC {
|
|
281
|
+
static TYPE_QNAME = "0x8235459df815e77668b4a49bb36e229f3321f432::pool::TestUSDC";
|
|
282
|
+
dummy_field;
|
|
283
|
+
}
|
|
284
|
+
pool.TestUSDC = TestUSDC;
|
|
285
|
+
class TestUSDT {
|
|
286
|
+
static TYPE_QNAME = "0x8235459df815e77668b4a49bb36e229f3321f432::pool::TestUSDT";
|
|
287
|
+
dummy_field;
|
|
288
|
+
}
|
|
289
|
+
pool.TestUSDT = TestUSDT;
|
|
290
|
+
class Token {
|
|
291
|
+
static TYPE_QNAME = "0x8235459df815e77668b4a49bb36e229f3321f432::pool::Token";
|
|
292
|
+
dummy_field;
|
|
293
|
+
}
|
|
294
|
+
pool.Token = Token;
|
|
295
|
+
class TokenSupply {
|
|
296
|
+
static TYPE_QNAME = "0x8235459df815e77668b4a49bb36e229f3321f432::pool::TokenSupply";
|
|
297
|
+
id;
|
|
298
|
+
supply;
|
|
299
|
+
}
|
|
300
|
+
pool.TokenSupply = TokenSupply;
|
|
301
|
+
})(pool || (pool = {}));
|
|
302
|
+
const MODULES = JSON.parse('{"pool":{"file_format_version":6,"address":"0x8235459df815e77668b4a49bb36e229f3321f432","name":"pool","friends":[],"structs":{"ComputeShareStruct":{"abilities":{"abilities":[]},"type_parameters":[],"fields":[{"name":"remain","type_":"U64"},{"name":"admin","type_":"U64"},{"name":"lp","type_":"U64"}]},"LSP":{"abilities":{"abilities":["Drop"]},"type_parameters":[{"constraints":{"abilities":[]},"is_phantom":true},{"constraints":{"abilities":[]},"is_phantom":true}],"fields":[{"name":"dummy_field","type_":"Bool"}]},"LiquidityEvent":{"abilities":{"abilities":["Copy","Drop"]},"type_parameters":[],"fields":[{"name":"pool_id","type_":{"Struct":{"address":"0x2","module":"object","name":"ID","type_arguments":[]}}},{"name":"is_added","type_":"Bool"},{"name":"x_amount","type_":"U64"},{"name":"y_amount","type_":"U64"},{"name":"lsp_amount","type_":"U64"}]},"Pool":{"abilities":{"abilities":["Key"]},"type_parameters":[{"constraints":{"abilities":[]},"is_phantom":true},{"constraints":{"abilities":[]},"is_phantom":true}],"fields":[{"name":"id","type_":{"Struct":{"address":"0x2","module":"object","name":"UID","type_arguments":[]}}},{"name":"index","type_":"U64"},{"name":"x","type_":{"Struct":{"address":"0x2","module":"balance","name":"Balance","type_arguments":[{"TypeParameter":0}]}}},{"name":"y","type_":{"Struct":{"address":"0x2","module":"balance","name":"Balance","type_arguments":[{"TypeParameter":1}]}}},{"name":"x_admin","type_":{"Struct":{"address":"0x2","module":"balance","name":"Balance","type_arguments":[{"TypeParameter":0}]}}},{"name":"y_admin","type_":{"Struct":{"address":"0x2","module":"balance","name":"Balance","type_arguments":[{"TypeParameter":1}]}}},{"name":"lsp_supply","type_":{"Struct":{"address":"0x2","module":"balance","name":"Supply","type_arguments":[{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"LSP","type_arguments":[{"TypeParameter":0},{"TypeParameter":1}]}}]}}},{"name":"admin_fee","type_":"U64"},{"name":"lp_fee","type_":"U64"},{"name":"freeze","type_":"Bool"}]},"PoolCreateEvent":{"abilities":{"abilities":["Copy","Drop"]},"type_parameters":[],"fields":[{"name":"pool_id","type_":{"Struct":{"address":"0x2","module":"object","name":"ID","type_arguments":[]}}}]},"PoolCreateInfo":{"abilities":{"abilities":["Key"]},"type_parameters":[],"fields":[{"name":"id","type_":{"Struct":{"address":"0x2","module":"object","name":"UID","type_arguments":[]}}},{"name":"pool_id","type_":{"Struct":{"address":"0x2","module":"object","name":"ID","type_arguments":[]}}}]},"SwapCap":{"abilities":{"abilities":["Key"]},"type_parameters":[],"fields":[{"name":"id","type_":{"Struct":{"address":"0x2","module":"object","name":"UID","type_arguments":[]}}},{"name":"pool_create_counter","type_":"U64"}]},"SwapTokenEvent":{"abilities":{"abilities":["Copy","Drop"]},"type_parameters":[],"fields":[{"name":"pool_id","type_":{"Struct":{"address":"0x2","module":"object","name":"ID","type_arguments":[]}}},{"name":"x_to_y","type_":"Bool"},{"name":"in_amount","type_":"U64"},{"name":"out_amount","type_":"U64"}]},"TestBNB":{"abilities":{"abilities":["Drop"]},"type_parameters":[],"fields":[{"name":"dummy_field","type_":"Bool"}]},"TestBTC":{"abilities":{"abilities":["Drop"]},"type_parameters":[],"fields":[{"name":"dummy_field","type_":"Bool"}]},"TestDAI":{"abilities":{"abilities":["Drop"]},"type_parameters":[],"fields":[{"name":"dummy_field","type_":"Bool"}]},"TestETH":{"abilities":{"abilities":["Drop"]},"type_parameters":[],"fields":[{"name":"dummy_field","type_":"Bool"}]},"TestSOL":{"abilities":{"abilities":["Drop"]},"type_parameters":[],"fields":[{"name":"dummy_field","type_":"Bool"}]},"TestToken":{"abilities":{"abilities":["Drop"]},"type_parameters":[],"fields":[{"name":"dummy_field","type_":"Bool"}]},"TestTokenSupply":{"abilities":{"abilities":["Key"]},"type_parameters":[],"fields":[{"name":"id","type_":{"Struct":{"address":"0x2","module":"object","name":"UID","type_arguments":[]}}},{"name":"supply","type_":{"Struct":{"address":"0x2","module":"balance","name":"Supply","type_arguments":[{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestToken","type_arguments":[]}}]}}},{"name":"supply_bnb","type_":{"Struct":{"address":"0x2","module":"balance","name":"Supply","type_arguments":[{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestBNB","type_arguments":[]}}]}}},{"name":"supply_btc","type_":{"Struct":{"address":"0x2","module":"balance","name":"Supply","type_arguments":[{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestBTC","type_arguments":[]}}]}}},{"name":"supply_dai","type_":{"Struct":{"address":"0x2","module":"balance","name":"Supply","type_arguments":[{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestDAI","type_arguments":[]}}]}}},{"name":"supply_eth","type_":{"Struct":{"address":"0x2","module":"balance","name":"Supply","type_arguments":[{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestETH","type_arguments":[]}}]}}},{"name":"supply_sol","type_":{"Struct":{"address":"0x2","module":"balance","name":"Supply","type_arguments":[{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestSOL","type_arguments":[]}}]}}},{"name":"supply_usdc","type_":{"Struct":{"address":"0x2","module":"balance","name":"Supply","type_arguments":[{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestUSDC","type_arguments":[]}}]}}},{"name":"supply_usdt","type_":{"Struct":{"address":"0x2","module":"balance","name":"Supply","type_arguments":[{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestUSDT","type_arguments":[]}}]}}}]},"TestUSDC":{"abilities":{"abilities":["Drop"]},"type_parameters":[],"fields":[{"name":"dummy_field","type_":"Bool"}]},"TestUSDT":{"abilities":{"abilities":["Drop"]},"type_parameters":[],"fields":[{"name":"dummy_field","type_":"Bool"}]},"Token":{"abilities":{"abilities":["Drop"]},"type_parameters":[],"fields":[{"name":"dummy_field","type_":"Bool"}]},"TokenSupply":{"abilities":{"abilities":["Key"]},"type_parameters":[],"fields":[{"name":"id","type_":{"Struct":{"address":"0x2","module":"object","name":"UID","type_arguments":[]}}},{"name":"supply","type_":{"Struct":{"address":"0x2","module":"balance","name":"Supply","type_arguments":[{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"Token","type_arguments":[]}}]}}}]}},"exposed_functions":{"add_liquidity":{"visibility":"Private","is_entry":true,"type_parameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"Pool","type_arguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","type_arguments":[{"TypeParameter":0}]}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","type_arguments":[{"TypeParameter":1}]}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"burn_token":{"visibility":"Private","is_entry":true,"type_parameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"SwapCap","type_arguments":[]}}},{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TokenSupply","type_arguments":[]}}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","type_arguments":[{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"Token","type_arguments":[]}}]}},{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"compute_amount":{"visibility":"Public","is_entry":false,"type_parameters":[],"parameters":["U64","U64","U64"],"return_":["U64"]},"compute_k":{"visibility":"Public","is_entry":false,"type_parameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"Pool","type_arguments":[{"TypeParameter":0},{"TypeParameter":1}]}}}],"return_":["U128"]},"compute_share":{"visibility":"Public","is_entry":false,"type_parameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"Pool","type_arguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},"U64"],"return_":[{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"ComputeShareStruct","type_arguments":[]}}]},"create_pool":{"visibility":"Private","is_entry":true,"type_parameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"SwapCap","type_arguments":[]}}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"freeze_pool":{"visibility":"Private","is_entry":true,"type_parameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"SwapCap","type_arguments":[]}}},{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"Pool","type_arguments":[{"TypeParameter":0},{"TypeParameter":1}]}}}],"return_":[]},"get_admin_amounts":{"visibility":"Public","is_entry":false,"type_parameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"Pool","type_arguments":[{"TypeParameter":0},{"TypeParameter":1}]}}}],"return_":["U64","U64"]},"get_amounts":{"visibility":"Public","is_entry":false,"type_parameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"Pool","type_arguments":[{"TypeParameter":0},{"TypeParameter":1}]}}}],"return_":["U64","U64","U64"]},"get_token_supply":{"visibility":"Public","is_entry":false,"type_parameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TokenSupply","type_arguments":[]}}}],"return_":["U64"]},"get_x_amount":{"visibility":"Public","is_entry":false,"type_parameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"Pool","type_arguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},"U64","Bool"],"return_":["U64"]},"get_y_amount":{"visibility":"Public","is_entry":false,"type_parameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"Pool","type_arguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},"U64","Bool"],"return_":["U64"]},"mint_test_token":{"visibility":"Private","is_entry":true,"type_parameters":[],"parameters":[{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestTokenSupply","type_arguments":[]}}},"U64","Address",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"mint_test_token_bnb":{"visibility":"Private","is_entry":true,"type_parameters":[],"parameters":[{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestTokenSupply","type_arguments":[]}}},"U64","Address",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"mint_test_token_btc":{"visibility":"Private","is_entry":true,"type_parameters":[],"parameters":[{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestTokenSupply","type_arguments":[]}}},"U64","Address",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"mint_test_token_dai":{"visibility":"Private","is_entry":true,"type_parameters":[],"parameters":[{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestTokenSupply","type_arguments":[]}}},"U64","Address",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"mint_test_token_eth":{"visibility":"Private","is_entry":true,"type_parameters":[],"parameters":[{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestTokenSupply","type_arguments":[]}}},"U64","Address",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"mint_test_token_merge":{"visibility":"Private","is_entry":true,"type_parameters":[],"parameters":[{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestTokenSupply","type_arguments":[]}}},"U64",{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","type_arguments":[{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestToken","type_arguments":[]}}]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"mint_test_token_sol":{"visibility":"Private","is_entry":true,"type_parameters":[],"parameters":[{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestTokenSupply","type_arguments":[]}}},"U64","Address",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"mint_test_token_usdc":{"visibility":"Private","is_entry":true,"type_parameters":[],"parameters":[{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestTokenSupply","type_arguments":[]}}},"U64","Address",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"mint_test_token_usdt":{"visibility":"Private","is_entry":true,"type_parameters":[],"parameters":[{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TestTokenSupply","type_arguments":[]}}},"U64","Address",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"mint_token":{"visibility":"Private","is_entry":true,"type_parameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"SwapCap","type_arguments":[]}}},{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TokenSupply","type_arguments":[]}}},"U64","Address",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"mint_token_merge":{"visibility":"Private","is_entry":true,"type_parameters":[],"parameters":[{"Reference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"SwapCap","type_arguments":[]}}},{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"TokenSupply","type_arguments":[]}}},"U64",{"MutableReference":{"Struct":{"address":"0x2","module":"coin","name":"Coin","type_arguments":[{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"Token","type_arguments":[]}}]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"redeem_admin_balance":{"visibility":"Private","is_entry":true,"type_parameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"SwapCap","type_arguments":[]}}},{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"Pool","type_arguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"remove_liquidity":{"visibility":"Private","is_entry":true,"type_parameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"Pool","type_arguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","type_arguments":[{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"LSP","type_arguments":[{"TypeParameter":0},{"TypeParameter":1}]}}]}},"U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"swap_x_to_y":{"visibility":"Private","is_entry":true,"type_parameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"Pool","type_arguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","type_arguments":[{"TypeParameter":0}]}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"swap_y_to_x":{"visibility":"Private","is_entry":true,"type_parameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"Pool","type_arguments":[{"TypeParameter":0},{"TypeParameter":1}]}}},{"Struct":{"address":"0x2","module":"coin","name":"Coin","type_arguments":[{"TypeParameter":1}]}},"U64","U64",{"MutableReference":{"Struct":{"address":"0x2","module":"tx_context","name":"TxContext","type_arguments":[]}}}],"return_":[]},"unfreeze_pool":{"visibility":"Private","is_entry":true,"type_parameters":[{"abilities":[]},{"abilities":[]}],"parameters":[{"Reference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"SwapCap","type_arguments":[]}}},{"MutableReference":{"Struct":{"address":"0x8235459df815e77668b4a49bb36e229f3321f432","module":"pool","name":"Pool","type_arguments":[{"TypeParameter":0},{"TypeParameter":1}]}}}],"return_":[]}}}}');
|
|
303
|
+
export function loadAllTypes(coder) {
|
|
304
|
+
_0x2.loadAllTypes(coder);
|
|
305
|
+
for (const m of Object.values(MODULES)) {
|
|
306
|
+
coder.load(m);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
loadAllTypes(defaultMoveCoder());
|
|
310
|
+
//# sourceMappingURL=swap.js.map
|