Transfer TAO from Metamask to SS58 Address
In this tutorial you will learn how to transfer TAO from your Metamask wallet to your Bittensor SS58 address for a coldkey (wallet) or a hotkey. There are two different options:
- Option 1: Transfer using a precompiled contract.
- Option 2: Transfer using the
withdraw
extrinsic in theevm
pallet in subtensor blockchain.
Prerequisites
- Node.js (v16 or later recommended)
- npm or yarn
- Clone the Bittensor EVM examples repo
- Get set up for using EVM wallet on testnet
- Install the EVM-Bittensor repo, containing scripts and examples.
Option 1: Transfer using a Precompiled Contract
Best for: Most users. You do NOT need the private key or seed for your SS58 address.
This option uses a precompiled contract to transfer TAO from your Metamask wallet to any SS58 address (coldkey or hotkey).
Configure the destination address
Open withdraw.js
in the EVM-Bittensor repo. Find the following line:
// Destination address can be replaced with any ss58 address here:
const destinationAddress = account.address;
Replace it with your own SS58 address:
const destinationAddress = "5HgU7B3xfSfisR1A7wDMt7FHX5Uizj6xtWWHwhwJMZSrdN7y";