[−][src]Crate artemis_asset
Asset
The asset module provides functionality for handling bridged asset balances.
Overview
This module is used by the ETH and ERC20 pallets to store account balances for bridged assets.
Each asset is identified by a unique H160
hash. This is useful for tracking ERC20 tokens which on Ethereum are identified by a 20-byte contract address.
For various reasons, we built our own asset pallet instead of reusing existing work:
assets
: Too high-level and limited for our needsgeneric-asset
: Its enforced permissions system implies trusted operations. But our system is designed to be trustless.balances
: Only stores balances for a single asset. Our ERC20 pallet supports multiple different ERC20 assets.
Additionally, we need to store balances using U256
, which seemed difficult or impossible to plug into the above pallets.
Interface
Dispatchable Calls
transfer
: Transferring a balance between accounts.
Public Functions
do_mint
: Mint to an account's free balance.do_burn
: Burn an account's free balance.
Structs
Account | |
AccountData | |
Module | |
TotalIssuance |
Enums
Call | Dispatchable calls. |
Error | |
RawEvent | Events for this module. |
Traits
Trait |
Type Definitions
Event |