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

Commit

Permalink
chore(deps): Bump substrate to polkadot-v1.6.0 (#17)
Browse files Browse the repository at this point in the history
* chore(deps): Bump substrate to polkadot-v1.6.0

* ci: Fix no standard library sources found error
  • Loading branch information
conr2d authored Jan 25, 2024
1 parent 10faf59 commit 146aa6a
Show file tree
Hide file tree
Showing 20 changed files with 148 additions and 185 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: dtolnay/rust-toolchain@nightly
with:
targets: wasm32-unknown-unknown
components: rustfmt
components: rust-src, rustfmt
- name: Install build dependencies
run: sudo apt-get install protobuf-compiler
- name: Rust Cache
Expand Down
102 changes: 51 additions & 51 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ members = [
]

[workspace.dependencies]
array-bytes = "4.2.0"
array-bytes = "6.2.2"
base64ct = { version = "1.6.0", default-features = false }
bech32 = { version = "0.9.1", default-features = false }
clap = { version = "4.0.9", features = ["derive"] }
Expand All @@ -25,66 +25,66 @@ num_enum = { version = "0.6.1", default-features = false }
parity-scale-codec = { version = "3.2.0", default-features = false }
ripemd = { version = "0.1.3", default-features = false }
scale-info = { version = "2.3.0", default-features = false }
secp256k1 = { version = "0.24.0", default-features = false }
secp256k1 = { version = "0.28.1", default-features = false }
serde = { version = "1.0.0", default-features = false }
serde_json = { version = "1.0.94", default-features = false }

# Substrate FRAME
frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
pallet-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false }
frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false }
frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false }
frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false }
pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false }
pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false }
pallet-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false }
pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false }
pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false }
pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false }
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false }
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false }

# Substrate
sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sc-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sc-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sc-keystore = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sc-network = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sc-rpc-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sc-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sp-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sp-runtime-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sp-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sp-version = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" }
sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" }
sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" }
sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" }
sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" }
sc-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" }
sc-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" }
sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" }
sc-keystore = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" }
sc-network = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" }
sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" }
sc-rpc-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" }
sc-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" }
sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" }
sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" }
sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" }
sp-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false }
sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false }
sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false }
sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false }
sp-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false }
sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false }
sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false }
sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false }
sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false }
sp-runtime-interface = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false }
sp-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false }
sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false }
sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false }
sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false }
sp-version = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0", default-features = false }
substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" }
substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" }
substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.6.0" }

# Frontier
fp-self-contained = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.1.0", default-features = false }
fp-self-contained = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v1.6.0", default-features = false }

# Horizon
hc-rpc = { path = "client/rpc", default-features = false }
hc-rpc = { path = "client/rpc" }
hp-account = { path = "primitives/account", default-features = false }
hp-cosmos = { path = "primitives/cosmos", default-features = false }
hp-crypto = { path = "primitives/crypto", default-features = false }
Expand Down
14 changes: 6 additions & 8 deletions client/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "hc-rpc"
version = "0.1.0"
edition = "2021"
license = "Apache-2.0"
repository = "https://github.com/NoirHQ/horizon/"
repository = "https://github.com/noirhq/horizon/"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand All @@ -16,13 +16,11 @@ hex = { workspace = true }
# Substrate
sc-chain-spec = { workspace = true }
sc-transaction-pool-api = { workspace = true }
sp-api = { workspace = true }
sp-api = { workspace = true, features = ["std"] }
sp-blockchain = { workspace = true }
sp-core = { workspace = true }
sp-runtime = { workspace = true }
sp-core = { workspace = true, features = ["std"] }
sp-runtime = { workspace = true, features = ["std"] }

# Horizon
hp-cosmos = { workspace = true }
hp-rpc = { workspace = true, features = ["default"] }

[dev-dependencies]
hp-cosmos = { workspace = true, features = ["std"] }
hp-rpc = { workspace = true, features = ["std"] }
6 changes: 2 additions & 4 deletions client/rpc/src/cosm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ use sc_transaction_pool_api::TransactionPool;
use sp_api::ProvideRuntimeApi;
use sp_blockchain::HeaderBackend;
use sp_core::{Bytes, H256};
use sp_runtime::{
generic::BlockId, traits::Block as BlockT, transaction_validity::TransactionSource,
};
use sp_runtime::{traits::Block as BlockT, transaction_validity::TransactionSource};
use std::{marker::PhantomData, sync::Arc};

#[rpc(server)]
Expand Down Expand Up @@ -79,7 +77,7 @@ where
.convert_tx(block_hash, tx.clone())
.map_err(|_| internal_err("cannot access runtime api"))?;
self.pool
.submit_one(&BlockId::Hash(block_hash), TransactionSource::Local, extrinsic)
.submit_one(block_hash, TransactionSource::Local, extrinsic)
.map_ok(move |_| tx.hash.into())
.map_err(|e| internal_err(e.to_string()))
.await
Expand Down
2 changes: 1 addition & 1 deletion frame/cosmos-accounts/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "pallet-cosmos-accounts"
version = "0.1.0"
edition = "2021"
license = "Apache-2.0"
repository = "https://github.com/NoirHQ/horizon/"
repository = "https://github.com/noirhq/horizon/"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
3 changes: 1 addition & 2 deletions frame/cosmos-accounts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@

