Debugging Smart Contracts
Learn how to run a local node to debug smart contracts on Abstract.
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:
Clone the repository
From any directory, clone the era-test-node
repository.
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:
You can now make any changes (such as including logs) to the smart contracts in the contracts
directory.
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.
Run the node
Once built, the node binary is available at ./target/release/era-test-node
.
Run the node using the built binary:
You can also run the node that forks from the current state of the Abstract testnet:
Network Details
Use the details below to connect to the local node: