Skip to content

Commit

Permalink
Merge pull request #196 from galacticcouncil/refactor/rename_BSX_to_U…
Browse files Browse the repository at this point in the history
…NITS

refactor: rename BSX to UNITS
  • Loading branch information
Roznovjak authored Oct 15, 2021
2 parents 13b404f + a55ba56 commit ae46540
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
20 changes: 10 additions & 10 deletions node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
use basilisk_runtime::{
AccountId, AssetRegistryConfig, AuraId, Balance, BalancesConfig, CollatorSelectionConfig, CouncilConfig,
DusterConfig, ElectionsConfig, GenesisConfig, MultiTransactionPaymentConfig, OrmlNftConfig, ParachainInfoConfig,
SessionConfig, Signature, SudoConfig, SystemConfig, TechnicalCommitteeConfig, TokensConfig, VestingConfig, BSX,
SessionConfig, Signature, SudoConfig, SystemConfig, TechnicalCommitteeConfig, TokensConfig, VestingConfig, UNITS,
NATIVE_EXISTENTIAL_DEPOSIT, WASM_BINARY,
};
use cumulus_primitives_core::ParaId;
Expand Down Expand Up @@ -511,12 +511,12 @@ fn parachain_genesis(
(
// Intergalactic HDX Tokens 15%
hex!["bca8eeb9c7cf74fc28ebe4091d29ae1c12ed622f7e3656aae080b54d5ff9a23c"].into(),
15_000_000_000u128 * BSX,
15_000_000_000u128 * UNITS,
),
(
// Treasury 9%
hex!["6d6f646c70792f74727372790000000000000000000000000000000000000000"].into(),
9_000_000_000 * BSX,
9_000_000_000 * UNITS,
),
],
},
Expand Down Expand Up @@ -561,7 +561,7 @@ fn parachain_genesis(
// Intergalactic elections
members: vec![(
hex!["bca8eeb9c7cf74fc28ebe4091d29ae1c12ed622f7e3656aae080b54d5ff9a23c"].into(),
14_999_900_000u128 * BSX,
14_999_900_000u128 * UNITS,
)],
},
council: CouncilConfig {
Expand Down Expand Up @@ -618,7 +618,7 @@ fn testnet_parachain_genesis(
balances: endowed_accounts
.iter()
.cloned()
.map(|k| (k, 1_000_000_000u128 * BSX))
.map(|k| (k, 1_000_000_000u128 * UNITS))
.collect(),
},
sudo: SudoConfig {
Expand Down Expand Up @@ -661,10 +661,10 @@ fn testnet_parachain_genesis(
.iter()
.flat_map(|x| {
vec![
(x.clone(), 1, 1_000_000_000u128 * BSX),
(x.clone(), 2, 1_000_000_000u128 * BSX),
(x.clone(), 3, 1_000_000_000u128 * BSX),
(x.clone(), 4, 1_000_000_000u128 * BSX),
(x.clone(), 1, 1_000_000_000u128 * UNITS),
(x.clone(), 2, 1_000_000_000u128 * UNITS),
(x.clone(), 3, 1_000_000_000u128 * UNITS),
(x.clone(), 4, 1_000_000_000u128 * UNITS),
]
})
.collect(),
Expand All @@ -675,7 +675,7 @@ fn testnet_parachain_genesis(
// Intergalactic elections
members: vec![(
get_account_id_from_seed::<sr25519::Public>("Alice"),
100_000_000u128 * BSX,
100_000_000u128 * UNITS,
)],
},
council: CouncilConfig {
Expand Down
14 changes: 7 additions & 7 deletions node/src/testing_chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use sp_runtime::traits::{IdentifyAccount, Verify};
use testing_basilisk_runtime::{
AccountId, AssetRegistryConfig, AuraId, Balance, BalancesConfig, CollatorSelectionConfig, CouncilConfig,
DusterConfig, ElectionsConfig, GenesisConfig, MultiTransactionPaymentConfig, OrmlNftConfig, ParachainInfoConfig,
SessionConfig, Signature, SudoConfig, SystemConfig, TechnicalCommitteeConfig, TokensConfig, VestingConfig, BSX,
SessionConfig, Signature, SudoConfig, SystemConfig, TechnicalCommitteeConfig, TokensConfig, VestingConfig, UNITS,
NATIVE_EXISTENTIAL_DEPOSIT, WASM_BINARY,
};

Expand Down Expand Up @@ -270,7 +270,7 @@ fn testnet_parachain_genesis(
balances: endowed_accounts
.iter()
.cloned()
.map(|k| (k, 1_000_000_000u128 * BSX))
.map(|k| (k, 1_000_000_000u128 * UNITS))
.collect(),
},
sudo: SudoConfig {
Expand Down Expand Up @@ -313,10 +313,10 @@ fn testnet_parachain_genesis(
.iter()
.flat_map(|x| {
vec![
(x.clone(), 1, 1_000_000_000u128 * BSX),
(x.clone(), 2, 1_000_000_000u128 * BSX),
(x.clone(), 3, 1_000_000_000u128 * BSX),
(x.clone(), 4, 1_000_000_000u128 * BSX),
(x.clone(), 1, 1_000_000_000u128 * UNITS),
(x.clone(), 2, 1_000_000_000u128 * UNITS),
(x.clone(), 3, 1_000_000_000u128 * UNITS),
(x.clone(), 4, 1_000_000_000u128 * UNITS),
]
})
.collect(),
Expand All @@ -326,7 +326,7 @@ fn testnet_parachain_genesis(
// Intergalactic elections
members: vec![(
get_account_id_from_seed::<sr25519::Public>("Alice"),
100_000_000u128 * BSX,
100_000_000u128 * UNITS,
)],
},
council: CouncilConfig {
Expand Down
6 changes: 3 additions & 3 deletions primitives/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ pub mod currency {
pub use crate::Balance;

pub const FORTUNE: Balance = u128::MAX;
pub const BSX: Balance = 1_000_000_000_000;
pub const DOLLARS: Balance = BSX * 100; // 100 BSX ~= 1 $
pub const CENTS: Balance = DOLLARS / 100; // 1 BSX ~= 1 cent
pub const UNITS: Balance = 1_000_000_000_000;
pub const DOLLARS: Balance = UNITS * 100; // 100 UNITS ~= 1 $
pub const CENTS: Balance = DOLLARS / 100; // 1 UNITS ~= 1 cent
pub const MILLICENTS: Balance = CENTS / 1_000;
pub const NATIVE_EXISTENTIAL_DEPOSIT: Balance = CENTS;
}
Expand Down
4 changes: 2 additions & 2 deletions runtime/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ parameter_types! {

// pallet nft
parameter_types! {
pub ClassBondAmount: Balance = 10_000 * BSX;
pub ClassBondAmount: Balance = 10_000 * UNITS;
}

// pallet orml_nft
Expand Down Expand Up @@ -219,6 +219,6 @@ parameter_types! {

// pallet vesting
parameter_types! {
pub MinVestedTransfer: Balance = 100_000 * BSX;
pub MinVestedTransfer: Balance = 100_000 * UNITS;
pub const MaxVestingSchedules: u32 = 100;
}

0 comments on commit ae46540

Please sign in to comment.