web3-errors
Advanced tools
Comparing version 1.0.3-dev.1361787.0 to 1.0.3-dev.4310419.0
@@ -63,2 +63,4 @@ export declare const ERR_RESPONSE = 100; | ||
export declare const ERR_TX_INVALID_PROPERTIES_FOR_TYPE = 439; | ||
export declare const ERR_TX_MISSING_GAS_INNER_ERROR = 440; | ||
export declare const ERR_TX_GAS_MISMATCH_INNER_ERROR = 441; | ||
export declare const ERR_CONN = 500; | ||
@@ -65,0 +67,0 @@ export declare const ERR_CONN_INVALID = 501; |
@@ -20,4 +20,4 @@ "use strict"; | ||
exports.ERR_TX_RECEIPT_MISSING_OR_BLOCKHASH_NULL = exports.ERR_TX_POLLING_TIMEOUT = exports.ERR_TX_DATA_AND_INPUT = exports.ERR_TX_UNSUPPORTED_TYPE = exports.ERR_TX_UNSUPPORTED_EIP_1559 = exports.ERR_TX_UNABLE_TO_POPULATE_NONCE = exports.ERR_TX_INVALID_NONCE_OR_CHAIN_ID = exports.ERR_TX_INVALID_OBJECT = exports.ERR_TX_INVALID_LEGACY_FEE_MARKET = exports.ERR_TX_INVALID_FEE_MARKET_GAS_PRICE = exports.ERR_TX_INVALID_FEE_MARKET_GAS = exports.ERR_TX_INVALID_LEGACY_GAS = exports.ERR_TX_MISSING_GAS = exports.ERR_TX_MISSING_CHAIN_INFO = exports.ERR_TX_INVALID_CHAIN_INFO = exports.ERR_TX_CHAIN_ID_MISMATCH = exports.ERR_TX_MISSING_CUSTOM_CHAIN_ID = exports.ERR_TX_MISSING_CUSTOM_CHAIN = exports.ERR_TX_INVALID_CALL = exports.ERR_TX_INVALID_SENDER = exports.ERR_RAW_TX_UNDEFINED = exports.ERR_TX_OUT_OF_GAS = exports.ERR_TX_REVERT_WITHOUT_REASON = exports.ERR_TX_CONTRACT_NOT_STORED = exports.ERR_TX_NO_CONTRACT_ADDRESS = exports.ERR_TX_REVERT_TRANSACTION = exports.ERR_TX_REVERT_INSTRUCTION = exports.ERR_TX = exports.ERR_CONTRACT_TX_DATA_AND_INPUT = exports.ERR_CONTRACT_EXECUTION_REVERTED = exports.ERR_CONTRACT_INSTANTIATION = exports.ERR_CONTRACT_MISSING_FROM_ADDRESS = exports.ERR_CONTRACT_MISSING_ADDRESS = exports.ERR_CONTRACT_MISSING_DEPLOY_DATA = exports.ERR_CONTRACT_RESERVED_EVENT = exports.ERR_CONTRACT_EVENT_NOT_EXISTS = exports.ERR_CONTRACT_REQUIRED_CALLBACK = exports.ERR_CONTRACT_ABI_MISSING = exports.ERR_CONTRACT_RESOLVER_MISSING = exports.ERR_CONTRACT = exports.ERR_INVALID_METHOD_PARAMS = exports.ERR_EXISTING_PLUGIN_NAMESPACE = exports.ERR_ABI_ENCODING = exports.ERR_OPERATION_ABORT = exports.ERR_OPERATION_TIMEOUT = exports.ERR_METHOD_NOT_IMPLEMENTED = exports.ERR_FORMATTERS = exports.ERR_PARAM = exports.ERR_INVALID_RESPONSE = exports.ERR_RESPONSE = void 0; | ||
exports.ERR_INVALID_ADDRESS = exports.ERR_INVALID_UNIT = exports.ERR_INVALID_NUMBER = exports.ERR_INVALID_BYTES = exports.ERR_INVALID_STRING = exports.ERR_ENS_NETWORK_NOT_SYNCED = exports.ERR_ENS_UNSUPPORTED_NETWORK = exports.ERR_ENS_CHECK_INTERFACE_SUPPORT = exports.JSONRPC_ERR_CHAIN_DISCONNECTED = exports.JSONRPC_ERR_DISCONNECTED = exports.JSONRPC_ERR_UNSUPPORTED_METHOD = exports.JSONRPC_ERR_UNAUTHORIZED = exports.JSONRPC_ERR_REJECTED_REQUEST = exports.GENESIS_BLOCK_NUMBER = exports.ERR_INVALID_SIGNATURE = exports.ERR_SIGNATURE_FAILED = exports.ERR_PBKDF2_ITERATIONS = exports.ERR_INVALID_KEYSTORE = exports.ERR_IV_LENGTH = exports.ERR_INVALID_PASSWORD = exports.ERR_KEY_VERSION_UNSUPPORTED = exports.ERR_KEY_DERIVATION_FAIL = exports.ERR_UNSUPPORTED_KDF = exports.ERR_INVALID_PRIVATE_KEY = exports.ERR_PRIVATE_KEY_LENGTH = exports.ERR_WS_PROVIDER = exports.ERR_SUBSCRIPTION = exports.ERR_INVALID_CLIENT = exports.ERR_INVALID_PROVIDER = exports.ERR_PROVIDER = exports.ERR_REQ_ALREADY_SENT = exports.ERR_CONN_PENDING_REQUESTS = exports.ERR_CONN_MAX_ATTEMPTS = exports.ERR_CONN_CLOSE = exports.ERR_CONN_NOT_OPEN = exports.ERR_CONN_TIMEOUT = exports.ERR_CONN_INVALID = exports.ERR_CONN = exports.ERR_TX_INVALID_PROPERTIES_FOR_TYPE = exports.ERR_TX_REVERT_TRANSACTION_CUSTOM_ERROR = exports.ERR_TX_INVALID_RECEIVER = exports.ERR_TX_HARDFORK_MISMATCH = exports.ERR_TX_CHAIN_MISMATCH = exports.ERR_TX_GAS_MISMATCH = exports.ERR_TX_SIGNING = exports.ERR_TX_BLOCK_TIMEOUT = exports.ERR_TX_SEND_TIMEOUT = exports.ERR_TX_NOT_FOUND = exports.ERR_TX_LOCAL_WALLET_NOT_AVAILABLE = exports.ERR_TX_RECEIPT_MISSING_BLOCK_NUMBER = void 0; | ||
exports.ERR_RPC_NOT_SUPPORTED = exports.ERR_RPC_LIMIT_EXCEEDED = exports.ERR_RPC_UNSUPPORTED_METHOD = exports.ERR_RPC_TRANSACTION_REJECTED = exports.ERR_RPC_UNAVAILABLE_RESOURCE = exports.ERR_RPC_MISSING_RESOURCE = exports.ERR_RPC_INVALID_INPUT = exports.ERR_RPC_INTERNAL_ERROR = exports.ERR_RPC_INVALID_PARAMS = exports.ERR_RPC_INVALID_METHOD = exports.ERR_RPC_INVALID_REQUEST = exports.ERR_RPC_INVALID_JSON = exports.ERR_CORE_CHAIN_MISMATCH = exports.ERR_CORE_HARDFORK_MISMATCH = exports.ERR_VALIDATION = exports.ERR_INVALID_NIBBLE_WIDTH = exports.ERR_INVALID_TYPE_ABI = exports.ERR_INVALID_BLOCK = exports.ERR_INVALID_LARGE_VALUE = exports.ERR_INVALID_SIZE = exports.ERR_INVALID_UNSIGNED_INTEGER = exports.ERR_INVALID_BOOLEAN = exports.ERR_INVALID_TYPE = exports.ERR_INVALID_HEX = void 0; | ||
exports.ERR_INVALID_NUMBER = exports.ERR_INVALID_BYTES = exports.ERR_INVALID_STRING = exports.ERR_ENS_NETWORK_NOT_SYNCED = exports.ERR_ENS_UNSUPPORTED_NETWORK = exports.ERR_ENS_CHECK_INTERFACE_SUPPORT = exports.JSONRPC_ERR_CHAIN_DISCONNECTED = exports.JSONRPC_ERR_DISCONNECTED = exports.JSONRPC_ERR_UNSUPPORTED_METHOD = exports.JSONRPC_ERR_UNAUTHORIZED = exports.JSONRPC_ERR_REJECTED_REQUEST = exports.GENESIS_BLOCK_NUMBER = exports.ERR_INVALID_SIGNATURE = exports.ERR_SIGNATURE_FAILED = exports.ERR_PBKDF2_ITERATIONS = exports.ERR_INVALID_KEYSTORE = exports.ERR_IV_LENGTH = exports.ERR_INVALID_PASSWORD = exports.ERR_KEY_VERSION_UNSUPPORTED = exports.ERR_KEY_DERIVATION_FAIL = exports.ERR_UNSUPPORTED_KDF = exports.ERR_INVALID_PRIVATE_KEY = exports.ERR_PRIVATE_KEY_LENGTH = exports.ERR_WS_PROVIDER = exports.ERR_SUBSCRIPTION = exports.ERR_INVALID_CLIENT = exports.ERR_INVALID_PROVIDER = exports.ERR_PROVIDER = exports.ERR_REQ_ALREADY_SENT = exports.ERR_CONN_PENDING_REQUESTS = exports.ERR_CONN_MAX_ATTEMPTS = exports.ERR_CONN_CLOSE = exports.ERR_CONN_NOT_OPEN = exports.ERR_CONN_TIMEOUT = exports.ERR_CONN_INVALID = exports.ERR_CONN = exports.ERR_TX_GAS_MISMATCH_INNER_ERROR = exports.ERR_TX_MISSING_GAS_INNER_ERROR = exports.ERR_TX_INVALID_PROPERTIES_FOR_TYPE = exports.ERR_TX_REVERT_TRANSACTION_CUSTOM_ERROR = exports.ERR_TX_INVALID_RECEIVER = exports.ERR_TX_HARDFORK_MISMATCH = exports.ERR_TX_CHAIN_MISMATCH = exports.ERR_TX_GAS_MISMATCH = exports.ERR_TX_SIGNING = exports.ERR_TX_BLOCK_TIMEOUT = exports.ERR_TX_SEND_TIMEOUT = exports.ERR_TX_NOT_FOUND = exports.ERR_TX_LOCAL_WALLET_NOT_AVAILABLE = exports.ERR_TX_RECEIPT_MISSING_BLOCK_NUMBER = void 0; | ||
exports.ERR_RPC_NOT_SUPPORTED = exports.ERR_RPC_LIMIT_EXCEEDED = exports.ERR_RPC_UNSUPPORTED_METHOD = exports.ERR_RPC_TRANSACTION_REJECTED = exports.ERR_RPC_UNAVAILABLE_RESOURCE = exports.ERR_RPC_MISSING_RESOURCE = exports.ERR_RPC_INVALID_INPUT = exports.ERR_RPC_INTERNAL_ERROR = exports.ERR_RPC_INVALID_PARAMS = exports.ERR_RPC_INVALID_METHOD = exports.ERR_RPC_INVALID_REQUEST = exports.ERR_RPC_INVALID_JSON = exports.ERR_CORE_CHAIN_MISMATCH = exports.ERR_CORE_HARDFORK_MISMATCH = exports.ERR_VALIDATION = exports.ERR_INVALID_NIBBLE_WIDTH = exports.ERR_INVALID_TYPE_ABI = exports.ERR_INVALID_BLOCK = exports.ERR_INVALID_LARGE_VALUE = exports.ERR_INVALID_SIZE = exports.ERR_INVALID_UNSIGNED_INTEGER = exports.ERR_INVALID_BOOLEAN = exports.ERR_INVALID_TYPE = exports.ERR_INVALID_HEX = exports.ERR_INVALID_ADDRESS = exports.ERR_INVALID_UNIT = void 0; | ||
// Response error | ||
@@ -89,2 +89,4 @@ exports.ERR_RESPONSE = 100; | ||
exports.ERR_TX_INVALID_PROPERTIES_FOR_TYPE = 439; | ||
exports.ERR_TX_MISSING_GAS_INNER_ERROR = 440; | ||
exports.ERR_TX_GAS_MISMATCH_INNER_ERROR = 441; | ||
// Connection error codes | ||
@@ -91,0 +93,0 @@ exports.ERR_CONN = 500; |
@@ -153,2 +153,6 @@ import { Bytes, HexString, Numbers, TransactionReceipt, Web3ValidationErrorObject } from 'web3-types'; | ||
} | ||
export declare class MissingGasInnerError extends BaseWeb3Error { | ||
code: number; | ||
constructor(); | ||
} | ||
export declare class MissingGasError extends InvalidValueError { | ||
@@ -163,2 +167,6 @@ code: number; | ||
} | ||
export declare class TransactionGasMismatchInnerError extends BaseWeb3Error { | ||
code: number; | ||
constructor(); | ||
} | ||
export declare class TransactionGasMismatchError extends InvalidValueError { | ||
@@ -165,0 +173,0 @@ code: number; |
@@ -19,3 +19,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.InvalidPropertiesForTransactionTypeError = exports.LocalWalletNotAvailableError = exports.TransactionSigningError = exports.TransactionReceiptMissingBlockNumberError = exports.TransactionMissingReceiptOrBlockHashError = exports.TransactionBlockTimeoutError = exports.TransactionPollingTimeoutError = exports.TransactionSendTimeoutError = exports.TransactionDataAndInputError = exports.UnsupportedTransactionTypeError = exports.Eip1559NotSupportedError = exports.UnableToPopulateNonceError = exports.InvalidNonceOrChainIdError = exports.InvalidTransactionObjectError = exports.UnsupportedFeeMarketError = exports.Eip1559GasPriceError = exports.InvalidMaxPriorityFeePerGasOrMaxFeePerGas = exports.InvalidGasOrGasPrice = exports.TransactionGasMismatchError = exports.MissingGasError = exports.MissingChainOrHardforkError = exports.CommonOrChainAndHardforkError = exports.HardforkMismatchError = exports.ChainMismatchError = exports.ChainIdMismatchError = exports.MissingCustomChainIdError = exports.MissingCustomChainError = exports.InvalidTransactionCall = exports.InvalidTransactionWithReceiver = exports.InvalidTransactionWithSender = exports.TransactionNotFound = exports.UndefinedRawTransactionError = exports.TransactionOutOfGasError = exports.TransactionRevertedWithoutReasonError = exports.ContractCodeNotStoredError = exports.NoContractAddressFoundError = exports.TransactionRevertWithCustomError = exports.TransactionRevertInstructionError = exports.RevertInstructionError = exports.TransactionError = void 0; | ||
exports.InvalidPropertiesForTransactionTypeError = exports.LocalWalletNotAvailableError = exports.TransactionSigningError = exports.TransactionReceiptMissingBlockNumberError = exports.TransactionMissingReceiptOrBlockHashError = exports.TransactionBlockTimeoutError = exports.TransactionPollingTimeoutError = exports.TransactionSendTimeoutError = exports.TransactionDataAndInputError = exports.UnsupportedTransactionTypeError = exports.Eip1559NotSupportedError = exports.UnableToPopulateNonceError = exports.InvalidNonceOrChainIdError = exports.InvalidTransactionObjectError = exports.UnsupportedFeeMarketError = exports.Eip1559GasPriceError = exports.InvalidMaxPriorityFeePerGasOrMaxFeePerGas = exports.InvalidGasOrGasPrice = exports.TransactionGasMismatchError = exports.TransactionGasMismatchInnerError = exports.MissingGasError = exports.MissingGasInnerError = exports.MissingChainOrHardforkError = exports.CommonOrChainAndHardforkError = exports.HardforkMismatchError = exports.ChainMismatchError = exports.ChainIdMismatchError = exports.MissingCustomChainIdError = exports.MissingCustomChainError = exports.InvalidTransactionCall = exports.InvalidTransactionWithReceiver = exports.InvalidTransactionWithSender = exports.TransactionNotFound = exports.UndefinedRawTransactionError = exports.TransactionOutOfGasError = exports.TransactionRevertedWithoutReasonError = exports.ContractCodeNotStoredError = exports.NoContractAddressFoundError = exports.TransactionRevertWithCustomError = exports.TransactionRevertInstructionError = exports.RevertInstructionError = exports.TransactionError = void 0; | ||
const error_codes_js_1 = require("../error_codes.js"); | ||
@@ -200,2 +200,9 @@ const web3_error_base_js_1 = require("../web3_error_base.js"); | ||
exports.MissingChainOrHardforkError = MissingChainOrHardforkError; | ||
class MissingGasInnerError extends web3_error_base_js_1.BaseWeb3Error { | ||
constructor() { | ||
super('Missing properties in transaction, either define "gas" and "gasPrice" for type 0 transactions or "gas", "maxPriorityFeePerGas" and "maxFeePerGas" for type 2 transactions'); | ||
this.code = error_codes_js_1.ERR_TX_MISSING_GAS_INNER_ERROR; | ||
} | ||
} | ||
exports.MissingGasInnerError = MissingGasInnerError; | ||
class MissingGasError extends web3_error_base_js_1.InvalidValueError { | ||
@@ -206,5 +213,13 @@ constructor(value) { | ||
this.code = error_codes_js_1.ERR_TX_MISSING_GAS; | ||
this.innerError = new MissingGasInnerError(); | ||
} | ||
} | ||
exports.MissingGasError = MissingGasError; | ||
class TransactionGasMismatchInnerError extends web3_error_base_js_1.BaseWeb3Error { | ||
constructor() { | ||
super('Missing properties in transaction, either define "gas" and "gasPrice" for type 0 transactions or "gas", "maxPriorityFeePerGas" and "maxFeePerGas" for type 2 transactions, not both'); | ||
this.code = error_codes_js_1.ERR_TX_GAS_MISMATCH_INNER_ERROR; | ||
} | ||
} | ||
exports.TransactionGasMismatchInnerError = TransactionGasMismatchInnerError; | ||
class TransactionGasMismatchError extends web3_error_base_js_1.InvalidValueError { | ||
@@ -215,2 +230,3 @@ constructor(value) { | ||
this.code = error_codes_js_1.ERR_TX_GAS_MISMATCH; | ||
this.innerError = new TransactionGasMismatchInnerError(); | ||
} | ||
@@ -217,0 +233,0 @@ } |
@@ -83,2 +83,4 @@ /* | ||
export const ERR_TX_INVALID_PROPERTIES_FOR_TYPE = 439; | ||
export const ERR_TX_MISSING_GAS_INNER_ERROR = 440; | ||
export const ERR_TX_GAS_MISMATCH_INNER_ERROR = 441; | ||
// Connection error codes | ||
@@ -85,0 +87,0 @@ export const ERR_CONN = 500; |
@@ -17,3 +17,3 @@ /* | ||
*/ | ||
import { ERR_RAW_TX_UNDEFINED, ERR_TX, ERR_TX_BLOCK_TIMEOUT, ERR_TX_CONTRACT_NOT_STORED, ERR_TX_CHAIN_ID_MISMATCH, ERR_TX_DATA_AND_INPUT, ERR_TX_GAS_MISMATCH, ERR_TX_CHAIN_MISMATCH, ERR_TX_HARDFORK_MISMATCH, ERR_TX_INVALID_CALL, ERR_TX_INVALID_CHAIN_INFO, ERR_TX_INVALID_FEE_MARKET_GAS, ERR_TX_INVALID_FEE_MARKET_GAS_PRICE, ERR_TX_INVALID_LEGACY_FEE_MARKET, ERR_TX_INVALID_LEGACY_GAS, ERR_TX_INVALID_NONCE_OR_CHAIN_ID, ERR_TX_INVALID_OBJECT, ERR_TX_INVALID_SENDER, ERR_TX_INVALID_RECEIVER, ERR_TX_LOCAL_WALLET_NOT_AVAILABLE, ERR_TX_MISSING_CHAIN_INFO, ERR_TX_MISSING_CUSTOM_CHAIN, ERR_TX_MISSING_CUSTOM_CHAIN_ID, ERR_TX_MISSING_GAS, ERR_TX_NO_CONTRACT_ADDRESS, ERR_TX_NOT_FOUND, ERR_TX_OUT_OF_GAS, ERR_TX_POLLING_TIMEOUT, ERR_TX_RECEIPT_MISSING_BLOCK_NUMBER, ERR_TX_RECEIPT_MISSING_OR_BLOCKHASH_NULL, ERR_TX_REVERT_INSTRUCTION, ERR_TX_REVERT_TRANSACTION, ERR_TX_REVERT_WITHOUT_REASON, ERR_TX_SEND_TIMEOUT, ERR_TX_SIGNING, ERR_TX_UNABLE_TO_POPULATE_NONCE, ERR_TX_UNSUPPORTED_EIP_1559, ERR_TX_UNSUPPORTED_TYPE, ERR_TX_REVERT_TRANSACTION_CUSTOM_ERROR, ERR_TX_INVALID_PROPERTIES_FOR_TYPE, } from '../error_codes.js'; | ||
import { ERR_RAW_TX_UNDEFINED, ERR_TX, ERR_TX_BLOCK_TIMEOUT, ERR_TX_CONTRACT_NOT_STORED, ERR_TX_CHAIN_ID_MISMATCH, ERR_TX_DATA_AND_INPUT, ERR_TX_GAS_MISMATCH, ERR_TX_CHAIN_MISMATCH, ERR_TX_HARDFORK_MISMATCH, ERR_TX_INVALID_CALL, ERR_TX_INVALID_CHAIN_INFO, ERR_TX_INVALID_FEE_MARKET_GAS, ERR_TX_INVALID_FEE_MARKET_GAS_PRICE, ERR_TX_INVALID_LEGACY_FEE_MARKET, ERR_TX_INVALID_LEGACY_GAS, ERR_TX_INVALID_NONCE_OR_CHAIN_ID, ERR_TX_INVALID_OBJECT, ERR_TX_INVALID_SENDER, ERR_TX_INVALID_RECEIVER, ERR_TX_LOCAL_WALLET_NOT_AVAILABLE, ERR_TX_MISSING_CHAIN_INFO, ERR_TX_MISSING_CUSTOM_CHAIN, ERR_TX_MISSING_CUSTOM_CHAIN_ID, ERR_TX_MISSING_GAS, ERR_TX_NO_CONTRACT_ADDRESS, ERR_TX_NOT_FOUND, ERR_TX_OUT_OF_GAS, ERR_TX_POLLING_TIMEOUT, ERR_TX_RECEIPT_MISSING_BLOCK_NUMBER, ERR_TX_RECEIPT_MISSING_OR_BLOCKHASH_NULL, ERR_TX_REVERT_INSTRUCTION, ERR_TX_REVERT_TRANSACTION, ERR_TX_REVERT_WITHOUT_REASON, ERR_TX_SEND_TIMEOUT, ERR_TX_SIGNING, ERR_TX_UNABLE_TO_POPULATE_NONCE, ERR_TX_UNSUPPORTED_EIP_1559, ERR_TX_UNSUPPORTED_TYPE, ERR_TX_REVERT_TRANSACTION_CUSTOM_ERROR, ERR_TX_INVALID_PROPERTIES_FOR_TYPE, ERR_TX_MISSING_GAS_INNER_ERROR, ERR_TX_GAS_MISMATCH_INNER_ERROR, } from '../error_codes.js'; | ||
import { InvalidValueError, BaseWeb3Error } from '../web3_error_base.js'; | ||
@@ -177,2 +177,8 @@ export class TransactionError extends BaseWeb3Error { | ||
} | ||
export class MissingGasInnerError extends BaseWeb3Error { | ||
constructor() { | ||
super('Missing properties in transaction, either define "gas" and "gasPrice" for type 0 transactions or "gas", "maxPriorityFeePerGas" and "maxFeePerGas" for type 2 transactions'); | ||
this.code = ERR_TX_MISSING_GAS_INNER_ERROR; | ||
} | ||
} | ||
export class MissingGasError extends InvalidValueError { | ||
@@ -183,4 +189,11 @@ constructor(value) { | ||
this.code = ERR_TX_MISSING_GAS; | ||
this.innerError = new MissingGasInnerError(); | ||
} | ||
} | ||
export class TransactionGasMismatchInnerError extends BaseWeb3Error { | ||
constructor() { | ||
super('Missing properties in transaction, either define "gas" and "gasPrice" for type 0 transactions or "gas", "maxPriorityFeePerGas" and "maxFeePerGas" for type 2 transactions, not both'); | ||
this.code = ERR_TX_GAS_MISMATCH_INNER_ERROR; | ||
} | ||
} | ||
export class TransactionGasMismatchError extends InvalidValueError { | ||
@@ -191,2 +204,3 @@ constructor(value) { | ||
this.code = ERR_TX_GAS_MISMATCH; | ||
this.innerError = new TransactionGasMismatchInnerError(); | ||
} | ||
@@ -193,0 +207,0 @@ } |
@@ -63,2 +63,4 @@ export declare const ERR_RESPONSE = 100; | ||
export declare const ERR_TX_INVALID_PROPERTIES_FOR_TYPE = 439; | ||
export declare const ERR_TX_MISSING_GAS_INNER_ERROR = 440; | ||
export declare const ERR_TX_GAS_MISMATCH_INNER_ERROR = 441; | ||
export declare const ERR_CONN = 500; | ||
@@ -65,0 +67,0 @@ export declare const ERR_CONN_INVALID = 501; |
@@ -153,2 +153,6 @@ import { Bytes, HexString, Numbers, TransactionReceipt, Web3ValidationErrorObject } from 'web3-types'; | ||
} | ||
export declare class MissingGasInnerError extends BaseWeb3Error { | ||
code: number; | ||
constructor(); | ||
} | ||
export declare class MissingGasError extends InvalidValueError { | ||
@@ -163,2 +167,6 @@ code: number; | ||
} | ||
export declare class TransactionGasMismatchInnerError extends BaseWeb3Error { | ||
code: number; | ||
constructor(); | ||
} | ||
export declare class TransactionGasMismatchError extends InvalidValueError { | ||
@@ -165,0 +173,0 @@ code: number; |
{ | ||
"name": "web3-errors", | ||
"version": "1.0.3-dev.1361787.0+1361787", | ||
"version": "1.0.3-dev.4310419.0+4310419", | ||
"description": "This package has web3 error classes", | ||
@@ -44,3 +44,3 @@ "main": "./lib/commonjs/index.js", | ||
"dependencies": { | ||
"web3-types": "1.0.3-dev.1361787.0+1361787" | ||
"web3-types": "1.0.3-dev.4310419.0+4310419" | ||
}, | ||
@@ -61,3 +61,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "1361787fe87a0d4b8458e34760ef7e699989afde" | ||
"gitHead": "431041995fe0f5900000d03fa8c97cc79d956b47" | ||
} |
@@ -93,2 +93,4 @@ /* | ||
export const ERR_TX_MISSING_GAS_INNER_ERROR = 440; | ||
export const ERR_TX_GAS_MISMATCH_INNER_ERROR = 441; | ||
// Connection error codes | ||
@@ -95,0 +97,0 @@ export const ERR_CONN = 500; |
@@ -68,2 +68,4 @@ /* | ||
ERR_TX_INVALID_PROPERTIES_FOR_TYPE, | ||
ERR_TX_MISSING_GAS_INNER_ERROR, | ||
ERR_TX_GAS_MISMATCH_INNER_ERROR, | ||
} from '../error_codes.js'; | ||
@@ -316,2 +318,12 @@ import { InvalidValueError, BaseWeb3Error } from '../web3_error_base.js'; | ||
export class MissingGasInnerError extends BaseWeb3Error { | ||
public code = ERR_TX_MISSING_GAS_INNER_ERROR; | ||
public constructor() { | ||
super( | ||
'Missing properties in transaction, either define "gas" and "gasPrice" for type 0 transactions or "gas", "maxPriorityFeePerGas" and "maxFeePerGas" for type 2 transactions', | ||
); | ||
} | ||
} | ||
export class MissingGasError extends InvalidValueError { | ||
@@ -334,5 +346,16 @@ public code = ERR_TX_MISSING_GAS; | ||
); | ||
this.innerError = new MissingGasInnerError(); | ||
} | ||
} | ||
export class TransactionGasMismatchInnerError extends BaseWeb3Error { | ||
public code = ERR_TX_GAS_MISMATCH_INNER_ERROR; | ||
public constructor() { | ||
super( | ||
'Missing properties in transaction, either define "gas" and "gasPrice" for type 0 transactions or "gas", "maxPriorityFeePerGas" and "maxFeePerGas" for type 2 transactions, not both', | ||
); | ||
} | ||
} | ||
export class TransactionGasMismatchError extends InvalidValueError { | ||
@@ -355,2 +378,3 @@ public code = ERR_TX_GAS_MISMATCH; | ||
); | ||
this.innerError = new TransactionGasMismatchInnerError(); | ||
} | ||
@@ -357,0 +381,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
396054
7037