mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 14:01:02 +00:00
Integrate the claims module (#355)
* Integrate the claims. * Remove accidetnal code. * Update runtime/src/lib.rs Co-Authored-By: thiolliere <gui.thiolliere@gmail.com> * Add Config. * Introduce claims to config * Expose claims module signing Prefix (#358) * Update parking_lot, bette trait args
This commit is contained in:
committed by
Bastian Köcher
parent
4d19de4bd9
commit
9b6e630816
@@ -68,11 +68,11 @@ impl EcdsaSignature {
|
||||
|
||||
decl_event!(
|
||||
pub enum Event<T> where
|
||||
B = BalanceOf<T>,
|
||||
A = <T as system::Trait>::AccountId
|
||||
Balance = BalanceOf<T>,
|
||||
AccountId = <T as system::Trait>::AccountId
|
||||
{
|
||||
/// Someone claimed some DOTs.
|
||||
Claimed(A, EthereumAddress, B),
|
||||
Claimed(AccountId, EthereumAddress, Balance),
|
||||
}
|
||||
);
|
||||
|
||||
@@ -96,6 +96,9 @@ decl_storage! {
|
||||
|
||||
decl_module! {
|
||||
pub struct Module<T: Trait> for enum Call where origin: T::Origin {
|
||||
/// The Prefix that is used in signed Ethereum messages for this network
|
||||
const Prefix: &[u8] = T::Prefix::get();
|
||||
|
||||
/// Deposit one of this module's events by using the default implementation.
|
||||
fn deposit_event<T>() = default;
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ parameter_types! {
|
||||
pub type DealWithFees = SplitTwoWays<
|
||||
Balance,
|
||||
NegativeImbalance,
|
||||
_4, Treasury, // 4 parts (80%) goes to the treasury.
|
||||
_4, Treasury, // 4 parts (80%) goes to the treasury.
|
||||
_1, ToAuthor, // 1 part (20%) goes to the block author.
|
||||
>;
|
||||
|
||||
@@ -373,6 +373,16 @@ impl slots::Trait for Runtime {
|
||||
|
||||
impl curated_grandpa::Trait for Runtime { }
|
||||
|
||||
parameter_types!{
|
||||
pub const Prefix: &'static [u8] = b"Pay KSMs to the Kusama account:";
|
||||
}
|
||||
|
||||
impl claims::Trait for Runtime {
|
||||
type Event = Event;
|
||||
type Currency = Balances;
|
||||
type Prefix = Prefix;
|
||||
}
|
||||
|
||||
impl sudo::Trait for Runtime {
|
||||
type Event = Event;
|
||||
type Proposal = Call;
|
||||
@@ -403,6 +413,7 @@ construct_runtime!(
|
||||
Parachains: parachains::{Module, Call, Storage, Config<T>, Inherent, Origin},
|
||||
Attestations: attestations::{Module, Call, Storage},
|
||||
Slots: slots::{Module, Call, Storage, Event<T>},
|
||||
Claims: claims::{Module, Call, Storage, Event<T>, Config<T>, ValidateUnsigned},
|
||||
Sudo: sudo,
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user