@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/test-utils.mjs
CHANGED
@@ -291,6 +291,8 @@ var launchNode = async ({
|
|
291
291
|
console.log(
|
292
292
|
`fuel-core node under pid ${child.pid} does not exist. The node might have been killed before cleanup was called. Exiting cleanly.`
|
293
293
|
);
|
294
|
+
} else if (error.message.includes("pid must be a positive integer")) {
|
295
|
+
process.kill(+child.pid);
|
294
296
|
} else {
|
295
297
|
throw e;
|
296
298
|
}
|
@@ -319,6 +321,7 @@ var launchNode = async ({
|
|
319
321
|
reject(new FuelError(FuelError.CODES.NODE_LAUNCH_FAILED, text));
|
320
322
|
}
|
321
323
|
});
|
324
|
+
process.setMaxListeners(100);
|
322
325
|
process.on("exit", cleanup);
|
323
326
|
process.on("SIGINT", cleanup);
|
324
327
|
process.on("SIGUSR1", cleanup);
|
@@ -4913,7 +4916,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
4913
4916
|
createOperations() {
|
4914
4917
|
const fetchFn = _Provider.getFetchFn(this.options);
|
4915
4918
|
const gqlClient = new GraphQLClient(this.urlWithoutAuth, {
|
4916
|
-
fetch: (
|
4919
|
+
fetch: (input, requestInit) => fetchFn(input.toString(), requestInit || {}, this.options),
|
4917
4920
|
responseMiddleware: (response) => {
|
4918
4921
|
if ("response" in response) {
|
4919
4922
|
const graphQlResponse = response.response;
|
@@ -5164,7 +5167,8 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
5164
5167
|
dryRun: [{ receipts: rawReceipts, status }]
|
5165
5168
|
} = await this.operations.dryRun({
|
5166
5169
|
encodedTransactions: [hexlify17(transactionRequest.toTransactionBytes())],
|
5167
|
-
utxoValidation: false
|
5170
|
+
utxoValidation: false,
|
5171
|
+
gasPrice: "0"
|
5168
5172
|
});
|
5169
5173
|
receipts = rawReceipts.map(processGqlReceipt);
|
5170
5174
|
dryRunStatus = status;
|
@@ -5178,7 +5182,8 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
5178
5182
|
missingContractIds.push(contractId);
|
5179
5183
|
});
|
5180
5184
|
const { maxFee } = await this.estimateTxGasAndFee({
|
5181
|
-
transactionRequest
|
5185
|
+
transactionRequest,
|
5186
|
+
gasPrice: bn17(0)
|
5182
5187
|
});
|
5183
5188
|
transactionRequest.maxFee = maxFee;
|
5184
5189
|
} else {
|
@@ -5314,7 +5319,7 @@ Supported fuel-core version: ${supportedVersion}.`
|
|
5314
5319
|
const chainInfo = this.getChain();
|
5315
5320
|
const { gasPriceFactor, maxGasPerTx } = this.getGasConfig();
|
5316
5321
|
const minGas = transactionRequest.calculateMinGas(chainInfo);
|
5317
|
-
if (!gasPrice) {
|
5322
|
+
if (!isDefined2(gasPrice)) {
|
5318
5323
|
gasPrice = await this.estimateGasPrice(10);
|
5319
5324
|
}
|
5320
5325
|
const minFee = calculateGasFee({
|
@@ -6758,14 +6763,13 @@ var mergeQuantities = (...coinQuantities) => {
|
|
6758
6763
|
// src/utils/formatTransferToContractScriptData.ts
|
6759
6764
|
import { ASSET_ID_LEN, BigNumberCoder as BigNumberCoder2, CONTRACT_ID_LEN, WORD_SIZE } from "@fuel-ts/abi-coder";
|
6760
6765
|
import { Address as Address4 } from "@fuel-ts/address";
|
6761
|
-
import { BN as BN3 } from "@fuel-ts/math";
|
6762
6766
|
import { arrayify as arrayify15, concat as concat4 } from "@fuel-ts/utils";
|
6763
6767
|
import * as asm from "@fuels/vm-asm";
|
6764
6768
|
var formatTransferToContractScriptData = (transferParams) => {
|
6765
6769
|
const numberCoder = new BigNumberCoder2("u64");
|
6766
6770
|
return transferParams.reduce((acc, transferParam) => {
|
6767
6771
|
const { assetId, amount, contractId } = transferParam;
|
6768
|
-
const encoded = numberCoder.encode(
|
6772
|
+
const encoded = numberCoder.encode(amount);
|
6769
6773
|
const scriptData = concat4([
|
6770
6774
|
Address4.fromAddressOrString(contractId).toBytes(),
|
6771
6775
|
encoded,
|
@@ -7003,7 +7007,8 @@ var Account = class extends AbstractAccount {
|
|
7003
7007
|
return request;
|
7004
7008
|
}
|
7005
7009
|
const { maxFee } = await this.provider.estimateTxGasAndFee({
|
7006
|
-
transactionRequest: requestToReestimate
|
7010
|
+
transactionRequest: requestToReestimate,
|
7011
|
+
gasPrice
|
7007
7012
|
});
|
7008
7013
|
request.maxFee = maxFee;
|
7009
7014
|
return request;
|