Giter Site home page Giter Site logo

Invalid Sender about web3dart HOT 8 CLOSED

simolus3 avatar simolus3 commented on September 3, 2024
Invalid Sender

from web3dart.

Comments (8)

gavinerasmus avatar gavinerasmus commented on September 3, 2024 2

I had the same error. I'm running a private chain on google cloud platform. The issue was the chainId and network ID are different as the chainID is hardcoded to 1 in the transaction.dart file. I changed it to a variable that I pass as part of the .send(client, chainId) and it now works. Is this something worth updating in the next version of the package?

from web3dart.

simolus3 avatar simolus3 commented on September 3, 2024 1

Interesting. Can you tell me what RPC node you're connecting to (infura, a private geth instance, ...)? It seems like this only fails on some nodes. That error code isn't officially documented, so the exact meaning depends on what node you're connecting to.
Another cause might be a wrong private key. Did you call getBalance with the address obtained by calling Credentials.address or another?

from web3dart.

VladimirLesunov avatar VladimirLesunov commented on September 3, 2024

But getBalance is worked

from web3dart.

zoechi avatar zoechi commented on September 3, 2024

Related SO question https://stackoverflow.com/questions/54783752/invalid-sender-in-web3dart

from web3dart.

VladimirLesunov avatar VladimirLesunov commented on September 3, 2024

Related SO question https://stackoverflow.com/questions/54783752/invalid-sender-in-web3dart

but there is no answer)

from web3dart.

VladimirLesunov avatar VladimirLesunov commented on September 3, 2024

I'm connecting to a private RPC, and getting the balance is completely identical to your example.

from web3dart.

piotrgomola avatar piotrgomola commented on September 3, 2024

I'm also getting:
Unhandled Exception: RPCError: got code -32000 with msg "invalid sender".

when trying to send transaction that change the state:
var response = await transaction.send(ethClient);

tried with different chain id, I'm working on private RPC, running on Kaleido geth/poa environment.

Other calls works fine, getBalance and making transactions via call() functions (without changing the state)

from web3dart.

simolus3 avatar simolus3 commented on September 3, 2024

Thanks for pointing out the mistake!
The chainId can already be changed with the version on master. If you need it now, you can import it with

dependencies:
  web3dart:
    git: https://github.com/simolus3/web3dart.git

It'll probably take me some time to upload the next version to pub though. To be honest, I'm kind of embarrassed with the quality of this library at the moment so I want to refactor some internal APIs and write more unit tests before I release the next version.

from web3dart.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.