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

XCMP, xTokens, Assets, AssetManager and Treasury for Manta #1050

Merged
merged 25 commits into from
Apr 6, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
04a7c95
Add xcm, assets, assetmanager, treasury
ghzlatarev Mar 21, 2023
0eb039b
Fix benchmarking
ghzlatarev Mar 21, 2023
983fffb
Clean up
ghzlatarev Mar 21, 2023
db40850
Add xTokens to callfilter
ghzlatarev Mar 21, 2023
426e195
Add xcm-tests
ghzlatarev Mar 22, 2023
a14dd41
Merge branch 'manta' into ghzlatarev/manta-xcm
ghzlatarev Mar 24, 2023
a99a343
Use reasonable prices for treasury constants
ghzlatarev Mar 24, 2023
8f16ccc
dedupe some code
ghzlatarev Mar 24, 2023
8c0805c
Use feature
ghzlatarev Mar 24, 2023
8457880
Fix cargo imports
ghzlatarev Mar 24, 2023
da5ef9e
CLean up common.rs
ghzlatarev Mar 28, 2023
5395682
Better name for feature
ghzlatarev Mar 28, 2023
1702f8d
Taplo fmt
ghzlatarev Mar 28, 2023
afca5a2
Clean up xcm benchmarks code
ghzlatarev Mar 28, 2023
4f8df97
Merge branch 'manta' into ghzlatarev/manta-xcm
ghzlatarev Mar 28, 2023
30b9f0e
Update weights files
ghzlatarev Mar 28, 2023
ee96b6c
Fix occurences of kma, ksm, kusama
ghzlatarev Mar 29, 2023
8193915
Merge branch 'manta' into ghzlatarev/manta-xcm
ferrell-code Mar 29, 2023
e4cddfc
Address pr comments
ghzlatarev Apr 4, 2023
9ac0e40
Merge branch 'manta' into ghzlatarev/manta-xcm
ghzlatarev Apr 4, 2023
900f201
Fix benchmarks
ghzlatarev Apr 4, 2023
dd7935b
Merge branch 'manta' into ghzlatarev/manta-xcm
ghzlatarev Apr 4, 2023
09938af
Merge remote-tracking branch 'origin/manta' into ghzlatarev/manta-xcm
zqhxuyuan Apr 6, 2023
c9b119f
parachain id use parachain info
zqhxuyuan Apr 6, 2023
3d8aacd
Increase spend period in comparison to Calamari
ghzlatarev Apr 6, 2023
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: 12 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions node/src/chain_specs/manta/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ fn manta_dev_genesis(
polkadot_xcm: PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
},
asset_manager: Default::default(),
}
}

Expand Down
3 changes: 3 additions & 0 deletions primitives/manta/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ pub type AccountId = <Signer as IdentifyAccount>::AccountId;
/// This index is used to look up accounts.
pub type AccountIndex = u32;

/// Manta Asset Id Type
pub type MantaAssetId = u128;

/// Calamari Asset Id Type
pub type CalamariAssetId = u128;

Expand Down
84 changes: 79 additions & 5 deletions runtime/manta/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ version = '4.0.4'
[dependencies]
codec = { package = "parity-scale-codec", version = '3.1.2', default-features = false, features = ["derive", "max-encoded-len"] }
hex-literal = { version = '0.3.4', optional = true }
log = { version = "0.4.16", default-features = false }
scale-info = { version = "2.1.2", default-features = false, features = ["derive"] }
serde = { version = "1.0.140", features = ['derive'], optional = true }
smallvec = "1.8.0"
Expand Down Expand Up @@ -40,6 +41,7 @@ frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.
frame-try-runtime = { git = "https://github.com/paritytech/substrate.git", default-features = false, optional = true, branch = "polkadot-v0.9.28" }

