Crate cosmwasm_vm

source ·

Modules§

Structs§

  • 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.
  • Additional environmental information in a debug call.
  • 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.
  • Statistics about the usage of a cache instance. Those values are node specific and must not be used in a consensus critical context. When a node is hit by a client for simulations or other queries, hits and misses increase. Also a node restart will reset the values.

Enums§

Traits§

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

Functions§

  • Calls Wasm export “execute” and returns raw data from the contract. The result is length limited to prevent abuse but otherwise unchecked.
  • Calls Wasm export “instantiate” and returns raw data from the contract. The result is length limited to prevent abuse but otherwise unchecked.
  • Calls Wasm export “migrate” and returns raw data from the contract. The result is length limited to prevent abuse but otherwise unchecked.
  • Calls Wasm export “query” and returns raw data from the contract. The result is length limited to prevent abuse but otherwise unchecked.
  • Calls Wasm export “reply” and returns raw data from the contract. The result is length limited to prevent abuse but otherwise unchecked.
  • Calls Wasm export “sudo” and returns raw data from the contract. The result is length limited to prevent abuse but otherwise unchecked.
  • Takes a comma-separated string, splits it by commas, removes empty elements and returns a set of capabilities. This can be used e.g. to initialize the cache.
  • Deserializes JSON data into a document of type T.

Type Aliases§