-
Notifications
You must be signed in to change notification settings - Fork 680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XCM: Proper Asset Checking #487
Labels
I5-enhancement
An additional feature request.
T1-FRAME
This PR/Issue is related to core FRAME, the framework.
T6-XCM
This PR/Issue is related to XCM.
Comments
the-right-joyce
added
I5-enhancement
An additional feature request.
and removed
J0-enhancement
labels
Aug 25, 2023
serban300
pushed a commit
to serban300/polkadot-sdk
that referenced
this issue
Apr 8, 2024
* fixed client used in headers maintain * fmt
serban300
pushed a commit
to serban300/polkadot-sdk
that referenced
this issue
Apr 8, 2024
* fixed client used in headers maintain * fmt
serban300
pushed a commit
to serban300/polkadot-sdk
that referenced
this issue
Apr 8, 2024
* fixed client used in headers maintain * fmt
serban300
pushed a commit
to serban300/polkadot-sdk
that referenced
this issue
Apr 8, 2024
* fixed client used in headers maintain * fmt
serban300
pushed a commit
to serban300/polkadot-sdk
that referenced
this issue
Apr 9, 2024
* fixed client used in headers maintain * fmt
serban300
pushed a commit
to serban300/polkadot-sdk
that referenced
this issue
Apr 9, 2024
* fixed client used in headers maintain * fmt
serban300
pushed a commit
to serban300/polkadot-sdk
that referenced
this issue
Apr 9, 2024
* fixed client used in headers maintain * fmt
serban300
pushed a commit
to serban300/polkadot-sdk
that referenced
this issue
Apr 9, 2024
* fixed client used in headers maintain * fmt
serban300
pushed a commit
to serban300/polkadot-sdk
that referenced
this issue
Apr 9, 2024
* fixed client used in headers maintain * fmt
serban300
pushed a commit
to serban300/polkadot-sdk
that referenced
this issue
Apr 9, 2024
* fixed client used in headers maintain * fmt
serban300
pushed a commit
to serban300/polkadot-sdk
that referenced
this issue
Apr 10, 2024
* fixed client used in headers maintain * fmt
serban300
pushed a commit
to serban300/polkadot-sdk
that referenced
this issue
Apr 10, 2024
* fixed client used in headers maintain * fmt
bkchr
pushed a commit
that referenced
this issue
Apr 10, 2024
* fixed client used in headers maintain * fmt
This was referenced Jun 5, 2024
acatangiu
added
the
T1-FRAME
This PR/Issue is related to core FRAME, the framework.
label
Oct 15, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
I5-enhancement
An additional feature request.
T1-FRAME
This PR/Issue is related to core FRAME, the framework.
T6-XCM
This PR/Issue is related to XCM.
Right now an account is used to represent all assets teleported to other chains (in the case that the assets are minted on the local chain) and to represent all assets teleported in from other chains (in the case that the assets are minted on a remote chain).
In the first case this is a somewhat harmless abuse of the account model, which is useful since a) it's an easy way of managing bookkeeping and b) total issuance is updated naturally to include foreign-held assets.
In the second case it is quite problematic since total issuance double-counts assets held locally as they're teleported in (once in owner's account and a second time in the checking account).
Instead, we should introduce and use a new feature in assets, uniques and balances pallets, exposed by new traits. Other pallets (e.g. ORML) which would want to be fully compatible with the teleportation system can also implement these traits.
The new trait introduces four new functions:
fn import(checking: AccountId, ... /* asset id, amount &c */)
: to be called aftermint
. Note internally that the asset has been imported. Any transfers/burn-and-mints should not alter this mark - the only way to alter the mark should be through theunimport
call.fn unimport(checking: AccountId, ... /* asset id, amount &c */) -> Result<(), ()>
: to be called beforeburn
; return anErr
if no outstandingimport
ed asset matches the asset given. Otherwise remove mark as imported.fn export(checking: AccountId, ... /* asset id, amount &c */)
: to be called afterburn
. Note internally that an asset exists in a foreign system. If total issuance is tracked then it should be increased accordingly. Any transfers/burn-and-mints should not alter this mark.fn unexport(checking: AccountId, dest: AccountId, ... /* asset id, amount &c */) -> Result<(), ()>
: Remove a mark/note previously placed on an asset byexport
. If there is no outstandingexport
ed asset, then return anErr
.The text was updated successfully, but these errors were encountered: