Skip to content

Commit

Permalink
add faucets
Browse files Browse the repository at this point in the history
  • Loading branch information
tuminfei committed May 22, 2022
1 parent 6e55022 commit 73a46cb
Show file tree
Hide file tree
Showing 11 changed files with 112 additions and 42 deletions.
73 changes: 58 additions & 15 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 bin/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ log = { version = "0.4.11" }

# uniarts
uniarts-service = { path = "../service", default-features = false }
uniarts-primitives = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.4" }
uniarts-primitives = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.5" }

# substratem
sp-core = { version = "3.0.0", optional = true }
Expand Down
4 changes: 2 additions & 2 deletions bin/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jsonrpc-pubsub = "15.0.0"
futures = "0.3.4"

# uniarts
uniarts-primitives = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.4" }
uniarts-primitives = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.5" }

# rpc
substrate-frame-rpc-system = { version = "3.0.0" }
pallet-transaction-payment-rpc = { version = "3.0.0" }

pallet-staking-rpc = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.4" }
pallet-staking-rpc = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.5" }
pallet-contracts-rpc = { version = "3.0.0" }

# substrate client
Expand Down
4 changes: 2 additions & 2 deletions bin/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ codec = { package = "parity-scale-codec", version = "2.0.0", default-features =
pangu-runtime = { path = "../../runtime/pangu" }
fuxi-runtime = { path = "../../runtime/fuxi" }
uniarts-rpc = { path = "../rpc" }
uniarts-primitives = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.4" }
uniarts-primitives = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.5" }

# substrate client
sc-cli = { version = "0.9.0", features = ["wasmtime"] }
Expand Down Expand Up @@ -58,7 +58,7 @@ frame-benchmarking-cli = { version = "3.0.0" }
substrate-frame-rpc-system = { version = "3.0.0" }
substrate-prometheus-endpoint = { version = "0.9.0" }
pallet-transaction-payment-rpc = { version = "3.0.0" }
pallet-staking-rpc = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.4" }
pallet-staking-rpc = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.5" }
pallet-contracts-rpc = { version = "3.0.0" }
pallet-contracts = { version = "3.0.0" }

Expand Down
2 changes: 1 addition & 1 deletion primitives/chain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ codec = { package = "parity-scale-codec", version = "2.0.0", default-features =
sp-core = { version = "3.0.0", default-features = false }
sp-runtime = { version = "3.0.0", default-features = false }
sp-std = { version = "3.0.0", default-features = false }
uniarts-primitives = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.4" , default-features = false }
uniarts-primitives = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.5" , default-features = false }

pallet-evm = { version = "3.0.0-dev", default-features = false, path = "../../pallets/evm" }

Expand Down
24 changes: 13 additions & 11 deletions runtime/fuxi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,21 @@ orml-traits = { default-features = false, version = '0.4.0' }

# Used for RPCs
pallet-transaction-payment-rpc-runtime-api = { version = "3.0.0", default-features = false }
pallet-staking-rpc-runtime-api = { version = "3.0.0", default-features = false, git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.4" }
pallet-staking-rpc-runtime-api = { version = "3.0.0", default-features = false, git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.5" }

# Uni-Arts configs
uniarts-common = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.4", default-features = false }
pallet-names = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.4", default-features = false }
pallet-nft-multi = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.4", default-features = false }
pallet-nft-blindbox = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.4", default-features = false }
pallet-rewards = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.4", default-features = false }
pallet-staking = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.4", default-features = false }
pallet-validator-set = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.4", default-features = false }
pallet-bridge = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.4", default-features = false }
pallet-assets = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.4" , default-features = false }
uniarts-common = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.5", default-features = false }
pallet-names = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.5", default-features = false }
pallet-nft-multi = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.5", default-features = false }
pallet-nft-blindbox = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.5", default-features = false }
pallet-rewards = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.5", default-features = false }
pallet-staking = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.5", default-features = false }
pallet-validator-set = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.5", default-features = false }
pallet-bridge = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.5", default-features = false }
pallet-assets = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.5" , default-features = false }
pallet-faucets = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.5" , default-features = false }
# pallet-lotteries = { path = "../../configs/lotteries", default-features = false }
uniarts-primitives = { package = "uniarts-primitives", git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.4", default-features = false }
uniarts-primitives = { package = "uniarts-primitives", git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.5", default-features = false }

#EVM
pallet-ethereum = { version = "0.1.0", default-features = false, path = "../../pallets/ethereum" }
Expand Down Expand Up @@ -143,6 +144,7 @@ std = [
"pallet-recovery/std",
"pallet-nicks/std",
"pallet-bridge/std",
"pallet-faucets/std",
"orml-currencies/std",
"orml-tokens/std",
"sp-api/std",
Expand Down
1 change: 1 addition & 0 deletions runtime/fuxi/src/configs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ pub mod pallet_bridge_config;
pub mod pallet_proxy_config;
pub mod pallet_evm_config;
pub mod pallet_ethereum_config;
pub mod pallet_faucets_config;
8 changes: 8 additions & 0 deletions runtime/fuxi/src/configs/pallet_faucets_config.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
use pallet_faucets::Config;
use uniarts_primitives::*;
use crate::*;

impl Config for Runtime {
type Event = Event;
type Currency = Uart;
}
3 changes: 2 additions & 1 deletion runtime/fuxi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("uart"),
impl_name: create_runtime_str!("uart"),
authoring_version: 1,
spec_version: 50,
spec_version: 51,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 2,
Expand Down Expand Up @@ -237,6 +237,7 @@ construct_runtime!(
Bridge: pallet_bridge::{Module, Call, Storage, Event<T>, Config<T>} = 65,
Ethereum: pallet_ethereum::{Module, Call, Storage, Event, Config, ValidateUnsigned} = 66,
EVM: pallet_evm::{Module, Config, Call, Storage, Event<T>} = 67,
Faucets: pallet_faucets::{Module, Call, Storage, Event<T>} = 68,
}
);

Expand Down
15 changes: 15 additions & 0 deletions runtime/fuxi/types.json
Original file line number Diff line number Diff line change
Expand Up @@ -288,5 +288,20 @@
"start_time": "BlockNumber",
"end_time": "BlockNumber",
"has_ended": "bool"
},
"Faucet": {
"enabled": "bool",
"period": "BlockNumber",
"period_limit": "Balance",
"drip_limit": "Balance",

"next_period_at": "BlockNumber",
"dripped_in_current_period": "Balance"
},
"FaucetUpdate": {
"enabled": "Option<bool>",
"period": "Option<BlockNumber>",
"period_limit": "Option<Balance>",
"drip_limit": "Option<Balance>"
}
}
18 changes: 9 additions & 9 deletions runtime/pangu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,18 @@ pallet-contracts-rpc-runtime-api = { version = "3.0.0", default-features = false

# Used for RPCs
pallet-transaction-payment-rpc-runtime-api = { version = "3.0.0", default-features = false }
pallet-staking-rpc-runtime-api = { version = "3.0.0", default-features = false, git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.4" }
pallet-staking-rpc-runtime-api = { version = "3.0.0", default-features = false, git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.5" }

# Uni-Arts configs
uniarts-common = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.4", default-features = false }
pallet-assets = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.4" , default-features = false }
pallet-names = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.4" , default-features = false }
pallet-nft = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.4" , default-features = false }
pallet-rewards = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.4" , default-features = false }
pallet-staking = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.4" , default-features = false }
pallet-validator-set = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.4" , default-features = false }
uniarts-common = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.5", default-features = false }
pallet-assets = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.5" , default-features = false }
pallet-names = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.5" , default-features = false }
pallet-nft = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.5" , default-features = false }
pallet-rewards = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.5" , default-features = false }
pallet-staking = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.5" , default-features = false }
pallet-validator-set = { git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.5" , default-features = false }
# pallet-lotteries = { path = "../../configs/lotteries", default-features = false }
uniarts-primitives = { package = "uniarts-primitives", git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.4" , default-features = false }
uniarts-primitives = { package = "uniarts-primitives", git = "https://github.com/uni-arts-chain/uni-arts-common.git", tag = "v3.0.5" , default-features = false }

# Used for runtime benchmarking
frame-benchmarking = { version = "3.0.0", default-features = false, optional = true }
Expand Down

0 comments on commit 73a46cb

Please sign in to comment.