你的错误与你的问题,看上去无关,是不是没有赋值?
另外:
gasLimit 不能是2100 , 你可以查看一下usdt转账需要的 gas 。
gasPrice = fee / gasLimit
fee 这里就是你的balance。
使用sendSignedTransaction方法转出usdt的时候,如果把ETH 的余额eth_balance全部用来做手续费,gasLimit是web3.utils.toHex(21000),gasPrice该设置为多少?
关键代码段及报错如下:
“E:\test\getblock_vision\node_modules\web3-utils\lib\utils.js:236
throw new Error('Given input "' + value + '" is not a number.');
Error: Given input "NaN" is not a number.”