Acala Wiki
LearnBuildMaintain
  • Acala & Karura Wiki
  • Acala 2.0
    • Overview
    • Execution Roadmap
    • aUSD SEED (aSEED)
      • aSEED Integration Guide
      • aSEED Redemption Guide
    • ACA
      • ACA/KAR Staking
    • Universal Asset Hub (UAH)
    • Euphrates DApp
  • Learn
    • Acala Introduction
      • Acala Dollar
      • AcalaSwap
      • Homa Liquid Staking
      • Redenomination of ACA
    • Trilogy Networks
    • Flexible Fees
      • How to change default fee token
    • Governance Overivew
      • Participate in Democracy
      • How to Verify a Runtime Upgrade
      • How to Verify Referendum Proposal
    • Treasury
    • Acala EVM+
      • Why Acala EVM+
      • Existing Solutions
      • Acala EVM+
        • Composable DeFi Stack
        • Flexible Fees
        • EVM Account
        • On-chain Scheduler
        • Queryable & Lightweight
        • Upgradable Contracts
        • Compatible Toolings
        • No Dust Account
      • How does it work?
  • Get started
    • Acala Network
      • Acala Launch Phases
      • Wallet & Account
        • Account Generation
          • Polkadot{.js} Browser Extension
          • Polkawallet Mobile App
          • Ledger Hardware Wallet
        • Exchange Withdraw/Deposit
        • Balance Type and Vesting
        • Check Address for Different Chains
      • Acala's DOT Bridge
      • Acala Assets
      • Governance
      • Acala Web Apps
      • Acala Mobile
    • Karura Network
      • Karura Launch Phases
      • Check Distribution
      • Wallets & Account
        • Account Generation
          • Polkadot{.js} Browser Extension
          • Polkawallet Mobile App
          • Ledger Hardware Wallet
        • Exchange Withdraw/Deposit
        • Balance Type & Vesting
        • Check Address for Different Chains
      • Inter Kusama Transfer
      • Karura Assets
      • Karura Web Apps
      • Governance
      • Transaction Fees
    • Mandala Testnet
  • Integrate
    • Acala Network
      • Protocol Info
      • Token Transfer
      • Node Interaction
      • Full Node
      • Collator
    • Karura Network
      • Protocol Info
      • Token Transfer
      • Node Interaction
      • Full Node
      • Collator
  • Build
    • EVM+ documentation
    • SDKs
      • Acala Stablecoin
      • Homa Liquid Staking
      • AcalaSwap
      • Homa Staking
    • Guides
      • Node Interaction
      • Transaction Construction
    • Build DApps
      • Deploy Ecosystem Modules
      • Composable Chains
        • Open HRMP Channel
        • Bridge Tokens
        • Cross-chain Listing
      • Open-Web3-Stack & ORML
      • Smart Contracts
        • Acala EVM Overview
        • Get Started
          • Connect to a Node
            • Use MetaMask with EVM+
          • Setup EVM Account
          • Polkadot Explorer
          • EVM Playground
          • Use Remix
          • Use Waffle
          • Use Hardhat
          • Deploy Contracts
        • Advanced
          • Use Native & Cross-chain Tokens
          • Use On-chain Scheduler
            • Tutorial
          • Use Oracle Feeds
          • Upcoming Features
        • Acala EVM Hacker Guide
          • Try Acala DApp
    • Tools
    • Indexers
      • SubQuery
    • Miscellaneous
      • Runtime Events
      • Modules
    • Cross Chain DeFi
  • Ecosystem
    • General Info
    • Alliance
    • Community
    • Contribution & Rewards
      • Acala Old Friend NFT
    • Ecosystem
    • Media Kits
    • Ledger Generic App Migration
  • Crowdloans
    • What are crowdloans
    • Acala Crowdloan
      • Crowdloan Event
      • Crowdloan Rewards
      • Claim ACA
      • How to Crowdloan
      • FAQ
      • Acala Quests
        • Attaching Polkawallet to Polkadot.js Extension
      • DOT Address
        • Creating a New DOT Account
        • Becoming a DOT Holder
        • Unstaking Your DOT
          • Unstaking Your DOT Tokens on Polkadot.{js} Extension
          • Unstaking Your DOT Tokens on Polkawallet
    • Karura Crowdloan
      • Crowdloan Event
      • Crowdloan Rewards
      • Claim KAR
      • How to Crowdloan
      • FAQ
      • KSM Address
        • Creating a New KSM Account
        • Check KSM Address
        • Unstaking Your KSM
          • Unstaking Your KSM Tokens on Polkawallet
          • Unstaking Your KSM Tokens on Polkadot.{js} Extension
      • Finding Tokens and NFTs
  • Misc
    • aUSD Incident
    • Contributing
    • Glossary
Powered by GitBook
On this page
  • Single Wallet, Single Account Experience
  • Setup EVM Account
  • 1. Bind an auto-generate EVM Account
  • 2. Bind an Existing Ethereum Account

Was this helpful?

Edit on GitHub
  1. Build
  2. Build DApps
  3. Smart Contracts
  4. Get Started

Setup EVM Account

PreviousUse MetaMask with EVM+NextPolkadot Explorer

Last updated 6 months ago

Was this helpful?

Single Wallet, Single Account Experience

Users can use one extension/wallet, and a single Substrate account to interact with the Substrate runtime, contracts in EVM, and wasm contracts or a hybrid of these. If a user wants to use a particular Ethereum address, then simply link it with his/her Substrate address (basically proving the user owns both addresses), thereafter the user can just use the Substrate account with or alike to sign any Ethereum transactions seamlessly.

