Crate pallet_evm_precompile_assets_erc20

Source

Structs§

Erc20AssetsPrecompileSet
The following distribution has been decided for the precompiles 0-1023: Ethereum Mainnet Precompiles 1024-2047 Precompiles that are not in Ethereum Mainnet but are neither Astar specific 2048-4095 Astar specific precompiles Asset precompiles can only fall between 0xFFFFFFFF00000000000000000000000000000000 - 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF The precompile for AssetId X, where X is a u128 (i.e.16 bytes), if 0XFFFFFFFF + Bytes(AssetId) In order to route the address to Erc20AssetsPrecompile, we first check whether the AssetId exists in pallet-assets We cannot do this right now, so instead we check whether the total supply is zero. If so, we do not route to the precompiles This means that every address that starts with 0xFFFFFFFF will go through an additional db read, but the probability for this to happen is 2^-32 for random addresses

Enums§

Erc20AssetsPrecompileSetCall

Constants§

SELECTOR_LOG_APPROVAL
Solidity selector of the Approval log, which is the Keccak of the Log signature.
SELECTOR_LOG_TRANSFER
Solidity selector of the Transfer log, which is the Keccak of the Log signature.

Traits§

AddressToAssetId
This trait ensure we can convert EVM address to AssetIds We will require Runtime to have this trait implemented

Type Aliases§

AssetIdOf
Alias for the Asset Id type for the provided Runtime and Instance.
BalanceOf
Alias for the Balance type for the provided Runtime and Instance.