@fuel-ts/account 0.0.0-rc-2040-20240415161332 → 0.0.0-rc-1832-20240415161726
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.
Potentially problematic release.
This version of @fuel-ts/account might be problematic. Click here for more details.
- package/dist/index.global.js +88 -84
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -2
- package/dist/index.mjs.map +1 -1
- package/dist/predicate/predicate.d.ts +1 -0
- package/dist/predicate/predicate.d.ts.map +1 -1
- package/dist/providers/transaction-request/transaction-request.d.ts.map +1 -1
- package/dist/test-utils.global.js +87 -84
- package/dist/test-utils.global.js.map +1 -1
- package/dist/test-utils.js +4 -2
- package/dist/test-utils.js.map +1 -1
- package/dist/test-utils.mjs +4 -2
- package/dist/test-utils.mjs.map +1 -1
- package/package.json +16 -16
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"predicate.d.ts","sourceRoot":"","sources":["../../src/predicate/predicate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EACL,SAAS,EAKV,MAAM,oBAAoB,CAAC;AAI5B,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAIlD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,OAAO,KAAK,EACV,UAAU,EACV,QAAQ,EACR,oBAAoB,EACpB,kBAAkB,
|
1
|
+
{"version":3,"file":"predicate.d.ts","sourceRoot":"","sources":["../../src/predicate/predicate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAA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AAE,SAAuB;IAChC,gBAAgB;IAChB,QAAQ,GAAE,YAAiB,GAC1B,OAAO,CAAC,kBAAkB,CAAC;IAK9B;;;;;OAKG;IACH,eAAe,CACb,sBAAsB,EAAE,sBAAsB,EAC9C,OAAO,CAAC,EAAE,IAAI,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,GACrD,OAAO,CAAC,mBAAmB,CAAC;IAK/B;;;;;OAKG;IACH,mBAAmB,CAAC,sBAAsB,EAAE,sBAAsB,GAAG,OAAO,CAAC,UAAU,CAAC;IAKxF,OAAO,CAAC,gBAAgB;IAsBxB;;;;;;;OAOG;IACH,OAAO,CAAC,MAAM,CAAC,oBAAoB;IAgCnC;;;;;;;OAOG;IACH,OAAO,CAAC,MAAM,CAAC,wBAAwB;CAsCxC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"transaction-request.d.ts","sourceRoot":"","sources":["../../../src/providers/transaction-request/transaction-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACnF,OAAO,KAAK,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1F,OAAO,EAKL,eAAe,EAChB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,kBAAkB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gB,IAAI,8BAA8B,EAAE;IAMpD;;;;OAIG;IACH,+BAA+B,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,GAAG,SAAS;IAmBvE;;;;;;;OAOG;IACH,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,CAAC,EAAE,SAAS,CAAC,UAAU,EAAE,CAAC;
|
1
|
+
{"version":3,"file":"transaction-request.d.ts","sourceRoot":"","sources":["../../../src/providers/transaction-request/transaction-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACnF,OAAO,KAAK,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1F,OAAO,EAKL,eAAe,EAChB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAM5C,OAAO,KAAK,EACV,uBAAuB,EACvB,2BAA2B,EAE5B,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,EACV,wBAAwB,EACxB,8BAA8B,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
|
31977
31977
|
ErrorCode2["INVALID_COMPONENT"] = "invalid-component";
|
31978
31978
|
ErrorCode2["CONFIGURABLE_NOT_FOUND"] = "configurable-not-found";
|
31979
31979
|
ErrorCode2["TYPE_NOT_FOUND"] = "type-not-found";
|
31980
|
-
ErrorCode2["LOG_TYPE_NOT_FOUND"] = "log-type-not-found";
|
31981
31980
|
ErrorCode2["TYPE_NOT_SUPPORTED"] = "type-not-supported";
|
31982
31981
|
ErrorCode2["INVALID_DECODE_VALUE"] = "invalid-decode-value";
|
31983
31982
|
ErrorCode2["JSON_ABI_ERROR"] = "json-abi-error";
|
@@ -34763,7 +34762,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34763
34762
|
var import_bn = __toESM(require_bn(), 1);
|
34764
34763
|
var DEFAULT_PRECISION = 9;
|
34765
34764
|
var DEFAULT_MIN_PRECISION = 3;
|
34766
|
-
var
|
34765
|
+
var DECIMAL_UNITS = 9;
|
34767
34766
|
function toFixed(value, options) {
|
34768
34767
|
const { precision = DEFAULT_PRECISION, minPrecision = DEFAULT_MIN_PRECISION } = options || {};
|
34769
34768
|
const [valueUnits = "0", valueDecimals = "0"] = String(value || "0.0").split(".");
|
@@ -34829,7 +34828,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34829
34828
|
}
|
34830
34829
|
format(options) {
|
34831
34830
|
const {
|
34832
|
-
units =
|
34831
|
+
units = DECIMAL_UNITS,
|
34833
34832
|
precision = DEFAULT_PRECISION,
|
34834
34833
|
minPrecision = DEFAULT_MIN_PRECISION
|
34835
34834
|
} = options || {};
|
@@ -34845,7 +34844,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34845
34844
|
}
|
34846
34845
|
return formattedFixed;
|
34847
34846
|
}
|
34848
|
-
formatUnits(units =
|
34847
|
+
formatUnits(units = DECIMAL_UNITS) {
|
34849
34848
|
const valueUnits = this.toString().slice(0, units * -1);
|
34850
34849
|
const valueDecimals = this.toString().slice(units * -1);
|
34851
34850
|
const length = valueDecimals.length;
|
@@ -34954,7 +34953,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
34954
34953
|
// END ANCHOR: OVERRIDES to avoid losing references
|
34955
34954
|
};
|
34956
34955
|
var bn = (value, base, endian) => new BN(value, base, endian);
|
34957
|
-
bn.parseUnits = (value, units =
|
34956
|
+
bn.parseUnits = (value, units = DECIMAL_UNITS) => {
|
34958
34957
|
const valueToParse = value === "." ? "0." : value;
|
34959
34958
|
const [valueUnits = "0", valueDecimals = "0"] = valueToParse.split(".");
|
34960
34959
|
const length = valueDecimals.length;
|
@@ -35220,6 +35219,15 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35220
35219
|
}
|
35221
35220
|
};
|
35222
35221
|
var isHeapType = (type3) => type3 === VEC_CODER_TYPE || type3 === BYTES_CODER_TYPE || type3 === STD_STRING_CODER_TYPE;
|
35222
|
+
function findOrThrow(arr, predicate, throwFn = () => {
|
35223
|
+
throw new FuelError(ErrorCode.ELEMENT_NOT_FOUND, "Element not found in the array.");
|
35224
|
+
}) {
|
35225
|
+
const found = arr.find(predicate);
|
35226
|
+
if (found === void 0) {
|
35227
|
+
throwFn();
|
35228
|
+
}
|
35229
|
+
return found;
|
35230
|
+
}
|
35223
35231
|
var isMultipleOfWordSize = (length) => length % WORD_SIZE === 0;
|
35224
35232
|
var getWordSizePadding = (length) => WORD_SIZE - length % WORD_SIZE;
|
35225
35233
|
var rightPadToWordSize = (encoded) => {
|
@@ -35229,7 +35237,6 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35229
35237
|
const padding = new Uint8Array(WORD_SIZE - encoded.length % WORD_SIZE);
|
35230
35238
|
return concatBytes2([encoded, padding]);
|
35231
35239
|
};
|
35232
|
-
var isUint8Array = (value) => value instanceof Uint8Array;
|
35233
35240
|
var ArrayCoder = class extends Coder {
|
35234
35241
|
coder;
|
35235
35242
|
length;
|
@@ -35771,11 +35778,8 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35771
35778
|
this.coder = coder;
|
35772
35779
|
}
|
35773
35780
|
encode(value) {
|
35774
|
-
if (!Array.isArray(value)
|
35775
|
-
throw new FuelError(
|
35776
|
-
ErrorCode.ENCODE_ERROR,
|
35777
|
-
`Expected array value, or a Uint8Array. You can use arrayify to convert a value to a Uint8Array.`
|
35778
|
-
);
|
35781
|
+
if (!Array.isArray(value)) {
|
35782
|
+
throw new FuelError(ErrorCode.ENCODE_ERROR, `Expected array value.`);
|
35779
35783
|
}
|
35780
35784
|
const parts = [];
|
35781
35785
|
const pointer = new BigNumberCoder("u64").encode(BASE_VECTOR_OFFSET);
|
@@ -35806,38 +35810,6 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35806
35810
|
];
|
35807
35811
|
}
|
35808
35812
|
};
|
35809
|
-
var findFunctionByName = (abi, name) => {
|
35810
|
-
const fn = abi.functions.find((f2) => f2.name === name);
|
35811
|
-
if (!fn) {
|
35812
|
-
throw new FuelError(
|
35813
|
-
ErrorCode.FUNCTION_NOT_FOUND,
|
35814
|
-
`Function with name '${name}' doesn't exist in the ABI`
|
35815
|
-
);
|
35816
|
-
}
|
35817
|
-
return fn;
|
35818
|
-
};
|
35819
|
-
var findTypeById = (abi, typeId) => {
|
35820
|
-
const type3 = abi.types.find((t) => t.typeId === typeId);
|
35821
|
-
if (!type3) {
|
35822
|
-
throw new FuelError(
|
35823
|
-
ErrorCode.TYPE_NOT_FOUND,
|
35824
|
-
`Type with typeId '${typeId}' doesn't exist in the ABI.`
|
35825
|
-
);
|
35826
|
-
}
|
35827
|
-
return type3;
|
35828
|
-
};
|
35829
|
-
var findNonEmptyInputs = (abi, inputs) => inputs.filter((input) => findTypeById(abi, input.type).type !== "()");
|
35830
|
-
var findVectorBufferArgument = (components) => {
|
35831
|
-
const bufferComponent = components.find((c) => c.name === "buf");
|
35832
|
-
const bufferTypeArgument = bufferComponent?.originalTypeArguments?.[0];
|
35833
|
-
if (!bufferComponent || !bufferTypeArgument) {
|
35834
|
-
throw new FuelError(
|
35835
|
-
ErrorCode.INVALID_COMPONENT,
|
35836
|
-
`The Vec type provided is missing or has a malformed 'buf' component.`
|
35837
|
-
);
|
35838
|
-
}
|
35839
|
-
return bufferTypeArgument;
|
35840
|
-
};
|
35841
35813
|
var ResolvedAbiType = class {
|
35842
35814
|
abi;
|
35843
35815
|
name;
|
@@ -35846,8 +35818,20 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35846
35818
|
components;
|
35847
35819
|
constructor(abi, argument) {
|
35848
35820
|
this.abi = abi;
|
35821
|
+
const type3 = findOrThrow(
|
35822
|
+
abi.types,
|
35823
|
+
(t) => t.typeId === argument.type,
|
35824
|
+
() => {
|
35825
|
+
throw new FuelError(
|
35826
|
+
ErrorCode.TYPE_NOT_FOUND,
|
35827
|
+
`Type does not exist in the provided abi: ${JSON.stringify({
|
35828
|
+
argument,
|
35829
|
+
abi: this.abi
|
35830
|
+
})}`
|
35831
|
+
);
|
35832
|
+
}
|
35833
|
+
);
|
35849
35834
|
this.name = argument.name;
|
35850
|
-
const type3 = findTypeById(abi, argument.type);
|
35851
35835
|
this.type = type3.type;
|
35852
35836
|
this.originalTypeArguments = argument.typeArguments;
|
35853
35837
|
this.components = ResolvedAbiType.getResolvedGenericComponents(
|
@@ -35899,7 +35883,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35899
35883
|
)
|
35900
35884
|
};
|
35901
35885
|
}
|
35902
|
-
const argType =
|
35886
|
+
const argType = findOrThrow(abi.types, (t) => t.typeId === arg.type);
|
35903
35887
|
const implicitTypeParameters = this.getImplicitGenericTypeParameters(abi, argType.components);
|
35904
35888
|
if (implicitTypeParameters && implicitTypeParameters.length > 0) {
|
35905
35889
|
return {
|
@@ -35916,7 +35900,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
35916
35900
|
}
|
35917
35901
|
const implicitGenericParameters = implicitGenericParametersParam ?? [];
|
35918
35902
|
args.forEach((a) => {
|
35919
|
-
const argType =
|
35903
|
+
const argType = findOrThrow(abi.types, (t) => t.typeId === a.type);
|
35920
35904
|
if (genericRegEx.test(argType.type)) {
|
35921
35905
|
implicitGenericParameters.push(argType.typeId);
|
35922
35906
|
return;
|
@@ -36025,7 +36009,13 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36025
36009
|
return new ArrayCoder(arrayElementCoder, length);
|
36026
36010
|
}
|
36027
36011
|
if (resolvedAbiType.type === VEC_CODER_TYPE) {
|
36028
|
-
const arg =
|
36012
|
+
const arg = findOrThrow(components, (c) => c.name === "buf").originalTypeArguments?.[0];
|
36013
|
+
if (!arg) {
|
36014
|
+
throw new FuelError(
|
36015
|
+
ErrorCode.INVALID_COMPONENT,
|
36016
|
+
`The provided Vec type is missing the 'type argument'.`
|
36017
|
+
);
|
36018
|
+
}
|
36029
36019
|
const argType = new ResolvedAbiType(resolvedAbiType.abi, arg);
|
36030
36020
|
const itemCoder = getCoder(argType, { isSmallBytes: true, encoding: ENCODING_V0 });
|
36031
36021
|
return new VecCoder(itemCoder);
|
@@ -36494,7 +36484,13 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36494
36484
|
return new ArrayCoder(arrayElementCoder, length);
|
36495
36485
|
}
|
36496
36486
|
if (resolvedAbiType.type === VEC_CODER_TYPE) {
|
36497
|
-
const arg =
|
36487
|
+
const arg = findOrThrow(components, (c) => c.name === "buf").originalTypeArguments?.[0];
|
36488
|
+
if (!arg) {
|
36489
|
+
throw new FuelError(
|
36490
|
+
ErrorCode.INVALID_COMPONENT,
|
36491
|
+
`The provided Vec type is missing the 'type argument'.`
|
36492
|
+
);
|
36493
|
+
}
|
36498
36494
|
const argType = new ResolvedAbiType(resolvedAbiType.abi, arg);
|
36499
36495
|
const itemCoder = getCoder2(argType, { isSmallBytes: true, encoding: ENCODING_V0 });
|
36500
36496
|
return new VecCoder2(itemCoder);
|
@@ -36565,7 +36561,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36565
36561
|
jsonAbi;
|
36566
36562
|
constructor(jsonAbi, name) {
|
36567
36563
|
this.jsonAbi = jsonAbi;
|
36568
|
-
this.jsonFn =
|
36564
|
+
this.jsonFn = findOrThrow(this.jsonAbi.functions, (f2) => f2.name === name);
|
36569
36565
|
this.name = name;
|
36570
36566
|
this.signature = FunctionFragment.getSignature(this.jsonAbi, this.jsonFn);
|
36571
36567
|
this.selector = FunctionFragment.getFunctionSelector(this.signature);
|
@@ -36589,11 +36585,13 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36589
36585
|
return bn(hashedFunctionSignature.slice(0, 10)).toHex(8);
|
36590
36586
|
}
|
36591
36587
|
#isInputDataPointer() {
|
36592
|
-
const inputTypes = this.jsonFn.inputs.map(
|
36588
|
+
const inputTypes = this.jsonFn.inputs.map(
|
36589
|
+
(i) => this.jsonAbi.types.find((t) => t.typeId === i.type)
|
36590
|
+
);
|
36593
36591
|
return this.jsonFn.inputs.length > 1 || isPointerType(inputTypes[0]?.type || "");
|
36594
36592
|
}
|
36595
36593
|
#isOutputDataHeap() {
|
36596
|
-
const outputType =
|
36594
|
+
const outputType = findOrThrow(this.jsonAbi.types, (t) => t.typeId === this.jsonFn.output.type);
|
36597
36595
|
return isHeapType(outputType?.type || "");
|
36598
36596
|
}
|
36599
36597
|
#getOutputEncodedLength() {
|
@@ -36613,7 +36611,9 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36613
36611
|
encodeArguments(values, offset = 0) {
|
36614
36612
|
FunctionFragment.verifyArgsAndInputsAlign(values, this.jsonFn.inputs, this.jsonAbi);
|
36615
36613
|
const shallowCopyValues = values.slice();
|
36616
|
-
const nonEmptyInputs =
|
36614
|
+
const nonEmptyInputs = this.jsonFn.inputs.filter(
|
36615
|
+
(x) => findOrThrow(this.jsonAbi.types, (t) => t.typeId === x.type).type !== "()"
|
36616
|
+
);
|
36617
36617
|
if (Array.isArray(values) && nonEmptyInputs.length !== values.length) {
|
36618
36618
|
shallowCopyValues.length = this.jsonFn.inputs.length;
|
36619
36619
|
shallowCopyValues.fill(void 0, values.length);
|
@@ -36634,7 +36634,7 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36634
36634
|
if (args.length === inputs.length) {
|
36635
36635
|
return;
|
36636
36636
|
}
|
36637
|
-
const inputTypes = inputs.map((
|
36637
|
+
const inputTypes = inputs.map((i) => findOrThrow(abi.types, (t) => t.typeId === i.type));
|
36638
36638
|
const optionalInputs = inputTypes.filter(
|
36639
36639
|
(x) => x.type === OPTION_CODER_TYPE || x.type === "()"
|
36640
36640
|
);
|
@@ -36649,7 +36649,9 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36649
36649
|
}
|
36650
36650
|
decodeArguments(data) {
|
36651
36651
|
const bytes3 = arrayify(data);
|
36652
|
-
const nonEmptyInputs =
|
36652
|
+
const nonEmptyInputs = this.jsonFn.inputs.filter(
|
36653
|
+
(x) => findOrThrow(this.jsonAbi.types, (t) => t.typeId === x.type).type !== "()"
|
36654
|
+
);
|
36653
36655
|
if (nonEmptyInputs.length === 0) {
|
36654
36656
|
if (bytes3.length === 0) {
|
36655
36657
|
return void 0;
|
@@ -36684,7 +36686,10 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36684
36686
|
return result.decoded;
|
36685
36687
|
}
|
36686
36688
|
decodeOutput(data) {
|
36687
|
-
const outputAbiType =
|
36689
|
+
const outputAbiType = findOrThrow(
|
36690
|
+
this.jsonAbi.types,
|
36691
|
+
(t) => t.typeId === this.jsonFn.output.type
|
36692
|
+
);
|
36688
36693
|
if (outputAbiType.type === "()") {
|
36689
36694
|
return [void 0, 0];
|
36690
36695
|
}
|
@@ -36694,15 +36699,6 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36694
36699
|
});
|
36695
36700
|
return coder.decode(bytes3, 0);
|
36696
36701
|
}
|
36697
|
-
/**
|
36698
|
-
* Checks if the function is read-only i.e. it only reads from storage, does not write to it.
|
36699
|
-
*
|
36700
|
-
* @returns True if the function is read-only or pure, false otherwise.
|
36701
|
-
*/
|
36702
|
-
isReadOnly() {
|
36703
|
-
const storageAttribute = this.attributes.find((attr) => attr.name === "storage");
|
36704
|
-
return !storageAttribute?.arguments.includes("write");
|
36705
|
-
}
|
36706
36702
|
};
|
36707
36703
|
var Interface = class {
|
36708
36704
|
functions;
|
@@ -36745,33 +36741,38 @@ This unreleased fuel-core build may include features and updates not yet support
|
|
36745
36741
|
return fragment.decodeOutput(data);
|
36746
36742
|
}
|
36747
36743
|
decodeLog(data, logId) {
|
36748
|
-
const loggedType = this.jsonAbi.loggedTypes
|
36749
|
-
|
36750
|
-
throw new FuelError(
|
36751
|
-
ErrorCode.LOG_TYPE_NOT_FOUND,
|
36752
|
-
`Log type with logId '${logId}' doesn't exist in the ABI.`
|
36753
|
-
);
|
36754
|
-
}
|
36755
|
-
return AbiCoder.decode(this.jsonAbi, loggedType.loggedType, arrayify(data), 0, {
|
36744
|
+
const { loggedType } = findOrThrow(this.jsonAbi.loggedTypes, (type3) => type3.logId === logId);
|
36745
|
+
return AbiCoder.decode(this.jsonAbi, loggedType, arrayify(data), 0, {
|
36756
36746
|
encoding: this.jsonAbi.encoding
|
36757
36747
|
});
|
36758
36748
|
}
|
36759
36749
|
encodeConfigurable(name, value) {
|
36760
|
-
const configurable =
|
36761
|
-
|
36762
|
-
|
36763
|
-
|
36764
|
-
|
36765
|
-
|
36766
|
-
|
36750
|
+
const configurable = findOrThrow(
|
36751
|
+
this.jsonAbi.configurables,
|
36752
|
+
(c) => c.name === name,
|
36753
|
+
() => {
|
36754
|
+
throw new FuelError(
|
36755
|
+
ErrorCode.CONFIGURABLE_NOT_FOUND,
|
36756
|
+
`A configurable with the '${name}' was not found in the ABI.`
|
36757
|
+
);
|
36758
|
+
}
|
36759
|
+
);
|
36767
36760
|
return AbiCoder.encode(this.jsonAbi, configurable.configurableType, value, {
|
36768
36761
|
isRightPadded: true,
|
36769
|
-
|
36770
|
-
encoding: ENCODING_V0
|
36762
|
+
encoding: this.jsonAbi.encoding
|
36771
36763
|
});
|
36772
36764
|
}
|
36773
36765
|
getTypeById(typeId) {
|
36774
|
-
return
|
36766
|
+
return findOrThrow(
|
36767
|
+
this.jsonAbi.types,
|
36768
|
+
(t) => t.typeId === typeId,
|
36769
|
+
() => {
|
36770
|
+
throw new FuelError(
|
36771
|
+
ErrorCode.TYPE_NOT_FOUND,
|
36772
|
+
`Type with typeId '${typeId}' doesn't exist in the ABI.`
|
36773
|
+
);
|
36774
|
+
}
|
36775
|
+
);
|
36775
36776
|
}
|
36776
36777
|
};
|
36777
36778
|
|
@@ -43162,7 +43163,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43162
43163
|
assetId,
|
43163
43164
|
txPointer: "0x00000000000000000000000000000000",
|
43164
43165
|
witnessIndex,
|
43165
|
-
predicate: predicate?.bytes
|
43166
|
+
predicate: predicate?.bytes,
|
43167
|
+
predicateData: predicate?.predicateDataBytes
|
43166
43168
|
};
|
43167
43169
|
this.pushInput(input);
|
43168
43170
|
this.addChangeOutput(owner, assetId);
|
@@ -43194,7 +43196,8 @@ ${PANIC_DOC_URL}#variant.${status.reason}`;
|
|
43194
43196
|
recipient: recipient.toB256(),
|
43195
43197
|
amount,
|
43196
43198
|
witnessIndex,
|
43197
|
-
predicate: predicate?.bytes
|
43199
|
+
predicate: predicate?.bytes,
|
43200
|
+
predicateData: predicate?.predicateDataBytes
|
43198
43201
|
};
|
43199
43202
|
this.pushInput(input);
|
43200
43203
|
this.addChangeOutput(recipient, assetId);
|