xclud / web3dart

Ethereum library, written in Dart.
https://pub.dev/packages/web3dart
MIT License
170 stars 94 forks source link

Ganache V 7.0.0 + ,rpc error "Unhandled Exception: RPCError: got code -32700 #71

Closed Neo-vortex closed 1 year ago

Neo-vortex commented 1 year ago

This issue is also present on https://github.com/simolus3/web3dart/issues/240

full error : rpc error "Unhandled Exception: RPCError: got code -32700 with msg "Invalid signature v value"

steps to reproduce : sign any contract transaction and try to send the transaction expected : it should be ok result : it fails with rpc error "Unhandled Exception: RPCError: got code -32700 with msg "Invalid signature v value"

Neo-vortex commented 1 year ago

I solved the problem by manually optaning the chain_id and supply it while sending the transaction.

TomasWard1 commented 1 year ago

Thank you, you are a lifesaver. Here is the code that you are referring to:

BigInt cId = await _client.getChainId();
    await _client.sendTransaction(_credentials,
        Transaction.callContract(contract: _contract, function: _addPerson, parameters: [_credentials.address]),chainId: cId.toInt());
Uday-kiran9147 commented 4 months ago

Thank you @Neo-vortex.