Skip to content

Commit

Permalink
Polkadot v0.9.42 (#2560)
Browse files Browse the repository at this point in the history
* use the new convert trait

* fix

* update

* adapt to fungible traits change

* fix module currencies

* update orml

* adaptor to the new provider/consumer mechanism of substrate

* transfer ED to contract account when deploy

* check and transfer ED to contract address when charge storage

* update migrations

* update tests

* update tests

* add SystemAccountStore

* update comments

* update

* update evm-tests

* clean migrations

* fix tests

---------

Co-authored-by: Bryan Chen <[email protected]>
Co-authored-by: Ermal Kaleci <[email protected]>
Co-authored-by: qwer951123 <[email protected]>
  • Loading branch information
4 people authored Jul 4, 2023
1 parent a35964e commit 637aea4
Show file tree
Hide file tree
Showing 131 changed files with 4,109 additions and 2,746 deletions.
1,247 changes: 758 additions & 489 deletions Cargo.lock

Large diffs are not rendered by default.

459 changes: 231 additions & 228 deletions Cargo.toml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion evm-tests
12 changes: 6 additions & 6 deletions inspect/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ codec = { package = "parity-scale-codec", version = "3.4.0" }
clap = { version = "4.0.9", features = ["derive"] }
derive_more = "0.99"
log = "0.4.17"
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
16 changes: 8 additions & 8 deletions modules/aggregated-dex/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ edition = "2021"
[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] }
scale-info = { version = "2.2.0", default-features = false, features = ["derive"] }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
orml-traits = { path = "../../orml/traits", default-features = false }
support = { package = "module-support", path = "../support", default-features = false }
primitives = { package = "acala-primitives", path = "../../primitives", default-features = false }
Expand All @@ -21,9 +21,9 @@ orml-tokens = { path = "../../orml/tokens", default-features = false }

[dev-dependencies]
orml-tokens = { path = "../../orml/tokens" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }

[features]
default = ["std"]
Expand Down
2 changes: 1 addition & 1 deletion modules/aggregated-dex/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub use orml_traits::{parameter_type_with_key, MultiCurrency};
use primitives::{Amount, TokenSymbol, TradingPair};
use sp_runtime::{
testing::{Header, H256},
traits::{Bounded, IdentityLookup},
traits::IdentityLookup,
AccountId32, ArithmeticError, FixedPointNumber,
};
pub use support::{ExchangeRate, RebasedStableAsset};
Expand Down
18 changes: 9 additions & 9 deletions modules/asset-registry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ edition = "2021"
log = { version = "0.4.17", default-features = false }
scale-info = { version = "2.2.0", default-features = false, features = ["derive"] }
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
primitives = { package = "acala-primitives", path = "../../primitives", default-features = false }

xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.40", default-features = false }
xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.42", default-features = false }

module-support = { path = "../support", default-features = false }

[dev-dependencies]
serde_json = "1.0.81"
hex = "0.4"
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }

module-evm = { path = "../evm" }
module-evm-bridge = { path = "../evm-bridge" }
Expand Down
6 changes: 5 additions & 1 deletion modules/asset-registry/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,15 @@ impl pallet_balances::Config for Runtime {
type DustRemoval = ();
type RuntimeEvent = RuntimeEvent;
type ExistentialDeposit = ConstU128<1>;
type AccountStore = System;
type AccountStore = module_support::SystemAccountStore<Runtime>;
type MaxLocks = ();
type MaxReserves = ConstU32<50>;
type ReserveIdentifier = ReserveIdentifier;
type WeightInfo = ();
type HoldIdentifier = ();
type FreezeIdentifier = ();
type MaxHolds = ();
type MaxFreezes = ();
}

impl pallet_timestamp::Config for Runtime {
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 = "2021"
[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false }
scale-info = { version = "2.2.0", default-features = false, features = ["derive"] }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", 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.40", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", 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.40" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
orml-auction = { path = "../../orml/auction" }
cdp-treasury = { package = "module-cdp-treasury", path = "../cdp-treasury" }
module-dex = { path = "../dex" }
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,24 +7,24 @@ edition = "2021"
[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false }
scale-info = { version = "2.2.0", default-features = false, features = ["derive"] }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", 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.40", default-features = false }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
sp-application-crypto = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", 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 }
nutsfinance-stable-asset = { version = "0.1.0", default-features = false, path = "../../ecosystem-modules/stable-asset/lib/stable-asset", package = "nutsfinance-stable-asset" }

[dev-dependencies]
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
orml-currencies = { path = "../../orml/currencies" }
dex = { package = "module-dex", path = "../dex" }
cdp-treasury = { package = "module-cdp-treasury", path = "../cdp-treasury" }
Expand Down
4 changes: 4 additions & 0 deletions modules/cdp-engine/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ impl pallet_balances::Config for Runtime {
type MaxReserves = ();
type ReserveIdentifier = [u8; 8];
type WeightInfo = ();
type HoldIdentifier = ();
type FreezeIdentifier = ();
type MaxHolds = ();
type MaxFreezes = ();
}
pub type AdaptedBasicCurrency = orml_currencies::BasicCurrencyAdapter<Runtime, PalletBalances, Amount, BlockNumber>;

Expand Down
14 changes: 7 additions & 7 deletions modules/cdp-treasury/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ edition = "2021"
[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false }
scale-info = { version = "2.2.0", default-features = false, features = ["derive"] }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
orml-traits = { path = "../../orml/traits", default-features = false }
support = { package = "module-support", path = "../support", default-features = false }
primitives = { package = "acala-primitives", path = "../../primitives", default-features = false }
nutsfinance-stable-asset = { version = "0.1.0", default-features = false, path = "../../ecosystem-modules/stable-asset/lib/stable-asset", package = "nutsfinance-stable-asset" }

[dev-dependencies]
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
orml-currencies = { path = "../../orml/currencies" }
orml-auction = { path = "../../orml/auction" }
module-dex = { path = "../dex" }
Expand Down
4 changes: 4 additions & 0 deletions modules/cdp-treasury/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ impl pallet_balances::Config for Runtime {
type MaxReserves = ();
type ReserveIdentifier = [u8; 8];
type WeightInfo = ();
type HoldIdentifier = ();
type FreezeIdentifier = ();
type MaxHolds = ();
type MaxFreezes = ();
}
pub type AdaptedBasicCurrency = orml_currencies::BasicCurrencyAdapter<Runtime, PalletBalances, Amount, BlockNumber>;

Expand Down
32 changes: 16 additions & 16 deletions modules/collator-selection/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@ log = { version = "0.4.17", default-features = false }
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "max-encoded-len"] }
scale-info = { version = "2.2.0", default-features = false, features = ["derive"] }

frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false, optional = true }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
sp-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false, optional = true }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
sp-staking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42", default-features = false }

primitives = { package = "acala-primitives", path = "../../primitives", default-features = false }

[dev-dependencies]
pallet-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
pallet-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }
sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" }

[features]
default = ['std']
Expand Down
4 changes: 4 additions & 0 deletions modules/collator-selection/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ impl pallet_balances::Config for Test {
type MaxReserves = ConstU32<50>;
type ReserveIdentifier = ReserveIdentifier;
type WeightInfo = ();
type HoldIdentifier = ();
type FreezeIdentifier = ();
type MaxHolds = ();
type MaxFreezes = ();
}

pub struct Author4;
Expand Down
Loading

0 comments on commit 637aea4

Please sign in to comment.