Expand description
Defines types and functions that provide a convenient and succinct object-oriented interface for loading, deploying, getting information about, and executing (WASM) smart contracts.
A contract consists of a set of host functions that can be compiled into WASM module. The state transition function prepares execution context and builds an instance from a contract with well-defined functions. The contract should match the current version of Contract Binary Interface (cbi).
Modulesยง
- cbi
- Definition of host functions that are imported by ParallelChain Smart Contracts.
- context
- Defines a struct containing context for a Smart Contract Execution such as cache for storing smart contract module and VM memory limit for contract execution.
- functions
- Implementation for host functions used for contract methods according to crate::contract::cbi.
- instance
- Defines a struct to use wasmer::Instance to perform method call according to ParallelChain Smart Contract Defintions.
- module
- Defines a struct to use wasmer::Module as underlying WASM module to work with compiled contract bytecode in Parallelchain Mainnet.
- version
- Defines versioning of Contract Binary Interface.