Skip to content

Commit

Permalink
test: add test for Current logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Grigoriy Simonov committed May 1, 2023
1 parent 82ab91c commit e21ed21
Show file tree
Hide file tree
Showing 9 changed files with 2,863 additions and 1,117 deletions.
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ scale-codec = { package = "parity-scale-codec", version = "3.2.1", default-featu
scale-info = { version = "2.3.1", default-features = false, features = ["derive"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
hex-literal = { version = "0.4.1" }
# Substrate Client
sc-basic-authorship = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "master" }
sc-block-builder = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate", branch = "master" }
Expand Down
1 change: 1 addition & 0 deletions template/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ async-trait = "0.1"
clap = { version = "4.1", features = ["derive", "deprecated"] }
futures = "0.3.25"
jsonrpsee = { workspace = true, features = ["server", "macros"] }
hex-literal = { workspace = true }
log = "0.4.17"
scale-codec = { package = "parity-scale-codec", workspace = true }
serde = { workspace = true }
Expand Down
15 changes: 8 additions & 7 deletions template/node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use sp_state_machine::BasicExternalities;
use frontier_template_runtime::{
AccountId, EnableManualSeal, GenesisConfig, SS58Prefix, Signature, WASM_BINARY,
};
use hex_literal::hex;

// The URL for the telemetry server.
// const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/";
Expand Down Expand Up @@ -84,14 +85,14 @@ pub fn development_config(enable_manual_seal: Option<bool>) -> DevChainSpec {
DevGenesisExt {
genesis_config: testnet_genesis(
wasm_binary,
// Sudo account
get_account_id_from_seed::<ecdsa::Public>("Alice"),
// Pre-funded accounts
// Sudo account (Alith)
AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")),
// Pre-funded accounts: Alith, Baltathar, Charleth and Dorothy
vec![
get_account_id_from_seed::<ecdsa::Public>("Alice"),
get_account_id_from_seed::<ecdsa::Public>("Bob"),
get_account_id_from_seed::<ecdsa::Public>("Alice//stash"),
get_account_id_from_seed::<ecdsa::Public>("Bob//stash"),
AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")),
AccountId::from(hex!("3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0")),
AccountId::from(hex!("798d4Ba9baf0064Ec19eB4F0a1a45785ae9D6DFc")),
AccountId::from(hex!("773539d4Ac0e786233D90A233654ccEE26a613D9")),
],
// Initial PoA authorities
vec![authority_keys_from_seed("Alice")],
Expand Down
8 changes: 4 additions & 4 deletions template/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ use sp_core::{
use sp_runtime::{
create_runtime_str, generic, impl_opaque_keys,
traits::{
AccountIdLookup, BlakeTwo256, Block as BlockT, DispatchInfoOf, Dispatchable, Get,
IdentifyAccount, NumberFor, PostDispatchInfoOf, UniqueSaturatedInto, Verify,
BlakeTwo256, Block as BlockT, DispatchInfoOf, Dispatchable, Get, IdentifyAccount,
IdentityLookup, NumberFor, PostDispatchInfoOf, UniqueSaturatedInto, Verify,
},
transaction_validity::{TransactionSource, TransactionValidity, TransactionValidityError},
ApplyExtrinsicResult, ConsensusEngineId, Perbill, Permill,
Expand Down Expand Up @@ -181,7 +181,7 @@ impl frame_system::Config for Runtime {
/// The identifier used to distinguish between accounts.
type AccountId = AccountId;
/// The lookup mechanism to get account ID from whatever is passed in dispatchers.
type Lookup = AccountIdLookup<AccountId, ()>;
type Lookup = IdentityLookup<AccountId>;
/// The header type.
type Header = generic::Header<BlockNumber, BlakeTwo256>;
/// The ubiquitous event type.
Expand Down Expand Up @@ -445,7 +445,7 @@ impl fp_rpc::ConvertTransaction<opaque::UncheckedExtrinsic> for TransactionConve
}

/// The address format for describing accounts.
pub type Address = sp_runtime::MultiAddress<AccountId, ()>;
pub type Address = AccountId;
/// Block header type as expected by this runtime.
pub type Header = generic::Header<BlockNumber, BlakeTwo256>;
/// Block type as expected by this runtime.
Expand Down
Loading

0 comments on commit e21ed21

Please sign in to comment.