PS:我使用的是web3 beta-37 (因为每个版本都有自己的问题),deploy函数中行web3.eth.getAccounts下的任何东西都不能工作。当我运行代码时,它什么也没有显示!/compile');
'https://rinkeby.infura.io/v3/my_project_id');
con
找到了一些答案,说明了本地托管文件的问题,或者web3.js不适用于MetaMask。 if (typeof web3 !Ganache as your provider
web3 = new Web3(new Web3.providers.HttpProvider("https://rinkeby.infura.io('0x7cfAD6E80D992599d989166aABf536b21215544C'
x += byThisMuch;
在localhost: 8545上成功运行之后,我现在已经将它部署到Rinkeby TestNet (通过Remix),并使用InfuraGonna set one up...");
web3 = new Web3(new Web3.providers.HttpProvider("https://rinkeby.infura.io&