Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
update to substrate v0.9.43 (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
salman01zp authored Jul 13, 2023
1 parent e08be1f commit c1dc56d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 16 deletions.
2 changes: 1 addition & 1 deletion crates/bls/src/impls/milagro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ impl TPublicKey for milagro::PublicKey {

impl TAggregatePublicKey<milagro::PublicKey> for milagro::AggregatePublicKey {
fn to_public_key(&self) -> GenericPublicKey<milagro::PublicKey> {
GenericPublicKey::from_point(milagro::PublicKey { point: self.point.clone() })
GenericPublicKey::from_point(milagro::PublicKey { point: self.point })
}

fn aggregate(pubkeys: &[GenericPublicKey<milagro::PublicKey>]) -> Result<Self, Error> {
Expand Down
4 changes: 2 additions & 2 deletions crates/ssz/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ mod round_trip {
];

for i in 0..items.len() {
assert_eq!(items[i].as_ssz_bytes(), expected_encodings[i], "Failed on {}", i);
assert_eq!(items[i].as_ssz_bytes(), expected_encodings[i], "Failed on {i}");
}
}

Expand Down Expand Up @@ -188,7 +188,7 @@ mod round_trip {
];

for i in 0..items.len() {
assert_eq!(items[i].as_ssz_bytes(), expected_encodings[i], "Failed on {}", i);
assert_eq!(items[i].as_ssz_bytes(), expected_encodings[i], "Failed on {i}");
}
}

Expand Down
12 changes: 6 additions & 6 deletions pallet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ bls = { path = "../crates/bls", default-features = false }
tree_hash = { path = "../crates/tree_hash", default-features = false }
tree_hash_derive = { path = "../crates/tree_hash_derive", default-features = false }

frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.39" }
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.39" }
pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.39" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.39" }
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.39" }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.39" }
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43" }
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43" }
pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43" }
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43" }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43" }
hex = { version = "0.4.2", default-features = false, features = ["alloc"] }

[dev-dependencies]
Expand Down
13 changes: 6 additions & 7 deletions pallet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ pub mod pallet {
use frame_system::pallet_prelude::*;

#[pallet::pallet]
#[pallet::generate_store(pub(super) trait Store)]
#[pallet::without_storage_info]
pub struct Pallet<T>(_);

Expand Down Expand Up @@ -376,7 +375,7 @@ pub mod pallet {

#[pallet::call]
impl<T: Config> Pallet<T> {
#[pallet::weight(0)]
#[pallet::weight({0})]
#[pallet::call_index(0)]
pub fn init(
origin: OriginFor<T>,
Expand Down Expand Up @@ -449,7 +448,7 @@ pub mod pallet {
Ok(().into())
}

#[pallet::weight(1)]
#[pallet::weight({1})]
#[pallet::call_index(1)]
pub fn register_submitter(
origin: OriginFor<T>,
Expand Down Expand Up @@ -486,7 +485,7 @@ pub mod pallet {
Ok(().into())
}

#[pallet::weight(2)]
#[pallet::weight({2})]
#[pallet::call_index(2)]
pub fn unregister_submitter(
origin: OriginFor<T>,
Expand Down Expand Up @@ -514,7 +513,7 @@ pub mod pallet {
Ok(().into())
}

#[pallet::weight(3)]
#[pallet::weight({3})]
#[pallet::call_index(3)]
pub fn submit_beacon_chain_light_client_update(
origin: OriginFor<T>,
Expand All @@ -539,7 +538,7 @@ pub mod pallet {
Ok(().into())
}

#[pallet::weight(4)]
#[pallet::weight({4})]
#[pallet::call_index(4)]
pub fn submit_execution_header(
origin: OriginFor<T>,
Expand Down Expand Up @@ -584,7 +583,7 @@ pub mod pallet {
Ok(().into())
}

#[pallet::weight(5)]
#[pallet::weight({5})]
#[pallet::call_index(5)]
pub fn update_trusted_signer(
origin: OriginFor<T>,
Expand Down
4 changes: 4 additions & 0 deletions pallet/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ impl pallet_balances::Config for Test {
type MaxLocks = ();
type MaxReserves = ();
type ReserveIdentifier = [u8; 8];
type HoldIdentifier = ();
type FreezeIdentifier = ();
type MaxHolds = ();
type MaxFreezes = ();
type WeightInfo = ();
}

Expand Down

0 comments on commit c1dc56d

Please sign in to comment.