Skip to content

Commit

Permalink
update versions (#1210)
Browse files Browse the repository at this point in the history
  • Loading branch information
xlc authored Jul 15, 2021
1 parent 2d7032f commit f98c28f
Show file tree
Hide file tree
Showing 57 changed files with 1,079 additions and 1,122 deletions.
670 changes: 312 additions & 358 deletions Cargo.lock

Large diffs are not rendered by default.

355 changes: 176 additions & 179 deletions Cargo.toml

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions ecosystem-modules/chainsafe/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ edition = "2018"
[dependencies]
serde = { version = "1.0.124", optional = true }
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7", default-features = false }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
support = { package = "module-support", path = "../../modules/support", default-features = false }
primitives = { package = "acala-primitives", path = "../../primitives", default-features = false }
chainbridge = { git = "https://github.com/AcalaNetwork/chainbridge-substrate", default-features = false }
Expand Down
12 changes: 6 additions & 6 deletions ecosystem-modules/compound-cash/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ edition = "2018"
[dependencies]
serde = { version = "1.0.124", optional = true }
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.5", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.5", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.5", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
module-support = { path = "../../modules/support", default-features = false }
primitives = { package = "acala-primitives", path = "../../primitives", default-features = false }

[dev-dependencies]
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.5" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.5" }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.5" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8" }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8" }

[features]
default = ["std"]
Expand Down
14 changes: 7 additions & 7 deletions ecosystem-modules/ren/renvm-bridge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ edition = "2018"
[dependencies]
serde = { version = "1.0.124", optional = true }
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7", default-features = false }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
support = { package = "module-support", path = "../../../modules/support", default-features = false }
orml-traits = { path = "../../../orml/traits", default-features = false }
primitives = { package = "acala-primitives", path = "../../../primitives", default-features = false }
Expand All @@ -21,7 +21,7 @@ primitives = { package = "acala-primitives", path = "../../../primitives", defau
hex-literal = "0.3.1"
orml-currencies = { path = "../../../orml/currencies" }
orml-tokens = { path = "../../../orml/tokens" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8" }

[features]
default = ["std"]
Expand Down
102 changes: 51 additions & 51 deletions ecosystem-modules/ren/renvm-bridge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,57 @@ pub mod module {
Ok(().into())
}
}

#[pallet::validate_unsigned]
impl<T: Config> frame_support::unsigned::ValidateUnsigned for Pallet<T> {
type Call = Call<T>;

fn validate_unsigned(_source: TransactionSource, call: &Self::Call) -> TransactionValidity {
match call {
Call::mint(who, p_hash, amount, n_hash, sig) => {
// check if already exists
if Signatures::<T>::contains_key(&sig) {
return InvalidTransaction::Stale.into();
}

let verify_result = Encode::using_encoded(&who, |encoded| -> DispatchResult {
Self::verify_mint_signature(&p_hash, *amount, encoded, &n_hash, &sig.0)
});

// verify signature
if verify_result.is_err() {
return InvalidTransaction::BadProof.into();
}

ValidTransaction::with_tag_prefix("renvm-bridge")
.priority(T::UnsignedPriority::get())
.and_provides(sig)
.longevity(64_u64)
.propagate(true)
.build()
}
Call::rotate_key(new_key, sig) => {
// check if already exists
if Signatures::<T>::contains_key(&sig) {
return InvalidTransaction::Stale.into();
}

// verify signature
if Self::verify_rotate_key_signature(new_key, &sig.0).is_err() {
return InvalidTransaction::BadProof.into();
}

ValidTransaction::with_tag_prefix("renvm-bridge")
.priority(T::UnsignedPriority::get())
.and_provides(sig)
.longevity(64_u64)
.propagate(true)
.build()
}
_ => InvalidTransaction::Call.into(),
}
}
}
}

impl<T: Config> Pallet<T> {
Expand Down Expand Up @@ -319,54 +370,3 @@ impl<T: Config> Pallet<T> {
Ok(())
}
}

