Skip to content

Commit

Permalink
chore(runtime): move ss58 prefix to runtime primitives
Browse files Browse the repository at this point in the history
  • Loading branch information
clearloop committed Dec 19, 2023
1 parent f6c13bd commit ca53eb7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions runtime/primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,6 @@ pub type Header = generic::Header<BlockNumber, BlakeTwo256>;
pub type Block = generic::Block<Header, OpaqueExtrinsic>;
/// Block ID.
pub type BlockId = generic::BlockId<Block>;

/// SS58 prefix of VARA.
pub const VARA_SS58_PREFIX: u8 = 137;
4 changes: 2 additions & 2 deletions runtime/vara/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ pub use runtime_common::{
impl_runtime_apis_plus_common, BlockHashCount, DealWithFees, AVERAGE_ON_INITIALIZE_RATIO,
GAS_LIMIT_MIN_PERCENTAGE_NUM, NORMAL_DISPATCH_RATIO, VALUE_PER_GAS,
};
pub use runtime_primitives::{AccountId, Signature};
pub use runtime_primitives::{AccountId, Signature, VARA_SS58_PREFIX};
use runtime_primitives::{Balance, BlockNumber, Hash, Index, Moment};
use sp_api::impl_runtime_apis;
use sp_core::{crypto::KeyTypeId, ConstBool, ConstU64, OpaqueMetadata, H256};
Expand Down Expand Up @@ -189,7 +189,7 @@ pub fn native_version() -> NativeVersion {

parameter_types! {
pub const Version: RuntimeVersion = VERSION;
pub const SS58Prefix: u8 = 137;
pub const SS58Prefix: u8 = VARA_SS58_PREFIX;
pub RuntimeBlockWeights: BlockWeights = runtime_common::block_weights_for(MAXIMUM_BLOCK_WEIGHT);
pub RuntimeBlockLength: BlockLength =
BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO);
Expand Down

0 comments on commit ca53eb7

Please sign in to comment.