pub trait ExtrinsicBuilder {
    // Required methods
    fn pallet(&self) -> &str;
    fn extrinsic(&self) -> &str;
    fn build(&self, nonce: u32) -> Result<OpaqueExtrinsic, &'static str>;
}
Expand description

Used by the benchmark to build signed extrinsics.

The built extrinsics only need to be valid in the first block who’s parent block is the genesis block. This assumption simplifies the generation of the extrinsics. The signer should be one of the pre-funded dev accounts.

Required Methods§

source

fn pallet(&self) -> &str

Name of the pallet this builder is for.

Should be all lowercase.

source

fn extrinsic(&self) -> &str

Name of the extrinsic this builder is for.

Should be all lowercase.

source

fn build(&self, nonce: u32) -> Result<OpaqueExtrinsic, &'static str>

Builds an extrinsic.

Will be called multiple times with increasing nonces.

Implementations§

source§

impl dyn ExtrinsicBuilder + '_

source

pub fn name(&self) -> String

Name of this builder in CSV format: pallet, extrinsic.

Implementors§