pub trait CreateTransactionApi<Block: BlockT, RuntimeCall, AccountId>: Core<Block>{
// 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§
Sourcefn create_transaction(
&self,
__runtime_api_at_param__: <Block as BlockT>::Hash,
account: AccountId,
call: RuntimeCall,
) -> Result<Vec<u8>, ApiError>
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.