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

[pallet-assets] add asset_exists(id: AssetId) function #12782

Merged

Conversation

dharjeezy
Copy link
Contributor

@dharjeezy dharjeezy commented Nov 26, 2022

Checks if an asset exists via loose coupling(the Inspect trait).

closes #12444

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
@joepetrowski
Copy link
Contributor

I think you should add this to fungible::Inspect too.

@dharjeezy
Copy link
Contributor Author

I think you should add this to fungible::Inspect too.

Alright

@dharjeezy
Copy link
Contributor Author

I think you should add this to fungible::Inspect too.

@joepetrowski in this case, are we going to introduce a new type AssetId: AssetId; since it isn't in the trait initally
?

@joepetrowski
Copy link
Contributor

That is a great point. Seems obvious now, but looking at fungible I don't think it makes sense to add AssetId to it. In that case I'm OK with this PR.

@joepetrowski joepetrowski added A0-please_review Pull request needs code review. B3-apinoteworthy C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels Dec 8, 2022
@ggwpez
Copy link
Member

ggwpez commented Dec 8, 2022

bot rebase

@paritytech-processbot
Copy link

Rebased

@ggwpez
Copy link
Member

ggwpez commented Dec 8, 2022

bot merge

@Polkadot-Forum
Copy link

This pull request has been mentioned on Polkadot Forum. There might be relevant details there:

https://forum.polkadot.network/t/polkadot-release-analysis-v0-9-36/1529/1

ltfschoen pushed a commit to ltfschoen/substrate that referenced this pull request Feb 22, 2023
)

* check if an asset exists via loose coupling

* Update frame/support/src/traits/tokens/fungibles.rs

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
Co-authored-by: parity-processbot <>
ark0f pushed a commit to gear-tech/substrate that referenced this pull request Feb 27, 2023
)

* check if an asset exists via loose coupling

* Update frame/support/src/traits/tokens/fungibles.rs

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
Co-authored-by: parity-processbot <>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[pallet-assets] add asset_exists(id: AssetId) function
4 participants