-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Allow Creation of Asset Accounts That Don't Exist Yet and Add Blocked
Status
#13843
Conversation
Good call, if someone places a deposit, someone else shouldn't be able to remove that account. Updated logic / test. |
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.
Unblocking, as it turned out, the migration is not needed since the encoded value stays the same despite the AssetAccount.status
field had got changed
bot rebase |
Rebased |
Blocked
Status
bot merge |
Error: Github API says paritytech/cumulus#2437 is not mergeable |
bot rebase |
Rebased |
bot merge |
…d` Status (#13843) * prevent frozen accounts from receiving assets * refund deposits correctly * plus refund_other * add benchmarks * start migration work * docs * add migration logic * fix freeze_creating benchmark * support instanced migrations * review * correct deposit refund * only allow depositor, admin, or account origin to refund deposits * make sure refund actually removes account * do refund changes * Asset's account deposit owner (#13874) * assets deposit owner * doc typo * remove migration * empty commit * can transfer to frozen account * remove allow_burn from refund_other * storage version back to 1 * update doc * fix benches * update docs * more tests * Update frame/assets/src/types.rs * refund updating the reason * refactor * separate refund and refund_foreign * refunds, touch_other, tests * fixes * fmt * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_assets * tests: asserts asset account counts * Account touch trait (#14063) * assets touch trait * docs * move touch trait into support/traits * permissionless flag for do_touch * Apply suggestions from code review Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * move trait to misc, drop option * Apply suggestions from code review Co-authored-by: Gavin Wood <gavin@parity.io> * correct doc * Update frame/assets/src/functions.rs --------- Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: Gavin Wood <gavin@parity.io> Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Block asset account (#14070) * replace is_fronzen flag by status enum * block asset account * remove redundant brackets * fix typo * fmt * Apply suggestions from code review Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com> * rename permissionless to check_depositor * doc fix * use account id lookup instead account id * add benchmark for touch_other --------- Co-authored-by: muharem <ismailov.m.h@gmail.com> Co-authored-by: command-bot <> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: Gavin Wood <gavin@parity.io> Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com>
What happens if a local asset's deposit is different to a foreign asset? Doesn't |
Seems a reasonable point; @muharem ^^^? |
|
…d` Status (paritytech#13843) * prevent frozen accounts from receiving assets * refund deposits correctly * plus refund_other * add benchmarks * start migration work * docs * add migration logic * fix freeze_creating benchmark * support instanced migrations * review * correct deposit refund * only allow depositor, admin, or account origin to refund deposits * make sure refund actually removes account * do refund changes * Asset's account deposit owner (paritytech#13874) * assets deposit owner * doc typo * remove migration * empty commit * can transfer to frozen account * remove allow_burn from refund_other * storage version back to 1 * update doc * fix benches * update docs * more tests * Update frame/assets/src/types.rs * refund updating the reason * refactor * separate refund and refund_foreign * refunds, touch_other, tests * fixes * fmt * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_assets * tests: asserts asset account counts * Account touch trait (paritytech#14063) * assets touch trait * docs * move touch trait into support/traits * permissionless flag for do_touch * Apply suggestions from code review Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * move trait to misc, drop option * Apply suggestions from code review Co-authored-by: Gavin Wood <gavin@parity.io> * correct doc * Update frame/assets/src/functions.rs --------- Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: Gavin Wood <gavin@parity.io> Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Block asset account (paritytech#14070) * replace is_fronzen flag by status enum * block asset account * remove redundant brackets * fix typo * fmt * Apply suggestions from code review Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com> * rename permissionless to check_depositor * doc fix * use account id lookup instead account id * add benchmark for touch_other --------- Co-authored-by: muharem <ismailov.m.h@gmail.com> Co-authored-by: command-bot <> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: Gavin Wood <gavin@parity.io> Co-authored-by: Jegor Sidorenko <5252494+jsidorenko@users.noreply.github.com>
touch_other
andrefund_other
, allowing an asset class'sFreezer
orAdmin
to create an account with zero balance in the asset class by placing a deposit; and to remove/refund. The existence of the account is represented by a newExistenceReason::DepositFrom
variant.AccountTouch
that allows other pallets totouch
an account into existence for an asset class.Blocked
(invoked by the asset class'sFreezer
via the new dispatchableblock
). UnlikeFrozen
, which prevents withdrawals from an account,Blocked
prevents both withdrawals from and deposits into the blocked account. The account can be returned to its unrestricted (Liquid
) state via the existingthaw
function.Cumulus Companion: paritytech/cumulus#2437
Made in collaborating with @muharem