Skip to content

Commit

Permalink
Decouple Runtime API impls from specific structs (#167)
Browse files Browse the repository at this point in the history
* decouple runtime API gas price from struct

* same for chain IDs
  • Loading branch information
JoshOrndorff committed Oct 16, 2020
1 parent 51bd10f commit 9d42605
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions template/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -479,15 +479,15 @@ impl_runtime_apis! {

impl frontier_rpc_primitives::EthereumRuntimeRPCApi<Block> for Runtime {
fn chain_id() -> u64 {
ChainId::get()
<Runtime as frame_evm::Trait>::ChainId::get()
}

fn account_basic(address: H160) -> EVMAccount {
EVM::account_basic(&address)
}

fn gas_price() -> U256 {
FixedGasPrice::min_gas_price()
<Runtime as frame_evm::Trait>::FeeCalculator::min_gas_price()
}

fn account_code_at(address: H160) -> Vec<u8> {
Expand Down

0 comments on commit 9d42605

Please sign in to comment.