---
title: "Leveraging Ethereum Developer Tools On Hedera"
id: "15846"
type: "post"
slug: "leveraging-ethereum-developer-tools-on-hedera"
published_at: "2022-08-25T16:58:00+00:00"
modified_at: "2025-12-08T19:23:37+00:00"
url: "https://hedera.com/blog/leveraging-ethereum-developer-tools-on-hedera/"
markdown_url: "https://hedera.com/blog/leveraging-ethereum-developer-tools-on-hedera.md"
excerpt: "The JSON-RPC Relay provides excellent usability for developers with existing workflows dependent on Ethereum developer tools like Truffle, Web3js, Ethers, and Hardhat to seamlessly build on Hedera. In addition, it makes it easy to integrate with Metamask."
taxonomy_category:
  - "Uncategorized"
taxonomy_post_tag:
  - "technical"
---

[Skip to content](#content)
blog

# Leveraging Ethereum Developer Tools On Hedera

August 25, 2022

![Hedera Team](/wp-content/uploads/2025/12/HH-logo-Black.jpg)

Hedera

Hedera provides secure, scalable infrastructure for real-world decentralized applications in finance, AI, and sustainability, governed by global enterprises.

Learning how to properly use new sets of developer tools requires time and effort. Many seasoned engineers already have their ol’ reliable set of frameworks and libraries they frequently use. With the release of the Hedera [JSON-RPC relay](https://github.com/hashgraph/hedera-json-rpc-relay)
, Ethereum developer tools combined with ECDSA-based Hedera accounts are available for developers only. You can continue to utilize familiar Ethereum tooling to build on Hedera. This blog speaks to the support of 4 Ethereum tools and the enablement of Metamask.

#### Supported Ethereum Developer Tools

The most common EVM-based tools and workflows across Web3 ecosystems are built on the JSON-RPC specification. You can continue to utilize the following familiar Ethereum tooling, Web3JS, Truffle, Ethers, and Hardhat, to build on Hedera thanks to the JSON-RPC Relay. As an Ethereum developer, your workflow does not have to change.

|  | web3js | Truffle | ethers | Hardhat |
| --- | --- | --- | --- | --- |
| Transfer HBARS | ✅ | ✅ | ✅ | ✅ |
| Contract Deployment | ✅ | ✅ | ✅ | ✅ |
| Can use the contract instance after deploy without re-initialization | ✅ | ✅ | ⚠️ | ⚠️ |
| Contract View Function Call | ✅ | ✅ | ✅ | ✅ |
| Contract Function Call | ✅ | ✅ | ✅ | ✅ |

You can transfer HBAR, deploy contracts, and perform contract calls bringing even greater usability to the developer community.

Check out the Web3js, Truffle, and Hardhat examples on the [repo](https://github.com/hashgraph/hedera-json-rpc-relay/tree/main/tools)
. It is important to note that when working with Ethersjs and Hardhat there is an extra step to retrieve the valid Hedera contract address. Learn more about it [here.](https://github.com/hashgraph/hedera-json-rpc-relay/tree/main/tools)

#### Getting Started

Before you get started it is important to create a new ECDSA-based account with an alias. Currently, the JSON-RPC Relay only supports Hedera accounts with an alias set (i.e public address) based on its ECDSA public key. You can easily do this by following the steps below:

![code window background](https://hedera.com/wp-content/uploads/2025/12/CodeSnippetBackground-scaled.jpg)

```
// generate an ECDSA key-pair
const newPrivateKey = PrivateKey.generateECDSA();
console.log(`The raw private key (use this for JSON RPC wallet import): ${newPrivateKey.toStringRaw()}`);

const newPublicKey = newPrivateKey.publicKey;

// account publickey alias
const aliasAccountId = newPublicKey.toAccountId(0, 0);
console.log(`The alias account id: ${aliasAccountId}`);
```

![code window background](https://hedera.com/wp-content/uploads/2025/12/CodeSnippetBackground-scaled.jpg)

```
const operatorAccountId = AccountId.fromString(process.env.OPERATOR_ID);
const operatorPrivateKey = PrivateKey.fromString(process.env.OPERATOR_PVKEY);

// Hbar transfers will auto-create a Hedera Account
// for long-form account Ids that do not have accounts yet
const tokenTransferTxn = async (senderAccountId, receiverAccountId, hbarAmount) => {
    const transferToAliasTx = new TransferTransaction()
        .addHbarTransfer(senderAccountId, new Hbar(-hbarAmount))
        .addHbarTransfer(receiverAccountId, new Hbar(hbarAmount))
        .freezeWith(client);

    const signedTx = await transferToAliasTx.sign(operatorPrivateKey);
    const txResponse = await signedTx.execute(client);
    await txResponse.getReceipt(client);
}
```

Create a function to help log your account info.

![code window background](https://hedera.com/wp-content/uploads/2025/12/CodeSnippetBackground-scaled.jpg)

```
const logAccountInfo = async (accountId) => {
    const info = await new AccountInfoQuery()
        .setAccountId(accountId)
        .execute(client);
 
    console.log(`The normal account ID: ${info.accountId}`);
    console.log(`Account Balance: ${info.balance}`);
}
```

![code window background](https://hedera.com/wp-content/uploads/2025/12/CodeSnippetBackground-scaled.jpg)

```
const main = async () => {
    await tokenTransferTxn(operatorAccountId, aliasAccountId, 100);
    await logAccountInfo(aliasAccountId);
}
 
main();
```

#### Console output

![code window background](https://hedera.com/wp-content/uploads/2025/12/CodeSnippetBackground-scaled.jpg)

```
The raw private key (use this for JSON RPC wallet import): 81cd442a945d2c9f04ed5bf355a59db9e9f7553b9d4c319938eb9176085cb4c8
The alias account id: 0.0.302d300706052b8104000a03220002d47f1da5a3e086c568776d5be31165c65a135bb48951b4ccbf4284b025225ff4
The normal account ID: 0.0.47995491
Account Balance: 99.31142415 ℏ
```

The account is officially registered with Hedera when hbars are initially deposited to the account alias. The transaction fee to create the account is deducted from the initial hbar transfer. The remaining balance minus the transaction fee to create the account is the initial balance of the new account.If interested in learning more about auto account creation read the following [documentation](https://docs.hedera.com/hedera/sdks-and-apis/sdks/cryptocurrency/create-an-account#create-an-account-via-an-account-alias)
 and [HIP-32](https://hips.hedera.com/hip/hip-32)
.

#### IMPORTANT NOTE: Private keys for Testnet are displayed here for educational purposes only. Never share your private key(s) with others, as that may result in lost funds or loss of control over your account.

#### Import Hedera Account into Metamask

#### Step 1: Go to [HashIO](https://swirldslabs.com/hashio/) , the SwirldsLabs hosted version of the JSON-RPC Relay, and copy the Testnet URL.

HashIO provides the URLs for each Hedera environment that will let you interact with the respective environment nodes on Hedera the same way you would an Ethereum node.

![Image](https://hedera.com/wp-content/uploads/2025/12/hashio-sc_2022-08-26-185203_wkuj-scaled.png)

#### Step 2: Open Metamask and add Hedera as a custom network.

| Network Name |
| --- |
| Hedera |
| New RPC URL |
| https://testnet.hashio.io/api |
| Chain ID |
| 296 |
| Currency Symbol |
| HBAR |

| Config | Default | Description |
| --- | --- | --- |
| CHAIN_ID | 0x12a | The network chain id. Local and previewnet envs should use 0x12a (298). Previewnet, Testnet and Mainnet should use 0x129 (297), 0x128 (296) and 0x127 (295) respectively |

#### Step 3: Import your Hedera account into Metamask

Import your newly created ECDSA-based Hedera account into Metamask using your private key from above.

![<p>Use your private key to import your Hedera account into Metamask</p> <p>“/><figcaption class=](https://hedera.com/wp-content/uploads/2025/12/import-account-3.png) Use your private key to import your Hedera account into Metamask

![<p>Your Hedera Account in Metamask</p> <p>“/><figcaption class=](https://hedera.com/wp-content/uploads/2025/12/account-imported_2022-08-26-232126_pcyv.png) Your Hedera Account in Metamask

You’ve successfully connected your Hedera account to Metamask! You may now receive and send hbar on testnet through Metamask!

The release of the JSON-RPC Relay to developers is bringing greater usability to the developer community by enabling the support of common Ethereum developer tooling while building on Hedera.

Happy Building!

[Back to Blog](/blog)

discover

See more articles

[View All](/blog)

![Image](https://hedera.com/wp-content/uploads/2026/08/Regulation_Blog-1024x576.png)

August 5, 2026

### Details decide. What digital asset policy did in July 2026

Halfway through 2026, the regulatory picture is coming into focus. Hedera Chief Policy Officer Nilmini Rubin and VP Global Policy Isadora Arredondo break down what moved in June across the

[Read More](https://hedera.com/blog/details-decide-what-digital-asset-policy-did-in-july-2026/)

![Deploy Multichain Dapps](https://hedera.com/wp-content/uploads/2026/07/HH600301_DeployMultichainDapps_Final-1024x576.png)

July 17, 2026

### Deploy Multichain Dapps on Hedera in 60 Seconds with scaffold-hbar

Deploying multichain dapps on Hedera has never been easier! With just one command, you can spin up a fully functional dapp using Next.js, Hardhat or Foundry, and AI agent context…

[Read More](https://hedera.com/blog/deploy-multichain-dapps-on-hedera-in-60-seconds-with-scaffold-hbar/)

![Regulation is finding its form](https://hedera.com/wp-content/uploads/2026/07/Regulation_Blog-1-1024x576.png)

July 13, 2026

### Regulation is finding its form in summer 2026

Halfway through 2026, the regulatory picture is coming into focus. Hedera Chief Policy Officer Nilmini Rubin and VP Global Policy Isadora Arredondo break down what moved in June across the

[Read More](https://hedera.com/blog/regulation-is-finding-its-form-in-summer-2026/)

## Ready to get started?

Discover why Hedera is the trusted institutional-grade network powering the new digital economy.

[Start Building](/start-building)

[Contact](/contact)

We use cookies to deliver the best experience on our website and to analyze traffic. By continuing to use this site, you consent to our cookie policy.

Review our [Privacy Policy](/privacy)
 to understand how Hedera collects and uses information.

Accept All CookiesAccept Necessary Cookies
