Skip to content

Commit c6267dc

Browse files
author
Grigoriy Simonov
committed
test: add test for Current logs
1 parent 82ab91c commit c6267dc

File tree

9 files changed

+2863
-1117
lines changed

9 files changed

+2863
-1117
lines changed

Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ environmental = { version = "1.1.3", default-features = false }
4242
ethereum = { version = "0.14.0", default-features = false }
4343
ethereum-types = { version = "0.14.1", default-features = false }
4444
evm = { version = "0.37.0", default-features = false }
45+
hex-literal = { version = "0.4.1" }
4546
impl-serde = { version = "0.4.0", default-features = false }
4647
jsonrpsee = "0.16.2"
4748
kvdb-rocksdb = "0.17.0"

template/node/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ async-trait = "0.1"
1717
clap = { version = "4.1", features = ["derive", "deprecated"] }
1818
futures = "0.3.25"
1919
jsonrpsee = { workspace = true, features = ["server", "macros"] }
20+
hex-literal = { workspace = true }
2021
log = "0.4.17"
2122
scale-codec = { package = "parity-scale-codec", workspace = true }
2223
serde = { workspace = true }

template/node/src/chain_spec.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ use sp_state_machine::BasicExternalities;
1212
use frontier_template_runtime::{
1313
AccountId, EnableManualSeal, GenesisConfig, SS58Prefix, Signature, WASM_BINARY,
1414
};
15+
use hex_literal::hex;
1516

1617
// The URL for the telemetry server.
1718
// const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/";
@@ -84,14 +85,14 @@ pub fn development_config(enable_manual_seal: Option<bool>) -> DevChainSpec {
8485
DevGenesisExt {
8586
genesis_config: testnet_genesis(
8687
wasm_binary,
87-
// Sudo account
88-
get_account_id_from_seed::<ecdsa::Public>("Alice"),
89-
// Pre-funded accounts
88+
// Sudo account (Alith)
89+
AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")),
90+
// Pre-funded accounts: Alith, Baltathar, Charleth and Dorothy
9091
vec![
91-
get_account_id_from_seed::<ecdsa::Public>("Alice"),
92-
get_account_id_from_seed::<ecdsa::Public>("Bob"),
93-
get_account_id_from_seed::<ecdsa::Public>("Alice//stash"),
94-
get_account_id_from_seed::<ecdsa::Public>("Bob//stash"),
92+
AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")),
93+
AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")),
94+
AccountId::from(hex!("798d4Ba9baf0064Ec19eB4F0a1a45785ae9D6DFc")),
95+
AccountId::from(hex!("773539d4Ac0e786233D90A233654ccEE26a613D9")),
9596
],
9697
// Initial PoA authorities
9798
vec![authority_keys_from_seed("Alice")],

template/runtime/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ use sp_core::{
2020
use sp_runtime::{
2121
create_runtime_str, generic, impl_opaque_keys,
2222
traits::{
23-
AccountIdLookup, BlakeTwo256, Block as BlockT, DispatchInfoOf, Dispatchable, Get,
24-
IdentifyAccount, NumberFor, PostDispatchInfoOf, UniqueSaturatedInto, Verify,
23+
BlakeTwo256, Block as BlockT, DispatchInfoOf, Dispatchable, Get, IdentifyAccount,
24+
IdentityLookup, NumberFor, PostDispatchInfoOf, UniqueSaturatedInto, Verify,
2525
},
2626
transaction_validity::{TransactionSource, TransactionValidity, TransactionValidityError},
2727
ApplyExtrinsicResult, ConsensusEngineId, Perbill, Permill,
@@ -181,7 +181,7 @@ impl frame_system::Config for Runtime {
181181
/// The identifier used to distinguish between accounts.
182182
type AccountId = AccountId;
183183
/// The lookup mechanism to get account ID from whatever is passed in dispatchers.
184-
type Lookup = AccountIdLookup<AccountId, ()>;
184+
type Lookup = IdentityLookup<AccountId>;
185185
/// The header type.
186186
type Header = generic::Header<BlockNumber, BlakeTwo256>;
187187
/// The ubiquitous event type.
@@ -445,7 +445,7 @@ impl fp_rpc::ConvertTransaction<opaque::UncheckedExtrinsic> for TransactionConve
445445
}
446446

447447
/// The address format for describing accounts.
448-
pub type Address = sp_runtime::MultiAddress<AccountId, ()>;
448+
pub type Address = AccountId;
449449
/// Block header type as expected by this runtime.
450450
pub type Header = generic::Header<BlockNumber, BlakeTwo256>;
451451
/// Block type as expected by this runtime.

0 commit comments

Comments
 (0)