@fuel-ts/account 0.97.0 → 0.97.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/dist/account.d.ts.map +1 -1
- package/dist/connectors/fuel-connector.d.ts.map +1 -1
- package/dist/index.global.js +587 -14247
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +31 -29
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -7
- package/dist/index.mjs.map +1 -1
- package/dist/predicate/predicate.d.ts.map +1 -1
- package/dist/providers/provider.d.ts.map +1 -1
- package/dist/providers/transaction-request/blob-transaction-request.d.ts.map +1 -1
- package/dist/providers/transaction-request/create-transaction-request.d.ts.map +1 -1
- package/dist/providers/transaction-request/errors.d.ts.map +1 -1
- package/dist/providers/transaction-request/script-transaction-request.d.ts.map +1 -1
- package/dist/providers/transaction-request/upgrade-transaction-request.d.ts.map +1 -1
- package/dist/providers/transaction-request/upload-transaction-request.d.ts.map +1 -1
- package/dist/providers/transaction-summary/get-transaction-summary.d.ts +6 -1
- package/dist/providers/transaction-summary/get-transaction-summary.d.ts.map +1 -1
- package/dist/providers/transaction-summary/operations.d.ts +21 -3
- package/dist/providers/transaction-summary/operations.d.ts.map +1 -1
- package/dist/test-utils/launchNode.d.ts.map +1 -1
- package/dist/test-utils.global.js +590 -14247
- package/dist/test-utils.global.js.map +1 -1
- package/dist/test-utils.js +30 -25
- package/dist/test-utils.js.map +1 -1
- package/dist/test-utils.mjs +12 -7
- package/dist/test-utils.mjs.map +1 -1
- package/dist/utils/formatTransferToContractScriptData.d.ts +1 -1
- package/dist/utils/formatTransferToContractScriptData.d.ts.map +1 -1
- package/dist/wallet/base-wallet-unlocked.d.ts.map +1 -1
- package/package.json +17 -17
package/dist/index.mjs
CHANGED
@@ -4759,7 +4759,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
4759
4759
|
createOperations() {
|
4760
4760
|
const fetchFn = _Provider.getFetchFn(this.options);
|
4761
4761
|
const gqlClient = new GraphQLClient(this.urlWithoutAuth, {
|
4762
|
-
fetch: (
|
4762
|
+
fetch: (input, requestInit) => fetchFn(input.toString(), requestInit || {}, this.options),
|
4763
4763
|
responseMiddleware: (response) => {
|
4764
4764
|
if ("response" in response) {
|
4765
4765
|
const graphQlResponse = response.response;
|
@@ -5010,7 +5010,8 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
5010
5010
|
dryRun: [{ receipts: rawReceipts, status }]
|
5011
5011
|
} = await this.operations.dryRun({
|
5012
5012
|
encodedTransactions: [hexlify15(transactionRequest.toTransactionBytes())],
|
5013
|
-
utxoValidation: false
|
5013
|
+
utxoValidation: false,
|
5014
|
+
gasPrice: "0"
|
5014
5015
|
});
|
5015
5016
|
receipts = rawReceipts.map(processGqlReceipt);
|
5016
5017
|
dryRunStatus = status;
|
@@ -5024,7 +5025,8 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
5024
5025
|
missingContractIds.push(contractId);
|
5025
5026
|
});
|
5026
5027
|
const { maxFee } = await this.estimateTxGasAndFee({
|
5027
|
-
transactionRequest
|
5028
|
+
transactionRequest,
|
5029
|
+
gasPrice: bn17(0)
|
5028
5030
|
});
|
5029
5031
|
transactionRequest.maxFee = maxFee;
|
5030
5032
|
} else {
|
@@ -5160,7 +5162,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
5160
5162
|
const chainInfo = this.getChain();
|
5161
5163
|
const { gasPriceFactor, maxGasPerTx } = this.getGasConfig();
|
5162
5164
|
const minGas = transactionRequest.calculateMinGas(chainInfo);
|
5163
|
-
if (!gasPrice) {
|
5165
|
+
if (!isDefined2(gasPrice)) {
|
5164
5166
|
gasPrice = await this.estimateGasPrice(10);
|
5165
5167
|
}
|
5166
5168
|
const minFee = calculateGasFee({
|
@@ -6743,14 +6745,13 @@ var mergeQuantities = (...coinQuantities) => {
|
|
6743
6745
|
// src/utils/formatTransferToContractScriptData.ts
|
6744
6746
|
import { ASSET_ID_LEN, BigNumberCoder as BigNumberCoder2, CONTRACT_ID_LEN, WORD_SIZE } from "@fuel-ts/abi-coder";
|
6745
6747
|
import { Address as Address3 } from "@fuel-ts/address";
|
6746
|
-
import { BN as BN3 } from "@fuel-ts/math";
|
6747
6748
|
import { arrayify as arrayify14, concat as concat3 } from "@fuel-ts/utils";
|
6748
6749
|
import * as asm from "@fuels/vm-asm";
|
6749
6750
|
var formatTransferToContractScriptData = (transferParams) => {
|
6750
6751
|
const numberCoder = new BigNumberCoder2("u64");
|
6751
6752
|
return transferParams.reduce((acc, transferParam) => {
|
6752
6753
|
const { assetId, amount, contractId } = transferParam;
|
6753
|
-
const encoded = numberCoder.encode(
|
6754
|
+
const encoded = numberCoder.encode(amount);
|
6754
6755
|
const scriptData = concat3([
|
6755
6756
|
Address3.fromAddressOrString(contractId).toBytes(),
|
6756
6757
|
encoded,
|
@@ -6988,7 +6989,8 @@ var Account = class extends AbstractAccount {
|
|
6988
6989
|
return request;
|
6989
6990
|
}
|
6990
6991
|
const { maxFee } = await this.provider.estimateTxGasAndFee({
|
6991
|
-
transactionRequest: requestToReestimate
|
6992
|
+
transactionRequest: requestToReestimate,
|
6993
|
+
gasPrice
|
6992
6994
|
});
|
6993
6995
|
request.maxFee = maxFee;
|
6994
6996
|
return request;
|