Web3.js

To demonstrate how a DApp can interact with the Script blockchain via Web3.js. For readers that are not familiar with Web3.js, here (https://www.dappuniversity.com/articles/web3-js-intro) and here (https://www.youtube.com/playlist?list=PLS5SEs8ZftgXlCGXNfzKdq7nGBcIaVOdN) are good starting points.

Interact with the Script Testnet

interact with the Script Testnet through Web3.js. The chainID of the Script Testnet is 742. The Script Network hosts an ETH RPC endpoint for the Testnet at https://testeth-rpc-api.script.tv/rpc. The code below shows the setup for accessing the Script Testnet via Web3.js.

const Web3 = require('web3')

const web3 = new Web3('https://testeth-rpc-api.script.tv/rpc')

const chainID = 742 // for the Script Testnet

Last updated