Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
Prerequisites
- Python 3.8 or higher
- Basic Python knowledge
Connect to Monad testnet
Create a Web3 instance to connect to Monad:- Chain ID: 10143
- Block time: ~1 second
- 100% EVM compatible
Get latest block number
The simplest query - get the current block height:Check account balance
Query the MON balance of any address:Get transaction count (nonce)
Check how many transactions an address has sent:Fetch block by hash
Retrieve detailed block information:Get transaction details
Inspect a specific transaction:Get transaction receipt
Check execution results and logs:Call a smart contract
Read data from a contract without sending a transaction. This example calls thename() function on the Wrapped Monad (WMON) contract:
Using contract ABI
For easier interaction, use the contract ABI:Check if address is a contract
Determine whether an address is a smart contract or an externally owned account (EOA):Read contract storage
Access raw storage slots of a contract:Build a simple block monitor
Since Monad doesn’t currently support WebSocket subscriptions, use polling to monitor new blocks:Complete example
Here’s a script that demonstrates multiple queries:Monad-specific notes
Key differences from other EVM chains:
- 1-second finality: Blocks are finalized immediately, no reorganizations
- No pending transactions:
eth_getTransactionByHashonly returns confirmed transactions - No WebSocket subscriptions yet: Use polling for real-time data
- Block gas limit: 300M gas per block
Next steps
Now that you can query blockchain data, you can:- Build dashboards to visualize network activity
- Monitor specific addresses or contracts
- Create alerts for on-chain events
- Develop analytics tools