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

chore: launch code review #144

Merged
merged 40 commits into from
Aug 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
c03cc28
review runtime
jak-pan Aug 29, 2021
8e6c609
Merge branch 'master' into launch-review
jak-pan Aug 29, 2021
84030f4
update toolchain
jak-pan Aug 29, 2021
deebb35
review registry, duster, lbp
jak-pan Aug 30, 2021
895adb5
Merge branch 'master' into launch-review
mrq1911 Aug 30, 2021
bfd2b0a
bumped runtime version
mrq1911 Aug 30, 2021
c7dfd81
asset_registry.update tests
green-jay Aug 30, 2021
a515b3f
more review
jak-pan Aug 30, 2021
af55f85
adjust duster wiht assumpation of ED is always > 0
enthusiastmartin Aug 30, 2021
c995a12
remove unused currency code
enthusiastmartin Aug 30, 2021
ae247cf
review runtime
jak-pan Aug 30, 2021
fa63e36
Merge branch 'launch-review' of github.com:galacticcouncil/Basilisk-n…
jak-pan Aug 30, 2021
f6ab2cd
update asset-registry storage hashers
enthusiastmartin Aug 30, 2021
074a859
lbp review
jak-pan Aug 30, 2021
beb4fe9
Merge branch 'launch-review' of github.com:galacticcouncil/Basilisk-n…
jak-pan Aug 30, 2021
d22d277
update types
enthusiastmartin Aug 30, 2021
70521f5
feat: add ed to asset registry
enthusiastmartin Aug 30, 2021
fc43661
add asset registry ed tests
enthusiastmartin Aug 30, 2021
6c55bb3
update duster benchmarking
enthusiastmartin Aug 30, 2021
82f02b3
fix runtime params
enthusiastmartin Aug 30, 2021
e2dd9fe
update duster weights
enthusiastmartin Aug 30, 2021
def7132
Merge branch 'launch-review' into feat/dust-ed
enthusiastmartin Aug 30, 2021
5bb6fd9
lbp: various improvements
Roznovjak Aug 30, 2021
4465fd0
Merge branch 'launch-review' of /~https://github.com/galacticcouncil/Ba…
Roznovjak Aug 30, 2021
36912fb
update asset registry weights
enthusiastmartin Aug 30, 2021
05655dd
set asset registry origin
enthusiastmartin Aug 30, 2021
bc88cd4
use native ed from runtime
enthusiastmartin Aug 30, 2021
71ded59
add storage checks for AR tests
green-jay Aug 30, 2021
dacd57f
Merge branch 'launch-review' into feat/dust-ed
jak-pan Aug 30, 2021
475fc93
Merge pull request #146 from galacticcouncil/feat/dust-ed
jak-pan Aug 30, 2021
fbf1aef
release compressed wasm
mrq1911 Aug 30, 2021
2cab555
Update primitives/src/traits.rs
jak-pan Aug 30, 2021
baa870a
Update pallets/lbp/src/lib.rs
jak-pan Aug 30, 2021
1b4071c
added orml alias to types
mrq1911 Aug 30, 2021
758c94b
Update runtime/src/lib.rs
jak-pan Aug 30, 2021
0d89b4d
bump spec
jak-pan Aug 30, 2021
8adb3a4
Merge branch 'launch-review' of github.com:galacticcouncil/Basilisk-n…
jak-pan Aug 30, 2021
323b427
./target/release/basilisk build-spec --chain staging --raw > node/res…
mrq1911 Aug 31, 2021
4b3e607
keep consistent runtime version
mrq1911 Aug 31, 2021
a874727
lock
mrq1911 Aug 31, 2021
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: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ jobs:
- name: Upload release wasm
uses: actions/upload-artifact@v2
with:
name: basilisk_runtime.wasm
path: target/release/wbuild/basilisk-runtime/basilisk_runtime.compact.wasm
name: basilisk_runtime.compact.compressed.wasm
path: target/release/wbuild/basilisk-runtime/basilisk_runtime.compact.compressed.wasm

destroy-runner-instance:
name: destroy infra
Expand Down
27 changes: 2 additions & 25 deletions Cargo.lock

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

205 changes: 131 additions & 74 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,81 +70,138 @@ Then open settings screen -> developer and paste

