pub trait ExtWithInfo: PrecompileExt {
// Required method
fn instantiate(
&mut self,
limits: &CallResources<Self::T>,
code: Code,
value: U256,
input_data: Vec<u8>,
salt: Option<&[u8; 32]>,
) -> Result<H160, ExecError>;
}Expand description
Environment functions which are available to pre-compiles with HAS_CONTRACT_INFO = true.
Required Methods§
Sourcefn instantiate(
&mut self,
limits: &CallResources<Self::T>,
code: Code,
value: U256,
input_data: Vec<u8>,
salt: Option<&[u8; 32]>,
) -> Result<H160, ExecError>
fn instantiate( &mut self, limits: &CallResources<Self::T>, code: Code, value: U256, input_data: Vec<u8>, salt: Option<&[u8; 32]>, ) -> Result<H160, ExecError>
Instantiate a contract from the given code.
Returns the original code size of the called contract.
The newly created account will be associated with code. value specifies the amount of
value transferred from the caller to the newly created account.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.