mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 05:11:09 +00:00
contracts: Allow runtime authors to define a chain extension (#7548)
* Make host functions return TrapReason This avoids the need to manually store any trap reasons to the `Runtime` from the host function. This adds the following benefits: * It properly composes with the upcoming chain extensions * Missing to set a trap value is now a compile error * Add chain extension The chain extension is a way for the contract author to add new host functions for contracts to call. * Add tests for chain extensions * Fix regression in set_rent.wat fixture Not all offsets where properly updated when changing the fixtures for the new salt on instantiate. * Pre-charge a weight amount based off the specified length * Improve fn write docs * Renamed state to phantom * Fix typo
This commit is contained in:
committed by
GitHub
parent
e3e651f72c
commit
51c37ecc15
@@ -34,14 +34,13 @@ mod code_cache;
|
||||
mod prepare;
|
||||
mod runtime;
|
||||
|
||||
use self::runtime::Runtime;
|
||||
use self::code_cache::load as load_code;
|
||||
use pallet_contracts_primitives::ExecResult;
|
||||
|
||||
pub use self::code_cache::save as save_code;
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
pub use self::code_cache::save_raw as save_code_raw;
|
||||
pub use self::runtime::ReturnCode;
|
||||
pub use self::runtime::{ReturnCode, Runtime, RuntimeToken};
|
||||
|
||||
/// A prepared wasm module ready for execution.
|
||||
#[derive(Clone, Encode, Decode)]
|
||||
|
||||
Reference in New Issue
Block a user