```
{
"AssetPair": {
"asset_in": "AssetId",
"asset_out": "AssetId"
"alias":{
"tokens":{
"AccountData":"OrmlAccountData"
}
},
"Amount": "i128",
"AmountOf": "Amount",
"Address": "AccountId",
"OrmlAccountData": {
"free": "Balance",
"frozen": "Balance",
"reserved": "Balance"
},
"Fee": {
"numerator": "u32",
"denominator": "u32"
},
"BalanceInfo": {
"amount": "Balance",
"assetId": "AssetId"
},
"Chain": {
"genesisHash": "Vec<u8>",
"lastBlockHash": "Vec<u8>"
},
"CurrencyId": "AssetId",
"CurrencyIdOf": "AssetId",
"Intention": {
"who": "AccountId",
"asset_sell": "AssetId",
"asset_buy": "AssetId",
"amount": "Balance",
"discount": "bool",
"sell_or_buy": "IntentionType"
},
"IntentionId": "Hash",
"IntentionType": {
"_enum": [
"SELL",
"BUY"
]
},
"LookupSource": "AccountId",
"Price": "Balance",
"ClassId": "u64",
"TokenId": "u64",
"ClassData": {
"is_pool": "bool"
},
"TokenData": {
"locked": "bool"
},
"CID": "Vec<u8>",
"ClassInfo": {
"metadata": "Vec<u8>",
"total_issuance": "TokenId",
"owner": "AccountId",
"data": "ClassData"
},
"TokenInfo": {
"metadata": "Vec<u8>",
"owner": "AccountId",
"data": "TokenData"
},
"ClassInfoOf": "ClassInfo",
"TokenInfoOf": "TokenInfo",
"ClassIdOf": "ClassId",
"TokenIdOf": "TokenId",
"OrderedSet": "Vec<AssetId>",
"VestingSchedule": {
"start": "BlockNumber",
"period": "BlockNumber",
"period_count": "u32",
"per_period": "Compact<Balance>"
},
"VestingScheduleOf": "VestingSchedule"
"types":[
{
"AssetPair":{
"asset_in":"AssetId",
"asset_out":"AssetId"
},
"Amount":"i128",
"AmountOf":"Amount",
"Address":"AccountId",
"OrmlAccountData":{
"free":"Balance",
"frozen":"Balance",
"reserved":"Balance"
},
"Fee":{
"numerator":"u32",
"denominator":"u32"
},
"BalanceInfo":{
"amount":"Balance",
"assetId":"AssetId"
},
"Chain":{
"genesisHash":"Vec<u8>",
"lastBlockHash":"Vec<u8>"
},
"Currency":"AssetId",
"CurrencyId":"AssetId",
"CurrencyIdOf":"AssetId",
"Intention":{
"who":"AccountId",
"asset_sell":"AssetId",
"asset_buy":"AssetId",
"amount":"Balance",
"discount":"bool",
"sell_or_buy":"IntentionType"
},
"IntentionId":"Hash",
"IntentionType":{
"_enum":[
"SELL",
"BUY"
]
},
"LookupSource":"AccountId",
"Price":"Balance",
"ClassId":"u64",
"TokenId":"u64",
"ClassData":{
"is_pool":"bool"
},
"TokenData":{
"locked":"bool"
},
"ClassInfo":{
"metadata":"Vec<u8>",
"total_issuance":"TokenId",
"owner":"AccountId",
"data":"ClassData"
},
"TokenInfo":{
"metadata":"Vec<u8>",
"owner":"AccountId",
"data":"TokenData"
},
"ClassInfoOf":"ClassInfo",
"TokenInfoOf":"TokenInfo",
"ClassIdOf":"ClassId",
"TokenIdOf":"TokenId",
"OrderedSet":"Vec<AssetId>",
"VestingSchedule":{
"start":"BlockNumber",
"period":"BlockNumber",
"period_count":"u32",
"per_period":"Compact<Balance>"
},
"VestingScheduleOf":"VestingSchedule",
"LBPAssetInfo":{
"id":"AssetId",
"amount":"Balance",
"initial_weight":"LBPWeight",
"final_weight":"LBPWeight"
},
"LBPWeight":"u128",
"WeightPair":{
"weight_a":"LBPWeight",
"weight_b":"LBPWeight"
},
"WeightCurveType":{
"_enum":[
"Linear"
]
},
"PoolId":"AccountId",
"BalanceOf":"Balance",
"AssetType":{
"_enum":[
"Token"
]
},
"Pool":{
"owner":"AccountId",
"start":"BlockNumber",
"end":"BlockNumber",
"assets":"AssetPair",
"initial_weights":"WeightPair",
"final_weights":"WeightPair",
"last_weight_update":"BlockNumber",
"last_weights":"WeightPair",
"weight_curve":"WeightCurveType",
"pausable":"bool",
"paused":"bool",
"fee":"Fee",
"fee_receiver":"AccountId"
},
"AssetNativeLocation":"MultiLocation",
"AssetDetails":{
"name":"Vec<u8>",
"asset_type":"AssetType",
"locked":"bool"
},
"AssetMetadata":{
"symbol":"Vec<u8>",
"decimals":"u8"
}
}
]
}
```