#[allow(deprecated)]
impl<T: Config> frame_support::unsigned::ValidateUnsigned for Pallet<T> {
type Call = Call<T>;

fn validate_unsigned(_source: TransactionSource, call: &Self::Call) -> TransactionValidity {
match call {
Call::mint(who, p_hash, amount, n_hash, sig) => {
// check if already exists
if Signatures::<T>::contains_key(&sig) {
return InvalidTransaction::Stale.into();
}

let verify_result = Encode::using_encoded(&who, |encoded| -> DispatchResult {
Self::verify_mint_signature(&p_hash, *amount, encoded, &n_hash, &sig.0)
});

// verify signature
if verify_result.is_err() {
return InvalidTransaction::BadProof.into();
}

ValidTransaction::with_tag_prefix("renvm-bridge")
.priority(T::UnsignedPriority::get())
.and_provides(sig)
.longevity(64_u64)
.propagate(true)
.build()
}
Call::rotate_key(new_key, sig) => {
// check if already exists
if Signatures::<T>::contains_key(&sig) {
return InvalidTransaction::Stale.into();
}

// verify signature
if Self::verify_rotate_key_signature(new_key, &sig.0).is_err() {
return InvalidTransaction::BadProof.into();
}

ValidTransaction::with_tag_prefix("renvm-bridge")
.priority(T::UnsignedPriority::get())
.and_provides(sig)
.longevity(64_u64)
.propagate(true)
.build()
}
_ => InvalidTransaction::Call.into(),
}
}
}
14 changes: 7 additions & 7 deletions ecosystem-modules/starport/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ edition = "2018"

[dependencies]
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.5", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.5", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.5", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.5", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.5", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
primitives = { package = "acala-primitives", path = "../../primitives", default-features = false }
orml-traits = { path = "../../orml/traits", default-features = false }
module-support = { path = "../../modules/support", default-features = false }

[dev-dependencies]
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.5" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.5" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8" }
module-currencies = { path = "../../modules/currencies" }
orml-tokens = { path = "../../orml/tokens"}

Expand Down
12 changes: 6 additions & 6 deletions inspect/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ edition = "2018"
codec = { package = "parity-scale-codec", version = "2.0.0" }
derive_more = "0.99"
log = "0.4.8"
sc-cli = { version = "0.9.0", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7" }
sc-service = { version = "0.9.0", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7" }
sc-cli = { version = "0.9.0", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8" }
sc-service = { version = "0.9.0", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8" }
structopt = "0.3.8"
10 changes: 5 additions & 5 deletions modules/airdrop/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ edition = "2018"
[dependencies]
serde = { version = "1.0.124", optional = true }
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
primitives = { package = "acala-primitives", path = "../../primitives", default-features = false }

[dev-dependencies]
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7", default-features = false }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }

[features]
default = ["std"]
Expand Down
14 changes: 7 additions & 7 deletions modules/auction-manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ edition = "2018"
[dependencies]
serde = { version = "1.0.124", optional = true }
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
orml-traits = { path = "../../orml/traits", default-features = false }
orml-utilities = { path = "../../orml/utilities", default-features = false }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7", default-features = false }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
support = { package = "module-support", path = "../support", default-features = false }
primitives = { package = "acala-primitives", path = "../../primitives", default-features = false }

[dev-dependencies]
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8" }
orml-auction = { path = "../../orml/auction" }
cdp-treasury = { package = "module-cdp-treasury", path = "../cdp-treasury" }
module-dex = { path = "../dex" }
Expand Down
2 changes: 1 addition & 1 deletion modules/auction-manager/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ impl<T: Config> Pallet<T> {

// get to_be_continue record,
// if it exsits, iterator map storage start with previous key
let start_key = to_be_continue.get::<Vec<u8>>().flatten();
let start_key = to_be_continue.get::<Vec<u8>>().unwrap_or_default();

// get the max iterationns config
let max_iterations = StorageValueRef::persistent(&OFFCHAIN_WORKER_MAX_ITERATIONS)
Expand Down
18 changes: 9 additions & 9 deletions modules/cdp-engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ edition = "2018"
[dependencies]
serde = { version = "1.0.124", optional = true }
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
orml-traits = { path = "../../orml/traits", default-features = false }
orml-utilities = { path = "../../orml/utilities", default-features = false }
sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7", default-features = false }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7", default-features = false }
sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
support = { package = "module-support", path = "../support", default-features = false }
loans = { package = "module-loans", path = "../loans", default-features = false }
primitives = { package = "acala-primitives", path = "../../primitives", default-features = false }
rand_chacha = { version = "0.2", default-features = false }

[dev-dependencies]
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7" }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.7" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8" }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8" }
orml-currencies = { path = "../../orml/currencies" }
module-dex = { path = "../dex" }
cdp-treasury = { package = "module-cdp-treasury", path = "../cdp-treasury" }
Expand Down
2 changes: 1 addition & 1 deletion modules/cdp-engine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ impl<T: Config> Pallet<T> {

// get to_be_continue record
let (collateral_position, start_key) =
if let Some(Some((last_collateral_position, maybe_last_iterator_previous_key))) =
if let Ok(Some((last_collateral_position, maybe_last_iterator_previous_key))) =
to_be_continue.get::<(u32, Option<Vec<u8>>)>()
{
(last_collateral_position, maybe_last_iterator_previous_key)
Expand Down
Loading

0 comments on commit f98c28f

Please sign in to comment.