mirror of
https://github.com/datahaven-xyz/datahaven
synced 2026-05-24 09:50:01 +00:00
chore: ♻️ Remove the StorageHub conditional feature from the DataHav… (#146)
…en runtimes (always include SH)
This commit is contained in:
parent
f0b2de3906
commit
d2bea9278c
17 changed files with 70 additions and 805 deletions
|
|
@ -32,7 +32,7 @@ frame-try-runtime = { workspace = true, optional = true }
|
|||
hex = { workspace = true }
|
||||
hex-literal = { workspace = true }
|
||||
log = { workspace = true }
|
||||
num-bigint = { workspace = true, optional = true }
|
||||
num-bigint = { workspace = true }
|
||||
pallet-authorship = { workspace = true }
|
||||
pallet-babe = { workspace = true }
|
||||
pallet-balances = { workspace = true, features = ["insecure_zero_ed"] }
|
||||
|
|
@ -114,26 +114,26 @@ strum_macros = { workspace = true }
|
|||
|
||||
|
||||
# StorageHub
|
||||
pallet-bucket-nfts = { workspace = true, optional = true }
|
||||
pallet-nfts = { workspace = true, optional = true }
|
||||
pallet-cr-randomness = { workspace = true, optional = true }
|
||||
pallet-file-system = { workspace = true, optional = true }
|
||||
pallet-file-system-runtime-api = { workspace = true, optional = true }
|
||||
pallet-payment-streams = { workspace = true, optional = true }
|
||||
pallet-payment-streams-runtime-api = { workspace = true, optional = true }
|
||||
pallet-proofs-dealer = { workspace = true, optional = true }
|
||||
pallet-proofs-dealer-runtime-api = { workspace = true, optional = true }
|
||||
pallet-randomness = { workspace = true, optional = true }
|
||||
pallet-storage-providers = { workspace = true, optional = true }
|
||||
pallet-storage-providers-runtime-api = { workspace = true, optional = true }
|
||||
shp-constants = { workspace = true, optional = true }
|
||||
shp-file-metadata = { workspace = true, optional = true }
|
||||
shp-traits = { workspace = true, optional = true }
|
||||
shp-treasury-funding = { workspace = true, optional = true }
|
||||
shp-forest-verifier = { workspace = true, optional = true }
|
||||
shp-file-key-verifier = { workspace = true, optional = true }
|
||||
shp-data-price-updater = { workspace = true, optional = true }
|
||||
sp-trie = { workspace = true, optional = true }
|
||||
pallet-bucket-nfts = { workspace = true }
|
||||
pallet-nfts = { workspace = true }
|
||||
pallet-cr-randomness = { workspace = true }
|
||||
pallet-file-system = { workspace = true }
|
||||
pallet-file-system-runtime-api = { workspace = true }
|
||||
pallet-payment-streams = { workspace = true }
|
||||
pallet-payment-streams-runtime-api = { workspace = true }
|
||||
pallet-proofs-dealer = { workspace = true }
|
||||
pallet-proofs-dealer-runtime-api = { workspace = true }
|
||||
pallet-randomness = { workspace = true }
|
||||
pallet-storage-providers = { workspace = true }
|
||||
pallet-storage-providers-runtime-api = { workspace = true }
|
||||
shp-constants = { workspace = true }
|
||||
shp-file-metadata = { workspace = true }
|
||||
shp-traits = { workspace = true }
|
||||
shp-treasury-funding = { workspace = true }
|
||||
shp-forest-verifier = { workspace = true }
|
||||
shp-file-key-verifier = { workspace = true }
|
||||
shp-data-price-updater = { workspace = true }
|
||||
sp-trie = { workspace = true }
|
||||
|
||||
|
||||
[build-dependencies]
|
||||
|
|
@ -152,29 +152,6 @@ snowbridge-pallet-system-v2 = { workspace = true }
|
|||
snowbridge-outbound-queue-primitives = { workspace = true }
|
||||
|
||||
[features]
|
||||
storage-hub = [
|
||||
"dep:num-bigint",
|
||||
"dep:pallet-bucket-nfts",
|
||||
"dep:pallet-nfts",
|
||||
"dep:pallet-cr-randomness",
|
||||
"dep:pallet-file-system",
|
||||
"dep:pallet-file-system-runtime-api",
|
||||
"dep:pallet-payment-streams",
|
||||
"dep:pallet-payment-streams-runtime-api",
|
||||
"dep:pallet-proofs-dealer",
|
||||
"dep:pallet-proofs-dealer-runtime-api",
|
||||
"dep:pallet-randomness",
|
||||
"dep:pallet-storage-providers",
|
||||
"dep:pallet-storage-providers-runtime-api",
|
||||
"dep:shp-constants",
|
||||
"dep:shp-file-metadata",
|
||||
"dep:shp-traits",
|
||||
"dep:shp-treasury-funding",
|
||||
"dep:shp-forest-verifier",
|
||||
"dep:shp-file-key-verifier",
|
||||
"dep:shp-data-price-updater",
|
||||
"dep:sp-trie"
|
||||
]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"codec/std",
|
||||
|
|
@ -260,8 +237,6 @@ std = [
|
|||
"pallet-datahaven-native-transfer/std",
|
||||
|
||||
# StorageHub
|
||||
"pallet-authorship/std",
|
||||
"pallet-balances/std",
|
||||
"pallet-bucket-nfts/std",
|
||||
"pallet-nfts/std",
|
||||
"pallet-cr-randomness/std",
|
||||
|
|
@ -272,13 +247,8 @@ std = [
|
|||
"pallet-proofs-dealer/std",
|
||||
"pallet-proofs-dealer-runtime-api/std",
|
||||
"pallet-randomness/std",
|
||||
"pallet-session/std",
|
||||
"pallet-storage-providers/std",
|
||||
"pallet-storage-providers-runtime-api/std",
|
||||
"pallet-sudo/std",
|
||||
"pallet-timestamp/std",
|
||||
"pallet-transaction-payment-rpc-runtime-api/std",
|
||||
"pallet-transaction-payment/std",
|
||||
"shp-constants/std",
|
||||
"shp-file-metadata/std",
|
||||
"shp-forest-verifier/std",
|
||||
|
|
|
|||
|
|
@ -22,11 +22,10 @@
|
|||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// For more information, please refer to <http://unlicense.org>
|
||||
#[cfg(feature = "storage-hub")]
|
||||
mod storagehub;
|
||||
|
||||
pub mod governance;
|
||||
pub mod runtime_params;
|
||||
mod storagehub;
|
||||
|
||||
use super::{
|
||||
currency::*, AccountId, Babe, Balance, Balances, BeefyMmrLeaf, Block, BlockNumber,
|
||||
|
|
|
|||
|
|
@ -5,62 +5,10 @@ use sp_core::{ConstU32, H160, H256};
|
|||
use sp_runtime::{BoundedVec, Perbill};
|
||||
use sp_std::vec;
|
||||
|
||||
#[cfg(feature = "storage-hub")]
|
||||
use crate::currency::{GIGAWEI, HAVE};
|
||||
|
||||
#[cfg(feature = "storage-hub")]
|
||||
use crate::configs::storagehub::{ChallengeTicksTolerance, ReplicationTargetType, SpMinDeposit};
|
||||
|
||||
#[cfg(feature = "storage-hub")]
|
||||
use crate::currency::{GIGAWEI, HAVE};
|
||||
use datahaven_runtime_common::{Balance, BlockNumber};
|
||||
|
||||
#[cfg(not(feature = "storage-hub"))]
|
||||
#[dynamic_params(RuntimeParameters, pallet_parameters::Parameters::<Runtime>)]
|
||||
pub mod dynamic_params {
|
||||
use super::*;
|
||||
#[dynamic_pallet_params]
|
||||
#[codec(index = 0)]
|
||||
pub mod runtime_config {
|
||||
|
||||
use super::*;
|
||||
|
||||
#[codec(index = 0)]
|
||||
#[allow(non_upper_case_globals)]
|
||||
/// Set the initial address of the Snowbridge Gateway contract on Ethereum.
|
||||
/// The fact that this is a parameter means that we can set it initially to the zero address,
|
||||
/// and then change it later via governance, to the actual address of the deployed contract.
|
||||
pub static EthereumGatewayAddress: H160 = H160::repeat_byte(0x0);
|
||||
|
||||
#[codec(index = 1)]
|
||||
#[allow(non_upper_case_globals)]
|
||||
/// Set the initial address of the Rewards Registry contract on Ethereum.
|
||||
/// The fact that this is a parameter means that we can set it initially to the zero address,
|
||||
/// and then change it later via governance, to the actual address of the deployed contract.
|
||||
pub static RewardsRegistryAddress: H160 = H160::repeat_byte(0x0);
|
||||
|
||||
#[codec(index = 2)]
|
||||
#[allow(non_upper_case_globals)]
|
||||
/// The Selector is the first 4 bytes of the keccak256 hash of the function signature("updateRewardsMerkleRoot(bytes32)")
|
||||
pub static RewardsUpdateSelector: BoundedVec<u8, ConstU32<4>> =
|
||||
BoundedVec::truncate_from(vec![0xdc, 0x3d, 0x04, 0xec]);
|
||||
|
||||
#[codec(index = 3)]
|
||||
#[allow(non_upper_case_globals)]
|
||||
/// The RewardsAgentOrigin is the hash of the string "external_validators_rewards"
|
||||
/// TODO: Decide which agent origin we want to use. Currently for testing it's the zero hash
|
||||
pub static RewardsAgentOrigin: H256 = H256::from_slice(&hex!(
|
||||
"c505dfb2df107d106d08bd0f1a0acd10052ca9aa078629a4ccfd0c90c6e69b65"
|
||||
));
|
||||
|
||||
// Proportion of fees allocated to the Treasury (remainder are burned).
|
||||
// e.g. 20% to the treasury, 80% burned.
|
||||
#[codec(index = 4)]
|
||||
#[allow(non_upper_case_globals)]
|
||||
pub static FeesTreasuryProportion: Perbill = Perbill::from_percent(20);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "storage-hub")]
|
||||
#[dynamic_params(RuntimeParameters, pallet_parameters::Parameters::<Runtime>)]
|
||||
pub mod dynamic_params {
|
||||
use super::*;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ use frame_support::{
|
|||
weights::Weight,
|
||||
};
|
||||
use frame_system::pallet_prelude::BlockNumberFor;
|
||||
use frame_system::EnsureRoot;
|
||||
use frame_system::EnsureSigned;
|
||||
use num_bigint::BigUint;
|
||||
use pallet_nfts::PalletFeatures;
|
||||
|
|
|
|||
|
|
@ -266,7 +266,6 @@ impl WeightToFeePolynomial for WeightToFee {
|
|||
|
||||
// Create the runtime by composing the FRAME pallets that were previously configured.
|
||||
#[frame_support::runtime]
|
||||
#[cfg(not(feature = "storage-hub"))]
|
||||
mod runtime {
|
||||
#[runtime::runtime]
|
||||
#[runtime::derive(
|
||||
|
|
@ -420,159 +419,6 @@ mod runtime {
|
|||
pub type MessageQueue = pallet_message_queue;
|
||||
// ╚════════════ Polkadot SDK Utility Pallets - Block 2 ═════════════╝
|
||||
|
||||
// ╔══════════════════════ StorageHub Pallets ═══════════════════════╗
|
||||
// Start with index 80
|
||||
// ╚══════════════════════ StorageHub Pallets ═══════════════════════╝
|
||||
|
||||
// ╔═══════════════════ DataHaven-specific Pallets ══════════════════╗
|
||||
// Start with index 100
|
||||
#[runtime::pallet_index(100)]
|
||||
pub type OutboundCommitmentStore = pallet_outbound_commitment_store;
|
||||
|
||||
#[runtime::pallet_index(101)]
|
||||
pub type ExternalValidatorsRewards = pallet_external_validators_rewards;
|
||||
|
||||
#[runtime::pallet_index(102)]
|
||||
pub type DataHavenNativeTransfer = pallet_datahaven_native_transfer;
|
||||
|
||||
// ╚═══════════════════ DataHaven-specific Pallets ══════════════════╝
|
||||
}
|
||||
|
||||
#[frame_support::runtime]
|
||||
#[cfg(feature = "storage-hub")]
|
||||
mod runtime {
|
||||
#[runtime::runtime]
|
||||
#[runtime::derive(
|
||||
RuntimeCall,
|
||||
RuntimeEvent,
|
||||
RuntimeError,
|
||||
RuntimeOrigin,
|
||||
RuntimeFreezeReason,
|
||||
RuntimeHoldReason,
|
||||
RuntimeSlashReason,
|
||||
RuntimeLockId,
|
||||
RuntimeTask
|
||||
)]
|
||||
pub struct Runtime;
|
||||
|
||||
// ╔══════════════════ System and Consensus Pallets ═════════════════╗
|
||||
#[runtime::pallet_index(0)]
|
||||
pub type System = frame_system;
|
||||
|
||||
// Babe must be before session.
|
||||
#[runtime::pallet_index(1)]
|
||||
pub type Babe = pallet_babe;
|
||||
|
||||
#[runtime::pallet_index(2)]
|
||||
pub type Timestamp = pallet_timestamp;
|
||||
|
||||
#[runtime::pallet_index(3)]
|
||||
pub type Balances = pallet_balances;
|
||||
|
||||
// Consensus support.
|
||||
// Authorship must be before session in order to note author in the correct session and era.
|
||||
#[runtime::pallet_index(4)]
|
||||
pub type Authorship = pallet_authorship;
|
||||
|
||||
#[runtime::pallet_index(5)]
|
||||
pub type Offences = pallet_offences;
|
||||
|
||||
#[runtime::pallet_index(6)]
|
||||
pub type Historical = pallet_session::historical;
|
||||
|
||||
// External Validators must be before Session.
|
||||
#[runtime::pallet_index(7)]
|
||||
pub type ExternalValidators = pallet_external_validators;
|
||||
|
||||
#[runtime::pallet_index(8)]
|
||||
pub type Session = pallet_session;
|
||||
|
||||
#[runtime::pallet_index(9)]
|
||||
pub type ImOnline = pallet_im_online;
|
||||
|
||||
#[runtime::pallet_index(10)]
|
||||
pub type Grandpa = pallet_grandpa;
|
||||
|
||||
#[runtime::pallet_index(11)]
|
||||
pub type TransactionPayment = pallet_transaction_payment;
|
||||
|
||||
#[runtime::pallet_index(12)]
|
||||
pub type Beefy = pallet_beefy;
|
||||
|
||||
#[runtime::pallet_index(13)]
|
||||
pub type Mmr = pallet_mmr;
|
||||
|
||||
#[runtime::pallet_index(14)]
|
||||
pub type BeefyMmrLeaf = pallet_beefy_mmr;
|
||||
// ╚═════════════════ System and Consensus Pallets ══════════════════╝
|
||||
|
||||
// ╔═════════════════ Polkadot SDK Utility Pallets ══════════════════╗
|
||||
#[runtime::pallet_index(30)]
|
||||
pub type Utility = pallet_utility;
|
||||
|
||||
#[runtime::pallet_index(31)]
|
||||
pub type Scheduler = pallet_scheduler;
|
||||
|
||||
#[runtime::pallet_index(32)]
|
||||
pub type Preimage = pallet_preimage;
|
||||
|
||||
#[runtime::pallet_index(33)]
|
||||
pub type Identity = pallet_identity;
|
||||
|
||||
#[runtime::pallet_index(34)]
|
||||
pub type Multisig = pallet_multisig;
|
||||
|
||||
#[runtime::pallet_index(35)]
|
||||
pub type Parameters = pallet_parameters;
|
||||
|
||||
#[runtime::pallet_index(36)]
|
||||
pub type Sudo = pallet_sudo;
|
||||
|
||||
#[runtime::pallet_index(37)]
|
||||
pub type Treasury = pallet_treasury;
|
||||
|
||||
#[runtime::pallet_index(38)]
|
||||
pub type Proxy = pallet_proxy;
|
||||
// ╚═════════════════ Polkadot SDK Utility Pallets ══════════════════╝
|
||||
|
||||
// ╔════════════════════ Frontier (EVM) Pallets ═════════════════════╗
|
||||
#[runtime::pallet_index(50)]
|
||||
pub type Ethereum = pallet_ethereum;
|
||||
|
||||
#[runtime::pallet_index(51)]
|
||||
pub type Evm = pallet_evm;
|
||||
|
||||
#[runtime::pallet_index(52)]
|
||||
pub type EvmChainId = pallet_evm_chain_id;
|
||||
// ╚════════════════════ Frontier (EVM) Pallets ═════════════════════╝
|
||||
|
||||
// ╔══════════════════════ Snowbridge Pallets ═══════════════════════╗
|
||||
#[runtime::pallet_index(60)]
|
||||
pub type EthereumBeaconClient = snowbridge_pallet_ethereum_client;
|
||||
|
||||
#[runtime::pallet_index(61)]
|
||||
pub type EthereumInboundQueueV2 = snowbridge_pallet_inbound_queue_v2;
|
||||
|
||||
#[runtime::pallet_index(62)]
|
||||
pub type EthereumOutboundQueueV2 = snowbridge_pallet_outbound_queue_v2;
|
||||
|
||||
#[runtime::pallet_index(63)]
|
||||
pub type SnowbridgeSystem = snowbridge_pallet_system;
|
||||
|
||||
#[runtime::pallet_index(64)]
|
||||
pub type SnowbridgeSystemV2 = snowbridge_pallet_system_v2;
|
||||
// ╚══════════════════════ Snowbridge Pallets ═══════════════════════╝
|
||||
|
||||
// ╔════════════ Polkadot SDK Utility Pallets - Block 2 ═════════════╗
|
||||
// The Message Queue pallet has to be after the Snowbridge Outbound
|
||||
// Queue V2 pallet since the former processes messages in its
|
||||
// `on_initialize` hook and the latter clears up messages in
|
||||
// its `on_initialize` hook, so otherwise messages will be cleared
|
||||
// up before they are processed.
|
||||
#[runtime::pallet_index(70)]
|
||||
pub type MessageQueue = pallet_message_queue;
|
||||
// ╚════════════ Polkadot SDK Utility Pallets - Block 2 ═════════════╝
|
||||
|
||||
// ╔══════════════════════ StorageHub Pallets ═══════════════════════╗
|
||||
// Start with index 80
|
||||
#[runtime::pallet_index(80)]
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ frame-try-runtime = { workspace = true, optional = true }
|
|||
hex = { workspace = true }
|
||||
hex-literal = { workspace = true }
|
||||
log = { workspace = true }
|
||||
num-bigint = { workspace = true, optional = true }
|
||||
num-bigint = { workspace = true }
|
||||
pallet-authorship = { workspace = true }
|
||||
pallet-babe = { workspace = true }
|
||||
pallet-balances = { workspace = true, features = ["insecure_zero_ed"]}
|
||||
|
|
@ -113,26 +113,26 @@ xcm-builder = { workspace = true }
|
|||
xcm-executor = { workspace = true }
|
||||
|
||||
# StorageHub
|
||||
pallet-bucket-nfts = { workspace = true, optional = true }
|
||||
pallet-nfts = { workspace = true, optional = true }
|
||||
pallet-cr-randomness = { workspace = true, optional = true }
|
||||
pallet-file-system = { workspace = true, optional = true }
|
||||
pallet-file-system-runtime-api = { workspace = true, optional = true }
|
||||
pallet-payment-streams = { workspace = true, optional = true }
|
||||
pallet-payment-streams-runtime-api = { workspace = true, optional = true }
|
||||
pallet-proofs-dealer = { workspace = true, optional = true }
|
||||
pallet-proofs-dealer-runtime-api = { workspace = true, optional = true }
|
||||
pallet-randomness = { workspace = true, optional = true }
|
||||
pallet-storage-providers = { workspace = true, optional = true }
|
||||
pallet-storage-providers-runtime-api = { workspace = true, optional = true }
|
||||
shp-constants = { workspace = true, optional = true }
|
||||
shp-file-metadata = { workspace = true, optional = true }
|
||||
shp-traits = { workspace = true, optional = true }
|
||||
shp-treasury-funding = { workspace = true, optional = true }
|
||||
shp-forest-verifier = { workspace = true, optional = true }
|
||||
shp-file-key-verifier = { workspace = true, optional = true }
|
||||
shp-data-price-updater = { workspace = true, optional = true }
|
||||
sp-trie = { workspace = true, optional = true }
|
||||
pallet-bucket-nfts = { workspace = true }
|
||||
pallet-nfts = { workspace = true }
|
||||
pallet-cr-randomness = { workspace = true }
|
||||
pallet-file-system = { workspace = true }
|
||||
pallet-file-system-runtime-api = { workspace = true }
|
||||
pallet-payment-streams = { workspace = true }
|
||||
pallet-payment-streams-runtime-api = { workspace = true }
|
||||
pallet-proofs-dealer = { workspace = true }
|
||||
pallet-proofs-dealer-runtime-api = { workspace = true }
|
||||
pallet-randomness = { workspace = true }
|
||||
pallet-storage-providers = { workspace = true }
|
||||
pallet-storage-providers-runtime-api = { workspace = true }
|
||||
shp-constants = { workspace = true }
|
||||
shp-file-metadata = { workspace = true }
|
||||
shp-traits = { workspace = true }
|
||||
shp-treasury-funding = { workspace = true }
|
||||
shp-forest-verifier = { workspace = true }
|
||||
shp-file-key-verifier = { workspace = true }
|
||||
shp-data-price-updater = { workspace = true }
|
||||
sp-trie = { workspace = true }
|
||||
|
||||
[build-dependencies]
|
||||
substrate-wasm-builder = { workspace = true, optional = true, default-features = true }
|
||||
|
|
@ -150,29 +150,6 @@ snowbridge-pallet-system-v2 = { workspace = true }
|
|||
snowbridge-outbound-queue-primitives = { workspace = true }
|
||||
|
||||
[features]
|
||||
storage-hub = [
|
||||
"dep:num-bigint",
|
||||
"dep:pallet-bucket-nfts",
|
||||
"dep:pallet-nfts",
|
||||
"dep:pallet-cr-randomness",
|
||||
"dep:pallet-file-system",
|
||||
"dep:pallet-file-system-runtime-api",
|
||||
"dep:pallet-payment-streams",
|
||||
"dep:pallet-payment-streams-runtime-api",
|
||||
"dep:pallet-proofs-dealer",
|
||||
"dep:pallet-proofs-dealer-runtime-api",
|
||||
"dep:pallet-randomness",
|
||||
"dep:pallet-storage-providers",
|
||||
"dep:pallet-storage-providers-runtime-api",
|
||||
"dep:shp-constants",
|
||||
"dep:shp-file-metadata",
|
||||
"dep:shp-traits",
|
||||
"dep:shp-treasury-funding",
|
||||
"dep:shp-forest-verifier",
|
||||
"dep:shp-file-key-verifier",
|
||||
"dep:shp-data-price-updater",
|
||||
"dep:sp-trie"
|
||||
]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"codec/std",
|
||||
|
|
@ -258,8 +235,6 @@ std = [
|
|||
"pallet-datahaven-native-transfer/std",
|
||||
|
||||
# StorageHub
|
||||
"pallet-authorship/std",
|
||||
"pallet-balances/std",
|
||||
"pallet-bucket-nfts/std",
|
||||
"pallet-nfts/std",
|
||||
"pallet-cr-randomness/std",
|
||||
|
|
@ -270,13 +245,8 @@ std = [
|
|||
"pallet-proofs-dealer/std",
|
||||
"pallet-proofs-dealer-runtime-api/std",
|
||||
"pallet-randomness/std",
|
||||
"pallet-session/std",
|
||||
"pallet-storage-providers/std",
|
||||
"pallet-storage-providers-runtime-api/std",
|
||||
"pallet-sudo/std",
|
||||
"pallet-timestamp/std",
|
||||
"pallet-transaction-payment-rpc-runtime-api/std",
|
||||
"pallet-transaction-payment/std",
|
||||
"shp-constants/std",
|
||||
"shp-file-metadata/std",
|
||||
"shp-forest-verifier/std",
|
||||
|
|
|
|||
|
|
@ -23,11 +23,9 @@
|
|||
//
|
||||
// For more information, please refer to <http://unlicense.org>
|
||||
|
||||
#[cfg(feature = "storage-hub")]
|
||||
mod storagehub;
|
||||
|
||||
pub mod governance;
|
||||
pub mod runtime_params;
|
||||
mod storagehub;
|
||||
|
||||
use super::{
|
||||
currency::*, AccountId, Babe, Balance, Balances, BeefyMmrLeaf, Block, BlockNumber,
|
||||
|
|
|
|||
|
|
@ -5,16 +5,10 @@ use sp_core::{ConstU32, H160, H256};
|
|||
use sp_runtime::{BoundedVec, Perbill};
|
||||
use sp_std::vec;
|
||||
|
||||
#[cfg(feature = "storage-hub")]
|
||||
use crate::currency::{GIGAWEI, HAVE};
|
||||
|
||||
#[cfg(feature = "storage-hub")]
|
||||
use crate::configs::storagehub::{ChallengeTicksTolerance, ReplicationTargetType, SpMinDeposit};
|
||||
|
||||
#[cfg(feature = "storage-hub")]
|
||||
use crate::currency::{GIGAWEI, HAVE};
|
||||
use datahaven_runtime_common::{Balance, BlockNumber};
|
||||
|
||||
#[cfg(not(feature = "storage-hub"))]
|
||||
#[dynamic_params(RuntimeParameters, pallet_parameters::Parameters::<Runtime>)]
|
||||
pub mod dynamic_params {
|
||||
use super::*;
|
||||
|
|
@ -61,52 +55,6 @@ pub mod dynamic_params {
|
|||
#[codec(index = 4)]
|
||||
#[allow(non_upper_case_globals)]
|
||||
pub static FeesTreasuryProportion: Perbill = Perbill::from_percent(20);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "storage-hub")]
|
||||
#[dynamic_params(RuntimeParameters, pallet_parameters::Parameters::<Runtime>)]
|
||||
pub mod dynamic_params {
|
||||
use super::*;
|
||||
#[dynamic_pallet_params]
|
||||
#[codec(index = 0)]
|
||||
pub mod runtime_config {
|
||||
|
||||
use super::*;
|
||||
|
||||
#[codec(index = 0)]
|
||||
#[allow(non_upper_case_globals)]
|
||||
/// Set the initial address of the Snowbridge Gateway contract on Ethereum.
|
||||
/// The fact that this is a parameter means that we can set it initially to the zero address,
|
||||
/// and then change it later via governance, to the actual address of the deployed contract.
|
||||
pub static EthereumGatewayAddress: H160 = H160::repeat_byte(0x0);
|
||||
|
||||
#[codec(index = 1)]
|
||||
#[allow(non_upper_case_globals)]
|
||||
/// Set the initial address of the Rewards Registry contract on Ethereum.
|
||||
/// The fact that this is a parameter means that we can set it initially to the zero address,
|
||||
/// and then change it later via governance, to the actual address of the deployed contract.
|
||||
pub static RewardsRegistryAddress: H160 = H160::repeat_byte(0x0);
|
||||
|
||||
#[codec(index = 2)]
|
||||
#[allow(non_upper_case_globals)]
|
||||
/// The Selector is the first 4 bytes of the keccak256 hash of the function signature("updateRewardsMerkleRoot(bytes32)")
|
||||
pub static RewardsUpdateSelector: BoundedVec<u8, ConstU32<4>> =
|
||||
BoundedVec::truncate_from(vec![0xdc, 0x3d, 0x04, 0xec]);
|
||||
|
||||
#[codec(index = 3)]
|
||||
#[allow(non_upper_case_globals)]
|
||||
/// The RewardsAgentOrigin is the hash of the string "external_validators_rewards"
|
||||
/// TODO: Decide which agent origin we want to use. Currently for testing it's the zero hash
|
||||
pub static RewardsAgentOrigin: H256 = H256::from_slice(&hex!(
|
||||
"c505dfb2df107d106d08bd0f1a0acd10052ca9aa078629a4ccfd0c90c6e69b65"
|
||||
));
|
||||
|
||||
// Proportion of fees allocated to the Treasury (remainder are burned).
|
||||
// e.g. 20% to the treasury, 80% burned.
|
||||
#[codec(index = 4)]
|
||||
#[allow(non_upper_case_globals)]
|
||||
pub static FeesTreasuryProportion: Perbill = Perbill::from_percent(20);
|
||||
|
||||
// ╔══════════════════════ StorageHub Pallets ═══════════════════════╗
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ use frame_support::{
|
|||
weights::Weight,
|
||||
};
|
||||
use frame_system::pallet_prelude::BlockNumberFor;
|
||||
use frame_system::EnsureRoot;
|
||||
use frame_system::EnsureSigned;
|
||||
use num_bigint::BigUint;
|
||||
use pallet_nfts::PalletFeatures;
|
||||
|
|
|
|||
|
|
@ -268,7 +268,6 @@ impl WeightToFeePolynomial for WeightToFee {
|
|||
|
||||
// Create the runtime by composing the FRAME pallets that were previously configured.
|
||||
#[frame_support::runtime]
|
||||
#[cfg(not(feature = "storage-hub"))]
|
||||
mod runtime {
|
||||
#[runtime::runtime]
|
||||
#[runtime::derive(
|
||||
|
|
@ -422,179 +421,6 @@ mod runtime {
|
|||
pub type MessageQueue = pallet_message_queue;
|
||||
// ╚════════════ Polkadot SDK Utility Pallets - Block 2 ═════════════╝
|
||||
|
||||
// ╔══════════════════════ StorageHub Pallets ═══════════════════════╗
|
||||
// Start with index 80
|
||||
// #[runtime::pallet_index(80)]
|
||||
// pub type Providers = pallet_storage_providers;
|
||||
|
||||
// #[runtime::pallet_index(81)]
|
||||
// pub type FileSystem = pallet_file_system;
|
||||
|
||||
// #[runtime::pallet_index(82)]
|
||||
// pub type ProofsDealer = pallet_proofs_dealer;
|
||||
|
||||
// #[runtime::pallet_index(83)]
|
||||
// pub type Randomness = pallet_randomness;
|
||||
|
||||
// #[runtime::pallet_index(84)]
|
||||
// pub type PaymentStreams = pallet_payment_streams;
|
||||
|
||||
// #[runtime::pallet_index(85)]
|
||||
// pub type BucketNfts = pallet_bucket_nfts;
|
||||
|
||||
// #[runtime::pallet_index(90)]
|
||||
// pub type Nfts = pallet_nfts;
|
||||
// ╚══════════════════════ StorageHub Pallets ═══════════════════════╝
|
||||
|
||||
// ╔═══════════════════ DataHaven-specific Pallets ══════════════════╗
|
||||
// Start with index 100
|
||||
#[runtime::pallet_index(100)]
|
||||
pub type OutboundCommitmentStore = pallet_outbound_commitment_store;
|
||||
|
||||
#[runtime::pallet_index(101)]
|
||||
pub type ExternalValidatorsRewards = pallet_external_validators_rewards;
|
||||
|
||||
#[runtime::pallet_index(102)]
|
||||
pub type DataHavenNativeTransfer = pallet_datahaven_native_transfer;
|
||||
// ╚═══════════════════ DataHaven-specific Pallets ══════════════════╝
|
||||
}
|
||||
|
||||
// Create the runtime by composing the FRAME pallets that were previously configured.
|
||||
#[frame_support::runtime]
|
||||
#[cfg(feature = "storage-hub")]
|
||||
mod runtime {
|
||||
#[runtime::runtime]
|
||||
#[runtime::derive(
|
||||
RuntimeCall,
|
||||
RuntimeEvent,
|
||||
RuntimeError,
|
||||
RuntimeOrigin,
|
||||
RuntimeFreezeReason,
|
||||
RuntimeHoldReason,
|
||||
RuntimeSlashReason,
|
||||
RuntimeLockId,
|
||||
RuntimeTask
|
||||
)]
|
||||
pub struct Runtime;
|
||||
|
||||
// ╔══════════════════ System and Consensus Pallets ═════════════════╗
|
||||
#[runtime::pallet_index(0)]
|
||||
pub type System = frame_system;
|
||||
|
||||
// Babe must be before session.
|
||||
#[runtime::pallet_index(1)]
|
||||
pub type Babe = pallet_babe;
|
||||
|
||||
#[runtime::pallet_index(2)]
|
||||
pub type Timestamp = pallet_timestamp;
|
||||
|
||||
#[runtime::pallet_index(3)]
|
||||
pub type Balances = pallet_balances;
|
||||
|
||||
// Consensus support.
|
||||
// Authorship must be before session in order to note author in the correct session and era.
|
||||
#[runtime::pallet_index(4)]
|
||||
pub type Authorship = pallet_authorship;
|
||||
|
||||
#[runtime::pallet_index(5)]
|
||||
pub type Offences = pallet_offences;
|
||||
|
||||
#[runtime::pallet_index(6)]
|
||||
pub type Historical = pallet_session::historical;
|
||||
|
||||
// External Validators must be before Session.
|
||||
#[runtime::pallet_index(7)]
|
||||
pub type ExternalValidators = pallet_external_validators;
|
||||
|
||||
#[runtime::pallet_index(8)]
|
||||
pub type Session = pallet_session;
|
||||
|
||||
#[runtime::pallet_index(9)]
|
||||
pub type ImOnline = pallet_im_online;
|
||||
|
||||
#[runtime::pallet_index(10)]
|
||||
pub type Grandpa = pallet_grandpa;
|
||||
|
||||
#[runtime::pallet_index(11)]
|
||||
pub type TransactionPayment = pallet_transaction_payment;
|
||||
|
||||
#[runtime::pallet_index(12)]
|
||||
pub type Beefy = pallet_beefy;
|
||||
|
||||
#[runtime::pallet_index(13)]
|
||||
pub type Mmr = pallet_mmr;
|
||||
|
||||
#[runtime::pallet_index(14)]
|
||||
pub type BeefyMmrLeaf = pallet_beefy_mmr;
|
||||
// ╚═════════════════ System and Consensus Pallets ══════════════════╝
|
||||
|
||||
// ╔═════════════════ Polkadot SDK Utility Pallets ══════════════════╗
|
||||
#[runtime::pallet_index(30)]
|
||||
pub type Utility = pallet_utility;
|
||||
|
||||
#[runtime::pallet_index(31)]
|
||||
pub type Scheduler = pallet_scheduler;
|
||||
|
||||
#[runtime::pallet_index(32)]
|
||||
pub type Preimage = pallet_preimage;
|
||||
|
||||
#[runtime::pallet_index(33)]
|
||||
pub type Identity = pallet_identity;
|
||||
|
||||
#[runtime::pallet_index(34)]
|
||||
pub type Multisig = pallet_multisig;
|
||||
|
||||
#[runtime::pallet_index(35)]
|
||||
pub type Parameters = pallet_parameters;
|
||||
|
||||
#[runtime::pallet_index(36)]
|
||||
pub type Sudo = pallet_sudo;
|
||||
|
||||
#[runtime::pallet_index(37)]
|
||||
pub type Treasury = pallet_treasury;
|
||||
|
||||
#[runtime::pallet_index(38)]
|
||||
pub type Proxy = pallet_proxy;
|
||||
// ╚═════════════════ Polkadot SDK Utility Pallets ══════════════════╝
|
||||
|
||||
// ╔════════════════════ Frontier (EVM) Pallets ═════════════════════╗
|
||||
#[runtime::pallet_index(50)]
|
||||
pub type Ethereum = pallet_ethereum;
|
||||
|
||||
#[runtime::pallet_index(51)]
|
||||
pub type Evm = pallet_evm;
|
||||
|
||||
#[runtime::pallet_index(52)]
|
||||
pub type EvmChainId = pallet_evm_chain_id;
|
||||
// ╚════════════════════ Frontier (EVM) Pallets ═════════════════════╝
|
||||
|
||||
// ╔══════════════════════ Snowbridge Pallets ═══════════════════════╗
|
||||
#[runtime::pallet_index(60)]
|
||||
pub type EthereumBeaconClient = snowbridge_pallet_ethereum_client;
|
||||
|
||||
#[runtime::pallet_index(61)]
|
||||
pub type EthereumInboundQueueV2 = snowbridge_pallet_inbound_queue_v2;
|
||||
|
||||
#[runtime::pallet_index(62)]
|
||||
pub type EthereumOutboundQueueV2 = snowbridge_pallet_outbound_queue_v2;
|
||||
|
||||
#[runtime::pallet_index(63)]
|
||||
pub type SnowbridgeSystem = snowbridge_pallet_system;
|
||||
|
||||
#[runtime::pallet_index(64)]
|
||||
pub type SnowbridgeSystemV2 = snowbridge_pallet_system_v2;
|
||||
// ╚══════════════════════ Snowbridge Pallets ═══════════════════════╝
|
||||
|
||||
// ╔════════════ Polkadot SDK Utility Pallets - Block 2 ═════════════╗
|
||||
// The Message Queue pallet has to be after the Snowbridge Outbound
|
||||
// Queue V2 pallet since the former processes messages in its
|
||||
// `on_initialize` hook and the latter clears up messages in
|
||||
// its `on_initialize` hook, so otherwise messages will be cleared
|
||||
// up before they are processed.
|
||||
#[runtime::pallet_index(70)]
|
||||
pub type MessageQueue = pallet_message_queue;
|
||||
// ╚════════════ Polkadot SDK Utility Pallets - Block 2 ═════════════╝
|
||||
|
||||
// ╔══════════════════════ StorageHub Pallets ═══════════════════════╗
|
||||
// Start with index 80
|
||||
#[runtime::pallet_index(80)]
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ frame-try-runtime = { workspace = true, optional = true }
|
|||
hex = { workspace = true }
|
||||
hex-literal = { workspace = true }
|
||||
log = { workspace = true }
|
||||
num-bigint = { workspace = true, optional = true }
|
||||
num-bigint = { workspace = true }
|
||||
pallet-authorship = { workspace = true }
|
||||
pallet-babe = { workspace = true }
|
||||
pallet-balances = { workspace = true, features = ["insecure_zero_ed"] }
|
||||
|
|
@ -113,26 +113,26 @@ strum = { workspace = true }
|
|||
strum_macros = { workspace = true }
|
||||
|
||||
# StorageHub
|
||||
pallet-bucket-nfts = { workspace = true, optional = true }
|
||||
pallet-nfts = { workspace = true, optional = true }
|
||||
pallet-cr-randomness = { workspace = true, optional = true }
|
||||
pallet-file-system = { workspace = true, optional = true }
|
||||
pallet-file-system-runtime-api = { workspace = true, optional = true }
|
||||
pallet-payment-streams = { workspace = true, optional = true }
|
||||
pallet-payment-streams-runtime-api = { workspace = true, optional = true }
|
||||
pallet-proofs-dealer = { workspace = true, optional = true }
|
||||
pallet-proofs-dealer-runtime-api = { workspace = true, optional = true }
|
||||
pallet-randomness = { workspace = true, optional = true }
|
||||
pallet-storage-providers = { workspace = true, optional = true }
|
||||
pallet-storage-providers-runtime-api = { workspace = true, optional = true }
|
||||
shp-constants = { workspace = true, optional = true }
|
||||
shp-file-metadata = { workspace = true, optional = true }
|
||||
shp-traits = { workspace = true, optional = true }
|
||||
shp-treasury-funding = { workspace = true, optional = true }
|
||||
shp-forest-verifier = { workspace = true, optional = true }
|
||||
shp-file-key-verifier = { workspace = true, optional = true }
|
||||
shp-data-price-updater = { workspace = true, optional = true }
|
||||
sp-trie = { workspace = true, optional = true }
|
||||
pallet-bucket-nfts = { workspace = true }
|
||||
pallet-nfts = { workspace = true }
|
||||
pallet-cr-randomness = { workspace = true }
|
||||
pallet-file-system = { workspace = true }
|
||||
pallet-file-system-runtime-api = { workspace = true }
|
||||
pallet-payment-streams = { workspace = true }
|
||||
pallet-payment-streams-runtime-api = { workspace = true }
|
||||
pallet-proofs-dealer = { workspace = true }
|
||||
pallet-proofs-dealer-runtime-api = { workspace = true }
|
||||
pallet-randomness = { workspace = true }
|
||||
pallet-storage-providers = { workspace = true }
|
||||
pallet-storage-providers-runtime-api = { workspace = true }
|
||||
shp-constants = { workspace = true }
|
||||
shp-file-metadata = { workspace = true }
|
||||
shp-traits = { workspace = true }
|
||||
shp-treasury-funding = { workspace = true }
|
||||
shp-forest-verifier = { workspace = true }
|
||||
shp-file-key-verifier = { workspace = true }
|
||||
shp-data-price-updater = { workspace = true }
|
||||
sp-trie = { workspace = true }
|
||||
|
||||
[build-dependencies]
|
||||
substrate-wasm-builder = { workspace = true, optional = true, default-features = true }
|
||||
|
|
@ -150,29 +150,6 @@ snowbridge-pallet-system = { workspace = true }
|
|||
snowbridge-pallet-system-v2 = { workspace = true }
|
||||
|
||||
[features]
|
||||
storage-hub = [
|
||||
"dep:num-bigint",
|
||||
"dep:pallet-bucket-nfts",
|
||||
"dep:pallet-nfts",
|
||||
"dep:pallet-cr-randomness",
|
||||
"dep:pallet-file-system",
|
||||
"dep:pallet-file-system-runtime-api",
|
||||
"dep:pallet-payment-streams",
|
||||
"dep:pallet-payment-streams-runtime-api",
|
||||
"dep:pallet-proofs-dealer",
|
||||
"dep:pallet-proofs-dealer-runtime-api",
|
||||
"dep:pallet-randomness",
|
||||
"dep:pallet-storage-providers",
|
||||
"dep:pallet-storage-providers-runtime-api",
|
||||
"dep:shp-constants",
|
||||
"dep:shp-file-metadata",
|
||||
"dep:shp-traits",
|
||||
"dep:shp-treasury-funding",
|
||||
"dep:shp-forest-verifier",
|
||||
"dep:shp-file-key-verifier",
|
||||
"dep:shp-data-price-updater",
|
||||
"dep:sp-trie"
|
||||
]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"codec/std",
|
||||
|
|
@ -258,8 +235,6 @@ std = [
|
|||
"pallet-datahaven-native-transfer/std",
|
||||
|
||||
# StorageHub
|
||||
"pallet-authorship/std",
|
||||
"pallet-balances/std",
|
||||
"pallet-bucket-nfts/std",
|
||||
"pallet-nfts/std",
|
||||
"pallet-cr-randomness/std",
|
||||
|
|
@ -270,13 +245,8 @@ std = [
|
|||
"pallet-proofs-dealer/std",
|
||||
"pallet-proofs-dealer-runtime-api/std",
|
||||
"pallet-randomness/std",
|
||||
"pallet-session/std",
|
||||
"pallet-storage-providers/std",
|
||||
"pallet-storage-providers-runtime-api/std",
|
||||
"pallet-sudo/std",
|
||||
"pallet-timestamp/std",
|
||||
"pallet-transaction-payment-rpc-runtime-api/std",
|
||||
"pallet-transaction-payment/std",
|
||||
"shp-constants/std",
|
||||
"shp-file-metadata/std",
|
||||
"shp-forest-verifier/std",
|
||||
|
|
|
|||
|
|
@ -22,11 +22,10 @@
|
|||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// For more information, please refer to <http://unlicense.org>
|
||||
#[cfg(feature = "storage-hub")]
|
||||
mod storagehub;
|
||||
|
||||
pub mod governance;
|
||||
pub mod runtime_params;
|
||||
mod storagehub;
|
||||
|
||||
use super::{
|
||||
currency::*, AccountId, Babe, Balance, Balances, BeefyMmrLeaf, Block, BlockNumber,
|
||||
|
|
|
|||
|
|
@ -6,62 +6,10 @@ use sp_std::vec;
|
|||
|
||||
use crate::Runtime;
|
||||
|
||||
#[cfg(feature = "storage-hub")]
|
||||
use crate::currency::{GIGAWEI, HAVE};
|
||||
|
||||
#[cfg(feature = "storage-hub")]
|
||||
use crate::configs::storagehub::{ChallengeTicksTolerance, ReplicationTargetType, SpMinDeposit};
|
||||
|
||||
#[cfg(feature = "storage-hub")]
|
||||
use crate::currency::{GIGAWEI, HAVE};
|
||||
use datahaven_runtime_common::{Balance, BlockNumber};
|
||||
|
||||
#[dynamic_params(RuntimeParameters, pallet_parameters::Parameters::<Runtime>)]
|
||||
#[cfg(not(feature = "storage-hub"))]
|
||||
pub mod dynamic_params {
|
||||
use super::*;
|
||||
#[dynamic_pallet_params]
|
||||
#[codec(index = 0)]
|
||||
pub mod runtime_config {
|
||||
|
||||
use super::*;
|
||||
|
||||
#[codec(index = 0)]
|
||||
#[allow(non_upper_case_globals)]
|
||||
/// Set the initial address of the Snowbridge Gateway contract on Ethereum.
|
||||
/// The fact that this is a parameter means that we can set it initially to the zero address,
|
||||
/// and then change it later via governance, to the actual address of the deployed contract.
|
||||
pub static EthereumGatewayAddress: H160 = H160::repeat_byte(0x0);
|
||||
|
||||
#[codec(index = 1)]
|
||||
#[allow(non_upper_case_globals)]
|
||||
/// Set the initial address of the Rewards Registry contract on Ethereum.
|
||||
/// The fact that this is a parameter means that we can set it initially to the zero address,
|
||||
/// and then change it later via governance, to the actual address of the deployed contract.
|
||||
pub static RewardsRegistryAddress: H160 = H160::repeat_byte(0x0);
|
||||
|
||||
#[codec(index = 2)]
|
||||
#[allow(non_upper_case_globals)]
|
||||
/// The Selector is the first 4 bytes of the keccak256 hash of the function signature("updateRewardsMerkleRoot(bytes32)")
|
||||
pub static RewardsUpdateSelector: BoundedVec<u8, ConstU32<4>> =
|
||||
BoundedVec::truncate_from(vec![0xdc, 0x3d, 0x04, 0xec]);
|
||||
|
||||
#[codec(index = 3)]
|
||||
#[allow(non_upper_case_globals)]
|
||||
/// The RewardsAgentOrigin is the hash of the string "external_validators_rewards"
|
||||
/// TODO: Decide which agent origin we want to use. Currently for testing it's the zero hash
|
||||
pub static RewardsAgentOrigin: H256 = H256::from_slice(&hex!(
|
||||
"c505dfb2df107d106d08bd0f1a0acd10052ca9aa078629a4ccfd0c90c6e69b65"
|
||||
));
|
||||
|
||||
// Proportion of fees allocated to the Treasury (remainder are burned).
|
||||
// e.g. 20% to the treasury, 80% burned.
|
||||
#[codec(index = 4)]
|
||||
#[allow(non_upper_case_globals)]
|
||||
pub static FeesTreasuryProportion: Perbill = Perbill::from_percent(20);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "storage-hub")]
|
||||
#[dynamic_params(RuntimeParameters, pallet_parameters::Parameters::<Runtime>)]
|
||||
pub mod dynamic_params {
|
||||
use super::*;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ use frame_support::{
|
|||
weights::Weight,
|
||||
};
|
||||
use frame_system::pallet_prelude::BlockNumberFor;
|
||||
use frame_system::EnsureRoot;
|
||||
use frame_system::EnsureSigned;
|
||||
use num_bigint::BigUint;
|
||||
use pallet_nfts::PalletFeatures;
|
||||
|
|
|
|||
|
|
@ -265,7 +265,6 @@ impl WeightToFeePolynomial for WeightToFee {
|
|||
|
||||
// Create the runtime by composing the FRAME pallets that were previously configured.
|
||||
#[frame_support::runtime]
|
||||
#[cfg(not(feature = "storage-hub"))]
|
||||
mod runtime {
|
||||
#[runtime::runtime]
|
||||
#[runtime::derive(
|
||||
|
|
@ -419,159 +418,6 @@ mod runtime {
|
|||
pub type MessageQueue = pallet_message_queue;
|
||||
// ╚════════════ Polkadot SDK Utility Pallets - Block 2 ═════════════╝
|
||||
|
||||
// ╔══════════════════════ StorageHub Pallets ═══════════════════════╗
|
||||
// Start with index 80
|
||||
// ╚══════════════════════ StorageHub Pallets ═══════════════════════╝
|
||||
|
||||
// ╔═══════════════════ DataHaven-specific Pallets ══════════════════╗
|
||||
// Start with index 100
|
||||
#[runtime::pallet_index(100)]
|
||||
pub type OutboundCommitmentStore = pallet_outbound_commitment_store;
|
||||
|
||||
#[runtime::pallet_index(101)]
|
||||
pub type ExternalValidatorsRewards = pallet_external_validators_rewards;
|
||||
|
||||
#[runtime::pallet_index(102)]
|
||||
pub type DataHavenNativeTransfer = pallet_datahaven_native_transfer;
|
||||
|
||||
// ╚═══════════════════ DataHaven-specific Pallets ══════════════════╝
|
||||
}
|
||||
|
||||
#[frame_support::runtime]
|
||||
#[cfg(feature = "storage-hub")]
|
||||
mod runtime {
|
||||
#[runtime::runtime]
|
||||
#[runtime::derive(
|
||||
RuntimeCall,
|
||||
RuntimeEvent,
|
||||
RuntimeError,
|
||||
RuntimeOrigin,
|
||||
RuntimeFreezeReason,
|
||||
RuntimeHoldReason,
|
||||
RuntimeSlashReason,
|
||||
RuntimeLockId,
|
||||
RuntimeTask
|
||||
)]
|
||||
pub struct Runtime;
|
||||
|
||||
// ╔══════════════════ System and Consensus Pallets ═════════════════╗
|
||||
#[runtime::pallet_index(0)]
|
||||
pub type System = frame_system;
|
||||
|
||||
// Babe must be before session.
|
||||
#[runtime::pallet_index(1)]
|
||||
pub type Babe = pallet_babe;
|
||||
|
||||
#[runtime::pallet_index(2)]
|
||||
pub type Timestamp = pallet_timestamp;
|
||||
|
||||
#[runtime::pallet_index(3)]
|
||||
pub type Balances = pallet_balances;
|
||||
|
||||
// Consensus support.
|
||||
// Authorship must be before session in order to note author in the correct session and era.
|
||||
#[runtime::pallet_index(4)]
|
||||
pub type Authorship = pallet_authorship;
|
||||
|
||||
#[runtime::pallet_index(5)]
|
||||
pub type Offences = pallet_offences;
|
||||
|
||||
#[runtime::pallet_index(6)]
|
||||
pub type Historical = pallet_session::historical;
|
||||
|
||||
// External Validators must be before Session.
|
||||
#[runtime::pallet_index(7)]
|
||||
pub type ExternalValidators = pallet_external_validators;
|
||||
|
||||
#[runtime::pallet_index(8)]
|
||||
pub type Session = pallet_session;
|
||||
|
||||
#[runtime::pallet_index(9)]
|
||||
pub type ImOnline = pallet_im_online;
|
||||
|
||||
#[runtime::pallet_index(10)]
|
||||
pub type Grandpa = pallet_grandpa;
|
||||
|
||||
#[runtime::pallet_index(11)]
|
||||
pub type TransactionPayment = pallet_transaction_payment;
|
||||
|
||||
#[runtime::pallet_index(12)]
|
||||
pub type Beefy = pallet_beefy;
|
||||
|
||||
#[runtime::pallet_index(13)]
|
||||
pub type Mmr = pallet_mmr;
|
||||
|
||||
#[runtime::pallet_index(14)]
|
||||
pub type BeefyMmrLeaf = pallet_beefy_mmr;
|
||||
// ╚═════════════════ System and Consensus Pallets ══════════════════╝
|
||||
|
||||
// ╔═════════════════ Polkadot SDK Utility Pallets ══════════════════╗
|
||||
#[runtime::pallet_index(30)]
|
||||
pub type Utility = pallet_utility;
|
||||
|
||||
#[runtime::pallet_index(31)]
|
||||
pub type Scheduler = pallet_scheduler;
|
||||
|
||||
#[runtime::pallet_index(32)]
|
||||
pub type Preimage = pallet_preimage;
|
||||
|
||||
#[runtime::pallet_index(33)]
|
||||
pub type Identity = pallet_identity;
|
||||
|
||||
#[runtime::pallet_index(34)]
|
||||
pub type Multisig = pallet_multisig;
|
||||
|
||||
#[runtime::pallet_index(35)]
|
||||
pub type Parameters = pallet_parameters;
|
||||
|
||||
#[runtime::pallet_index(36)]
|
||||
pub type Sudo = pallet_sudo;
|
||||
|
||||
#[runtime::pallet_index(37)]
|
||||
pub type Treasury = pallet_treasury;
|
||||
|
||||
#[runtime::pallet_index(38)]
|
||||
pub type Proxy = pallet_proxy;
|
||||
// ╚═════════════════ Polkadot SDK Utility Pallets ══════════════════╝
|
||||
|
||||
// ╔════════════════════ Frontier (EVM) Pallets ═════════════════════╗
|
||||
#[runtime::pallet_index(50)]
|
||||
pub type Ethereum = pallet_ethereum;
|
||||
|
||||
#[runtime::pallet_index(51)]
|
||||
pub type Evm = pallet_evm;
|
||||
|
||||
#[runtime::pallet_index(52)]
|
||||
pub type EvmChainId = pallet_evm_chain_id;
|
||||
// ╚════════════════════ Frontier (EVM) Pallets ═════════════════════╝
|
||||
|
||||
// ╔══════════════════════ Snowbridge Pallets ═══════════════════════╗
|
||||
#[runtime::pallet_index(60)]
|
||||
pub type EthereumBeaconClient = snowbridge_pallet_ethereum_client;
|
||||
|
||||
#[runtime::pallet_index(61)]
|
||||
pub type EthereumInboundQueueV2 = snowbridge_pallet_inbound_queue_v2;
|
||||
|
||||
#[runtime::pallet_index(62)]
|
||||
pub type EthereumOutboundQueueV2 = snowbridge_pallet_outbound_queue_v2;
|
||||
|
||||
#[runtime::pallet_index(63)]
|
||||
pub type SnowbridgeSystem = snowbridge_pallet_system;
|
||||
|
||||
#[runtime::pallet_index(64)]
|
||||
pub type SnowbridgeSystemV2 = snowbridge_pallet_system_v2;
|
||||
// ╚══════════════════════ Snowbridge Pallets ═══════════════════════╝
|
||||
|
||||
// ╔════════════ Polkadot SDK Utility Pallets - Block 2 ═════════════╗
|
||||
// The Message Queue pallet has to be after the Snowbridge Outbound
|
||||
// Queue V2 pallet since the former processes messages in its
|
||||
// `on_initialize` hook and the latter clears up messages in
|
||||
// its `on_initialize` hook, so otherwise messages will be cleared
|
||||
// up before they are processed.
|
||||
#[runtime::pallet_index(70)]
|
||||
pub type MessageQueue = pallet_message_queue;
|
||||
// ╚════════════ Polkadot SDK Utility Pallets - Block 2 ═════════════╝
|
||||
|
||||
// ╔══════════════════════ StorageHub Pallets ═══════════════════════╗
|
||||
// Start with index 80
|
||||
#[runtime::pallet_index(80)]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": "0.1.0-autogenerated.11221632385899729439",
|
||||
"version": "0.1.0-autogenerated.11476301422201833224",
|
||||
"name": "@polkadot-api/descriptors",
|
||||
"files": [
|
||||
"dist"
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in a new issue