aftermath-ts-sdk 0.0.121 → 0.0.122
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":"transactionsApiHelpers.d.ts","sourceRoot":"","sources":["../../../src/general/api/transactionsApiHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,gCAAgC,EAChC,gBAAgB,EAChB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"transactionsApiHelpers.d.ts","sourceRoot":"","sources":["../../../src/general/api/transactionsApiHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,gCAAgC,EAChC,gBAAgB,EAChB,iBAAiB,EAIjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGzD,qBAAa,sBAAsB;IAKtB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,YAAY;IAY5C,2BAA2B,UAC1B,gCAAgC,WAC9B,iBAAiB,UAClB,MAAM,KACZ,QAAQ,sBAAsB,CAAC,CAkBhC;IAEK,+BAA+B,OACjC,gBAAgB,KAClB,QAAQ,gBAAgB,CAAC,CAiB1B;IAEK,wCAAwC,OAC1C,gBAAgB,GAAG,QAAQ,gBAAgB,CAAC,KAC9C,QAAQ,qBAAqB,CAAC,CAI/B;IAUF,OAAc,uBAAuB,mBACpB,MAAM,eACT,MAAM,gBACL,MAAM,KAClB,GAAG,MAAM,KAAK,MAAM,KAAK,MAAM,EAAE,CACkB;IAEtD,OAAc,kBAAkB;cAErB,IAAI;;;MACyC;CACxD"}
|
|
@@ -40,14 +40,17 @@ class TransactionsApiHelpers {
|
|
|
40
40
|
const sender = tx.blockData.sender;
|
|
41
41
|
if (!sender)
|
|
42
42
|
throw new Error("no sender set for transaction");
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
const [txResponse, referenceGasPrice] = yield Promise.all([
|
|
44
|
+
this.Provider.provider.dryRunTransactionBlock({
|
|
45
|
+
transactionBlock: tx.serialize(),
|
|
46
|
+
}),
|
|
47
|
+
this.Provider.provider.getReferenceGasPrice(),
|
|
48
|
+
]);
|
|
49
|
+
const gasUsed = (0, sui_js_1.getTotalGasUsedUpperBound)(txResponse.effects);
|
|
48
50
|
if (gasUsed === undefined)
|
|
49
|
-
throw Error("
|
|
51
|
+
throw Error("dry run move call failed");
|
|
50
52
|
tx.setGasBudget(gasUsed);
|
|
53
|
+
tx.setGasPrice(referenceGasPrice);
|
|
51
54
|
return tx;
|
|
52
55
|
});
|
|
53
56
|
this.fetchSetGasBudgetAndSerializeTransaction = (tx) => __awaiter(this, void 0, void 0, function* () {
|