Skip to content

Commit

Permalink
Merge pull request #10 from uni-arts-chain/MultiCurrency
Browse files Browse the repository at this point in the history
Multi currency
  • Loading branch information
tuminfei authored May 7, 2021
2 parents d45bc20 + ac60ae7 commit 1cd173e
Show file tree
Hide file tree
Showing 24 changed files with 3,720 additions and 147 deletions.
45 changes: 41 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ members = [
'pallets/assets',
'pallets/names',
'pallets/forum',
'pallets/nft',
'pallets/nft-multi',
'pallets/nft-blindbox',
'pallets/nft-trade',
'pallets/nft-auction',
Expand Down
5 changes: 3 additions & 2 deletions bin/cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const UNI_ARTS_ADDRESS_FORMAT_ID: u8 = 45;

impl SubstrateCli for Cli {
fn impl_name() -> String {
"Uni-arts Node".into()
"UniArts Node".into()
}

fn impl_version() -> String {
Expand Down Expand Up @@ -72,6 +72,7 @@ impl SubstrateCli for Cli {
"staging" => Box::new(uniarts_service::chain_spec::staging_config()?),
"uart" => Box::new(uniarts_service::chain_spec::pangu_config()?),
"pangu" => Box::new(uniarts_service::chain_spec::pangu_config()?),
"fuxi_staging" => Box::new(uniarts_service::chain_spec::fuxi_staging_config()?),
"fuxi" => Box::new(uniarts_service::chain_spec::fuxi_config()?),
path => Box::new(uniarts_service::chain_spec::PanguChainSpec::from_json_file(
std::path::PathBuf::from(path),
Expand Down Expand Up @@ -279,7 +280,7 @@ pub fn run() -> sc_cli::Result<()> {
info!(" \\____/|_| |_|_| /_/ \\_\\_| \\__|___/ \\_____|_| |_|\\__,_|_|_| |_|");
info!(" ");
info!(" ");
info!(" by Uni-Arts Network, 2018-2020");
info!(" by UniArts Network, 2018-2020");

if chain_spec.is_pangu_network() {
runner.run_node_until_exit(|config| match config.role {
Expand Down
66 changes: 42 additions & 24 deletions bin/service/res/fuxi.json

Large diffs are not rendered by default.

20 changes: 12 additions & 8 deletions bin/service/src/chain_spec/fuxi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,18 @@ pub fn fuxi_staging_config() -> Result<FuxiChainSpec, String> {
];

let endowed_accounts: Vec<(AccountId, Balance)> = vec![
// IPO
// Parachain award 20%
(hex!("90e8e5d81d429880185694c4175b0720d2c336aedf026d3f47b05643fcad6a2d").into(), 20_000_000 * UART),
// Team
(hex!("22818069e4959c3130ae728ddb532dad9c27f179c64a0fe4de1ba2ef15035841").into(), 25_000_000 * UART),
// Pre-sale
(hex!("9cb78b6b82c7007f6bf4f55d95535d10f98a3c6cbbb27f5f216c9c030bab983f").into(), 30_000_000 * UART),
// Treasury
(hex!("58390913ec4a2371fee5bc8a81d1fd6d500012adc0f408f1aa56267c0414501b").into(), 25_000_000 * UART),
// Team 20%
(hex!("22818069e4959c3130ae728ddb532dad9c27f179c64a0fe4de1ba2ef15035841").into(), 20_000_000 * UART),
// Token sale 26%
(hex!("9cb78b6b82c7007f6bf4f55d95535d10f98a3c6cbbb27f5f216c9c030bab983f").into(), 26_000_000 * UART),
// Treasury 20%
(hex!("58390913ec4a2371fee5bc8a81d1fd6d500012adc0f408f1aa56267c0414501b").into(), 20_000_000 * UART),
// Adivsors 6%
(hex!("827287f438297be6947dce38caf80ddbf750fa0db16a18bbf77cbc6a1e5a551e").into(), 6_000_000 * UART),
// Ecosystem & Artists %8
(hex!("ac2d4a632aedf3157f1c872d0778b3a5f75f38622f36f53e93025963acb6b709").into(), 8_000_000 * UART),
];

let council_members: Vec<AccountId> = vec![
Expand All @@ -118,7 +122,7 @@ pub fn fuxi_staging_config() -> Result<FuxiChainSpec, String> {

Ok(FuxiChainSpec::from_genesis(
// Name
"Uni-Arts Staging network",
"UniArts Staging network",
// ID
"fuxi_staging",
ChainType::Live,
Expand Down
2 changes: 1 addition & 1 deletion bin/service/src/chain_spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub use pangu::{

pub mod fuxi;
pub use fuxi::{
fuxi_config, fuxi_development_config, fuxi_local_testnet_config, FuxiChainSpec,
fuxi_config, fuxi_development_config, fuxi_staging_config, fuxi_local_testnet_config, FuxiChainSpec,
};

// --- crates ---
Expand Down
13 changes: 11 additions & 2 deletions pallets/nft-auction/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,14 @@ transaction-payment = { version = "2.0.1", package = 'pallet-transaction-payment
# third-party dependencies
serde = { version = "1.0.102", features = ["derive"] }
log = "0.4.8"
# orml
orml-currencies = { default-features = false, version = '0.3.0' }
orml-tokens = { default-features = false, version = '0.3.0' }
orml-traits = { default-features = false, version = '0.3.0' }

pallet-nft = { path = "../nft", default-features = false }
pallet-nft-multi = { path = "../nft-multi", default-features = false }
module-support = { version = "0.1.0", default-features = false, path = "../support" }
uniarts-primitives = { version = "2.0.1", default-features = false, path = "../../primitives" }

[dev-dependencies]
sp-core = { version = "2.0.1"}
Expand All @@ -39,7 +44,11 @@ std = [
"sp-std/std",
"sp-core/std",
"module-support/std",
"pallet-nft/std",
"pallet-nft-multi/std",
"orml-traits/std",
"orml-currencies/std",
"orml-tokens/std",
"uniarts-primitives/std",
]


Loading

0 comments on commit 1cd173e

Please sign in to comment.