Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ jobs:

- name: Check Build
run: |
SKIP_WASM_BUILD= cargo check --all-targets --all-features
SKIP_WASM_BUILD= cargo check --bin parallel-dev --features runtime-benchmarks
SKIP_WASM_BUILD= cargo check --bin parallel --features runtime-benchmarks
SKIP_WASM_BUILD= cargo check --bin parallel --no-default-features --features runtime-parallel --features runtime-benchmarks

# - name: Check Wasm
# run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

- name: Generate code coverage
run: |
cargo +nightly-2021-03-24 tarpaulin --verbose --all-features --workspace --exclude parallel --exclude parallel-dev --exclude parallel-runtime --exclude vanilla-runtime --timeout 120 --out Xml
cargo +nightly-2021-03-24 tarpaulin --verbose --workspace --exclude parallel --exclude parallel-dev --exclude parallel-runtime --exclude heiko-runtime --exclude vanilla-runtime --timeout 120 --out Xml

- name: Upload To Codecov.io
uses: codecov/codecov-action@v1
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@

- Add RpcDataProviderId & AccountData to types.json (#136)

## 2021.05.22

- Add xKSM, heiko-runtime and impl_currency_id macro (#134)

## 2021.05.21

- Add types.json update bot (#130)
Expand Down
68 changes: 68 additions & 0 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 @@ -2,4 +2,4 @@
panic = 'unwind'

[workspace]
members = ['node/*', 'pallets/*', 'runtime/*']
members = ['node/*', 'pallets/*']
13 changes: 10 additions & 3 deletions node/parallel-dev/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ use sp_runtime::{
};
use vanilla_runtime::currency::DOLLARS;
use vanilla_runtime::{
AuraConfig, CouncilConfig, DemocracyConfig, ElectionsConfig, GrandpaConfig,
TechnicalCommitteeConfig, VanillaOracleConfig, WASM_BINARY,
AuraConfig, CouncilConfig, DemocracyConfig, ElectionsConfig, GrandpaConfig, OracleConfig,
TechnicalCommitteeConfig, WASM_BINARY,
};

pub type VanillaChainSpec = sc_service::GenericChainSpec<vanilla_runtime::GenesisConfig>;
Expand Down Expand Up @@ -177,7 +177,7 @@ fn testnet_genesis(
.collect(),
},
pallet_sudo: vanilla_runtime::SudoConfig { key: root_key },
orml_oracle_Instance1: VanillaOracleConfig {
orml_oracle_Instance1: OracleConfig {
members: endowed_accounts.clone().into(),
phantom: Default::default(),
},
Expand All @@ -190,6 +190,7 @@ fn testnet_genesis(
(x.clone(), CurrencyId::KSM, 1_000 * TOKEN_DECIMAL),
(x.clone(), CurrencyId::USDT, 1_000 * TOKEN_DECIMAL),
(x.clone(), CurrencyId::xDOT, 1_000 * TOKEN_DECIMAL),
(x.clone(), CurrencyId::xKSM, 1_000 * TOKEN_DECIMAL),
]
})
.collect(),
Expand All @@ -200,6 +201,7 @@ fn testnet_genesis(
CurrencyId::KSM,
CurrencyId::USDT,
CurrencyId::xDOT,
CurrencyId::xKSM,
],
borrow_index: Rate::one(), // 1
exchange_rate: Rate::saturating_from_rational(2, 100), // 0.02
Expand All @@ -212,31 +214,36 @@ fn testnet_genesis(
(CurrencyId::KSM, Ratio::from_percent(50)),
(CurrencyId::USDT, Ratio::from_percent(50)),
(CurrencyId::xDOT, Ratio::from_percent(50)),
(CurrencyId::xKSM, Ratio::from_percent(50)),
],
liquidation_incentive: vec![
(CurrencyId::DOT, Ratio::from_percent(90)),
(CurrencyId::KSM, Ratio::from_percent(90)),
(CurrencyId::USDT, Ratio::from_percent(90)),
(CurrencyId::xDOT, Ratio::from_percent(90)),
(CurrencyId::xKSM, Ratio::from_percent(90)),
],
// TODO : please refer to https://github.com/parallel-finance/parallel/issues/46
liquidation_threshold: vec![
(CurrencyId::DOT, Ratio::from_percent(90)),
(CurrencyId::KSM, Ratio::from_percent(90)),
(CurrencyId::USDT, Ratio::from_percent(90)),
(CurrencyId::xDOT, Ratio::from_percent(90)),
(CurrencyId::xKSM, Ratio::from_percent(90)),
],
close_factor: vec![
(CurrencyId::DOT, Ratio::from_percent(50)),
(CurrencyId::KSM, Ratio::from_percent(50)),
(CurrencyId::USDT, Ratio::from_percent(50)),
(CurrencyId::xDOT, Ratio::from_percent(50)),
(CurrencyId::xKSM, Ratio::from_percent(50)),
],
reserve_factor: vec![
(CurrencyId::DOT, Ratio::from_percent(15)),
(CurrencyId::KSM, Ratio::from_percent(15)),
(CurrencyId::USDT, Ratio::from_percent(15)),
(CurrencyId::xDOT, Ratio::from_percent(15)),
(CurrencyId::xKSM, Ratio::from_percent(15)),
],
},
pallet_staking: vanilla_runtime::StakingConfig {
Expand Down
8 changes: 6 additions & 2 deletions node/parallel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ log = '0.4.13'

primitives = { package = 'parallel-primitives', path = '../../primitives' }

heiko-runtime = { version = '0.0.1', path = '../../runtime/heiko', optional = true }
pallet-transaction-payment-rpc = { version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.1' }
parallel-runtime = { version = '0.0.1', path = '../../runtime/parallel' }
parallel-runtime = { version = '0.0.1', path = '../../runtime/parallel', optional = true }

sc-basic-authorship = { version = '0.9.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.1' }
sc-chain-spec = { version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.1' }
Expand Down Expand Up @@ -80,8 +81,11 @@ substrate-build-script-utils = { version = '3.0.0', git = 'https://github.com/pa
name = 'parallel'

[features]
default = []
default = ['runtime-parallel']
runtime-benchmarks = [
'heiko-runtime/runtime-benchmarks',
'parallel-runtime/runtime-benchmarks',
'polkadot-service/runtime-benchmarks',
]
runtime-heiko = ['heiko-runtime']
runtime-parallel = ['parallel-runtime']
Loading