Struct FlowBuilder

Source
pub struct FlowBuilder { /* private fields */ }

Implementations§

Source§

impl FlowBuilder

Source

pub fn empty() -> Self

Creates an empty FlowBuilder with no actions.

Source

pub fn set_extcodecopy_op( &mut self, source: Address, data_offset: u16, code_offset: u16, size: u16, ) -> &mut Self

Adds an EXTCODECOPY operation to the action list.

Source

pub fn set_addr_op(&mut self, addr: Address) -> &mut Self

Adds a SETADDR operation to the action list.

Source

pub fn set_value_op(&mut self, value: U256) -> &mut Self

Adds a SETVALUE operation to the action list.

Source

pub fn set_data_op(&mut self, offset: u16, data: &[u8]) -> &mut Self

Adds a SETDATA operation to the action list.

Source

pub fn set_cleardata_op(&mut self, size: u16) -> &mut Self

Adds a CLEARDATA operation to the action list.

Source

pub fn call_op(&mut self) -> &mut Self

Adds a CALL operation to the action list.

Source

pub fn create_op(&mut self, created_address: Address) -> &mut Self

Adds a CREATE operation to the action list.

Source

pub fn delegatecall_op(&mut self) -> &mut Self

Adds a DELEGATECALL operation to the action list.

Source

pub fn call(&mut self, target: Address, data: &[u8], value: U256) -> &mut Self

Prepares a CALL operation with the specified target, data, and value.

Source

pub fn delegatecall(&mut self, target: Address, data: &[u8]) -> &mut Self

Prepares a DELEGATECALL operation with the specified target and data.

Source

pub fn create( &mut self, created_address: Address, data: &[u8], value: U256, ) -> &mut Self

Prepares a CREATE operation with the specified address, data, and value.

Source

pub fn set_callback(&mut self, callback_address: Address) -> &mut Self

prepare set callback

Source

pub fn set_fail(&mut self) -> &mut Self

Prepares a SETFAIL operation.

Source

pub fn clear_fail(&mut self) -> &mut Self

Prepares a CLEARFAIL operation.

Source

pub fn optimize(&mut self) -> &mut Self

Optimizes the sequence of operations.

Source

pub fn build_raw(&mut self) -> Vec<u8>

Builds the sequence of operations into a byte vector, optionally optimizing it.

Source

pub fn build(&mut self) -> Vec<u8>

Builds the sequence of operations into a byte vector, optionally optimizing it.

Trait Implementations§

Source§

impl Default for FlowBuilder

Source§

fn default() -> FlowBuilder

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.