To view logs, trace calls to system contracts and more, Abstract offers a local node.

Running a local node

To get started running a local node, follow the steps below:

1

Install Prerequisites

If you are on Windows, we strongly recommend using WSL 2.

The node is written in Rust. Install Rust on your machine:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
2

Clone the repository

From any directory, clone the era-test-node repository.

git clone https://github.com/matter-labs/era-test-node && cd era-test-node
3

Build smart contracts

You will notice there is a Makefile at the root of the repository containing various commands.

Use the commands below to fetch and build the smart contracts:

make fetch-contracts && make build-contracts

You can now make any changes (such as including logs) to the smart contracts in the contracts directory.

4

Build the node

To build the binary, run the following command.

Omit clean and build-contracts if you have not made any changes to the smart contracts.

make clean && make build-contracts && make rust-build
5

Run the node

Once built, the node binary is available at ./target/release/era-test-node.

Run the node using the built binary:

./target/release/era_test_node

You can also run the node that forks from the current state of the Abstract testnet:

./target/release/era_test_node fork https://api.testnet.abs.xyz

Network Details

Use the details below to connect to the local node:

  • Chain ID: 260
  • RPC URL: http://localhost:8011
  • ethNetwork: localhost (Add this for Hardhat)
  • zksync: true (Add this for Hardhat)