#[non_exhaustive]pub enum TestkitError {
Show 46 variants
MissingFaucet,
FundingRequestMismatch {
recipient: ContractAddress,
},
ReceiptHashMismatch {
expected: TxHash,
receipt: Box<TransactionReceipt>,
},
Submission {
tx_hash: TxHash,
signed_transaction: String,
detail: String,
source: Box<dyn Error + Send + Sync>,
},
UnverifiedDeployment {
tx_hash: TxHash,
predicted_address: ContractAddress,
signed_transaction: String,
detail: Box<str>,
source: Option<Box<TestkitError>>,
receipt: Option<Box<TransactionReceipt>>,
},
DeploymentRequestMismatch {
name: String,
},
NoNetwork,
Rpc {
method: &'static str,
detail: String,
},
Offline {
operation: &'static str,
},
ManifestLoad {
path: String,
detail: String,
},
ManifestSchema {
actual: u32,
},
Manifest {
field: &'static str,
detail: String,
},
UnsupportedDerivationScheme {
scheme: String,
},
NoBootstrapAccounts,
BootstrapPublicKeyMismatch {
index: u32,
},
NotEnoughAccounts {
needed: usize,
available: usize,
},
DuplicateAgent {
name: String,
},
AgentsFailed {
failures: AgentFailures,
},
NonceExhausted {
index: u32,
},
Signing {
detail: String,
},
Encode {
detail: String,
},
Decode {
detail: String,
},
InvalidContractVersion {
version: String,
},
Deploy {
detail: String,
},
Reverted {
method: String,
status: String,
},
NoReturn {
kind: &'static str,
detail: String,
},
ReceiptWait {
source: Box<ReceiptPollError>,
},
NativeCall {
method: &'static str,
source: Box<NativeClientError>,
},
InvalidFundingEvidence {
detail: String,
retained: Option<Box<(TxHash, HexBytes)>>,
source: Box<NativeClientError>,
},
InvalidFundingResponse {
retained: Option<Box<(TxHash, HexBytes)>>,
response: Box<FundingSubmission>,
detail: String,
},
UnsupportedResponse {
method: &'static str,
raw: Value,
},
NativeEndpoint {
source: Box<NativeRpcError>,
},
PendingTimeout {
tx_hash: String,
last_status: Box<TransactionStatus>,
},
TransactionNotPending {
tx_hash: String,
status: Box<TransactionStatus>,
},
ManualBlockProductionUnavailable,
BlockProduction {
source: BlockProductionError,
},
ArtifactLoad {
name: String,
path: String,
detail: String,
},
UnknownArtifactExtension {
path: String,
},
DuplicateArtifact {
name: String,
},
UnknownArtifact {
name: String,
},
ArtifactRegistrationPending {
name: String,
tx_hash: TxHash,
signed_transaction: String,
},
NodeSupervisor {
detail: String,
},
MissingRuntimeManifest,
UnknownAgent {
name: String,
},
MailboxClosed {
name: String,
},
AgentJoin {
detail: String,
},
}Expand description
Errors returned by the harness while building or running a scenario.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
MissingFaucet
The runtime manifest has no faucet account to fund test accounts.
FundingRequestMismatch
A pending request must be reconciled before changing its amount.
Fields
recipient: ContractAddressRecipient with retained funding intent.
ReceiptHashMismatch
A receipt belongs to another transaction.
Fields
receipt: Box<TransactionReceipt>Complete conflicting receipt, including its claimed commitment and execution.
Submission
An ambiguous submission retains the exact original signed transaction.
Fields
UnverifiedDeployment
A submitted deployment could not be verified; preserve the original attempt.
Fields
predicted_address: ContractAddressAddress predicted from the signed deployment effects.
source: Option<Box<TestkitError>>Original receipt-wait evidence, when waiting stopped before validation.
receipt: Option<Box<TransactionReceipt>>Authoritative receipt whose deployment return did not match the prediction.
DeploymentRequestMismatch
Retained deployment effects differ from a new request by the same caller.
NoNetwork
A scenario was built without a network configuration.
Rpc
A JSON-RPC call to the target failed.
Offline
A chain operation was attempted against an offline target.
ManifestLoad
The runtime manifest could not be read or parsed.
ManifestSchema
The runtime manifest declared an unsupported schema version.
Manifest
A field could not be read from the runtime manifest.
UnsupportedDerivationScheme
The manifest used a bootstrap-account derivation scheme we do not support.
NoBootstrapAccounts
The manifest carried no bootstrap accounts to assign to agents.
BootstrapPublicKeyMismatch
A derived signer did not match the public key the manifest advertised.
NotEnoughAccounts
The scenario has fewer accounts than it has agents.
Fields
DuplicateAgent
Two agents in one run were given the same name.
AgentsFailed
One or more agent bodies returned errors.
Fields
failures: AgentFailuresAll returned agent errors, ordered by agent position.
NonceExhausted
An account exhausted its per-account nonce sequence.
Signing
Building or signing a transaction failed.
Encode
Encoding calldata or a contract failed.
Decode
Decoding a contract return value failed.
InvalidContractVersion
A contract interface version is not valid SemVer.
Deploy
A deploy transaction did not execute successfully.
Reverted
A contract call executed but its status was not Ok.
Carries the method name; add call-site context with map_err where
that alone does not identify which call reverted.
Fields
NoReturn
A contract call or view did not return successfully.
Fields
ReceiptWait
Receipt waiting stopped with retained status, commitment and read errors.
Fields
source: Box<ReceiptPollError>Wait cause plus the strongest observed commitment and status.
NativeCall
Native RPC failure, retaining the original application or malformed result.
Fields
source: Box<NativeClientError>Original RPC error or malformed result, including raw data.
InvalidFundingEvidence
Funding evidence could not be validated; retain the original RPC failure.
Fields
retained: Option<Box<(TxHash, HexBytes)>>Original validated hash and signed bytes, if already retained.
source: Box<NativeClientError>Original RPC error carrying the conflicting or invalid evidence.
InvalidFundingResponse
A funding result conflicts with the retained request or its signed identity.
Fields
retained: Option<Box<(TxHash, HexBytes)>>Original validated hash and signed bytes, if already retained.
response: Box<FundingSubmission>Complete supplied result, retained without accepting its identity.
UnsupportedResponse
An unfamiliar response is retained without asserting its meaning.
Fields
NativeEndpoint
Endpoint compatibility or identity validation failed.
Fields
source: Box<NativeRpcError>Compatibility, identity or discovery failure with its original evidence.
PendingTimeout
A submitted transaction did not become pending before the polling budget elapsed.
Fields
last_status: Box<TransactionStatus>Last status observed before timeout.
TransactionNotPending
A submitted transaction reached a terminal or unexpected state before becoming pending.
Fields
status: Box<TransactionStatus>Status observed instead of Pending.
Manual block production is unavailable for this target or driver mode.
BlockProduction
The local supervisor failed to produce a manually-requested block.
Fields
source: BlockProductionErrorUnderlying supervisor block-production error.
ArtifactLoad
A contract artifact could not be read from disk.
Fields
UnknownArtifactExtension
A file artifact had an extension the harness does not recognize.
DuplicateArtifact
Two artifacts were registered under the same name.
UnknownArtifact
An agent referenced an artifact name that was never registered.
ArtifactRegistrationPending
An artifact registration transaction is still awaiting a receipt.
Fields
NodeSupervisor
The local node supervisor failed to start or stop the target.
MissingRuntimeManifest
A started local node did not advertise a runtime manifest.
UnknownAgent
A message was addressed to an agent that is not part of the scenario.
MailboxClosed
The recipient agent’s mailbox was already closed.
AgentJoin
An agent task failed to join for a reason other than a panic.
Trait Implementations§
Source§impl Debug for TestkitError
impl Debug for TestkitError
Source§impl Display for TestkitError
impl Display for TestkitError
Source§impl Error for TestkitError
impl Error for TestkitError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()