TronWeb integration
In this guide, we will show you how to get started with TronWeb to connect to GetBlock.
Last updated
Was this helpful?
Was this helpful?
const fullNode = new TronWeb.providers.HttpProvider("https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/")
const solidityNode = new TronWeb.providers.HttpProvider("https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/")
const eventServer = new TronWeb.providers.HttpProvider("https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/")
const tronWeb = new TronWeb(fullNode, solidityNode, eventServer)tronWeb.trx.getBlock('latest').then(result => {console.log(result)});