Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Use fungible traits for treasury pallet #13476

Open
wants to merge 116 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
ccd2ebb
First reworking of fungibles API
gavofyork Dec 14, 2022
de93255
New API and docs
gavofyork Dec 16, 2022
31ba6f2
More fungible::* API improvements
gavofyork Dec 16, 2022
0c8a27c
New ref-counting logic for old API
gavofyork Dec 19, 2022
97f7460
Missing files
gavofyork Dec 19, 2022
5027cb1
Fixes
gavofyork Dec 19, 2022
b42a687
Use the new transfer logic
gavofyork Dec 20, 2022
77d4c8e
Use fungibles for the dispatchables
gavofyork Dec 20, 2022
4485cd6
Use shelve/restore names
gavofyork Dec 20, 2022
67d8a7d
Locking works with total balance.
gavofyork Dec 22, 2022
77152ab
Merge remote-tracking branch 'origin/master' into gav-hold-freeze
gavofyork Dec 23, 2022
04a4c75
repotting and removal
gavofyork Dec 27, 2022
e84fbb5
Separate Holds from Reserves
gavofyork Jan 6, 2023
11306ed
Introduce freezes
gavofyork Jan 16, 2023
872bbcc
Merge remote-tracking branch 'origin/master' into gav-hold-freeze
gavofyork Jan 17, 2023
3f33588
Missing files
gavofyork Jan 17, 2023
900fef3
Merge remote-tracking branch 'origin/master' into gav-hold-freeze
gavofyork Jan 18, 2023
359d858
Tests for freezing
gavofyork Jan 18, 2023
428a41c
Fix hold+freeze combo
gavofyork Jan 19, 2023
f009268
More tests
gavofyork Jan 19, 2023
1d5a2d8
Fee-free dispatchable for upgrading accounts
gavofyork Jan 19, 2023
3807bb4
Benchmarks and a few fixes
gavofyork Jan 19, 2023
db5d596
Another test
gavofyork Jan 20, 2023
c609d74
Docs and refactor to avoid blanket impls
gavofyork Jan 20, 2023
3af6d09
Repot
gavofyork Jan 20, 2023
cd9343a
Fit out ItemOf fully
gavofyork Jan 20, 2023
5f5e6d1
Add events to Balanced traits
gavofyork Jan 20, 2023
176f92d
Introduced events into Hold traits
gavofyork Jan 20, 2023
1e0219a
Fix Assets pallet tests
gavofyork Jan 20, 2023
7cfd446
Assets benchmarks pass
gavofyork Jan 20, 2023
0f92a6b
Missing files and fixes
gavofyork Jan 21, 2023
4745cb8
Fixes
gavofyork Jan 21, 2023
4ee2a44
Fixes
gavofyork Jan 23, 2023
aa0eccf
Benchmarks fixes
gavofyork Jan 23, 2023
14beb70
Merge remote-tracking branch 'origin/master' into gav-hold-freeze
gavofyork Jan 23, 2023
84049b1
Fix balance benchmarks
gavofyork Jan 23, 2023
857efce
Formatting
gavofyork Jan 23, 2023
bf24b91
Expose fungible sub modules
gavofyork Jan 23, 2023
0ab291c
Merge branch 'gav-hold-freeze' into gav-nis-hold
gavofyork Jan 23, 2023
72fce5f
Move NIS to fungible API
gavofyork Jan 23, 2023
b2cae2a
Fix broken impl and add test
gavofyork Jan 23, 2023
020d11a
Merge branch 'gav-hold-freeze' into gav-nis-hold
gavofyork Jan 23, 2023
4b28afb
Fix tests
gavofyork Jan 23, 2023
d4da1a1
API for `transfer_and_hold`
gavofyork Jan 23, 2023
49fd3fc
Merge branch 'gav-hold-freeze' into gav-nis-hold
gavofyork Jan 23, 2023
bee7038
Use composite APIs
gavofyork Jan 23, 2023
f438f86
Merge branch 'gav-nis-hold' into gav-hold-freeze
gavofyork Jan 23, 2023
947d2b3
Formatting
gavofyork Jan 23, 2023
b469b45
Upgraded event
gavofyork Jan 23, 2023
ecb1765
Fixes
gavofyork Jan 23, 2023
79cf354
Fixes
gavofyork Jan 23, 2023
4c28b9d
Fixes
gavofyork Jan 23, 2023
01caead
Fixes
gavofyork Jan 23, 2023
83f47cb
Repot tests and some fixed
gavofyork Jan 24, 2023
16bdba7
Fix some bits
gavofyork Jan 24, 2023
cad82e8
Fix dust tests
gavofyork Jan 24, 2023
7b0b55c
Rename `set_balance`
gavofyork Jan 26, 2023
30de46d
becomes
gavofyork Jan 26, 2023
81dedbd
Move dust handling to fungibles API
gavofyork Jan 27, 2023
e0c1dc5
Formatting
gavofyork Jan 27, 2023
63e1698
Merge branch 'master' into gav-hold-freeze
gavofyork Jan 27, 2023
b210e19
Fixes and more refactoring
gavofyork Jan 27, 2023
6289a64
Fixes
gavofyork Jan 27, 2023
732e102
Fixes
gavofyork Jan 27, 2023
607b36a
Fixes
gavofyork Jan 27, 2023
37b999a
Fixes
gavofyork Jan 27, 2023
be3b91a
Fixes
gavofyork Jan 27, 2023
cdbd9b1
Merge branch 'master' into gav-hold-freeze
gavofyork Jan 27, 2023
dec5e42
Fixes
gavofyork Jan 28, 2023
242a8a1
Merge branch 'gav-hold-freeze' of github.com:paritytech/substrate int…
gavofyork Jan 28, 2023
f8439c1
Fixes
gavofyork Jan 28, 2023
1beffe4
Fixes
gavofyork Jan 28, 2023
75d5924
Fixes
gavofyork Jan 28, 2023
804f776
Use reducible_balance for better correctness on fees
gavofyork Feb 7, 2023
a5b6971
Reducing hold to zero should remove entry.
gavofyork Feb 7, 2023
c982d1b
Add test
gavofyork Feb 7, 2023
696b859
Docs
gavofyork Feb 7, 2023
32ee5dc
Update frame/support/src/traits/tokens/fungibles/hold.rs
gavofyork Feb 7, 2023
576f8a1
Update frame/support/src/traits/tokens/fungibles/regular.rs
gavofyork Feb 7, 2023
4a124cb
Update frame/support/src/traits/tokens/fungible/hold.rs
gavofyork Feb 7, 2023
574cdec
Update frame/support/src/traits/tokens/fungible/regular.rs
gavofyork Feb 7, 2023
c0c320d
Docs
gavofyork Feb 7, 2023
07d8132
Merge branch 'gav-hold-freeze' of github.com:paritytech/substrate int…
gavofyork Feb 7, 2023
b632c9f
Docs
gavofyork Feb 7, 2023
436fea7
Docs
gavofyork Feb 7, 2023
49caee7
Merge branch 'master' into gav-hold-freeze
gavofyork Feb 7, 2023
91b7343
Fix NIS benchmarks
gavofyork Feb 9, 2023
53fbf7d
Doc comment
gavofyork Feb 9, 2023
c7459ae
Remove post_mutation
gavofyork Feb 9, 2023
864f46a
Merge remote-tracking branch 'origin/master' into gav-hold-freeze
gavofyork Feb 23, 2023
7360c20
Fix some tests
gavofyork Feb 23, 2023
6dbdca4
Fix some grumbles
gavofyork Feb 23, 2023
543713b
Enumify bool args to fungible(s) functions
gavofyork Feb 23, 2023
78a6b18
Fix up assets and balances
gavofyork Feb 23, 2023
35760c0
Formatting
gavofyork Feb 23, 2023
0d1a458
Fix contracts
gavofyork Feb 23, 2023
1f292ae
Merge remote-tracking branch 'origin/master' into gav-hold-freeze
gavofyork Feb 24, 2023
1415e77
Fix tests & benchmarks build
gavofyork Feb 24, 2023
dd6e45f
Typify minted boolean arg
gavofyork Feb 24, 2023
4d69fb8
Typify on_hold boolean arg; renames
gavofyork Feb 24, 2023
3e513e1
Fix numerous tests
gavofyork Feb 24, 2023
e14456e
Fix dependency issue
gavofyork Feb 24, 2023
0f1cd51
Privatize dangerous API mutate_account
gavofyork Feb 24, 2023
dd200cd
Fix contracts (@alext - please check this commit)
gavofyork Feb 24, 2023
5c1ea9d
Remove println
gavofyork Feb 24, 2023
354aa13
Fix tests for contracts
athei Feb 24, 2023
82ace53
Fix broken rename
gavofyork Feb 24, 2023
36ae88e
Merge branch 'gav-hold-freeze' of github.com:paritytech/substrate int…
gavofyork Feb 24, 2023
fcb69a8
Fix broken rename
gavofyork Feb 24, 2023
a3579af
Fix broken rename
gavofyork Feb 24, 2023
a40f3a8
Docs
gavofyork Feb 24, 2023
ba9ff68
Update frame/support/src/traits/tokens/fungible/hold.rs
gavofyork Mar 3, 2023
9d5e61f
Merge remote-tracking branch 'origin/master' into gav-hold-freeze
gavofyork Mar 3, 2023
22595ef
remove from_ref_time
gavofyork Mar 3, 2023
42789a2
use fungibles traits for treasury, tips and bounties pallets
tonyalaribe Mar 6, 2023
3dad47b
Merge branch 'gav-hold-freeze' into aa/use-fungibles-traits-for-treasury
tonyalaribe Mar 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
4 changes: 4 additions & 0 deletions bin/node-template/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@ impl pallet_balances::Config for Runtime {
type ExistentialDeposit = ConstU128<EXISTENTIAL_DEPOSIT>;
type AccountStore = System;
type WeightInfo = pallet_balances::weights::SubstrateWeight<Runtime>;
type FreezeIdentifier = ();
type MaxFreezes = ();
type HoldIdentifier = ();
type MaxHolds = ();
}

parameter_types! {
Expand Down
2 changes: 1 addition & 1 deletion bin/node/cli/benches/block_production.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ fn prepare_benchmark(client: &FullClient) -> (usize, Vec<OpaqueExtrinsic>) {
let extrinsic: OpaqueExtrinsic = create_extrinsic(
client,
src.clone(),
BalancesCall::transfer { dest: dst.clone(), value: 1 * DOLLARS },
BalancesCall::transfer_allow_death { dest: dst.clone(), value: 1 * DOLLARS },
Some(nonce),
)
.into();
Expand Down
8 changes: 3 additions & 5 deletions bin/node/cli/benches/transaction_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,9 @@ fn create_account_extrinsics(
Sr25519Keyring::Alice.pair(),
SudoCall::sudo {
call: Box::new(
BalancesCall::set_balance {
BalancesCall::force_set_balance {
who: AccountId::from(a.public()).into(),
new_free: 0,
new_reserved: 0,
}
.into(),
),
Expand All @@ -156,10 +155,9 @@ fn create_account_extrinsics(
Sr25519Keyring::Alice.pair(),
SudoCall::sudo {
call: Box::new(
BalancesCall::set_balance {
BalancesCall::force_set_balance {
who: AccountId::from(a.public()).into(),
new_free: 1_000_000 * DOLLARS,
new_reserved: 0,
}
.into(),
),
Expand All @@ -184,7 +182,7 @@ fn create_benchmark_extrinsics(
create_extrinsic(
client,
account.clone(),
BalancesCall::transfer {
BalancesCall::transfer_allow_death {
dest: Sr25519Keyring::Bob.to_account_id().into(),
value: 1 * DOLLARS,
},
Expand Down
2 changes: 1 addition & 1 deletion bin/node/cli/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ mod tests {
};
let signer = charlie.clone();

let function = RuntimeCall::Balances(BalancesCall::transfer {
let function = RuntimeCall::Balances(BalancesCall::transfer_allow_death {
dest: to.into(),
value: amount,
});
Expand Down
1 change: 1 addition & 0 deletions bin/node/cli/tests/temp_base_path_works.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ use std::{

pub mod common;

#[ignore]
#[tokio::test]
async fn temp_base_path_works() {
let mut cmd = Command::new(cargo_bin("substrate"));
Expand Down
2 changes: 1 addition & 1 deletion bin/node/executor/benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ fn test_blocks(
}];
block1_extrinsics.extend((0..20).map(|i| CheckedExtrinsic {
signed: Some((alice(), signed_extra(i, 0))),
function: RuntimeCall::Balances(pallet_balances::Call::transfer {
function: RuntimeCall::Balances(pallet_balances::Call::transfer_allow_death {
dest: bob().into(),
value: 1 * DOLLARS,
}),
Expand Down
57 changes: 35 additions & 22 deletions bin/node/executor/tests/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ fn changes_trie_block() -> (Vec<u8>, Hash) {
},
CheckedExtrinsic {
signed: Some((alice(), signed_extra(0, 0))),
function: RuntimeCall::Balances(pallet_balances::Call::transfer {
function: RuntimeCall::Balances(pallet_balances::Call::transfer_allow_death {
dest: bob().into(),
value: 69 * DOLLARS,
}),
Expand All @@ -116,7 +116,7 @@ fn blocks() -> ((Vec<u8>, Hash), (Vec<u8>, Hash)) {
},
CheckedExtrinsic {
signed: Some((alice(), signed_extra(0, 0))),
function: RuntimeCall::Balances(pallet_balances::Call::transfer {
function: RuntimeCall::Balances(pallet_balances::Call::transfer_allow_death {
dest: bob().into(),
value: 69 * DOLLARS,
}),
Expand All @@ -136,14 +136,14 @@ fn blocks() -> ((Vec<u8>, Hash), (Vec<u8>, Hash)) {
},
CheckedExtrinsic {
signed: Some((bob(), signed_extra(0, 0))),
function: RuntimeCall::Balances(pallet_balances::Call::transfer {
function: RuntimeCall::Balances(pallet_balances::Call::transfer_allow_death {
dest: alice().into(),
value: 5 * DOLLARS,
}),
},
CheckedExtrinsic {
signed: Some((alice(), signed_extra(1, 0))),
function: RuntimeCall::Balances(pallet_balances::Call::transfer {
function: RuntimeCall::Balances(pallet_balances::Call::transfer_allow_death {
dest: bob().into(),
value: 15 * DOLLARS,
}),
Expand Down Expand Up @@ -183,7 +183,12 @@ fn panic_execution_with_foreign_code_gives_error() {
let mut t = new_test_ext(bloaty_code_unwrap());
t.insert(
<frame_system::Account<Runtime>>::hashed_key_for(alice()),
(69u128, 0u32, 0u128, 0u128, 0u128).encode(),
AccountInfo::<<Runtime as frame_system::Config>::Index, _> {
providers: 1,
data: (69u128, 0u128, 0u128, 1u128 << 127),
..Default::default()
}
.encode(),
);
t.insert(<pallet_balances::TotalIssuance<Runtime>>::hashed_key().to_vec(), 69_u128.encode());
t.insert(<frame_system::BlockHash<Runtime>>::hashed_key_for(0), vec![0u8; 32]);
Expand All @@ -204,9 +209,14 @@ fn bad_extrinsic_with_native_equivalent_code_gives_error() {
let mut t = new_test_ext(compact_code_unwrap());
t.insert(
<frame_system::Account<Runtime>>::hashed_key_for(alice()),
(0u32, 0u32, 0u32, 69u128, 0u128, 0u128, 0u128).encode(),
AccountInfo::<<Runtime as frame_system::Config>::Index, _> {
providers: 1,
data: (69u128, 0u128, 0u128, 1u128 << 127),
..Default::default()
}
.encode(),
);
t.insert(<pallet_balances::TotalIssuance<Runtime>>::hashed_key().to_vec(), 69_u128.encode());
t.insert(<pallet_balances::TotalIssuance<Runtime>>::hashed_key().to_vec(), 69u128.encode());
t.insert(<frame_system::BlockHash<Runtime>>::hashed_key_for(0), vec![0u8; 32]);

let r =
Expand All @@ -226,17 +236,18 @@ fn successful_execution_with_native_equivalent_code_gives_ok() {
t.insert(
<frame_system::Account<Runtime>>::hashed_key_for(alice()),
AccountInfo::<<Runtime as frame_system::Config>::Index, _> {
data: (111 * DOLLARS, 0u128, 0u128, 0u128),
providers: 1,
data: (111 * DOLLARS, 0u128, 0u128, 1u128 << 127),
..Default::default()
}
.encode(),
);
t.insert(
<frame_system::Account<Runtime>>::hashed_key_for(bob()),
AccountInfo::<<Runtime as frame_system::Config>::Index, _> {
data: (0 * DOLLARS, 0u128, 0u128, 0u128),
..Default::default()
}
AccountInfo::<
<Runtime as frame_system::Config>::Index,
<Runtime as frame_system::Config>::AccountData,
>::default()
.encode(),
);
t.insert(
Expand Down Expand Up @@ -267,17 +278,18 @@ fn successful_execution_with_foreign_code_gives_ok() {
t.insert(
<frame_system::Account<Runtime>>::hashed_key_for(alice()),
AccountInfo::<<Runtime as frame_system::Config>::Index, _> {
data: (111 * DOLLARS, 0u128, 0u128, 0u128),
providers: 1,
data: (111 * DOLLARS, 0u128, 0u128, 1u128 << 127),
..Default::default()
}
.encode(),
);
t.insert(
<frame_system::Account<Runtime>>::hashed_key_for(bob()),
AccountInfo::<<Runtime as frame_system::Config>::Index, _> {
data: (0 * DOLLARS, 0u128, 0u128, 0u128),
..Default::default()
}
AccountInfo::<
<Runtime as frame_system::Config>::Index,
<Runtime as frame_system::Config>::AccountData,
>::default()
.encode(),
);
t.insert(
Expand Down Expand Up @@ -788,17 +800,18 @@ fn successful_execution_gives_ok() {
t.insert(
<frame_system::Account<Runtime>>::hashed_key_for(alice()),
AccountInfo::<<Runtime as frame_system::Config>::Index, _> {
data: (111 * DOLLARS, 0u128, 0u128, 0u128),
providers: 1,
data: (111 * DOLLARS, 0u128, 0u128, 1u128 << 127),
..Default::default()
}
.encode(),
);
t.insert(
<frame_system::Account<Runtime>>::hashed_key_for(bob()),
AccountInfo::<<Runtime as frame_system::Config>::Index, _> {
data: (0 * DOLLARS, 0u128, 0u128, 0u128),
..Default::default()
}
AccountInfo::<
<Runtime as frame_system::Config>::Index,
<Runtime as frame_system::Config>::AccountData,
>::default()
.encode(),
);
t.insert(
Expand Down
5 changes: 4 additions & 1 deletion bin/node/executor/tests/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ pub fn sign(xt: CheckedExtrinsic) -> UncheckedExtrinsic {
}

pub fn default_transfer_call() -> pallet_balances::Call<Runtime> {
pallet_balances::Call::<Runtime>::transfer { dest: bob().into(), value: 69 * DOLLARS }
pallet_balances::Call::<Runtime>::transfer_allow_death {
dest: bob().into(),
value: 69 * DOLLARS,
}
}

pub fn from_block_number(n: u32) -> Header {
Expand Down
6 changes: 3 additions & 3 deletions bin/node/executor/tests/fees.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ fn new_account_info(free_dollars: u128) -> Vec<u8> {
frame_system::AccountInfo {
nonce: 0u32,
consumers: 0,
providers: 0,
providers: 1,
sufficients: 0,
data: (free_dollars * DOLLARS, 0 * DOLLARS, 0 * DOLLARS, 0 * DOLLARS),
data: (free_dollars * DOLLARS, 0 * DOLLARS, 0 * DOLLARS, 1u128 << 127),
}
.encode()
}
Expand Down Expand Up @@ -214,7 +214,7 @@ fn block_weight_capacity_report() {
let mut xts = (0..num_transfers)
.map(|i| CheckedExtrinsic {
signed: Some((charlie(), signed_extra(nonce + i as Index, 0))),
function: RuntimeCall::Balances(pallet_balances::Call::transfer {
function: RuntimeCall::Balances(pallet_balances::Call::transfer_allow_death {
dest: bob().into(),
value: 0,
}),
Expand Down
12 changes: 6 additions & 6 deletions bin/node/executor/tests/submit_transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ fn should_submit_signed_transaction() {
t.execute_with(|| {
let results =
Signer::<Runtime, TestAuthorityId>::all_accounts().send_signed_transaction(|_| {
pallet_balances::Call::transfer {
pallet_balances::Call::transfer_allow_death {
dest: Alice.to_account_id().into(),
value: Default::default(),
}
Expand Down Expand Up @@ -123,7 +123,7 @@ fn should_submit_signed_twice_from_the_same_account() {
t.execute_with(|| {
let result =
Signer::<Runtime, TestAuthorityId>::any_account().send_signed_transaction(|_| {
pallet_balances::Call::transfer {
pallet_balances::Call::transfer_allow_death {
dest: Alice.to_account_id().into(),
value: Default::default(),
}
Expand All @@ -135,7 +135,7 @@ fn should_submit_signed_twice_from_the_same_account() {
// submit another one from the same account. The nonce should be incremented.
let result =
Signer::<Runtime, TestAuthorityId>::any_account().send_signed_transaction(|_| {
pallet_balances::Call::transfer {
pallet_balances::Call::transfer_allow_death {
dest: Alice.to_account_id().into(),
value: Default::default(),
}
Expand Down Expand Up @@ -174,7 +174,7 @@ fn should_submit_signed_twice_from_all_accounts() {
t.execute_with(|| {
let results = Signer::<Runtime, TestAuthorityId>::all_accounts()
.send_signed_transaction(|_| {
pallet_balances::Call::transfer { dest: Alice.to_account_id().into(), value: Default::default() }
pallet_balances::Call::transfer_allow_death { dest: Alice.to_account_id().into(), value: Default::default() }
});

let len = results.len();
Expand All @@ -185,7 +185,7 @@ fn should_submit_signed_twice_from_all_accounts() {
// submit another one from the same account. The nonce should be incremented.
let results = Signer::<Runtime, TestAuthorityId>::all_accounts()
.send_signed_transaction(|_| {
pallet_balances::Call::transfer { dest: Alice.to_account_id().into(), value: Default::default() }
pallet_balances::Call::transfer_allow_death { dest: Alice.to_account_id().into(), value: Default::default() }
});

let len = results.len();
Expand Down Expand Up @@ -238,7 +238,7 @@ fn submitted_transaction_should_be_valid() {
t.execute_with(|| {
let results =
Signer::<Runtime, TestAuthorityId>::all_accounts().send_signed_transaction(|_| {
pallet_balances::Call::transfer {
pallet_balances::Call::transfer_allow_death {
dest: Alice.to_account_id().into(),
value: Default::default(),
}
Expand Down
4 changes: 2 additions & 2 deletions bin/node/runtime/src/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use crate::{
use frame_support::{
pallet_prelude::*,
traits::{
fungibles::{Balanced, CreditOf},
fungibles::{Balanced, Credit},
Currency, OnUnbalanced,
},
};
Expand All @@ -45,7 +45,7 @@ impl OnUnbalanced<NegativeImbalance> for Author {
/// Will drop and burn the assets in case the transfer fails.
pub struct CreditToBlockAuthor;
impl HandleCredit<AccountId, Assets> for CreditToBlockAuthor {
fn handle_credit(credit: CreditOf<AccountId, Assets>) {
fn handle_credit(credit: Credit<AccountId, Assets>) {
if let Some(author) = pallet_authorship::Pallet::<Runtime>::author() {
// Drop the result which will trigger the `OnDrop` of the imbalance in case of error.
let _ = Assets::resolve(&author, credit);
Expand Down
Loading