-
Notifications
You must be signed in to change notification settings - Fork 114
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
Runtime: Argo Bridge #5155
Merged
Merged
Runtime: Argo Bridge #5155
Changes from 14 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
37f3d91
WIP: argo bridge
freakstatic 69263df
change Argo Bridge configs
freakstatic 299ecf8
tests: improve Argo Bridge tests
freakstatic 5330221
fix: use the right destination account on finalize_inbound_transfer
freakstatic cbde78c
fix: Argo Bridge - add new error (OperatorAccountNotSet)
freakstatic c649652
add const for number of max remote chains
freakstatic 6fe1642
Add Argo Bridge benchmark tests
freakstatic 60830b1
change RemoteAccount comment
freakstatic 8f3c830
bump spec version to 2004
freakstatic e1db690
add Argo Bridge pallet to benchmarks definition
freakstatic 3c20a1f
tests: add benchmarking tests to Argo Bridge pallet
freakstatic afedc96
update Argo Bridge weights
freakstatic 0faf5ec
Update Proposals Codex benchmarking to include Argo Bridge constraint…
freakstatic 0fb0b20
small improvements on Argo Bridge benchmarking
freakstatic bed43b0
fix clippy warnings
kdembler 0f48abc
Merge pull request #2 from kdembler/argo-clippy
freakstatic b278c08
fix: add missing argo bridge configs to project codex pallet
freakstatic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
use node_runtime::{argo_bridge::types::BridgeStatus, ArgoBridgeConfig, DefaultBridgingFee}; | ||
|
||
pub fn production_config() -> ArgoBridgeConfig { | ||
ArgoBridgeConfig { | ||
status: BridgeStatus::Paused, | ||
mint_allowance: 0, | ||
bridging_fee: DefaultBridgingFee::get(), | ||
thawn_duration: 1, | ||
..Default::default() | ||
} | ||
} | ||
|
||
pub fn testing_config() -> ArgoBridgeConfig { | ||
ArgoBridgeConfig { | ||
status: BridgeStatus::Paused, | ||
mint_allowance: 0, | ||
bridging_fee: DefaultBridgingFee::get(), | ||
thawn_duration: 1, | ||
..Default::default() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
[package] | ||
name = "pallet-argo-bridge" | ||
version = '1.0.0' | ||
authors = ['Joystream contributors'] | ||
edition = '2018' | ||
|
||
[dependencies] | ||
sp-io = { package = 'sp-io', default-features = false, git = 'https://github.com/joystream/substrate.git', rev = '1d0eefca86ef31b9e7727df01a6ed23ad65491e9'} | ||
sp-std = { package = 'sp-std', default-features = false, git = 'https://github.com/joystream/substrate.git', rev = '1d0eefca86ef31b9e7727df01a6ed23ad65491e9'} | ||
sp-runtime = { package = 'sp-runtime', default-features = false, git = 'https://github.com/joystream/substrate.git', rev = '1d0eefca86ef31b9e7727df01a6ed23ad65491e9'} | ||
frame-support = { package = 'frame-support', default-features = false, git = 'https://github.com/joystream/substrate.git', rev = '1d0eefca86ef31b9e7727df01a6ed23ad65491e9'} | ||
frame-system = { package = 'frame-system', default-features = false, git = 'https://github.com/joystream/substrate.git', rev = '1d0eefca86ef31b9e7727df01a6ed23ad65491e9'} | ||
sp-arithmetic = { package = 'sp-arithmetic', default-features = false, git = 'https://github.com/joystream/substrate.git', rev = '1d0eefca86ef31b9e7727df01a6ed23ad65491e9'} | ||
common = { package = 'pallet-common', default-features = false, path = '../common'} | ||
storage = { package = 'pallet-storage', default-features = false, path = '../storage'} | ||
balances = { package = 'pallet-balances', default-features = false, git = 'https://github.com/joystream/substrate.git', rev = '1d0eefca86ef31b9e7727df01a6ed23ad65491e9'} | ||
membership = { package = 'pallet-membership', default-features = false, path = '../membership'} | ||
codec = { package = 'parity-scale-codec', version = '3.1.2', default-features = false, features = ['derive'] } | ||
serde = {version = '1.0.101', features = ['derive'], optional = true} | ||
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } | ||
sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/joystream/substrate.git', rev = '1d0eefca86ef31b9e7727df01a6ed23ad65491e9', optional = true } | ||
|
||
# Benchmarking dependencies | ||
frame-benchmarking = { package = 'frame-benchmarking', default-features = false, git = 'https://github.com/joystream/substrate.git', rev = '1d0eefca86ef31b9e7727df01a6ed23ad65491e9', optional = true} | ||
|
||
[dev-dependencies] | ||
sp-core = { package = 'sp-core', default-features = false, git = 'https://github.com/joystream/substrate.git', rev = '1d0eefca86ef31b9e7727df01a6ed23ad65491e9' } | ||
randomness-collective-flip = { package = 'pallet-insecure-randomness-collective-flip', default-features = false, git = 'https://github.com/joystream/substrate.git', rev = '1d0eefca86ef31b9e7727df01a6ed23ad65491e9'} | ||
staking-handler = { package = 'pallet-staking-handler', default-features = false, path = '../staking-handler'} | ||
pallet-timestamp = { package = 'pallet-timestamp', default-features = false, git = 'https://github.com/joystream/substrate.git', rev = '1d0eefca86ef31b9e7727df01a6ed23ad65491e9'} | ||
sp-storage = { package = 'sp-storage', default-features = false, git = 'https://github.com/joystream/substrate.git', rev = '1d0eefca86ef31b9e7727df01a6ed23ad65491e9'} | ||
|
||
[features] | ||
default = ['std', 'runtime-benchmarks'] | ||
runtime-benchmarks = [ | ||
"frame-benchmarking/runtime-benchmarks", | ||
'sp-core', | ||
"common/runtime-benchmarks", | ||
] | ||
std = [ | ||
'sp-std/std', | ||
'sp-io/std', | ||
'sp-runtime/std', | ||
'frame-support/std', | ||
'frame-system/std', | ||
'sp-arithmetic/std', | ||
'common/std', | ||
'storage/std', | ||
'balances/std', | ||
'membership/std', | ||
'codec/std', | ||
'serde', | ||
'scale-info/std', | ||
'frame-benchmarking?/std', | ||
] | ||
try-runtime = ["frame-support/try-runtime"] |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also think that you can set the mint allowance storage variable to be
0
by default since I don't think any other initial value is plausible