Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: rename BSX to UNITS #196

Merged
merged 4 commits into from
Oct 15, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 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 @@ -662,7 +662,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;
}