Acala Developers
EVMAccounts Predeploy Contract
You can use this predeploy contract to call evm-accounts pallet
This contracts will interact with evm-accounts pallet
function claimDefaultEvmAddress(bytes32 accountId) external nonpayable returns (bool)
Claim account mapping between AccountId and a generated EvmAddress based off of the AccountId.
It'll emit an {ClaimAccount} event.
Name | Type | Description |
---|---|---|
accountId | bytes32 | The substrate account. |
Name | Type | Description |
---|---|---|
_0 | bool | Returns a boolean value indicating whether the operation succeeded. |
function getAccountId(address evmAddress) external view returns (bytes32)
Get the AccountId used to generate the given EvmAddress.
Name | Type | Description |
---|---|---|
evmAddress | address | The EVM address. |
Name | Type | Description |
---|---|---|
_0 | bytes32 | Returns (accountId). |
function getEvmAddress(bytes32 accountId) external view returns (address)
Get the EvmAddress associated with a given AccountId or the underlying EvmAddress of the AccountId.
Name | Type | Description |
---|---|---|
accountId | bytes32 | The substrate account. |
Name | Type | Description |
---|---|---|
_0 | address | Returns (evmAddress). Return address(0x0) if the AccountId is not mapped. |
event ClaimAccount(address indexed sender, bytes32 indexed accountId, address indexed evmAddress)
Mapping between Substrate accounts and EVM accounts claim account event.
Name | Type | Description |
---|---|---|
sender indexed |
address | The sender of the transaction. |
accountId indexed |
bytes32 | The substrate account. |
evmAddress indexed |
address | The mapped EVM accounts. |