Expand description

§Moonbeam Foreign Assets pallet

This pallets allow to create and manage XCM derivative assets (aka. foreign assets).

Each asset is implemented by an evm smart contract that is deployed by this pallet The evm smart contract for each asset is trusted by the runtime, and should be deployed only by the runtime itself.

This pallet made several assumptions on theses evm smarts contracts:

  • Only this pallet should be able to mint and burn tokens
  • The following selectors should be exposed and callable only by this pallet account:
    • burnFrom(address, uint256)
    • mintInto(address, uint256)
    • pause(address, uint256)
    • unpause(address, uint256)
  • The smart contract should expose as weel the ERC20.transfer selector

Each asset has a unique identifier that can never change. This identifier is named “AssetId”, it’s an integer (u128). This pallet maintain a two-way mapping beetween each AssetId the XCM Location of the asset.

Re-exports§

Modules§

  • The pallet module in each FRAME pallet hosts the most important items needed to construct this pallet.
  • Autogenerated weights for pallet_foreign_asset_creator

Enums§

Traits§