mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 06:17:56 +00:00
Fix substrate factory CLI command (#3239)
* CLI execution flag for import-blocks and factory. * Fix minimum_balance bug with CLI factory.
This commit is contained in:
committed by
Bastian Köcher
parent
c9c0ad4756
commit
8aa367c27a
@@ -23,11 +23,13 @@ use rand::rngs::StdRng;
|
||||
|
||||
use parity_codec::Decode;
|
||||
use keyring::sr25519::Keyring;
|
||||
use node_runtime::{Call, CheckedExtrinsic, UncheckedExtrinsic, SignedExtra, BalancesCall};
|
||||
use node_primitives::Hash;
|
||||
use node_runtime::{Call, CheckedExtrinsic, UncheckedExtrinsic, SignedExtra, BalancesCall, ExistentialDeposit};
|
||||
use primitives::{sr25519, crypto::Pair};
|
||||
use parity_codec::Encode;
|
||||
use sr_primitives::{generic::Era, traits::{Block as BlockT, Header as HeaderT, SignedExtension}};
|
||||
use substrate_service::ServiceFactory;
|
||||
use support::traits::Get;
|
||||
use transaction_factory::RuntimeAdapter;
|
||||
use transaction_factory::modes::Mode;
|
||||
use crate::service;
|
||||
@@ -133,7 +135,7 @@ impl RuntimeAdapter for FactoryState<Number> {
|
||||
sender: &Self::AccountId,
|
||||
key: &Self::Secret,
|
||||
destination: &Self::AccountId,
|
||||
amount: &Self::Number,
|
||||
amount: &Self::Balance,
|
||||
prior_block_hash: &<Self::Block as BlockT>::Hash,
|
||||
) -> <Self::Block as BlockT>::Extrinsic {
|
||||
let index = self.extract_index(&sender, prior_block_hash);
|
||||
@@ -161,9 +163,9 @@ impl RuntimeAdapter for FactoryState<Number> {
|
||||
inherent
|
||||
}
|
||||
|
||||
fn minimum_balance() -> Self::Number {
|
||||
fn minimum_balance() -> Self::Balance {
|
||||
// TODO get correct amount via api. See #2587.
|
||||
1337
|
||||
ExistentialDeposit::get()
|
||||
}
|
||||
|
||||
fn master_account_id() -> Self::AccountId {
|
||||
|
||||
Reference in New Issue
Block a user