📜  web3 js 连接到 ropsten - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:26.195000             🧑  作者: Mango

代码示例1
const Web3 = require('web3');
const infuraProjectId = "";
const ropstenAddress = "<0xROPSTEN_ADDRESS>";
const web3 = new Web3(new Web3.providers.HttpProvider(
    'https://ropsten.infura.io/v3/' + infuraProjectId
));

// REFERENCES:
// https://blog.infura.io/getting-started-with-infura-28e41844cc89/