Add missing RPC required for relay (#57)

* add missing RPC required for relay

* cargo fmt --all
This commit is contained in:
Svyatoslav Nikolsky
2020-04-07 15:50:02 +03:00
committed by Bastian Köcher
parent 1da78b8ab4
commit b055027161
4 changed files with 34 additions and 0 deletions
+7
View File
@@ -65,6 +65,12 @@ default-features = false
rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31"
git = "https://github.com/paritytech/substrate/"
[dependencies.frame-system-rpc-runtime-api]
version = "2.0.0-alpha.2"
default-features = false
rev = "2afecf81ee19b8a6edb364b419190ea47c4a4a31"
git = "https://github.com/paritytech/substrate/"
[dependencies.pallet-timestamp]
version = "2.0.0-alpha.2"
default-features = false
@@ -177,6 +183,7 @@ std = [
"frame-executive/std",
"frame-support/std",
"frame-system/std",
"frame-system-rpc-runtime-api/std",
"pallet-grandpa/std",
"pallet-randomness-collective-flip/std",
"serde",
+6
View File
@@ -330,6 +330,12 @@ impl_runtime_apis! {
}
}
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime {
fn account_nonce(account: AccountId) -> Index {
System::account_nonce(account)
}
}
impl sp_bridge_eth_poa::EthereumHeadersApi<Block> for Runtime {
fn best_block() -> (u64, sp_bridge_eth_poa::H256) {
BridgeEthPoA::best_block()