Expand Down
218 changes: 87 additions & 131 deletions node/res/basilisk.json

Large diffs are not rendered by default.

27 changes: 22 additions & 5 deletions node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,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,
WASM_BINARY,
WASM_BINARY, NATIVE_EXISTENTIAL_DEPOSIT
};
use cumulus_primitives_core::ParaId;
use hex_literal::hex;
Expand Down Expand Up @@ -210,7 +210,12 @@ pub fn testnet_parachain_config(para_id: ParaId) -> Result<ChainSpec, String> {
vec![hex!["30035c21ba9eda780130f2029a80c3e962f56588bc04c36be95a225cb536fb55"].into()],
hex!["30035c21ba9eda780130f2029a80c3e962f56588bc04c36be95a225cb536fb55"].into(), // SAME AS ROOT
vec![].into(),
vec![b"hKSM".to_vec(), b"hDOT".to_vec(), b"hETH".to_vec(), b"hUSDT".to_vec()],
vec![
(b"hKSM".to_vec(), 1_000u128),
(b"hDOT".to_vec(), 1_000u128),
(b"hETH".to_vec(), 1_000u128),
(b"hUSDT".to_vec(), 1_000u128),
],
)
},
// Bootnodes
Expand Down Expand Up @@ -293,7 +298,12 @@ pub fn parachain_development_config(para_id: ParaId) -> Result<ChainSpec, String
],
get_account_id_from_seed::<sr25519::Public>("Alice"), // SAME AS ROOT
get_vesting_config_for_test(),
vec![b"hKSM".to_vec(), b"hDOT".to_vec(), b"hETH".to_vec(), b"hUSDT".to_vec()],
vec![
(b"hKSM".to_vec(), 1_000u128),
(b"hDOT".to_vec(), 1_000u128),
(b"hETH".to_vec(), 1_000u128),
(b"hUSDT".to_vec(), 1_000u128),
],
)
},
// Bootnodes
Expand Down Expand Up @@ -437,7 +447,12 @@ pub fn local_parachain_config(para_id: ParaId) -> Result<ChainSpec, String> {
],
get_account_id_from_seed::<sr25519::Public>("Alice"), // SAME AS ROOT
get_vesting_config_for_test(),
vec![b"hKSM".to_vec(), b"hDOT".to_vec(), b"hETH".to_vec(), b"hUSDT".to_vec()],
vec![
(b"hKSM".to_vec(), 1_000u128),
(b"hDOT".to_vec(), 1_000u128),
(b"hETH".to_vec(), 1_000u128),
(b"hUSDT".to_vec(), 1_000u128),
],
)
},
// Bootnodes
Expand Down Expand Up @@ -516,6 +531,7 @@ fn parachain_genesis(
asset_registry: AssetRegistryConfig {
asset_names: vec![],
native_asset_name: TOKEN_SYMBOL.as_bytes().to_vec(),
native_existential_deposit: NATIVE_EXISTENTIAL_DEPOSIT,
},
multi_transaction_payment: MultiTransactionPaymentConfig {
currencies: vec![],
Expand Down Expand Up @@ -572,7 +588,7 @@ fn testnet_parachain_genesis(
tech_committee_members: Vec<AccountId>,
tx_fee_payment_account: AccountId,
vesting_list: Vec<(AccountId, BlockNumber, BlockNumber, u32, Balance)>,
registered_assets: Vec<Vec<u8>>,
registered_assets: Vec<(Vec<u8>, Balance)>, // (Asset name, Existential deposit)
) -> GenesisConfig {
GenesisConfig {
system: SystemConfig {
Expand Down Expand Up @@ -617,6 +633,7 @@ fn testnet_parachain_genesis(
asset_registry: AssetRegistryConfig {
asset_names: registered_assets,
native_asset_name: TOKEN_SYMBOL.as_bytes().to_vec(),
native_existential_deposit: NATIVE_EXISTENTIAL_DEPOSIT,
},
multi_transaction_payment: MultiTransactionPaymentConfig {
currencies: vec![],
Expand Down
3 changes: 3 additions & 0 deletions pallets/asset-registry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ serde = { features = ["derive"], optional = true, version = "1.0.101" }
# Local dependencies
primitives = { path = "../../primitives", default-features = false }

# ORML dependencies
orml-traits = { git = "/~https://github.com/open-web3-stack/open-runtime-module-library", rev = "8d5432c3458702a7df14b374bddde43a2a20aa43", default-features = false }

# Substrate dependencies
frame-support = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9", default-features = false }
frame-system = { git = "/~https://github.com/paritytech/substrate", branch = "polkadot-v0.9.9", default-features = false }
Expand Down
Loading