无论我为gasPrice和gasLimit投入多少,交易都被低估

时间:2018-11-09 01:07:38

标签: ethereum web3 go-ethereum

我目前正在Ropsten测试网络上测试钱包到钱包的转账,但是我的交易总是被低估了。这是txObject供参考:

function buildTransferTxObject(nonce, toAddress, value) {
    const gasPriceRopsten = web3.eth.getGasPrice()

    this.nonce = web3.utils.toHex(nonce);
    this.toAddress = toAddress;
    this.value = web3.utils.toHex(web3.utils.toWei(value, 'ether'));
    this.gasLimit = web3.utils.toHex(21000);
    this.gasPrice = web3.utils.toHex(gasPriceRopsten);
};

0 个答案:

没有答案