Trait CreateTransactionApi

Source
pub trait CreateTransactionApi<Block: BlockT, RuntimeCall, AccountId>: Core<Block>
where RuntimeCall: Codec, AccountId: Codec,
{ // Provided method fn create_transaction( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, account: AccountId, call: RuntimeCall, ) -> Result<Vec<u8>, ApiError> { ... } }
Expand description

Create transaction. This trait is meant to be implemented by the runtime and is responsible for constructing a transaction to be included in the block.

Provided Methods§

Source

fn create_transaction( &self, __runtime_api_at_param__: <Block as BlockT>::Hash, account: AccountId, call: RuntimeCall, ) -> Result<Vec<u8>, ApiError>

Attempt to create signed transaction Runtime implementation is free to construct the payload to sign in any way it wants. Returns a scale encoded extrinsic Should panic if signed transaction cannot be created.

Trait Implementations§

Source§

impl<Block: BlockT, RuntimeCall, AccountId> RuntimeApiInfo for dyn CreateTransactionApi<Block, RuntimeCall, AccountId>

Source§

const ID: [u8; 8]

The identifier of the runtime api.
Source§

const VERSION: u32 = 1u32

The version of the runtime api.

Implementors§