Trait sputnikvm::Precompiled
source · pub trait Precompiled: Sync {
fn step(&self, _: &[u8]) -> Rc<Vec<u8>> { ... }
fn gas(&self, _: &[u8]) -> Gas { ... }
fn gas_and_step(
&self,
data: &[u8],
gas_limit: Gas
) -> Result<(Gas, Rc<Vec<u8>>), RuntimeError> { ... }
}
Expand description
Represent a precompiled contract.
Provided Methods
sourcefn gas_and_step(
&self,
data: &[u8],
gas_limit: Gas
) -> Result<(Gas, Rc<Vec<u8>>), RuntimeError>
fn gas_and_step(
&self,
data: &[u8],
gas_limit: Gas
) -> Result<(Gas, Rc<Vec<u8>>), RuntimeError>
Combine step and gas together, given the gas limit.