pub struct CallDataBuilder {
    pub args: Vec<Vec<u8>>,
}
Expand description

Builder to contruct CallData::arguments so that it can be passed to entrypoint

Basic example

let args_builder = smart_contract::CallDataBuilder::new();
args_builder
.add("i am string".to_string())
.add(0_i32)
.add(vec![0u8; 8]);
 
// construct Vec<u8> data to pass to CallData::arguments 
let args :Vec<u8> = args_builder.to_call_arguments();
...

Fields

args: Vec<Vec<u8>>

Implementations

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.