Skip to main content
This tutorial covers reading contract state, calling write functions, and listening for events using ethers.js. The same patterns work with any deployed contract on Autheo Chain.

Prerequisites

  • Node.js 18+ installed
  • A contract ABI and deployed contract address
  • A funded wallet (get testnet THEO from the faucet)

Setup

Create a .env file:

Read from a contract (no gas required)

Write to a contract (requires gas)

Listen for events

Simulate before sending

Use staticCall to simulate a write transaction without broadcasting:

Encoding function calls manually

For low-level interaction or debugging:

Next steps