Skip to content

Commit 5e76d0c

Browse files
Merge branch 'multiple-fee-recipients' into payments-pallet
2 parents 0377671 + 16be330 commit 5e76d0c

File tree

39 files changed

+1497
-441
lines changed

39 files changed

+1497
-441
lines changed

Cargo.dev.toml

+65-65
Large diffs are not rendered by default.

auction/Cargo.toml

+7-7
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ authors = ["Acala Developers"]
88
edition = "2021"
99

1010
[dependencies]
11-
scale-info = { version = "2.0.1", default-features = false, features = ["derive"] }
11+
scale-info = { version = "2.1", default-features = false, features = ["derive"] }
1212
serde = { version = "1.0.136", optional = true }
1313
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false }
14-
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
15-
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
14+
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
15+
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
1616

17-
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
18-
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
17+
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
18+
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
1919
orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false }
2020

2121
[dev-dependencies]
22-
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
23-
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
22+
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19" }
23+
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19" }
2424

2525
[features]
2626
default = ["std"]

authority/Cargo.toml

+9-9
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@ authors = ["Acala Developers"]
88
edition = "2021"
99

1010
[dependencies]
11-
scale-info = { version = "2.0.1", default-features = false, features = ["derive"] }
11+
scale-info = { version = "2.1", default-features = false, features = ["derive"] }
1212
serde = { version = "1.0.136", optional = true }
1313
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false }
14-
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
15-
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
16-
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
14+
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
15+
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
16+
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
1717

18-
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
19-
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
18+
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
19+
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
2020

2121
[dev-dependencies]
22-
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
23-
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
24-
pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
22+
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19" }
23+
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19" }
24+
pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19" }
2525

2626
[features]
2727
default = ["std"]

bencher/Cargo.toml

+13-13
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ authors = ["Laminar Developers <[email protected]>"]
88
edition = "2021"
99

1010
[dependencies]
11-
paste = "1.0.6"
11+
paste = "1.0.7"
1212
build-helper = { version = "0.1.1", optional = true }
1313
cargo_metadata = { version = "0.14.1", optional = true }
1414
tempfile = { version = "3.2.0", optional = true }
@@ -24,18 +24,18 @@ serde_json = {version = "1.0.68", optional = true }
2424
hash-db = { version = "0.15.2", default-features = false, optional = true }
2525
bencher-procedural = { path = "bencher-procedural", default-features = false }
2626
codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"], default-features = false }
27-
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
28-
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
29-
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
30-
sp-runtime-interface = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
31-
sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false, optional = true }
32-
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false, features = ["wasmtime"], optional = true }
33-
sc-executor-common = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", optional = true }
34-
sc-client-db = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false, features = ["with-kvdb-rocksdb"], optional = true }
35-
sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false, optional = true }
36-
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
37-
sp-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
38-
sp-storage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false, optional = true }
27+
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
28+
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
29+
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
30+
sp-runtime-interface = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
31+
sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false, optional = true }
32+
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false, features = ["wasmtime"], optional = true }
33+
sc-executor-common = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", optional = true }
34+
sc-client-db = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false, features = ["with-kvdb-rocksdb"], optional = true }
35+
sp-maybe-compressed-blob = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false, optional = true }
36+
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
37+
sp-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
38+
sp-storage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false, optional = true }
3939

4040
[features]
4141
default = ["std"]

bencher/test/Cargo.toml

+7-7
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ required-features = ["bench"]
1313

1414
[dependencies]
1515
serde = { version = "1.0.136", optional = true }
16-
scale-info = { version = "2.0.1", default-features = false, features = ["derive"] }
16+
scale-info = { version = "2.1", default-features = false, features = ["derive"] }
1717
codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"], default-features = false }
18-
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
19-
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
20-
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
21-
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
22-
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
18+
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
19+
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
20+
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
21+
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
22+
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
2323
orml-bencher = { path = "..", default-features = false }
2424
orml-weight-meter = { path = "../../weight-meter", default-features = false }
2525

2626
[dev-dependencies]
27-
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
27+
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19" }
2828

2929
[features]
3030
default = ["std"]

benchmarking/Cargo.toml

+11-11
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@ edition = "2021"
99

1010
[dependencies]
1111
serde = { version = "1.0.136", optional = true }
12-
paste = "1.0"
12+
paste = "1.0.7"
1313
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false }
14-
scale-info = { version = "2.0.1", default-features = false, features = ["derive"] }
15-
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
16-
sp-runtime-interface = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
17-
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
18-
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
19-
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
20-
sp-storage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
21-
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
22-
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
14+
scale-info = { version = "2.1", default-features = false, features = ["derive"] }
15+
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
16+
sp-runtime-interface = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
17+
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
18+
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
19+
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
20+
sp-storage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
21+
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
22+
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
2323
log = { version = "0.4.14", default-features = false }
2424

2525
[dev-dependencies]
26-
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
26+
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19" }
2727
hex-literal = "0.3.4"
2828

2929
[features]

currencies/Cargo.toml

+8-8
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ authors = ["Laminar Developers <[email protected]>"]
88
edition = "2021"
99

1010
[dependencies]
11-
scale-info = { version = "2.0.1", default-features = false, features = ["derive"] }
11+
scale-info = { version = "2.1", default-features = false, features = ["derive"] }
1212
serde = { version = "1.0.136", optional = true }
1313
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false }
14-
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
15-
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
16-
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
14+
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
15+
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
16+
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
1717

18-
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
19-
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18", default-features = false }
18+
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
19+
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19", default-features = false }
2020

2121
orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false }
2222
orml-utilities = { path = "../utilities", version = "0.4.1-dev", default-features = false }
2323

2424
[dev-dependencies]
25-
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
26-
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.18" }
25+
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19" }
26+
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.19" }
2727
orml_tokens = { package = "orml-tokens", path = "../tokens", version = "0.4.1-dev" }
2828

2929
[features]

currencies/src/lib.rs

+11-79
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ pub mod module {
8181

8282
#[pallet::config]
8383
pub trait Config: frame_system::Config {
84-
type Event: From<Event<Self>> + IsType<<Self as frame_system::Config>::Event>;
85-
8684
type MultiCurrency: TransferAll<Self::AccountId>
8785
+ MultiCurrencyExtended<Self::AccountId>
8886
+ MultiLockableCurrency<Self::AccountId>
@@ -109,36 +107,6 @@ pub mod module {
109107
DepositFailed,
110108
}
111109

112-
#[pallet::event]
113-
#[pallet::generate_deposit(pub(crate) fn deposit_event)]
114-
pub enum Event<T: Config> {
115-
/// Currency transfer success.
116-
Transferred {
117-
currency_id: CurrencyIdOf<T>,
118-
from: T::AccountId,
119-
to: T::AccountId,
120-
amount: BalanceOf<T>,
121-
},
122-
/// Update balance success.
123-
BalanceUpdated {
124-
currency_id: CurrencyIdOf<T>,
125-
who: T::AccountId,
126-
amount: AmountOf<T>,
127-
},
128-
/// Deposit success.
129-
Deposited {
130-
currency_id: CurrencyIdOf<T>,
131-
who: T::AccountId,
132-
amount: BalanceOf<T>,
133-
},
134-
/// Withdraw success.
135-
Withdrawn {
136-
currency_id: CurrencyIdOf<T>,
137-
who: T::AccountId,
138-
amount: BalanceOf<T>,
139-
},
140-
}
141-
142110
#[pallet::pallet]
143111
pub struct Pallet<T>(_);
144112

@@ -160,8 +128,7 @@ pub mod module {
160128
) -> DispatchResult {
161129
let from = ensure_signed(origin)?;
162130
let to = T::Lookup::lookup(dest)?;
163-
<Self as MultiCurrency<T::AccountId>>::transfer(currency_id, &from, &to, amount)?;
164-
Ok(())
131+
<Self as MultiCurrency<T::AccountId>>::transfer(currency_id, &from, &to, amount)
165132
}
166133

167134
/// Transfer some native currency to another account.
@@ -176,15 +143,7 @@ pub mod module {
176143
) -> DispatchResult {
177144
let from = ensure_signed(origin)?;
178145
let to = T::Lookup::lookup(dest)?;
179-
T::NativeCurrency::transfer(&from, &to, amount)?;
180-
181-
Self::deposit_event(Event::Transferred {
182-
currency_id: T::GetNativeCurrencyId::get(),
183-
from,
184-
to,
185-
amount,
186-
});
187-
Ok(())
146+
T::NativeCurrency::transfer(&from, &to, amount)
188147
}
189148

190149
/// update amount of account `who` under `currency_id`.
@@ -199,8 +158,7 @@ pub mod module {
199158
) -> DispatchResult {
200159
ensure_root(origin)?;
201160
let dest = T::Lookup::lookup(who)?;
202-
<Self as MultiCurrencyExtended<T::AccountId>>::update_balance(currency_id, &dest, amount)?;
203-
Ok(())
161+
<Self as MultiCurrencyExtended<T::AccountId>>::update_balance(currency_id, &dest, amount)
204162
}
205163
}
206164
}
@@ -259,51 +217,32 @@ impl<T: Config> MultiCurrency<T::AccountId> for Pallet<T> {
259217
return Ok(());
260218
}
261219
if currency_id == T::GetNativeCurrencyId::get() {
262-
T::NativeCurrency::transfer(from, to, amount)?;
220+
T::NativeCurrency::transfer(from, to, amount)
263221
} else {
264-
T::MultiCurrency::transfer(currency_id, from, to, amount)?;
222+
T::MultiCurrency::transfer(currency_id, from, to, amount)
265223
}
266-
Self::deposit_event(Event::Transferred {
267-
currency_id,
268-
from: from.clone(),
269-
to: to.clone(),
270-
amount,
271-
});
272-
Ok(())
273224
}
274225

