Struct revm_interpreter::Contract
source · pub struct Contract {
pub input: Bytes,
pub bytecode: BytecodeLocked,
pub address: B160,
pub caller: B160,
pub value: U256,
}
Fields§
§input: Bytes
Contracts data
bytecode: BytecodeLocked
Bytecode contains contract code, size of original code, analysis with gas block and jump table. Note that current code is extended with push padding and STOP at end.
address: B160
Contract address
caller: B160
Caller of the EVM.
value: U256
Value send to contract.
Implementations§
source§impl Contract
impl Contract
pub fn new<SPEC: Spec>(
input: Bytes,
bytecode: Bytecode,
address: B160,
caller: B160,
value: U256
) -> Self
sourcepub fn new_env<SPEC: Spec>(env: &Env, bytecode: Bytecode) -> Self
pub fn new_env<SPEC: Spec>(env: &Env, bytecode: Bytecode) -> Self
Create new contract from environment TODO: Add spec related match to analyze bytecode by env.cfg.spec_id variable