Here is a list of the expected error codes the SDK can throw. These error codes are used to help understand the error that has been thrown with potential resolutions.
When your ABI does not have a main method.
This can be resolved by adding a main method to your ABI.
When the arguments supplied to the function do not match the minimum required input length.
Check that the arguments supplied to the function, match the required type.
When an
Account
is required for an operation. This will usually be in the form of a
Wallet
.
It could be caused during the deployments of contracts when an account is required to sign the transaction. This can be resolved by following the deployment guide
here .
When converting a big number into an incompatible format.
Ensure that the value you've supplied to the big number is compatible with the value you are converting to.
When there are more than policies with the same type, for a transaction.
Ensure that there are no duplicate (by type) policies for a transaction.
When more than one of the following options is passed: path
, address
, txId
, blockNumber
.
Check that only one of the following options is passed: path
, address
, txId
, blockNumber
.
When the function with the given name, signature or selector is not found in the ABI.
Check that the function name, signature or selector is correct and exits on the ABI.
When the gas limit is lower than the minimum gas limit.
Increase the gas limit to be greater than the minimum gas limit.
When the gas price is lower than the minimum gas price.
Increase the gas price to be greater than the minimum gas price.
A hardware wallet will throw for unsupported configurations.
The error message will determine which element of the configuration is incorrect. It could be due to the public or private key or when configuring to/from an extended key.
Checksum validation failed for the provided mnemonic.
Ensure that the mnemonic is correct.
When the program type either: does not have configurable constants to be set; or the provided configurable constant does not belong to the program type, as defined by its ABI.
Ensure the configurable constants provided are correct and are defined in ABI.
When the password provided is incorrect.
Ensure that the password is correct.
When the value is more than the max value.
Ensure that the value is less than the max value.
When the entropy is not: between 16 and 32 bytes; a multiple of 4.
Ensure that the entropy is between 16 and 32 bytes and a multiple of 4.
When the provided EVM address is invalid.
Ensure that the
EVM address is valid.
When the provided input parameters are not valid.
The error message will determine which parameter is missing. It could be that the provided program type is not one of the following contract
, script
, or predicate
.
When the supplied mnemonic is invalid.
Check the message for more details. It could be that the mnemonic phrase word length is not_ one of the following: 12, 15, 18, 21, or 24 lengths.
When the multi-call has a call that returns a heap type that is not the last call, or the multi-call has more than one call that returns a heap type.
Ensure that the multi-call has only one call that returns a heap type (which should be the last call).
When the provided password is incorrect.
Ensure that the password is correct.
When the supplied policy type is invalid for the given Script.
Check the policy type is defined in PolicyType
.
When the provided public key is invalid.
Ensure that the public key is valid.
When the receipt type is invalid.
Check the type is within ReceiptType
.
When the request to the Fuel node fails, error messages are propagated from the Fuel node.
Check the error message from the Fuel node.
When the seed length is not between 16 and 64 bytes.
Ensure that the seed length is between 16 and 64 bytes.
When the input type is invalid.
Check the type is within InputType
.
When the output type is invalid.
Check the type is within OutputType
.
When the transaction status received from the node is unexpected.
Check the status received is within TransactionStatus
.
When the transaction type from the Fuel Node is not valid.
The type is within
TransactionType
.
When the TTL is less than or equal to zero.
Ensure that the TTL is a number and that the TTL is greater than zero.
When the word list length is not equal to 2048.
The word list provided to the mnemonic length should be equal to 2048.
When an ABI type does not conform to the correct format.
It is usually caused by an incorrect type/s within your program, check our type
docs here for information on the types we support and their expected format.
When the log type ID supplied can not be found in the ABI.
Check that the log type ID is correct and exists in the ABI.
A connector is missing when it's required for a given operation.
Ensure that a connector has been supplied to the Account
or Wallet
.
A provider is missing when it's required for a given operation.
It could be caused by the provider not being set for either an
Account
or a
Wallet
- use the
connect
method to attach a provider.
When a required parameter has not been supplied to a given method.
The error message will determine which parameter is missing. This could be caused during type generation when neither inputs
nor filepaths
are supplied (at least one is required).
When the Fuel Node info cache is empty; This is usually caused by not being connected to the Fuel Node.
Ensure that the provider has connected to a Fuel Node successfully.
When the type with the given type ID is not found in the ABI.
Check that the type ID is correct and exists in the ABI.
When an unexpected type has been detected - the error message will determine which type is incorrect.
Check the type against your ABI and ensure that it is correct. You can find a list of all our types
here .
When the version of the Fuel Node you are targeting is not supported by the client you are accessing it from.
Check the version of the Fuel Node and use a compatible version of the SDK to target it.
A wallet manager will throw for a multitude of reasons. The error message will determine which element of the configuration is incorrect.
It could be that the passphrase is incorrect and/or the wallet does not exist in the manager.