@affluent-org/sdk 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/affluent.d.ts +3 -3
- package/dist/affluent.js +3 -3
- package/dist/common/computation.d.ts +6 -0
- package/dist/common/computation.js +54 -0
- package/dist/common/helper.d.ts +5 -0
- package/dist/common/helper.js +29 -0
- package/dist/common/service.d.ts +10 -2
- package/dist/common/service.js +56 -3
- package/dist/common/trace-action.d.ts +92 -0
- package/dist/common/trace-action.js +187 -0
- package/dist/common/transform.d.ts +15 -21
- package/dist/common/transform.js +63 -150
- package/dist/common/types.d.ts +9 -13
- package/dist/common/types.js +2 -2
- package/dist/context.d.ts +3 -0
- package/dist/context.js +9 -0
- package/dist/contracts/oracle/redstone-onchain-oracle/index.js +2 -0
- package/dist/contracts/vault/strategy-vault/index.d.ts +2 -1
- package/dist/contracts/vault/strategy-vault/index.js +1 -0
- package/dist/factorial.d.ts +18 -8
- package/dist/factorial.js +26 -14
- package/dist/index.d.ts +4 -2
- package/dist/index.js +18 -2
- package/dist/lib/send-msg.d.ts +16 -2
- package/dist/lib/send-msg.js +23 -2
- package/dist/monitor.js +2 -0
- package/dist/monitorCacheV1.js +3 -2
- package/dist/oracle/oracle.d.ts +3 -2
- package/dist/oracle/oracle.js +25 -2
- package/dist/pool.d.ts +41 -0
- package/dist/pool.js +146 -178
- package/dist/poolCacheV1.js +1 -0
- package/dist/rfq-auction.d.ts +2 -2
- package/dist/rfq-auction.js +6 -6
- package/dist/rfq-batch.d.ts +21 -11
- package/dist/rfq-batch.js +81 -9
- package/dist/services/composite-oracle/computation.d.ts +3 -8
- package/dist/services/composite-oracle/computation.js +91 -56
- package/dist/services/composite-oracle/index.js +4 -5
- package/dist/services/composite-oracle/query.js +1 -3
- package/dist/services/pool/computation.js +9 -61
- package/dist/services/pool/index.d.ts +10 -59
- package/dist/services/pool/index.js +55 -8
- package/dist/services/pool/query.js +1 -1
- package/dist/services/pool/user/trace.d.ts +90 -0
- package/dist/services/pool/user/trace.js +168 -0
- package/dist/services/rfq-auction/index.d.ts +7 -23
- package/dist/services/rfq-auction/index.js +45 -6
- package/dist/services/rfq-auction/user/index.js +1 -1
- package/dist/services/rfq-auction/user/trace.d.ts +53 -0
- package/dist/services/rfq-auction/user/trace.js +68 -0
- package/dist/services/rfq-batch/index.d.ts +16 -13
- package/dist/services/rfq-batch/index.js +34 -10
- package/dist/services/rfq-batch/user/trace.d.ts +49 -0
- package/dist/services/rfq-batch/user/trace.js +67 -0
- package/dist/services/share-vault/index.d.ts +12 -56
- package/dist/services/share-vault/index.js +37 -10
- package/dist/services/share-vault/query.js +1 -1
- package/dist/services/share-vault/user/trace.d.ts +54 -0
- package/dist/services/share-vault/user/trace.js +84 -0
- package/dist/services/strategy-vault/index.d.ts +68 -1981
- package/dist/services/strategy-vault/index.js +114 -53
- package/dist/services/strategy-vault/oracle.js +1 -0
- package/dist/services/strategy-vault/owner/index.d.ts +2 -2
- package/dist/services/strategy-vault/owner/index.js +1 -1
- package/dist/services/strategy-vault/owner/types.d.ts +4 -0
- package/dist/services/strategy-vault/query.js +1 -1
- package/dist/services/strategy-vault/user/trace.d.ts +156 -0
- package/dist/services/strategy-vault/user/trace.js +264 -0
- package/dist/share-vault.d.ts +164 -8
- package/dist/share-vault.js +222 -67
- package/dist/strategy_vault/base.d.ts +521 -105
- package/dist/strategy_vault/base.js +493 -41
- package/dist/strategy_vault/steps.d.ts +120 -3
- package/dist/strategy_vault/steps.js +161 -0
- package/dist/types/sender.d.ts +1 -0
- package/dist/utils/_parse_temp/StrategyVault.d.ts +9 -9
- package/dist/utils/_parse_temp/StrategyVault.js +48 -40
- package/dist/utils/_parse_temp/parseMsgBody.d.ts +2 -2
- package/dist/utils/_parse_temp/parseMsgBody.js +84 -84
- package/dist/utils/external-message-hash.d.ts +7 -3
- package/dist/utils/external-message-hash.js +20 -7
- package/dist/utils/oracle/redstone/helper.js +2 -0
- package/dist/utils/oracle/redstone/redstoneHelper.d.ts +7 -0
- package/dist/utils/oracle/redstone/redstoneHelper.js +103 -1
- package/dist/utils/pending-tracker/trackable-sender.d.ts +37 -4
- package/dist/utils/pending-tracker/trackable-sender.js +47 -8
- package/dist/utils/pending-tracker/v3-client.d.ts +16 -0
- package/dist/utils/pending-tracker/v3-client.js +80 -2
- package/dist/utils/toncenter/index.d.ts +1 -0
- package/dist/utils/toncenter/index.js +17 -0
- package/dist/utils/toncenter/transform.d.ts +11 -0
- package/dist/utils/toncenter/transform.js +40 -0
- package/dist/utils/toncenter/type.d.ts +227 -0
- package/dist/utils/toncenter/type.js +2 -0
- package/package.json +3 -3
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Address,
|
|
1
|
+
import { Address, Cell } from "@ton/core";
|
|
2
2
|
import { AddressLike } from "../contracts/common/type";
|
|
3
3
|
import { StrategyVaultBase } from "./base";
|
|
4
4
|
import { TxCallBackFn, TxStep } from "../utils/tracker/type";
|
|
5
|
+
import { AddressSender } from "../types/sender";
|
|
5
6
|
export declare class StrategyVaultSteps extends StrategyVaultBase {
|
|
6
|
-
sendDepositAssetAndWait(sender:
|
|
7
|
+
sendDepositAssetAndWait(sender: AddressSender, params: {
|
|
7
8
|
strategyVaultAddress: AddressLike;
|
|
8
9
|
assetAddress: AddressLike;
|
|
9
10
|
amount: bigint;
|
|
@@ -21,7 +22,7 @@ export declare class StrategyVaultSteps extends StrategyVaultBase {
|
|
|
21
22
|
};
|
|
22
23
|
steps: TxStep[];
|
|
23
24
|
}>;
|
|
24
|
-
sendBurnVaultAssetAndWait(sender:
|
|
25
|
+
sendBurnVaultAssetAndWait(sender: AddressSender, params: {
|
|
25
26
|
strategyVaultAddress: AddressLike;
|
|
26
27
|
withdrawAssetAddress: AddressLike;
|
|
27
28
|
vaultShareAmountForBurn: bigint;
|
|
@@ -39,6 +40,122 @@ export declare class StrategyVaultSteps extends StrategyVaultBase {
|
|
|
39
40
|
};
|
|
40
41
|
steps: TxStep[];
|
|
41
42
|
}>;
|
|
43
|
+
sendDepositQueueAndWait(sender: AddressSender, params: {
|
|
44
|
+
strategyVaultAddress: AddressLike;
|
|
45
|
+
assetAddress: AddressLike;
|
|
46
|
+
amount: bigint;
|
|
47
|
+
forwardParams?: {
|
|
48
|
+
forwardTonAmount?: bigint;
|
|
49
|
+
forwardPayload?: Cell;
|
|
50
|
+
};
|
|
51
|
+
queueItemParams?: {
|
|
52
|
+
actionForwardTonAmount?: bigint;
|
|
53
|
+
forwardTonAmount?: bigint;
|
|
54
|
+
forwardPayload?: Cell;
|
|
55
|
+
};
|
|
56
|
+
queryId?: bigint;
|
|
57
|
+
value?: bigint;
|
|
58
|
+
}, callbackFn?: TxCallBackFn): Promise<{
|
|
59
|
+
action: {
|
|
60
|
+
type: string;
|
|
61
|
+
params: {
|
|
62
|
+
strategyVaultAddress: AddressLike;
|
|
63
|
+
assetAddress: AddressLike;
|
|
64
|
+
amount: bigint;
|
|
65
|
+
forwardParams?: {
|
|
66
|
+
forwardTonAmount?: bigint;
|
|
67
|
+
forwardPayload?: Cell;
|
|
68
|
+
};
|
|
69
|
+
queueItemParams?: {
|
|
70
|
+
actionForwardTonAmount?: bigint;
|
|
71
|
+
forwardTonAmount?: bigint;
|
|
72
|
+
forwardPayload?: Cell;
|
|
73
|
+
};
|
|
74
|
+
queryId?: bigint;
|
|
75
|
+
value?: bigint;
|
|
76
|
+
};
|
|
77
|
+
queryId: bigint;
|
|
78
|
+
};
|
|
79
|
+
steps: TxStep[];
|
|
80
|
+
}>;
|
|
81
|
+
sendWithdrawQueueAndWait(sender: AddressSender, params: {
|
|
82
|
+
strategyVaultAddress: AddressLike;
|
|
83
|
+
shareAmount: bigint;
|
|
84
|
+
assetAddress: AddressLike;
|
|
85
|
+
forwardParams?: {
|
|
86
|
+
forwardTonAmount?: bigint;
|
|
87
|
+
forwardPayload?: Cell;
|
|
88
|
+
};
|
|
89
|
+
queueItemParams?: {
|
|
90
|
+
actionForwardTonAmount?: bigint;
|
|
91
|
+
forwardTonAmount?: bigint;
|
|
92
|
+
forwardPayload?: Cell;
|
|
93
|
+
};
|
|
94
|
+
queryId?: bigint;
|
|
95
|
+
value?: bigint;
|
|
96
|
+
}, callbackFn?: TxCallBackFn): Promise<{
|
|
97
|
+
action: {
|
|
98
|
+
type: string;
|
|
99
|
+
params: {
|
|
100
|
+
strategyVaultAddress: AddressLike;
|
|
101
|
+
shareAmount: bigint;
|
|
102
|
+
assetAddress: AddressLike;
|
|
103
|
+
forwardParams?: {
|
|
104
|
+
forwardTonAmount?: bigint;
|
|
105
|
+
forwardPayload?: Cell;
|
|
106
|
+
};
|
|
107
|
+
queueItemParams?: {
|
|
108
|
+
actionForwardTonAmount?: bigint;
|
|
109
|
+
forwardTonAmount?: bigint;
|
|
110
|
+
forwardPayload?: Cell;
|
|
111
|
+
};
|
|
112
|
+
queryId?: bigint;
|
|
113
|
+
value?: bigint;
|
|
114
|
+
};
|
|
115
|
+
queryId: bigint;
|
|
116
|
+
};
|
|
117
|
+
steps: TxStep[];
|
|
118
|
+
}>;
|
|
119
|
+
sendCancelDepositQueueAndWait(sender: AddressSender, params: {
|
|
120
|
+
strategyVaultAddress: AddressLike;
|
|
121
|
+
assetAddress: AddressLike;
|
|
122
|
+
userAddress: AddressLike;
|
|
123
|
+
queryId?: bigint;
|
|
124
|
+
value?: bigint;
|
|
125
|
+
}, callbackFn?: TxCallBackFn): Promise<{
|
|
126
|
+
action: {
|
|
127
|
+
type: string;
|
|
128
|
+
params: {
|
|
129
|
+
strategyVaultAddress: AddressLike;
|
|
130
|
+
assetAddress: AddressLike;
|
|
131
|
+
userAddress: AddressLike;
|
|
132
|
+
queryId?: bigint;
|
|
133
|
+
value?: bigint;
|
|
134
|
+
};
|
|
135
|
+
queryId: bigint;
|
|
136
|
+
};
|
|
137
|
+
steps: TxStep[];
|
|
138
|
+
}>;
|
|
139
|
+
sendCancelWithdrawQueueAndWait(sender: AddressSender, params: {
|
|
140
|
+
strategyVaultAddress: AddressLike;
|
|
141
|
+
assetAddress: AddressLike;
|
|
142
|
+
userAddress: AddressLike;
|
|
143
|
+
queryId?: bigint;
|
|
144
|
+
value?: bigint;
|
|
145
|
+
}, callbackFn?: TxCallBackFn): Promise<{
|
|
146
|
+
action: {
|
|
147
|
+
type: string;
|
|
148
|
+
params: {
|
|
149
|
+
strategyVaultAddress: AddressLike;
|
|
150
|
+
assetAddress: AddressLike;
|
|
151
|
+
userAddress: AddressLike;
|
|
152
|
+
queryId?: bigint;
|
|
153
|
+
value?: bigint;
|
|
154
|
+
};
|
|
155
|
+
queryId: bigint;
|
|
156
|
+
};
|
|
157
|
+
steps: TxStep[];
|
|
158
|
+
}>;
|
|
42
159
|
findAndCallback(target: Address, step: TxStep, createdLt: string | bigint, callbackFn?: TxCallBackFn): Promise<import("../utils/tracker/type").MatchedTxResult>;
|
|
43
160
|
buildFullSteps(startAddress: Address, queryId: bigint, steps: TxStep[]): TxStep[];
|
|
44
161
|
processingSteps(startAddress: Address, queryId: bigint, steps: ({
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.StrategyVaultSteps = void 0;
|
|
4
4
|
const utils_1 = require("../contracts/common/utils");
|
|
5
5
|
const jetton_minter_1 = require("../contracts/jetton/jetton-minter");
|
|
6
|
+
const strategy_vault_1 = require("../contracts/vault/strategy-vault");
|
|
6
7
|
const base_1 = require("./base");
|
|
7
8
|
const jetton_wallet_1 = require("../contracts/jetton/jetton-wallet");
|
|
8
9
|
const parser_1 = require("../utils/parser");
|
|
@@ -123,6 +124,166 @@ class StrategyVaultSteps extends base_1.StrategyVaultBase {
|
|
|
123
124
|
steps: fullSteps,
|
|
124
125
|
};
|
|
125
126
|
}
|
|
127
|
+
async sendDepositQueueAndWait(sender, params, callbackFn) {
|
|
128
|
+
const requesterAddress = sender.address;
|
|
129
|
+
const vault = this.getVault(params.strategyVaultAddress);
|
|
130
|
+
const assetAddress = (0, utils_1.toAddress)(params.assetAddress);
|
|
131
|
+
const isWTONDeposit = this.isWTON(assetAddress);
|
|
132
|
+
////////////////////////// tx //////////////////////////
|
|
133
|
+
const opts = await this.sendDepositQueue(sender, params);
|
|
134
|
+
const stepInfo = [];
|
|
135
|
+
if (isWTONDeposit) {
|
|
136
|
+
const wtonMaster = this.getByContract(jetton_minter_2.WTONMinter, assetAddress);
|
|
137
|
+
stepInfo.push({
|
|
138
|
+
description: "Send deposit queue wton",
|
|
139
|
+
to: await wtonMaster.getWalletAddress(vault.address),
|
|
140
|
+
opcode: jetton_wallet_2.WTONWallet.Op.ExternalTransfer,
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
const asset = this.getByContract(jetton_minter_1.JettonMinter, assetAddress);
|
|
145
|
+
stepInfo.push({
|
|
146
|
+
description: "Send deposit queue jetton",
|
|
147
|
+
to: await asset.getWalletAddress(sender.address),
|
|
148
|
+
opcode: jetton_wallet_1.JettonWallet.Op.Transfer,
|
|
149
|
+
}, {
|
|
150
|
+
description: "Transfer deposit queue jetton to the StrategyVault",
|
|
151
|
+
to: await asset.getWalletAddress(vault.address),
|
|
152
|
+
opcode: jetton_wallet_1.JettonWallet.Op.InternalTransfer,
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
////////////////////////// steps //////////////////////////
|
|
156
|
+
stepInfo.push({
|
|
157
|
+
description: "Send deposit queue",
|
|
158
|
+
to: vault.address,
|
|
159
|
+
opcode: jetton_wallet_1.JettonWallet.Op.TransferNotification,
|
|
160
|
+
}, {
|
|
161
|
+
description: "Excesses deposit queue",
|
|
162
|
+
to: requesterAddress,
|
|
163
|
+
opcode: jetton_wallet_1.JettonWallet.Op.Excesses,
|
|
164
|
+
});
|
|
165
|
+
const fullSteps = this.buildFullSteps(requesterAddress, opts.queryId, stepInfo);
|
|
166
|
+
this.processingSteps(requesterAddress, opts.queryId, fullSteps, callbackFn);
|
|
167
|
+
return {
|
|
168
|
+
action: {
|
|
169
|
+
type: "strategy_vault-deposit_queue",
|
|
170
|
+
params,
|
|
171
|
+
queryId: opts.queryId,
|
|
172
|
+
},
|
|
173
|
+
steps: fullSteps,
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
async sendWithdrawQueueAndWait(sender, params, callbackFn) {
|
|
177
|
+
const opts = await this.sendWithdrawQueue(sender, params);
|
|
178
|
+
const requesterAddress = sender.address;
|
|
179
|
+
const vault = this.getVault(params.strategyVaultAddress);
|
|
180
|
+
const stepInfo = [];
|
|
181
|
+
stepInfo.push({
|
|
182
|
+
description: "Sending the withdraw queue tx",
|
|
183
|
+
to: await vault.getWalletAddress(sender.address),
|
|
184
|
+
opcode: jetton_wallet_1.JettonWallet.Op.Burn,
|
|
185
|
+
}, {
|
|
186
|
+
description: "Send withdraw queue",
|
|
187
|
+
to: vault.address,
|
|
188
|
+
opcode: jetton_wallet_1.JettonWallet.Op.BurnNotification,
|
|
189
|
+
}, {
|
|
190
|
+
description: "Excesses withdraw queue",
|
|
191
|
+
to: requesterAddress,
|
|
192
|
+
opcode: jetton_wallet_1.JettonWallet.Op.Excesses,
|
|
193
|
+
});
|
|
194
|
+
const fullSteps = this.buildFullSteps(requesterAddress, opts.queryId, stepInfo);
|
|
195
|
+
this.processingSteps(requesterAddress, opts.queryId, fullSteps, callbackFn);
|
|
196
|
+
return {
|
|
197
|
+
action: {
|
|
198
|
+
type: "strategy_vault-withdraw_queue",
|
|
199
|
+
params,
|
|
200
|
+
queryId: opts.queryId,
|
|
201
|
+
},
|
|
202
|
+
steps: fullSteps,
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
async sendCancelDepositQueueAndWait(sender, params, callbackFn) {
|
|
206
|
+
const opts = await this.sendCancelDepositQueue(sender, params);
|
|
207
|
+
const requesterAddress = sender.address;
|
|
208
|
+
const vault = this.getVault(params.strategyVaultAddress);
|
|
209
|
+
const isWTON = this.isWTON(params.assetAddress);
|
|
210
|
+
const stepInfo = [];
|
|
211
|
+
stepInfo.push({
|
|
212
|
+
description: "Sending the Deposit Queue Cancel tx",
|
|
213
|
+
to: vault.address,
|
|
214
|
+
opcode: strategy_vault_1.StrategyVault.Op.CancelDepositQueue,
|
|
215
|
+
});
|
|
216
|
+
if (isWTON) {
|
|
217
|
+
const wton = this.getByContract(jetton_minter_2.WTONMinter, params.assetAddress);
|
|
218
|
+
stepInfo.push({
|
|
219
|
+
description: "Refund WTON",
|
|
220
|
+
to: await wton.getWalletAddress(vault.address),
|
|
221
|
+
opcode: jetton_wallet_2.WTONWallet.Op.Transfer,
|
|
222
|
+
}, {
|
|
223
|
+
description: "Refund transfer WTON",
|
|
224
|
+
to: await wton.getWalletAddress(sender.address),
|
|
225
|
+
opcode: jetton_wallet_2.WTONWallet.Op.InternalTransfer,
|
|
226
|
+
}, {
|
|
227
|
+
description: "Unwrap WTON",
|
|
228
|
+
to: sender.address,
|
|
229
|
+
opcode: jetton_wallet_2.WTONWallet.Op.UnwrapNotification,
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
else {
|
|
233
|
+
const asset = this.getByContract(jetton_minter_1.JettonMinter, params.assetAddress);
|
|
234
|
+
stepInfo.push({
|
|
235
|
+
description: "Refund Jetton",
|
|
236
|
+
to: await asset.getWalletAddress(vault.address),
|
|
237
|
+
opcode: jetton_wallet_1.JettonWallet.Op.Transfer,
|
|
238
|
+
}, {
|
|
239
|
+
description: "Refund transfer Jetton",
|
|
240
|
+
to: await asset.getWalletAddress(sender.address),
|
|
241
|
+
opcode: jetton_wallet_1.JettonWallet.Op.InternalTransfer,
|
|
242
|
+
}, {
|
|
243
|
+
description: "Excesses jetton transfer",
|
|
244
|
+
to: requesterAddress,
|
|
245
|
+
opcode: jetton_wallet_1.JettonWallet.Op.Excesses,
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
const fullSteps = this.buildFullSteps(requesterAddress, opts.queryId, stepInfo);
|
|
249
|
+
this.processingSteps(requesterAddress, opts.queryId, fullSteps, callbackFn);
|
|
250
|
+
return {
|
|
251
|
+
action: {
|
|
252
|
+
type: "strategy_vault-deposit_queue_cancel",
|
|
253
|
+
params,
|
|
254
|
+
queryId: opts.queryId,
|
|
255
|
+
},
|
|
256
|
+
steps: fullSteps,
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
async sendCancelWithdrawQueueAndWait(sender, params, callbackFn) {
|
|
260
|
+
const opts = await this.sendCancelWithdrawQueue(sender, params);
|
|
261
|
+
const vault = this.getVault(params.strategyVaultAddress);
|
|
262
|
+
const stepInfo = [];
|
|
263
|
+
stepInfo.push({
|
|
264
|
+
description: "Sending the withdraw queue cancel tx",
|
|
265
|
+
to: vault.address,
|
|
266
|
+
opcode: strategy_vault_1.StrategyVault.Op.CancelWithdrawQueue,
|
|
267
|
+
}, {
|
|
268
|
+
description: "Refund StrategyVault Token",
|
|
269
|
+
to: await vault.getWalletAddress(sender.address),
|
|
270
|
+
opcode: jetton_wallet_1.JettonWallet.Op.InternalTransfer,
|
|
271
|
+
}, {
|
|
272
|
+
description: "Excesses StrategyVault mint",
|
|
273
|
+
to: sender.address,
|
|
274
|
+
opcode: jetton_wallet_1.JettonWallet.Op.Excesses,
|
|
275
|
+
});
|
|
276
|
+
const fullSteps = this.buildFullSteps(sender.address, params.queryId, stepInfo);
|
|
277
|
+
this.processingSteps(sender.address, opts.queryId, fullSteps, callbackFn);
|
|
278
|
+
return {
|
|
279
|
+
action: {
|
|
280
|
+
type: "strategy_vault-withdraw_queue_cancel",
|
|
281
|
+
params,
|
|
282
|
+
queryId: opts.queryId,
|
|
283
|
+
},
|
|
284
|
+
steps: fullSteps,
|
|
285
|
+
};
|
|
286
|
+
}
|
|
126
287
|
async findAndCallback(target, step, createdLt, callbackFn) {
|
|
127
288
|
const matchedTx = await (0, tracker_1.findTx)(this.client, (0, utils_1.toAddress)(target), createdLt.toString(), step);
|
|
128
289
|
step.matchedTx = matchedTx;
|
package/dist/types/sender.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Address, Sender, SenderArguments } from "@ton/core";
|
|
2
2
|
export interface AddressSender extends Sender {
|
|
3
3
|
readonly address: Address;
|
|
4
|
+
getSeqno(): Promise<number>;
|
|
4
5
|
}
|
|
5
6
|
export interface MultiSender extends AddressSender {
|
|
6
7
|
multiSend(args: SenderArguments[]): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Address, Builder, Cell, Contract, ContractProvider, Dictionary, Sender, Slice } from
|
|
1
|
+
import { Address, Builder, Cell, Contract, ContractProvider, Dictionary, Sender, Slice } from "@ton/core";
|
|
2
2
|
export type StrategyVaultConfig = {
|
|
3
3
|
ownerAddress: Address;
|
|
4
4
|
assets: Cell | null;
|
|
@@ -61,12 +61,12 @@ export declare class StrategyVault implements Contract {
|
|
|
61
61
|
SetWhitelistedMinters: number;
|
|
62
62
|
SetManagementFeeRatePerYear: number;
|
|
63
63
|
SetMaxLeverageRatio: number;
|
|
64
|
-
|
|
64
|
+
SetRFQConfig: number;
|
|
65
65
|
SetGasConfig: number;
|
|
66
66
|
SetOracleConfig: number;
|
|
67
67
|
SetWalletCode: number;
|
|
68
68
|
SetDataAggregatorCode: number;
|
|
69
|
-
|
|
69
|
+
SetRFQCode: number;
|
|
70
70
|
SetContent: number;
|
|
71
71
|
UpgradeCode: number;
|
|
72
72
|
SetGuardianAddress: number;
|
|
@@ -89,10 +89,10 @@ export declare class StrategyVault implements Contract {
|
|
|
89
89
|
LiquidateToFactorial: number;
|
|
90
90
|
Deposit: number;
|
|
91
91
|
Withdraw: number;
|
|
92
|
-
|
|
92
|
+
CreateRFQ: number;
|
|
93
93
|
ExecuteStrategy: number;
|
|
94
94
|
TakeAggregatedData: number;
|
|
95
|
-
|
|
95
|
+
CancelRFQ: number;
|
|
96
96
|
Excesses: number;
|
|
97
97
|
};
|
|
98
98
|
static Error: {
|
|
@@ -122,7 +122,7 @@ export declare class StrategyVault implements Contract {
|
|
|
122
122
|
NotEnoughGas: number;
|
|
123
123
|
InvalidOp: number;
|
|
124
124
|
ExceededExposureCap: number;
|
|
125
|
-
|
|
125
|
+
InvalidRFQPeriod: number;
|
|
126
126
|
InvalidConfig: number;
|
|
127
127
|
InvalidPendingOwnerActionIndex: number;
|
|
128
128
|
NotYetExecutable: number;
|
|
@@ -134,7 +134,7 @@ export declare class StrategyVault implements Contract {
|
|
|
134
134
|
IncreaseBalance: number;
|
|
135
135
|
FactorialTransferIn: number;
|
|
136
136
|
FactorialTransferOut: number;
|
|
137
|
-
|
|
137
|
+
CreateRFQ: number;
|
|
138
138
|
FactorialLiquidate: number;
|
|
139
139
|
RFQInitialize: number;
|
|
140
140
|
RFQNotification: number;
|
|
@@ -240,7 +240,7 @@ export declare class StrategyVault implements Contract {
|
|
|
240
240
|
}): Promise<void>;
|
|
241
241
|
getState(provider: ContractProvider): Promise<import("@ton/core").ContractState>;
|
|
242
242
|
getWalletAddress(provider: ContractProvider, address: Address): Promise<Address>;
|
|
243
|
-
|
|
243
|
+
getRFQAddress(provider: ContractProvider, index: bigint): Promise<Address>;
|
|
244
244
|
static createFactorialPoolConfig(params: [Address, Address, boolean, boolean][]): Dictionary<Address, FactorialPool>;
|
|
245
245
|
static createFactorialPoolUpdateConfig(params: [Address, Address, boolean, boolean][]): Dictionary<Address, any>;
|
|
246
246
|
static createAssetConfig(params: [Address, boolean, boolean, boolean, number][]): Dictionary<Address, Asset>;
|
|
@@ -429,7 +429,7 @@ export declare class StrategyVault implements Contract {
|
|
|
429
429
|
static getOpName(opCode: number): string;
|
|
430
430
|
static getErrorName(errorCode: number): string;
|
|
431
431
|
static getGasKeyName(gasKey: number): string;
|
|
432
|
-
static getAvailableActionsOriginal(): readonly ["SetOwnerAddress", "SetAssetConfig", "SetFactorialPoolConfig", "SetManagerAddress", "SetPrivateVault", "SetDepositCloseTimestamp", "SetWithdrawOpenTimestamp", "SetWhitelistedMinters", "SetManagementFeeRatePerYear", "SetMaxLeverageRatio", "
|
|
432
|
+
static getAvailableActionsOriginal(): readonly ["SetOwnerAddress", "SetAssetConfig", "SetFactorialPoolConfig", "SetManagerAddress", "SetPrivateVault", "SetDepositCloseTimestamp", "SetWithdrawOpenTimestamp", "SetWhitelistedMinters", "SetManagementFeeRatePerYear", "SetMaxLeverageRatio", "SetRFQConfig", "SetGasConfig", "SetOracleConfig", "SetWalletCode", "SetDataAggregatorCode", "SetRFQCode", "SetContent", "UpgradeCode", "SetGuardianAddress", "SetTimelock", "SetManagementFeeRecipientAddress", "ClaimProtocolFee", "SetProtocolFeeRatePerYear", "SetProtocolFeeManagerAddress", "ClaimManagementFee", "ExecuteOwnerAction", "RevertOwnerAction", "Initialize", "SupplyToFactorial", "WithdrawFromFactorial", "BorrowFromFactorial", "RepayToFactorial", "LiquidateToFactorial", "CreateRFQ", "CancelRFQ", "TakeAggregatedData", "Excesses"];
|
|
433
433
|
static createInitializeMsgBody(queryID?: number): Cell;
|
|
434
434
|
static createExecuteStrategyMsgBody(body: Builder, queryID?: number): Cell;
|
|
435
435
|
static createLiquidateToFactorialMsgBody(oracleParams: Cell, pool: Address, borrower: Address, repayAsset: Address, seizeAsset: Address, repayAmount: bigint, response: Address, queryID?: number): Cell;
|