Module contract_interface

Module contract_interface 

Source
Expand description

Interface and related utilities for interaction with the compiled WASM contracts. Contracts have an isomorphic interface which partially maps to this interface, allowing interaction between the runtime and the contracts themselves.

This abstraction layer shouldn’t leak beyond the contract handler.

Structs§

Contract
A complete contract specification requires a parameters section and a contract section.
ContractCode
The executable contract.
ContractInstanceId
The key representing the hash of the contract executable code hash and a set of parameters.
ContractKey
A complete key specification, that represents a cryptographic hash that identifies the contract.
Parameters
Data that forms part of a contract along with the WebAssembly code.
RelatedContract
A contract related to an other contract and the specification of the kind of update notifications that should be received by this contract.
RelatedContracts
The contracts related to a parent or root contract. Tipically this means contracts which state requires to be verified or integrated in some way with the parent contract.
State
Data associated with a contract that can be retrieved by Applications and Components.
StateDelta
Represents a modification to some state - similar to a diff in source code.
StateSummary
Summary of State changes.
UpdateModification
An update to a contract state or any required related contracts to update that state.
WrappedContract
Just as locutus_stdlib::Contract but with some convenience impl.
WrappedState
The state for a contract.

Enums§

ContractError
Type of errors during interaction with a contract.
RelatedMode
Specification of the notifications of interest from a related contract.
UpdateData
Update notifications for a contract or a related contract.
ValidateResult
The result of calling the ContractInterface::validate_state function.
WsApiError

Traits§

ContractInterface
Trait to implement for the contract building.
TryFromTsStd