Prerequisites
- Node.js 18+ installed
- A contract ABI and deployed contract address
- A funded wallet (get testnet THEO from the faucet)
Setup
.env file:
Read from a contract (no gas required)
Write to a contract (requires gas)
Listen for events
Simulate before sending
UsestaticCall to simulate a write transaction without broadcasting:
Encoding function calls manually
For low-level interaction or debugging:Next steps
- Events and logs — in-depth event filtering and decoding
- Token contracts — working with ERC-20 and ERC-721 tokens