Skip to content
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

fungibles methods should not consume AssetId #3968

Open
liamaharon opened this issue Apr 3, 2024 · 2 comments · May be fixed by #4224
Open

fungibles methods should not consume AssetId #3968

liamaharon opened this issue Apr 3, 2024 · 2 comments · May be fixed by #4224
Labels
C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. C2-good-first-issue A task for a first time contributor to become familiar with the Polkadot-SDK. T1-FRAME This PR/Issue is related to core FRAME, the framework.

Comments

@liamaharon
Copy link
Contributor

liamaharon commented Apr 3, 2024

Methods such as

fn balance(asset: Self::AssetId, who: &AccountId) -> Self::Balance;
should take a ref rather than consume the AssetId.

It was probably written this way back when AssetIds were small and implemented Copy, but that's no longer the case with the increasing usage of XCM Locations as AssetIds.

All relevant fungibles methods should be updated, and unnecessary cloning of large types removed (e.g. in the asset-conversion pallet).

@liamaharon liamaharon added C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. T1-FRAME This PR/Issue is related to core FRAME, the framework. C2-good-first-issue A task for a first time contributor to become familiar with the Polkadot-SDK. labels Apr 3, 2024
@bkontur
Copy link
Contributor

bkontur commented Apr 3, 2024

Related issue for XCM Location: #3038

@dianpopa dianpopa linked a pull request Apr 20, 2024 that will close this issue
@dianpopa
Copy link

should be fixed by #4224

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. C2-good-first-issue A task for a first time contributor to become familiar with the Polkadot-SDK. T1-FRAME This PR/Issue is related to core FRAME, the framework.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants