Developers
Read RPC requests
Learn how to read data from Syncport RPC calls
Send a transaction on Syncport
Step 1: Install dependencies
Make sure ethers is installed and run this once if you haven't already:
Step 2: Set Environment Variables
Hardcode the Syncport testnet RPC url and your wallet's private key so you can send a transaction.
Step 3: Run the Read Script
Use this one-liner to read the current latest block number on your rollup:
Step 4: Confirm the read works
If successful, you'll see:
As a double check, feel free to cross verify on the explorer too!Alternatively, you can read data from a Syncport using an HTTP JSON-RPC call, send a POST request to the Syncport RPC endpoint with a JSON body specifying the method you want to call.
Example: Get the latest block number