This allows users to use all functionalities within Acala and cross-chain capabilities without managing multiple accounts or wallets.

Setup EVM Account

A user on Acala will always have a Substrate-based account that enables users to easily navigate multiple blockchains and sign any (EVM and Susbtrate) transactions with a single account. Read more on Acala Substrate Account . Follow the guide or to generate a Substrate account.

To enable Single Account and use Acala EVM, you either

  1. Bind an auto-generated Ethereum address OR

  2. Bind an existing Ethereum account to the Substrate account

1. Bind an auto-generate EVM Account

A user can generate an EVM address for each Substrate account. The user then can bind the EVM address to the Substrate account, so balances of native tokens e.g. DOT, renBTC, aUSD etc. on the Substrate account, are then available on the EVM address to use.

In the Acala EVM, if funds are sent to a Substrate account without an associated EVM address, an EVM address will be automatically generated and bound with the Substrate account.

Balances are automatically synchronized between the Substrate account and the associated EVM address. For example, a user teleports 10 renBTC to Acala, his/her balance will be shown in the Substrate account, the balance will also be shown and transferrable in the EVM address.

EVM Address Generation

The EVM Address is generated using the blake2_256 hash function with a prefix evm and the associated Substrate account as input. Check out the source code .

blake2_256("evm:" ++ account_id)[0..20]

Claiming the default EVM address

Step 1: Select the Polkadot account

If the account is created and the extension is installed correctly, the account should be available in the using the selected account dropdown.

Step 2: Select the correct extrinsic

To claim the default EVM address, select evmAddress from the submit the following extrinsic dropdown and select the claimDefaultAccount() option.

Step 3: Claim the account

Using the Send transaction, the Substrate wallet should prompt you to sign the transaction. Once the transaction is signed and added to the blockchain, your accounts should be bound.

Step 4: Validate the account binding

Once the accounts have been bound, you can validate the binding of the accounts, using the same Polkadot.js web app.

The chain state is validated using state queries, which can be found under Developer dropdown's Chain state option.

Select the evmAccounts from the selected state query dropdown. The evmAddress(AccountId32) option should return the EVM address bound to the Substrate account selected in the dropdown below.

Pressing the + button should query the chain for the associated EVM address and return it:

2. Bind an Existing Ethereum Account

In any case, if users want to use an existing Ethereum account in Acala EVM, this address will need to be claimed and bound to their Subatrate account.

One Substrate account can only be associated with one Ethereum address. A Substrate address already linked to a generated EVM address can no longer link to an existing Ethereum address and vice versa.

Binding an existing Ethereum account requires users to prove they own the Ethereum account private key, by signing a message, include it in a claim transaction and send it to the Acala network.

Step 1: Get the genesis hash

  • Copy the Genesis Hash hex string

Step 2: Get the Chain ID for your target address

  • Select the Developer tab, then Chain state from the dropdown

  • Select Constant and then evm from the constant query dropdown

  • Choose chainId from the method/action dropdown

  • Click the + button on the right

  1. Select the right account in Metamask

  2. Fill in the Substrate address, Chain id & Genesis hash

  3. Click Sign & copy the signature to the next step

The ethAddress should be the same as your Metamask wallet address that you used above to generate the signature.

  1. Select evmAcounts from the extrinsic dropdown menu

  2. Select claimAccount(ethAddress, ethSignature) from the method/action dropdown

  3. Fill in the ethAddress & ethSignature

  4. Click Submit Transaction

Step 5: Confirm the bindings

  1. Select the Developer tab, then Chain state from the dropdown

  2. Select Storage and then evmAccounts from the state query dropdown

  3. Click the + button on the right

  4. Double check that the evmAccounts.evmAddresses is indeed the right one.

Use Cases

Below are two potential use cases of binding an existing Ethereum address.

Use Case 1

For example, a DeFi protocol on Ethereum is now expanding its operation to Polkadot, by deploying their contracts on the Acala network. They will this new branch by airdropping tokens to their existing users if they also use the protocols on Acala.

The easiest way is to airdrop tokens to existing Ethereum addresses on Acala. Hence users would just bind their current Ethereum address to a Substrate address, use it for any EVM transactions, and receive airdrops.

Use Case 2

Navigate to the . The ability to claim the default EVM address can be found under Extrinsics in the Developer tab.

If you haven't yet installed the Polkadot{js} extension and created an account, please do so by following the steps .

In case you have no funds in the Substrate account, please use the #acala-testnet-faucet channel in our , to get some. You will need the funds to sent the transaction to bind the Substrate and EVM accounts.

Select the Metadata from the Settings Section of the

Step 3: Create the signature of the claim on the

Step 4: Claim Account on the Developer Section of the

For DApps like , users are required to sign messages using Ethereum private key. Using Linkdrop on Acala, would require users to claim their existing Ethereum address, and bind it to their Substrate account. Thereafter they can send transactions on behalf of the Ethereum account.

Polkadot.js web app
here
Discord
Polkadot App
EVM+ Playground
Polkadot App
Linkdrop
Polkadot{js} extension
here
here
here
here
Developer > Extrinsics
Sign and Submit transaction confirmation
Developer > Chain state
Successful query for bound EVM address
Step 1: Getting the Genesis hash
Developer > Chain state > Constants > evm > chainId
Step 3: Create the signature of the claim
Step 4: Fill in eth address and eth signature
Developer > Chain state > Storage > evmAccounts > evmAddresses