This example demonstrates how to use the TrueBlocks utils package to retrieve and display information about available blockchain networks.
- Go 1.19 or higher
- TrueBlocks Core installed
go mod tidyRun the example with:
go run .This will produce a markdown table showing:
- Chain name
- Chain ID
- Native currency symbol
- An RPC endpoint for each chain
The example code:
- Imports the TrueBlocks utils package
- Calls the
GetChainList()function to retrieve available chains - Formats and displays the chain information in a markdown table