@haven-fi/solauto-sdk 1.0.280 → 1.0.282
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/transactions/transactionUtils.d.ts.map +1 -1
- package/dist/transactions/transactionUtils.js +5 -4
- package/dist/transactions/transactionsManager.d.ts.map +1 -1
- package/dist/transactions/transactionsManager.js +3 -2
- package/dist/utils/solanaUtils.d.ts.map +1 -1
- package/dist/utils/solanaUtils.js +4 -2
- package/package.json +1 -1
- package/src/transactions/transactionUtils.ts +10 -4
- package/src/transactions/transactionsManager.ts +3 -2
- package/src/utils/solanaUtils.ts +4 -2
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"transactionUtils.d.ts","sourceRoot":"","sources":["../../src/transactions/transactionUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,kBAAkB,EAClB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,SAAS,EAA8B,MAAM,iBAAiB,CAAC;AAmBxE,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAqCzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAOlD,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"transactionUtils.d.ts","sourceRoot":"","sources":["../../src/transactions/transactionUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,kBAAkB,EAClB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,SAAS,EAA8B,MAAM,iBAAiB,CAAC;AAmBxE,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAqCzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAOlD,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAwLjD,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,aAAa,EACrB,EAAE,EAAE,kBAAkB,EACtB,sBAAsB,EAAE,MAAM,EAAE,GAC/B,OAAO,CAAC,kBAAkB,CAAC,CAkH7B;AA2LD,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,aAAa,EACrB,EAAE,EAAE,kBAAkB,GACrB,OAAO,CAAC,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAAC,CA0BnD;AAED,wBAAsB,8BAA8B,CAAC,MAAM,EAAE,aAAa,oBA2CzE;AAED,wBAAsB,gCAAgC,CACpD,MAAM,EAAE,aAAa,EACrB,2BAA2B,CAAC,EAAE,MAAM,EACpC,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC,CAsH5C;AAED,wBAAsB,gCAAgC,CACpD,eAAe,EAAE,oBAAoB,EACrC,YAAY,EAAE,SAAS,EACvB,eAAe,EAAE,SAAS,GACzB,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC,CAsC5C;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,kBAAkB,EAAE,KAAK,EAAE,GAAG;;;;EA0DxE"}
|
@@ -53,10 +53,9 @@ async function transactionChoresBefore(client, accountsGettingCreated, solautoAc
|
|
53
53
|
let chores = (0, umi_1.transactionBuilder)();
|
54
54
|
if (client.referralStateData === null ||
|
55
55
|
(client.referredBy !== undefined &&
|
56
|
-
client.referralStateData
|
57
|
-
(0, umi_1.publicKey)(web3_js_1.PublicKey.default)) ||
|
56
|
+
(0, umi_web3js_adapters_1.toWeb3JsPublicKey)(client.referralStateData.referredByState).equals(web3_js_1.PublicKey.default)) ||
|
58
57
|
(client.authorityLutAddress !== undefined &&
|
59
|
-
|
58
|
+
(0, umi_web3js_adapters_1.toWeb3JsPublicKey)(client.referralStateData.lookupTable).equals(web3_js_1.PublicKey.default))) {
|
60
59
|
chores = chores.add(client.updateReferralStatesIx(undefined, client.authorityLutAddress));
|
61
60
|
}
|
62
61
|
if (client.selfManaged) {
|
@@ -440,7 +439,9 @@ function getErrorInfo(umi, tx, error) {
|
|
440
439
|
if (typeof error === "object" && error["InstructionError"]) {
|
441
440
|
const err = error["InstructionError"];
|
442
441
|
const errIx = tx.getInstructions()[Math.max(0, err[0])];
|
443
|
-
const errCode = typeof err[1] === "object" && "Custom" in err[1]
|
442
|
+
const errCode = typeof err[1] === "object" && "Custom" in err[1]
|
443
|
+
? err[1]["Custom"]
|
444
|
+
: undefined;
|
444
445
|
const errName = errCode === undefined ? err[1] : undefined;
|
445
446
|
let programName = "";
|
446
447
|
if (errIx.programId.toString() ===
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"transactionsManager.d.ts","sourceRoot":"","sources":["../../src/transactions/transactionsManager.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,kBAAkB,EAEnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAMzD,OAAO,EACL,aAAa,EAEd,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,kBAAkB,EAElB,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,oBAAoB,EAAa,MAAM,YAAY,CAAC;AAO7D,qBAAa,wBAAyB,SAAQ,KAAK;gBACrC,OAAO,EAAE,MAAM;CAK5B;AAqCD,qBAAa,eAAe;IAMjB,OAAO,EAAE,CACd,UAAU,EAAE,MAAM,KACf,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC;IACxC,IAAI,CAAC,EAAE,MAAM;IARtB,oBAAoB,EAAG,MAAM,EAAE,CAAC;IAChC,EAAE,CAAC,EAAE,kBAAkB,CAAC;IACjB,WAAW,EAAE,OAAO,CAAS;gBAG3B,OAAO,EAAE,CACd,UAAU,EAAE,MAAM,KACf,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC,EACxC,IAAI,CAAC,EAAE,MAAM,YAAA;IAGhB,UAAU;IAKV,OAAO,CAAC,UAAU,EAAE,MAAM;IAMhC,cAAc,IAAI,MAAM,EAAE;CAY3B;
|
1
|
+
{"version":3,"file":"transactionsManager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E,CAAC;AAEJ,qBAAa,mBAAmB;IAK5B,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,cAAc,CAAC;IACvB,OAAO,CAAC,MAAM,CAAC;IACf,OAAO,CAAC,kBAAkB;IAC1B,OAAO,CAAC,aAAa,CAAC;IACtB,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,UAAU;IAVpB,OAAO,CAAC,QAAQ,CAAkC;IAClD,OAAO,CAAC,YAAY,CAAe;gBAGzB,SAAS,EAAE,aAAa,GAAG,oBAAoB,EAC/C,cAAc,CAAC,GAAE,CAAC,QAAQ,EAAE,0BAA0B,KAAK,IAAI,aAAA,EAC/D,MAAM,CAAC,EAAE,kBAAkB,YAAA,EAC3B,kBAAkB,GAAE,kBAA2C,EAC/D,aAAa,CAAC,EAAE,aAAa,YAAA,EAC7B,OAAO,GAAE,MAAU,EACnB,UAAU,GAAE,MAAY;YAQpB,uBAAuB;IAwCrC,OAAO,CAAC,YAAY;YA6CN,aAAa;IAoB3B,OAAO,CAAC,4BAA4B;IAUpC,OAAO,CAAC,mBAAmB;YAMb,SAAS;IAgBV,UAAU,CACrB,YAAY,EAAE,eAAe,EAAE,GAC9B,OAAO,CAAC,0BAA0B,CAAC;IA+DzB,IAAI,CACf,KAAK,EAAE,eAAe,EAAE,GACvB,OAAO,CAAC,0BAA0B,CAAC;YA+BxB,qBAAqB;YAuDrB,cAAc;YAqCd,eAAe;CAmD9B"}
|
@@ -105,8 +105,10 @@ class TransactionSet {
|
|
105
105
|
const transactions = this.items
|
106
106
|
.filter((x) => x.tx && x.tx.getInstructions().length > 0)
|
107
107
|
.map((x) => x.tx);
|
108
|
+
const txSpecificLuts = this.lutAddresses();
|
109
|
+
this.txHandler.log("Tx-specific LUTs: ", txSpecificLuts.map(x => x.toString()));
|
108
110
|
const lutInputs = await this.lookupTables.getLutInputs(this.lutAddresses());
|
109
|
-
this.txHandler.log(lutInputs);
|
111
|
+
this.txHandler.log("Lut inputs:", lutInputs);
|
110
112
|
return (0, umi_1.transactionBuilder)()
|
111
113
|
.add(transactions)
|
112
114
|
.setAddressLookupTables(lutInputs);
|
@@ -366,7 +368,6 @@ class TransactionsManager {
|
|
366
368
|
: TransactionStatus.Failed, attemptNum, undefined, undefined, errorDetails.errorName || errorDetails.errorInfo
|
367
369
|
? errorString
|
368
370
|
: e.message);
|
369
|
-
this.txHandler.log(errorString);
|
370
371
|
if (!errorDetails.canBeIgnored) {
|
371
372
|
throw e;
|
372
373
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"solanaUtils.d.ts","sourceRoot":"","sources":["../../src/utils/solanaUtils.ts"],"names":[],"mappings":"AACA,OAAO,EACL,uBAAuB,EACvB,MAAM,EACN,kBAAkB,EAClB,GAAG,EACH,kBAAkB,EAGnB,MAAM,0BAA0B,CAAC;AAOlC,OAAO,EAKL,UAAU,EACV,SAAS,EAKT,sBAAsB,EAEvB,MAAM,iBAAiB,CAAC;AAgBzB,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAIlE,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,MAAM,UAErD;AAED,wBAAgB,oBAAoB,CAAC,eAAe,EAAE,MAAM,UAE3D;AAED,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,EACd,SAAS,GAAE,SAAgC,GAC1C,CAAC,UAAU,EAAE,GAAG,CAAC,CAQnB;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,EACd,EAAE,EAAE,sBAAsB,GACzB,kBAAkB,CAMpB;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,MAAM,GACtB,kBAAkB,CAOpB;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,GACf,kBAAkB,CAOpB;AAED,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE,SA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AM,EAAE,MAAM,EACd,WAAW,EAAE,kBAAkB,EAC/B,gBAAgB,CAAC,EAAE,MAAM,EACzB,gBAAgB,CAAC,EAAE,MAAM,sBA2D1B;AA2BD,wBAAsB,2BAA2B,CAC/C,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,kBAAkB,EACtB,eAAe,EAAE,kBAAkB,GAClC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAsB7B;AAiDD,wBAAsB,8BAA8B,CAClD,GAAG,EAAE,GAAG,EACR,UAAU,EAAE,UAAU,EACtB,EAAE,EAAE,kBAAkB,EACtB,MAAM,CAAC,EAAE,kBAAkB,EAC3B,eAAe,GAAE,kBAA2C,EAC5D,cAAc,CAAC,EAAE,MAAM,IAAI,GAC1B,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CA0DjC"}
|
@@ -139,8 +139,10 @@ function assembleFinalTransaction(signer, transaction, computeUnitPrice, compute
|
|
139
139
|
return tx;
|
140
140
|
}
|
141
141
|
async function simulateTransaction(umi, connection, transaction) {
|
142
|
-
const tx = (0, umi_web3js_adapters_1.toWeb3JsTransaction)(transaction.build(umi));
|
143
|
-
(0, generalUtils_1.consoleLog)(
|
142
|
+
const tx = (0, umi_web3js_adapters_1.toWeb3JsTransaction)(transaction.useV0().build(umi));
|
143
|
+
(0, generalUtils_1.consoleLog)("TRANSACTIONS REQUIRED", transaction.minimumTransactionsRequired(umi));
|
144
|
+
(0, generalUtils_1.consoleLog)("TRANSACTION SIZE", transaction.getTransactionSize(umi));
|
145
|
+
(0, generalUtils_1.consoleLog)("FITS IN ONE TX", transaction.fitsInOneTransaction(umi));
|
144
146
|
const simulationResult = await connection.simulateTransaction(tx, {
|
145
147
|
sigVerify: false,
|
146
148
|
commitment: "processed",
|
package/package.json
CHANGED
@@ -137,10 +137,13 @@ async function transactionChoresBefore(
|
|
137
137
|
if (
|
138
138
|
client.referralStateData === null ||
|
139
139
|
(client.referredBy !== undefined &&
|
140
|
-
client.referralStateData
|
141
|
-
|
140
|
+
toWeb3JsPublicKey(client.referralStateData!.referredByState).equals(
|
141
|
+
PublicKey.default
|
142
|
+
)) ||
|
142
143
|
(client.authorityLutAddress !== undefined &&
|
143
|
-
client.referralStateData!.lookupTable
|
144
|
+
toWeb3JsPublicKey(client.referralStateData!.lookupTable).equals(
|
145
|
+
PublicKey.default
|
146
|
+
))
|
144
147
|
) {
|
145
148
|
chores = chores.add(
|
146
149
|
client.updateReferralStatesIx(undefined, client.authorityLutAddress)
|
@@ -811,7 +814,10 @@ export function getErrorInfo(umi: Umi, tx: TransactionBuilder, error: any) {
|
|
811
814
|
if (typeof error === "object" && (error as any)["InstructionError"]) {
|
812
815
|
const err = (error as any)["InstructionError"];
|
813
816
|
const errIx = tx.getInstructions()[Math.max(0, err[0])];
|
814
|
-
const errCode =
|
817
|
+
const errCode =
|
818
|
+
typeof err[1] === "object" && "Custom" in err[1]
|
819
|
+
? err[1]["Custom"]
|
820
|
+
: undefined;
|
815
821
|
const errName = errCode === undefined ? (err[1] as string) : undefined;
|
816
822
|
let programName = "";
|
817
823
|
|
@@ -161,8 +161,10 @@ class TransactionSet {
|
|
161
161
|
.filter((x) => x.tx && x.tx.getInstructions().length > 0)
|
162
162
|
.map((x) => x.tx!);
|
163
163
|
|
164
|
+
const txSpecificLuts = this.lutAddresses();
|
165
|
+
this.txHandler.log("Tx-specific LUTs: ", txSpecificLuts.map(x => x.toString()));
|
164
166
|
const lutInputs = await this.lookupTables.getLutInputs(this.lutAddresses());
|
165
|
-
this.txHandler.log(lutInputs);
|
167
|
+
this.txHandler.log("Lut inputs:", lutInputs);
|
166
168
|
return transactionBuilder()
|
167
169
|
.add(transactions)
|
168
170
|
.setAddressLookupTables(lutInputs);
|
@@ -599,7 +601,6 @@ export class TransactionsManager {
|
|
599
601
|
? errorString
|
600
602
|
: e.message
|
601
603
|
);
|
602
|
-
this.txHandler.log(errorString);
|
603
604
|
|
604
605
|
if (!errorDetails.canBeIgnored) {
|
605
606
|
throw e;
|
package/src/utils/solanaUtils.ts
CHANGED
@@ -271,8 +271,10 @@ async function simulateTransaction(
|
|
271
271
|
connection: Connection,
|
272
272
|
transaction: TransactionBuilder
|
273
273
|
): Promise<RpcResponseAndContext<SimulatedTransactionResponse>> {
|
274
|
-
const tx = toWeb3JsTransaction(transaction.build(umi));
|
275
|
-
consoleLog(
|
274
|
+
const tx = toWeb3JsTransaction(transaction.useV0().build(umi));
|
275
|
+
consoleLog("TRANSACTIONS REQUIRED", transaction.minimumTransactionsRequired(umi));
|
276
|
+
consoleLog("TRANSACTION SIZE", transaction.getTransactionSize(umi));
|
277
|
+
consoleLog("FITS IN ONE TX", transaction.fitsInOneTransaction(umi));
|
276
278
|
const simulationResult = await connection.simulateTransaction(
|
277
279
|
tx,
|
278
280
|
{
|