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

foreign asset creator pallet #15

Merged
merged 11 commits into from
Jan 9, 2024

Conversation

girazoki
Copy link
Collaborator

@girazoki girazoki commented Dec 8, 2023

This PR proposes a pallet that is similar to the asset-manager from moonbeam but it is a simplified version of it. In this case, the foreign-asset-creator-pallet is only responsible for creating and maintaining an assetId<->ForeignAsset mapping to ease the following situations:

  • knowing which assetId to touch whenever we receive an XCM MultiAsset
  • knowing which MultiAsset to send when we are told to send a specific assetId to another chain

Important changes:

  • We allow the creator to decide an assetId instead of deriving it ourselves through some other mechanism. The main reason for having a custom derivation for the assetId was that one could find a collision with a smart contract on the precompile address, but I believe this case is very ethereum specific and could be addressed in different manners (for instance, by using a smaller assetId type)

  • No units per second, this if needed should be done in a different pallet

  • No local asset creation

]

runtime-benchmarks = [ "frame-benchmarking" ]
try-runtime = [ "frame-support/try-runtime" ]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now try-runtime is a separate binary, so we don't need this rust feature anymore

@librelois
Copy link
Collaborator

@girazoki can you merge master?

@girazoki
Copy link
Collaborator Author

girazoki commented Jan 4, 2024

will do yes

@girazoki
Copy link
Collaborator Author

girazoki commented Jan 4, 2024

Done @librelois but I still want to push some benchmarking code

@girazoki
Copy link
Collaborator Author

girazoki commented Jan 9, 2024

@librelois this should be now ready tpo be merged

Copy link
Collaborator

@librelois librelois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@girazoki girazoki merged commit b5ec213 into main Jan 9, 2024
8 of 10 checks passed
@girazoki girazoki deleted the girazoki-simplified-foreign-asset-creator branch January 9, 2024 14:31
girazoki added a commit to moondance-labs/moonkit that referenced this pull request Jan 9, 2024
* foreign asset creator pallet

* add maybe equivalence

* lock

* Add benchmarks

* benchmarks

* at least 16 bit unsigned

* update

* add benchmarks

* add weights·

* fix tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants