logo
pub struct WasmTestBuilder<S> { /* private fields */ }
Expand description

Builder for simple WASM test

Implementations

Returns an LmdbWasmTestBuilder with configuration.

Flushes the LMDB environment to disk.

Returns a new LmdbWasmTestBuilder.

Creates a new instance of builder using the supplied configurations, opening wrapped LMDBs (e.g. in the Trie and Data stores) rather than creating them.

Creates a new instance of builder using the supplied configurations, opening wrapped LMDBs (e.g. in the Trie and Data stores) rather than creating them. Differs from open in that it doesn’t append GLOBAL_STATE_DIR to the supplied path.

Takes a RunGenesisRequest, executes the request and returns Self.

Queries state for a StoredValue.

Queries state for a dictionary item.

Queries for a StoredValue and returns the StoredValue and a Merkle proof.

Queries for the total supply of token.

Panics

Panics if the total supply can’t be found.

Runs an ExecuteRequest.

Commit effects of previous exec call on the latest post-state hash.

Runs a commit request, expects a successful response, and overwrites existing cached post state hash with a new one.

Upgrades the execution engine.

Executes a request to call the system auction contract.

Increments engine state.

Expects a successful run

Expects a failed run

Returns true if the las exec had an error, otherwise returns false.

Returns an Option<engine_state::Error> if the last exec had an error.

Gets the transform map that’s cached between runs

Gets genesis account (if present)

Returns the ContractHash of the mint, panics if it can’t be found.

Returns the ContractHash of the “handle payment” contract, panics if it can’t be found.

Returns the ContractHash of the “standard payment” contract, panics if it can’t be found.

Returns the ContractHash of the “auction” contract, panics if it can’t be found.

Returns genesis transforms, panics if there aren’t any.

Returns the genesis hash, panics if it can’t be found.

source

pub fn get_post_state_hash(&self) -> Digest

Returns the post state hash, panics if it can’t be found.

Returns the engine state.

Returns the results of all execs.

Returns the results of a specific exec.

Returns a count of exec results.

Returns a Result containing an UpgradeSuccess.

Expects upgrade success.

Returns the “handle payment” contract, panics if it can’t be found.

Returns the balance of a purse, panics if the balance can’t be parsed into a U512.

Returns a BalanceResult for a purse, panics if the balance can’t be found.

Returns a BalanceResult for a purse using a PublicKey.

Gets the purse balance of a proposer.

Queries for an Account.

Queries for an Account and panics if it can’t be found.

Queries for a contract by ContractHash.

Queries for a contract by ContractHash and returns an Option<ContractWasm>.

Queries for a contract package by ContractPackageHash.

Queries for a transfer by TransferAddr.

Queries for deploy info by DeployHash.

Returns a Vec<Gas> representing execution consts.

Returns the Gas cost of the last exec.

Returns the result of the last exec.

Assert that last error is the expected one.

NOTE: we’re using string-based representation for checking equality as the Error type does not implement Eq (many of its subvariants don’t).

Returns the error message of the last exec.

Gets ValidatorWeights for a given EraId.

Gets Bids.

Gets all [Key::Balance]s in global state.

Gets a stored value from a contract’s named keys.

Gets an EraId.

Gets the auction delay.

Gets the ContractHash of the system auction contract, panics if it can’t be found.

Gets the ContractHash of the system mint contract, panics if it can’t be found.

Gets the ContractHash of the system handle payment contract, panics if it can’t be found.

Returns the ContractHash of the system standard payment contract, panics if it can’t be found.

Resets the exec_results, upgrade_results and transform fields.

Returns a trie by hash.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Converts self into a target type. Read more

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more

Causes self to use its Binary implementation when Debug-formatted.

Causes self to use its Display implementation when Debug-formatted. Read more

Causes self to use its LowerExp implementation when Debug-formatted. Read more

Causes self to use its LowerHex implementation when Debug-formatted. Read more

Causes self to use its Octal implementation when Debug-formatted.

Causes self to use its Pointer implementation when Debug-formatted. Read more

Causes self to use its UpperExp implementation when Debug-formatted. Read more

Causes self to use its UpperHex implementation when Debug-formatted. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Pipes a value into a function that cannot ordinarily be called in suffix position. Read more

Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait mutable borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait mutable borrow into a function that cannot normally be called in suffix position. Read more

Pipes a dereference into a function that cannot normally be called in suffix position. Read more

Pipes a mutable dereference into a function that cannot normally be called in suffix position. Read more

Pipes a reference into a function that cannot ordinarily be called in suffix position. Read more

Pipes a mutable reference into a function that cannot ordinarily be called in suffix position. Read more

Should always be Self

Provides immutable access for inspection. Read more

Calls tap in debug builds, and does nothing in release builds.

Provides mutable access for modification. Read more

Calls tap_mut in debug builds, and does nothing in release builds.

Provides immutable access to the reference for inspection.

Calls tap_ref in debug builds, and does nothing in release builds.

Provides mutable access to the reference for modification.

Calls tap_ref_mut in debug builds, and does nothing in release builds.

Provides immutable access to the borrow for inspection. Read more

Calls tap_borrow in debug builds, and does nothing in release builds.

Provides mutable access to the borrow for modification.

Calls tap_borrow_mut in debug builds, and does nothing in release builds. Read more

Immutably dereferences self for inspection.

Calls tap_deref in debug builds, and does nothing in release builds.

Mutably dereferences self for modification.

Calls tap_deref_mut in debug builds, and does nothing in release builds. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Attempts to convert self into a target type. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more