Skip to content

Commit

Permalink
Pass access list to call in estimateGas and call (#2223)
Browse files Browse the repository at this point in the history
  • Loading branch information
shohamc1 authored Jul 26, 2023
1 parent 8f153a0 commit 2a35e98
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/ain-grpc/src/rpc/eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ impl MetachainRPCServer for MetachainRPCModule {
value,
data,
input,
access_list,
..
} = input;
let TxResponse { data, .. } = self
Expand All @@ -333,7 +334,7 @@ impl MetachainRPCServer for MetachainRPCModule {
.map(|d| d.0)
.unwrap_or(data.map(|d| d.0).unwrap_or_default()),
gas_limit: gas.unwrap_or(MAX_GAS_PER_BLOCK).as_u64(),
access_list: vec![],
access_list: access_list.unwrap_or_default(),
block_number: self.block_number_to_u256(block_number)?,
})
.map_err(|e| Error::Custom(format!("Error calling EVM : {e:?}")))?;
Expand Down Expand Up @@ -716,6 +717,7 @@ impl MetachainRPCServer for MetachainRPCModule {
gas,
value,
data,
access_list,
..
} = input;

Expand All @@ -729,7 +731,7 @@ impl MetachainRPCServer for MetachainRPCModule {
value: value.unwrap_or_default(),
data: &data.map(|d| d.0).unwrap_or_default(),
gas_limit: gas.unwrap_or(MAX_GAS_PER_BLOCK).as_u64(),
access_list: vec![],
access_list: access_list.unwrap_or_default(),
block_number,
})
.map_err(|e| Error::Custom(format!("Error calling EVM : {e:?}")))?;
Expand Down

0 comments on commit 2a35e98

Please sign in to comment.