Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2bba44e

Browse files
author
Grigoriy Simonov
committedMay 1, 2023
test: add test for Current logs
1 parent 82ab91c commit 2bba44e

File tree

10 files changed

+2865
-1119
lines changed

10 files changed

+2865
-1119
lines changed
 

‎Cargo.lock

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml

+1
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

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"]
1616
async-trait = "0.1"
1717
clap = { version = "4.1", features = ["derive", "deprecated"] }
1818
futures = "0.3.25"
19+
hex-literal = { workspace = true }
1920
jsonrpsee = { workspace = true, features = ["server", "macros"] }
2021
log = "0.4.17"
2122
scale-codec = { package = "parity-scale-codec", workspace = true }

‎template/node/src/benchmarking.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ impl frame_benchmarking_cli::ExtrinsicBuilder for TransferKeepAliveBuilder {
106106
self.client.as_ref(),
107107
acc,
108108
BalancesCall::transfer_keep_alive {
109-
dest: self.dest.into(),
109+
dest: self.dest,
110110
value: self.value,
111111
}
112112
.into(),
@@ -173,7 +173,7 @@ pub fn create_benchmark_extrinsic(
173173

174174
runtime::UncheckedExtrinsic::new_signed(
175175
call,
176-
AccountId20::from(sender.public()).into(),
176+
AccountId20::from(sender.public()),
177177
runtime::Signature::new(signature),
178178
extra,
179179
)

‎template/node/src/chain_spec.rs

+8-7
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

+4-4
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)
Please sign in to comment.