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

Pallet Assets: Create new asset classes from genesis config #9742

Merged
9 commits merged into from
Sep 30, 2021

Conversation

vgeddes
Copy link
Contributor

@vgeddes vgeddes commented Sep 9, 2021

This change allows chain developers to create new asset classes via genesis config. This is useful for asset classes controlled by the by the root account of a parachain.

Currently the assets pallet requires that stakeholders create a new asset class via a dispatchable (presumably invoked via an extrinsic). This limits the utility of the assets pallets. Our parachain would like to create new asset classes via a loosely coupled trait, and/or via genesis config. This PR addresses the latter.

If you think this is the right approach, I can go ahead and create companion PRs for Statemint, etc in the Cumulus repo

Polkadot address: 13qBjpFmDbf5vyumEcqpUji5V2iVzsZb6oN7d1qH7i2ZRHep

@vgeddes vgeddes changed the title Pallet Assets: Allow creating new asset classes from genesis config Pallet Assets: Create new asset classes from genesis config Sep 9, 2021
@shawntabrizi
Copy link
Member

This seems fine, but you dont want to give any genesis balances?

I would expect a vec of Vec<(AccountId, Balance)> for giving users balances at the start.

@shawntabrizi shawntabrizi added B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D5-nicetohaveaudit ⚠️ PR contains trivial changes to logic that should be properly reviewed. labels Sep 9, 2021
@vgeddes
Copy link
Contributor Author

vgeddes commented Sep 10, 2021

I agree, I'll add that too. Also for asset metadata.

vgeddes and others added 2 commits September 29, 2021 23:01
Improve error message

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Improve error message

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
@shawntabrizi
Copy link
Member

shawntabrizi commented Sep 30, 2021

@vgeddes please merge master.

And follow the instructions below.

@shawntabrizi
Copy link
Member

/tip small

@substrate-tip-bot
Copy link

Please fix the following problems before calling the tip bot again:

  • Contributor did not properly post their Polkadot or Kusama address. Make sure the pull request has: "{network} address: {address}".

@vgeddes
Copy link
Contributor Author

vgeddes commented Sep 30, 2021

Awesome, thanks for the tip! I've merged in master and pasted my address in the PR description, as well as below:

Polkadot address: 13qBjpFmDbf5vyumEcqpUji5V2iVzsZb6oN7d1qH7i2ZRHep

@bkchr
Copy link
Member

bkchr commented Sep 30, 2021

/tip small

@substrate-tip-bot
Copy link

A small tip was successfully submitted for vgeddes (13qBjpFmDbf5vyumEcqpUji5V2iVzsZb6oN7d1qH7i2ZRHep on polkadot).

https://polkadot.js.org/apps/#/treasury/tips

@shawntabrizi
Copy link
Member

bot merge

@ghost
Copy link

ghost commented Sep 30, 2021

Trying merge.

@ghost ghost merged commit 3302199 into paritytech:master Sep 30, 2021
ordian added a commit that referenced this pull request Oct 2, 2021
* master: (67 commits)
  Downstream `node-template` pull (#9915)
  Implement core::fmt::Debug for BoundedVec (#9914)
  Quickly skip invalid transactions during block authorship. (#9789)
  Add SS58 prefix for Automata (#9805)
  Clean up sc-peerset (#9806)
  Test each benchmark case in own #[test] (#9860)
  Add build with docker section to README (#9792)
  Simple Trait to Inspect Metadata (#9893)
  Pallet Assets: Create new asset classes from genesis config (#9742)
  doc: subkey usage (#9905)
  Silence alert about large-statement-fetcher (#9882)
  Fix democracy on-initialize weight (#9890)
  Fix basic authorship flaky test (#9906)
  contracts: Add event field names (#9896)
  subkey readme update on install (#9900)
  add feature wasmtime-jitdump (#9871)
  Return `target_hash` for finality_target instead of an Option (#9867)
  Update wasmtime to 0.29.0 (#9552)
  Less sleeps (#9848)
  remove unidiomatic (#9895)
  ...
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D5-nicetohaveaudit ⚠️ PR contains trivial changes to logic that should be properly reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants