@haven-fi/solauto-sdk 1.0.715 → 1.0.716
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.
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"transactionUtils.d.ts","sourceRoot":"","sources":["../../../src/services/transactions/transactionUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA8B,MAAM,iBAAiB,CAAC;AAKxE,OAAO,EAIL,kBAAkB,EAClB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;AAiBlC,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AA4BjE,OAAO,EAAE,qBAAqB,EAAyB,kBAAkB,EAAE,MAAM,aAAa,CAAC;
|
1
|
+
{"version":3,"file":"transactionUtils.d.ts","sourceRoot":"","sources":["../../../src/services/transactions/transactionUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA8B,MAAM,iBAAiB,CAAC;AAKxE,OAAO,EAIL,kBAAkB,EAClB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;AAiBlC,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AA4BjE,OAAO,EAAE,qBAAqB,EAAyB,kBAAkB,EAAE,MAAM,aAAa,CAAC;AA0L/F,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,aAAa,EACrB,EAAE,EAAE,kBAAkB,EACtB,sBAAsB,EAAE,MAAM,EAAE,GAC/B,OAAO,CAAC,kBAAkB,CAAC,CAyF7B;AA+LD,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,aAAa,EACrB,EAAE,EAAE,kBAAkB,GACrB,OAAO,CAAC,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAAC,CA0BnD;AAED,wBAAsB,gCAAgC,CACpD,eAAe,EAAE,oBAAoB,EACrC,YAAY,EAAE,SAAS,EACvB,eAAe,EAAE,SAAS,GACzB,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC,CAuC5C;AAED,wBAAgB,YAAY,CAC1B,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,kBAAkB,EAAE,EACzB,KAAK,EAAE,KAAK,EACZ,oBAAoB,CAAC,EAAE,OAAO,EAC9B,kBAAkB,CAAC,EAAE,kBAAkB;;;;EAuHxC;AAED,wBAAgB,cAAc,CAAC,kBAAkB,CAAC,EAAE,kBAAkB,8JAErE"}
|
@@ -92,6 +92,8 @@ async function transactionChoresBefore(client, accountsGettingCreated, solautoAc
|
|
92
92
|
chores = chores.add((0, utils_1.createAssociatedTokenAccountUmiIx)(client.signer, (0, umi_web3js_adapters_1.toWeb3JsPublicKey)(client.signer.publicKey), spl_token_1.NATIVE_MINT));
|
93
93
|
accountsGettingCreated.push(wSolUsage.wSolTokenAccount.toString());
|
94
94
|
}
|
95
|
+
console.log(solautoActions);
|
96
|
+
console.log(accountsGettingCreated);
|
95
97
|
for (const solautoAction of solautoActions ?? []) {
|
96
98
|
if (!(0, generated_1.isSolautoAction)("Withdraw", solautoAction) &&
|
97
99
|
!(0, generated_1.isSolautoAction)("Borrow", solautoAction)) {
|
package/local/txSandbox.ts
CHANGED
@@ -22,7 +22,7 @@ import {
|
|
22
22
|
} from "../src";
|
23
23
|
import { getSecretKey } from "./shared";
|
24
24
|
|
25
|
-
const payForTransaction =
|
25
|
+
const payForTransaction = false;
|
26
26
|
const testProgram = false;
|
27
27
|
const lpEnv: ProgramEnv = "Prod";
|
28
28
|
|
@@ -47,27 +47,23 @@ export async function main() {
|
|
47
47
|
});
|
48
48
|
|
49
49
|
await client.initializeExistingSolautoPosition({
|
50
|
-
positionId:
|
51
|
-
authority: new PublicKey("
|
50
|
+
positionId: 2,
|
51
|
+
authority: new PublicKey("EBhRj7jbF2EVE21i19JSuCX1BAbnZFYhoKW64HnaZ3kf"),
|
52
52
|
// lpUserAccount: new PublicKey(
|
53
53
|
// "GEokw9jqbh6d1xUNA3qaeYFFetbSR5Y1nt7C3chwwgSz"
|
54
54
|
// ),
|
55
55
|
});
|
56
56
|
|
57
|
-
|
57
|
+
const transactionItems = [rebalance(client)];
|
58
58
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
// retryConfig: { totalRetries: 2 },
|
68
|
-
// });
|
69
|
-
// const statuses = await txManager.send(transactionItems);
|
70
|
-
// consoleLog(statuses);
|
59
|
+
const txManager = new ClientTransactionsManager({
|
60
|
+
txHandler: client,
|
61
|
+
txRunType: payForTransaction ? "normal" : "only-simulate",
|
62
|
+
priorityFeeSetting: PriorityFeeSetting.Default,
|
63
|
+
retryConfig: { totalRetries: 2 },
|
64
|
+
});
|
65
|
+
const statuses = await txManager.send(transactionItems);
|
66
|
+
consoleLog(statuses);
|
71
67
|
}
|
72
68
|
|
73
69
|
async function refreshAll() {
|
package/package.json
CHANGED
@@ -208,6 +208,8 @@ async function transactionChoresBefore(
|
|
208
208
|
accountsGettingCreated.push(wSolUsage.wSolTokenAccount.toString());
|
209
209
|
}
|
210
210
|
|
211
|
+
console.log(solautoActions);
|
212
|
+
console.log(accountsGettingCreated);
|
211
213
|
for (const solautoAction of solautoActions ?? []) {
|
212
214
|
if (
|
213
215
|
!isSolautoAction("Withdraw", solautoAction) &&
|