youwallet / wallet

🚀 基于Flutter开发的跨终端数字货币交易所✨
https://youwallet.github.io/
116 stars 55 forks source link

RPCError: got code -32000 with msg "invalid sender". #51

Closed zhaobinglong closed 4 years ago

zhaobinglong commented 4 years ago

解决:

          credentials,
          Transaction(
              to: EthereumAddress.fromHex(token['address']),
              gasPrice: EtherAmount.inWei(BigInt.from(1000000000)),
              maxGas: 7000000,
              value: EtherAmount.fromUnitAndValue(EtherUnit.ether, 0),
              data: hexToBytes(postData)
          ),
          chainId: 3 // 没有这个参数会报RPCError: got code -32000 with msg "invalid sender".
      );