#![cfg_attr(not(feature = "std"), no_std)]
#![allow(clippy::comparison_chain, clippy::large_enum_variant)]
#![deny(unused_crate_dependencies)]

pub mod weights;

use crate::weights::WeightInfo;
#[cfg(feature = "std")]
use frame_support::{sp_runtime, traits::BuildGenesisConfig};
use frame_support::traits::BuildGenesisConfig;
use hp_crypto::EcdsaExt;
pub use pallet::*;
use sp_core::H160;
Expand Down
2 changes: 1 addition & 1 deletion frame/cosmos/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "pallet-cosmos"
version = "0.1.0"
edition = "2021"
license = "Apache-2.0"
repository = "https://github.com/NoirHQ/horizon/"
repository = "https://github.com/noirhq/horizon/"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
16 changes: 10 additions & 6 deletions frame/cosmos/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

#![cfg_attr(not(feature = "std"), no_std)]
#![allow(clippy::comparison_chain, clippy::large_enum_variant)]
#![deny(unused_crate_dependencies)]

pub mod errors;
pub mod handler;
Expand Down Expand Up @@ -378,11 +377,16 @@ impl<T: Config> Pallet<T> {
})
}
let origin = T::AddressMapping::into_account_id(*source);
T::Currency::withdraw(&origin, fee, WithdrawReasons::FEE, ExistenceRequirement::AllowDeath)
.map_err(|_| CosmosError {
weight: total_weight,
error: CosmosErrorCode::ErrInsufficientFee,
})?;
let _ = T::Currency::withdraw(
&origin,
fee,
WithdrawReasons::FEE,
ExistenceRequirement::AllowDeath,
)
.map_err(|_| CosmosError {
weight: total_weight,
error: CosmosErrorCode::ErrInsufficientFee,
})?;
frame_system::Pallet::<T>::inc_account_nonce(origin);
Ok(total_weight)
}
Expand Down
2 changes: 1 addition & 1 deletion primitives/account/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "hp-account"
version = "0.1.0"
edition = "2021"
license = "Apache-2.0"
repository = "https://github.com/NoirHQ/horizon/"
repository = "https://github.com/noirhq/horizon/"

[dependencies]
array-bytes = { workspace = true, optional = true }
Expand Down
2 changes: 1 addition & 1 deletion primitives/cosmos/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "hp-cosmos"
version = "0.1.0"
edition = "2021"
license = "Apache-2.0"
repository = "https://github.com/NoirHQ/horizon/"
repository = "https://github.com/noirhq/horizon/"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
3 changes: 2 additions & 1 deletion primitives/crypto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "hp-crypto"
version = "0.1.0"
edition = "2021"
license = "Apache-2.0"
repository = "https://github.com/NoirHQ/horizon/"
repository = "https://github.com/noirhq/horizon/"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand All @@ -19,5 +19,6 @@ default = ["std"]
std = [
"ripemd/std",
"secp256k1/std",
"secp256k1/global-context",
"sp-core/std"
]
2 changes: 1 addition & 1 deletion primitives/crypto/src/secp256k1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub fn secp256k1_ecdsa_verify(sig: &[u8], msg: &[u8], pub_key: &[u8]) -> bool {
Ok(v) => v,
Err(_) => return false,
};
let msg = match Message::from_slice(msg) {
let msg = match Message::from_digest_slice(msg) {
Ok(v) => v,
Err(_) => return false,
};
Expand Down
2 changes: 1 addition & 1 deletion primitives/io/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "hp-io"
version = "0.1.0"
edition = "2021"
license = "Apache-2.0"
repository = "https://github.com/NoirHQ/horizon/"
repository = "https://github.com/noirhq/horizon/"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
2 changes: 1 addition & 1 deletion primitives/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "hp-rpc"
version = "0.1.0"
edition = "2021"
license = "Apache-2.0"
repository = "https://github.com/NoirHQ/horizon/"
repository = "https://github.com/noirhq/horizon/"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
2 changes: 1 addition & 1 deletion primitives/rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#![cfg_attr(not(feature = "std"), no_std)]
#![allow(clippy::too_many_arguments)]
#![deny(unused_crate_dependencies)]
//#![deny(unused_crate_dependencies)]

use sp_runtime::traits::Block as BlockT;

Expand Down
3 changes: 2 additions & 1 deletion template/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "horizon-temaplte-node"
version = "0.0.0"
edition = "2021"
license = "Unlicense"
repository = "https://github.com/NoirHQ/horizon/"
repository = "https://github.com/noirhq/horizon/"
build = "build.rs"

[package.metadata.docs.rs]
Expand All @@ -18,6 +18,7 @@ clap = { workspace = true }
futures = { workspace = true }
hex = { workspace = true }
jsonrpsee = { workspace = true }
serde_json = { workspace = true }

# Substrate FRAME
frame-system-rpc-runtime-api = { workspace = true }
Expand Down
Loading

0 comments on commit 146aa6a

Please sign in to comment.