mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
Introduce safe types for handling imbalances (#2048)
* Be a little safer with total issuance. * PairT instead of _Pair * Remove rev causing upset * Remove fees stuff. * Fix build (including tests) * Update runtime, bump version * Fix * Handle gas refunds properly. * Rename identifier ala #2025 * Address grumbles * New not-quite-linear-typing API * Slimmer API * More linear-type test fixes * Fix tests * Tidy * Fix some grumbles * Keep unchecked functions private * Remove another less-than-safe currency function and ensure that contracts module can never create cash. * Address a few grumbles and fix tests
This commit is contained in:
committed by
Robert Habermeier
parent
f9e224e7b8
commit
dcd77a147c
@@ -169,11 +169,10 @@ impl balances::Trait for Runtime {
|
||||
type OnNewAccount = Indices;
|
||||
/// The uniquitous event type.
|
||||
type Event = Event;
|
||||
}
|
||||
|
||||
impl fees::Trait for Runtime {
|
||||
type TransferAsset = Balances;
|
||||
type Event = Event;
|
||||
type TransactionPayment = ();
|
||||
type DustRemoval = ();
|
||||
type TransferPayment = ();
|
||||
}
|
||||
|
||||
impl sudo::Trait for Runtime {
|
||||
@@ -200,7 +199,6 @@ construct_runtime!(
|
||||
Indices: indices,
|
||||
Balances: balances,
|
||||
Sudo: sudo,
|
||||
Fees: fees::{Module, Storage, Config<T>, Event<T>},
|
||||
// Used for the module template in `./template.rs`
|
||||
TemplateModule: template::{Module, Call, Storage, Event<T>},
|
||||
}
|
||||
@@ -221,7 +219,7 @@ pub type UncheckedExtrinsic = generic::UncheckedMortalCompactExtrinsic<Address,
|
||||
/// Extrinsic type that has already been checked.
|
||||
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, Nonce, Call>;
|
||||
/// Executive: handles dispatch to the various modules.
|
||||
pub type Executive = executive::Executive<Runtime, Block, Context, Fees, AllModules>;
|
||||
pub type Executive = executive::Executive<Runtime, Block, Context, Balances, AllModules>;
|
||||
|
||||
// Implement our runtime API endpoints. This is just a bunch of proxying.
|
||||
impl_runtime_apis! {
|
||||
|
||||
Reference in New Issue
Block a user