# Substrate pallets
pallet-assets = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28" }
pallet-aura = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" }
pallet-authorship = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" }
pallet-balances = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" }
Expand All @@ -50,12 +52,15 @@ pallet-sudo = { git = 'https://github.com/paritytech/substrate.git', default-fea
pallet-timestamp = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" }
pallet-transaction-payment = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" }
pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" }
pallet-treasury = { git = "https://github.com/paritytech/substrate.git", default-features = false, branch = "polkadot-v0.9.28" }
pallet-utility = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.28" }

# Cumulus dependencies
cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.28" }
cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.28" }
cumulus-pallet-session-benchmarking = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, optional = true, branch = "polkadot-v0.9.28" }
cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.28" }
cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.28" }
cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.28" }
cumulus-primitives-timestamp = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.28" }
cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus.git', default-features = false, branch = "polkadot-v0.9.28" }
Expand All @@ -68,19 +73,69 @@ pallet-author-inherent = { git = "https://github.com/manta-network/nimbus.git",

# Polkadot dependencies
pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.28" }
pallet-xcm-benchmarks = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.28", optional = true }
polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.28" }
polkadot-primitives = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.28" }
xcm = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.28" }
xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.28" }
xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', default-features = false, branch = "release-v0.9.28" }

# Third party (vendored) dependencies
orml-traits = { git = 'https://github.com/manta-network/open-runtime-module-library.git', default-features = false, branch = "polkadot-v0.9.28" }
orml-xtokens = { git = 'https://github.com/manta-network/open-runtime-module-library.git', default-features = false, branch = "polkadot-v0.9.28" }

# Self dependencies
manta-collator-selection = { path = '../../pallets/collator-selection', default-features = false }
manta-primitives = { path = '../../primitives/manta', default-features = false }
pallet-asset-manager = { path = '../../pallets/asset-manager', default-features = false }
pallet-parachain-staking = { path = '../../pallets/parachain-staking', default-features = false }
runtime-common = { path = '../common', default-features = false }
session-key-primitives = { path = '../../primitives/session-keys', default-features = false }

[dev-dependencies]
#lazy_static = "1.4.0"
#reqwest = { version = "0.11", features = ["blocking"] }
#serde_json = "1.0"

# 3rd dependencies
#codec = { package = "parity-scale-codec", version = "3.1.2" }
#scale-info = { version = "2.1.2", features = ["derive"] }

## Substrate dependencies
#frame-system = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" }
#pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" }
#pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" }
#pallet-utility = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" }
#sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" }
#sp-io = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" }
#sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.28" }

# Polkadot dependencies
#pallet-xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.28" }
polkadot-core-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.28" }
#polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.28" }
polkadot-runtime-parachains = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.28" }
#xcm = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.28" }
#xcm-builder = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.28" }
#xcm-executor = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.28" }
xcm-simulator = { git = 'https://github.com/paritytech/polkadot.git', branch = "release-v0.9.28" }

# Cumulus dependencies
#cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.28" }
#cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.28" }
#cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.28" }
#cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.28" }
#cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.28" }
#cumulus-test-relay-sproof-builder = { git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v0.9.28" }
#parachain-info = { git = 'https://github.com/paritytech/cumulus.git', branch = "polkadot-v0.9.28" }

# Orml dependencies
#orml-traits = { git = "https://github.com/manta-network/open-runtime-module-library.git", branch = "polkadot-v0.9.28" }
#orml-xtokens = { git = "https://github.com/manta-network/open-runtime-module-library.git", branch = "polkadot-v0.9.28" }

## Self dependencies
#pallet-asset-manager = { path = '../../pallets/asset-manager' }

[package.metadata.docs.rs]
targets = ['x86_64-unknown-linux-gnu']

Expand All @@ -93,6 +148,7 @@ runtime-benchmarks = [
'cumulus-pallet-session-benchmarking/runtime-benchmarks',
'hex-literal',
'sp-runtime/runtime-benchmarks',
'xcm-builder/runtime-benchmarks',
'frame-benchmarking',
'frame-system-benchmarking',
'frame-support/runtime-benchmarks',
Expand All @@ -105,9 +161,15 @@ runtime-benchmarks = [
'pallet-multisig/runtime-benchmarks',
'pallet-utility/runtime-benchmarks',
'pallet-timestamp/runtime-benchmarks',
'pallet-xcm/runtime-benchmarks',
'pallet-treasury/runtime-benchmarks',
'pallet-parachain-staking/runtime-benchmarks',
'pallet-preimage/runtime-benchmarks',
'pallet-assets/runtime-benchmarks',
'pallet-asset-manager/runtime-benchmarks',
'cumulus-pallet-xcmp-queue/runtime-benchmarks',
'cumulus-pallet-parachain-system/runtime-benchmarks',
'pallet-xcm-benchmarks',
]
try-runtime = [
'frame-executive/try-runtime',
Expand All @@ -122,6 +184,9 @@ try-runtime = [
'pallet-timestamp/try-runtime',
'pallet-transaction-payment/try-runtime',
'pallet-utility/try-runtime',
'pallet-treasury/try-runtime',
'pallet-assets/try-runtime',
'pallet-asset-manager/try-runtime',
'runtime-common/try-runtime',
]
# Set timing constants (e.g. session period) to faster versions to speed up testing.
Expand Down Expand Up @@ -157,22 +222,31 @@ std = [
'pallet-timestamp/std',
'pallet-session/std',
'pallet-sudo/std',
'sp-application-crypto/std',
'pallet-xcm/std',
'pallet-transaction-payment/std',
'pallet-treasury/std',
'manta-primitives/std',
'runtime-common/std',
'parachain-info/std',
'cumulus-pallet-parachain-system/std',
'cumulus-pallet-dmp-queue/std',
"cumulus-pallet-xcmp-queue/std",
"cumulus-pallet-xcm/std",
"cumulus-primitives-core/std",
"cumulus-primitives-timestamp/std",
"cumulus-primitives-utility/std",
"cumulus-pallet-dmp-queue/std",
"pallet-author-inherent/std",
"pallet-aura-style-filter/std",
'session-key-primitives/std',
'polkadot-primitives/std',
'manta-collator-selection/std',
'xcm/std',
'pallet-xcm/std',
'xcm-executor/std',
'xcm-builder/std',
'xcm-executor/std',
'polkadot-primitives/std',
'manta-collator-selection/std',
'pallet-treasury/std',
'pallet-assets/std',
'pallet-asset-manager/std',
'orml-traits/std',
'orml-xtokens/std',
]
Loading