@@ -27,13 +27,13 @@ pub trait HostContext {
2727 buffer_size : & usize ,
2828 ) -> usize ;
2929 fn selfdestruct ( & mut self , addr : & Address , beneficiary : & Address ) ;
30- fn get_tx_context ( & mut self ) -> ( Bytes32 , Address , Address , i64 , i64 , i64 , Bytes32 , Bytes32 ) ;
30+ fn get_tx_context ( & mut self ) -> ( Bytes32 , Address , Address , i64 , i64 , i64 , Bytes32 , Bytes32 , Bytes32 ) ;
3131 fn get_block_hash ( & mut self , number : i64 ) -> Bytes32 ;
3232 fn emit_log ( & mut self , addr : & Address , topics : & Vec < Bytes32 > , data : & Bytes ) ;
3333 fn call (
3434 & mut self ,
3535 kind : MessageKind ,
36- destination : & Address ,
36+ recipient : & Address ,
3737 sender : & Address ,
3838 value : & Bytes32 ,
3939 input : & Bytes ,
@@ -58,6 +58,8 @@ pub(crate) fn get_evmc_host_interface() -> ffi::evmc_host_interface {
5858 get_tx_context : Some ( get_tx_context) ,
5959 get_block_hash : Some ( get_block_hash) ,
6060 emit_log : Some ( emit_log) ,
61+ access_account : None , // TODO
62+ access_storage : None , // TODO
6163 }
6264}
6365
@@ -152,7 +154,7 @@ unsafe extern "C" fn selfdestruct(
152154}
153155
154156unsafe extern "C" fn get_tx_context ( context : * mut ffi:: evmc_host_context ) -> ffi:: evmc_tx_context {
155- let ( gas_price, origin, coinbase, number, timestamp, gas_limit, difficulty , chain_id) =
157+ let ( gas_price, origin, coinbase, number, timestamp, gas_limit, prev_randao , chain_id, base_fee ) =
156158 ( * ( context as * mut ExtendedContext ) ) . hctx . get_tx_context ( ) ;
157159 return ffi:: evmc_tx_context {
158160 tx_gas_price : evmc_sys:: evmc_bytes32 { bytes : gas_price } ,
@@ -161,8 +163,9 @@ unsafe extern "C" fn get_tx_context(context: *mut ffi::evmc_host_context) -> ffi
161163 block_number : number,
162164 block_timestamp : timestamp,
163165 block_gas_limit : gas_limit,
164- block_difficulty : evmc_sys:: evmc_bytes32 { bytes : difficulty } ,
166+ block_prev_randao : evmc_sys:: evmc_bytes32 { bytes : prev_randao } ,
165167 chain_id : evmc_sys:: evmc_bytes32 { bytes : chain_id } ,
168+ block_base_fee : evmc_sys:: evmc_bytes32 { bytes : base_fee } ,
166169 } ;
167170}
168171
@@ -211,7 +214,7 @@ pub unsafe extern "C" fn call(
211214 let ( output, gas_left, create_address, status_code) =
212215 ( * ( context as * mut ExtendedContext ) ) . hctx . call (
213216 msg. kind ,
214- & msg. destination . bytes ,
217+ & msg. recipient . bytes ,
215218 & msg. sender . bytes ,
216219 & msg. value . bytes ,
217220 & std:: slice:: from_raw_parts ( msg. input_data , msg. input_size ) ,
0 commit comments