我目前正在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);
};