Function ink_env::call_runtime

source ·
pub fn call_runtime<E, Call>(call: &Call) -> Result<()>where
    E: Environment,
    Call: Encode,
Expand description

Tries to trigger a runtime dispatchable, i.e. an extrinsic from a pallet.

call (after SCALE encoding) should be decodable to a valid instance of RuntimeCall enum.

For more details consult host function documentation.

Errors

  • If the call cannot be properly decoded on the pallet contracts side.
  • If the runtime doesn’t allow for the contract unstable feature.
  • If the runtime doesn’t allow for dispatching this call from a contract.

Panics

Panics in the off-chain environment.