@somnia-chain/markets-sdk / native / SomniaMempoolStatus
Variable: SomniaMempoolStatus
constSomniaMempoolStatus:object
Defined in: packages/sdk/src/native/errors.ts:52
The node's mempool verdict, as the data byte of a -32000 error carries it.
Worth branching on rather than matching error strings: nonceTooSmall is
retryable with a bumped nonce, insufficientBalance needs funding, and
accountDoesNotExist means the sender has never been seen — a different fix
from either.
Example (Branching on mempool status)
import { SomniaMempoolStatus, getSomniaRpcError } from "@somnia-chain/markets-sdk/native";
const rpc = getSomniaRpcError(error);
if (rpc?.mempoolStatus === SomniaMempoolStatus.nonceTooSmall) {
// stale nonce count — re-read it and retry
}
Type Declaration
success
readonlysuccess:0=0
Accepted. Never seen on an error.
hasInFlightTransactions
readonlyhasInFlightTransactions:1=1
The sender already has transactions in flight.
accountDoesNotExist
readonlyaccountDoesNotExist:2=2
The SENDER has never existed on chain — fund it before it can transact.
insufficientBalance
readonlyinsufficientBalance:3=3
The sender cannot cover value plus the gas ceiling.
nonceTooSmall
readonlynonceTooSmall:4=4
Nonce below the account's next — including when eth_getTransactionCount lags.
nonceTooLarge
readonlynonceTooLarge:5=5
Nonce beyond what the mempool will queue.
nonceNotCloseEnough
readonlynonceNotCloseEnough:6=6
Nonce too far ahead of the account's next to hold.
accountAlreadyLinked
readonlyaccountAlreadyLinked:7=7
The account is already linked.
invalidTransaction
readonlyinvalidTransaction:8=8
Malformed, or below the intrinsic gas cost.
invalidSignature
readonlyinvalidSignature:9=9
Signature did not recover to the sender.
accountNotLinked
readonlyaccountNotLinked:10=10
The account is not linked.
mempoolFull
readonlymempoolFull:11=11
No room; retry later.
gasPriceBelowBaseFee
readonlygasPriceBelowBaseFee:12=12
maxFeePerGas under the block's base fee.
gasPriceBelowDynamicFee
readonlygasPriceBelowDynamicFee:13=13
maxFeePerGas under the dynamic fee the node currently requires.
tooMuchValueInFlight
readonlytooMuchValueInFlight:14=14
The sender's in-flight value exceeds what the mempool allows at once.