Comments (8)
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.
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.
But getBalance is worked
from web3dart.
Related SO question https://stackoverflow.com/questions/54783752/invalid-sender-in-web3dart
from web3dart.
Related SO question https://stackoverflow.com/questions/54783752/invalid-sender-in-web3dart
but there is no answer)
from web3dart.
I'm connecting to a private RPC, and getting the balance is completely identical to your example.
from web3dart.
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.
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)
- NFT dapp HOT 1
- How to set a timeout for Web3Client? HOT 1
- intToBytes mistake
- How to decodeParameters
- web3dart
- Ignore non_constant_identifier_names, camel_case_types in generated (.g.dart) files HOT 5
- Test Net HOT 2
- Support ethers.utils functionality HOT 1
- Bug: Zero address returned from contract call causes exception HOT 20
- web3dart: ^2.3.3
- private Api for centralized blockchain HOT 3
- How can i call smart contract functions through web3dart without private key in flutter HOT 2
- getBlockInformation() - Throws Error HOT 1
- Transaction Lists HOT 2
- How a new user can create an account without private key?
- Support for BEP20 Transfer?
- Value not in Range
- On Ganache V 7.0.0 I am receiving an rpc error "Unhandled Exception: RPCError: got code -32700 with msg "Invalid signature v value"." HOT 1
- Getting transactions with eth_getBlockByNumber
- Doesn't work after building project but works fine in debug
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from web3dart.