Как исправить ExperimentalWarning: API-интерфейс fs.promises является ошибкой эксперимента - PullRequest
0 голосов
/ 10 марта 2019

Я пытаюсь получить учетные записи Rinkeby N / W, и это дает мне эту ошибку. **

    const HDWalletProvider = require("truffle-hdwallet-provider");
    const Web3  =  require('web3');
    const provider = new HDWalletProvider(
        "passed Mnemonic here as an argument",
         "https://rinkeby.infura.io/v3/8f7da0e9c75e4a94a4b92378b522caa1" 
    );

const web3 = new Web3(provider);

const deploy = async () => {
    //now get the rinkeby n/w accounts
    const accounts =  web3.eth.getAccounts();
    console.log("rinkeby accounts", accounts[0]);<- on this line it is showing this error

    // const result  = await new web3.eth.Contract(JSON.parse(interface))
        .deploy({ data: bytecode, arguments: ["Hi there!"]})
    //     .send({ from: accounts[0], gas: "1000000"});

    // // now lets print the address where our contract is deployed
    // const address = result.options.address;
    // console.log("contract address in rinkeby n/w", result.options.address);
};

deploy();

** ПРИМЕЧАНИЕ: здесь я не пишу свою мнемонику

...