我想使用 MetaMask 发送 ETH 或 ERC20 令牌
我正在使用的以下脚本抛出错误,
RPC 错误:错误:0.001 数字的无效交易值必须在 wei 中
const method = 'eth_sendTransaction'
const parameters = [{
from: account,
to: to,
value: 0.001
}]
const from = account
const payload = {
method: method,
params: parameters,
from: from,
}
web3.currentProvider.sendAsync(payload, function (err, response) {
});