mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 16:21:02 +00:00
Claim yer sale DOTs (#97)
* Add claims. * Failing build * Updatee to latest substrate, fix tests * Remove unneeded * Introduce tests with real work sig * Use right 64 bytes of pubkey to get eth addr * Fix for eth sig * Fix build * Fix wasm
This commit is contained in:
@@ -20,9 +20,16 @@
|
||||
// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256.
|
||||
#![recursion_limit="256"]
|
||||
|
||||
#[cfg(test)]
|
||||
#[macro_use]
|
||||
extern crate hex_literal;
|
||||
|
||||
#[macro_use]
|
||||
extern crate bitvec;
|
||||
|
||||
extern crate tiny_keccak;
|
||||
extern crate secp256k1;
|
||||
|
||||
#[macro_use]
|
||||
extern crate parity_codec_derive;
|
||||
extern crate parity_codec as codec;
|
||||
@@ -64,6 +71,7 @@ extern crate polkadot_primitives as primitives;
|
||||
extern crate substrate_keyring as keyring;
|
||||
|
||||
mod parachains;
|
||||
mod claims;
|
||||
|
||||
use rstd::prelude::*;
|
||||
use substrate_primitives::u32_trait::{_2, _4};
|
||||
@@ -108,7 +116,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||
spec_name: create_runtime_str!("polkadot"),
|
||||
impl_name: create_runtime_str!("parity-polkadot"),
|
||||
authoring_version: 1,
|
||||
spec_version: 104,
|
||||
spec_version: 105,
|
||||
impl_version: 0,
|
||||
apis: RUNTIME_API_VERSIONS,
|
||||
};
|
||||
@@ -234,6 +242,10 @@ impl sudo::Trait for Runtime {
|
||||
type Proposal = Call;
|
||||
}
|
||||
|
||||
impl claims::Trait for Runtime {
|
||||
type Event = Event;
|
||||
}
|
||||
|
||||
construct_runtime!(
|
||||
pub enum Runtime with Log(InternalLog: DigestItem<Hash, SessionKey>) where
|
||||
Block = Block,
|
||||
@@ -259,6 +271,7 @@ construct_runtime!(
|
||||
Parachains: parachains::{Module, Call, Storage, Config<T>, Inherent},
|
||||
Sudo: sudo,
|
||||
UpgradeKey: upgrade_key,
|
||||
Claims: claims,
|
||||
}
|
||||
);
|
||||
|
||||
@@ -293,8 +306,8 @@ impl_runtime_apis! {
|
||||
Executive::execute_block(block)
|
||||
}
|
||||
|
||||
fn initialise_block(header: <Block as BlockT>::Header) {
|
||||
Executive::initialise_block(&header)
|
||||
fn initialise_block(header: &<Block as BlockT>::Header) {
|
||||
Executive::initialise_block(header)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -387,7 +400,7 @@ impl_runtime_apis! {
|
||||
}
|
||||
|
||||
impl fg_primitives::GrandpaApi<Block> for Runtime {
|
||||
fn grandpa_pending_change(digest: DigestFor<Block>)
|
||||
fn grandpa_pending_change(digest: &DigestFor<Block>)
|
||||
-> Option<ScheduledChange<BlockNumber>>
|
||||
{
|
||||
for log in digest.logs.iter().filter_map(|l| match l {
|
||||
|
||||
Reference in New Issue
Block a user