Crate prov_cosmwasm_vm

Crate prov_cosmwasm_vm 

Source

Modules§

testing

Structs§

AnalysisReport
Backend
Holds all external dependencies of the contract. Designed to allow easy dependency injection at runtime. This cannot be copied or cloned since it would behave differently for mock storages and a bridge storage in the VM.
Cache
CacheOptions
Checksum
A SHA-256 checksum of a Wasm blob, used to identify a Wasm code. This must remain stable since this checksum is stored in the blockchain state.
GasInfo
A structure that represents gas cost to be deducted from the remaining gas. This is always needed when computations are performed outside of Wasm execution, such as calling crypto APIs or calls into the blockchain.
GasReport
Instance
InstanceOptions
Metrics
Size
Stats

Enums§

BackendError
CommunicationError
An error in the communcation between contract and host. Those happen around imports and exports.
RegionValidationError
An error validating a Region
VmError

Traits§

BackendApi
Callbacks to system functions defined outside of the wasm modules. This is a trait to allow Mocks in the test code.
Querier
Storage
Access to the VM’s backend storage, i.e. the chain

Functions§

call_execute
call_execute_raw
Calls Wasm export “execute” and returns raw data from the contract. The result is length limited to prevent abuse but otherwise unchecked.
call_instantiate
call_instantiate_raw
Calls Wasm export “instantiate” and returns raw data from the contract. The result is length limited to prevent abuse but otherwise unchecked.
call_migrate
call_migrate_raw
Calls Wasm export “migrate” and returns raw data from the contract. The result is length limited to prevent abuse but otherwise unchecked.
call_query
call_query_raw
Calls Wasm export “query” and returns raw data from the contract. The result is length limited to prevent abuse but otherwise unchecked.
call_reply
call_reply_raw
Calls Wasm export “reply” and returns raw data from the contract. The result is length limited to prevent abuse but otherwise unchecked.
call_sudo
call_sudo_raw
Calls Wasm export “sudo” and returns raw data from the contract. The result is length limited to prevent abuse but otherwise unchecked.
features_from_csv
Takes a comma-separated string, splits it by commas, removes empty elements and returns a set of features. This can be used e.g. to initialize the cache.
from_slice
Deserializes JSON data into a document of type T.
to_vec

Type Aliases§

BackendResult
A result type for calling into the backend. Such a call can cause non-negligible computational cost in both success and faiure case and must always have gas information attached.
CommunicationResult
RegionValidationResult
VmResult