275226
fn deposit(currency_id: Self::CurrencyId, who: &T::AccountId, amount: Self::Balance) -> DispatchResult {
276227
if amount.is_zero() {
277228
return Ok(());
278229
}
279230
if currency_id == T::GetNativeCurrencyId::get() {
280-
T::NativeCurrency::deposit(who, amount)?;
231+
T::NativeCurrency::deposit(who, amount)
281232
} else {
282-
T::MultiCurrency::deposit(currency_id, who, amount)?;
233+
T::MultiCurrency::deposit(currency_id, who, amount)
283234
}
284-
Self::deposit_event(Event::Deposited {
285-
currency_id,
286-
who: who.clone(),
287-
amount,
288-
});
289-
Ok(())
290235
}
291236

292237
fn withdraw(currency_id: Self::CurrencyId, who: &T::AccountId, amount: Self::Balance) -> DispatchResult {
293238
if amount.is_zero() {
294239
return Ok(());
295240
}
296241
if currency_id == T::GetNativeCurrencyId::get() {
297-
T::NativeCurrency::withdraw(who, amount)?;
242+
T::NativeCurrency::withdraw(who, amount)
298243
} else {
299-
T::MultiCurrency::withdraw(currency_id, who, amount)?;
244+
T::MultiCurrency::withdraw(currency_id, who, amount)
300245
}
301-
Self::deposit_event(Event::Withdrawn {
302-
currency_id,
303-
who: who.clone(),
304-
amount,
305-
});
306-
Ok(())
307246
}
308247

309248
fn can_slash(currency_id: Self::CurrencyId, who: &T::AccountId, amount: Self::Balance) -> bool {
@@ -328,16 +267,10 @@ impl<T: Config> MultiCurrencyExtended<T::AccountId> for Pallet<T> {
328267

329268
fn update_balance(currency_id: Self::CurrencyId, who: &T::AccountId, by_amount: Self::Amount) -> DispatchResult {
330269
if currency_id == T::GetNativeCurrencyId::get() {
331-
T::NativeCurrency::update_balance(who, by_amount)?;
270+
T::NativeCurrency::update_balance(who, by_amount)
332271
} else {
333-
T::MultiCurrency::update_balance(currency_id, who, by_amount)?;
272+
T::MultiCurrency::update_balance(currency_id, who, by_amount)
334273
}
335-
Self::deposit_event(Event::BalanceUpdated {
336-
currency_id,
337-
who: who.clone(),
338-
amount: by_amount,
339-
});
340-
Ok(())
341274
}
342275
}
343276

@@ -608,7 +541,6 @@ where
608541
let actual_deposit = deposit_result.peek();
609542
ensure!(actual_deposit == amount, Error::<T>::DepositFailed);
610543
}
611-
612544
Ok(())
613545
}
614546

0 commit comments

Comments
 (0)