Comments (5)
Hi, perhaps the docs are a bit unclear here.
web3dart
doesn't implement a full Ethereum node itself (it doesn't do mining etc.). Instead, it connects to a third-party Ethereum node to fetch data and to distribute transactions.
It thus needs a URL of a server that implements the RPC API. You can either host a node yourself (for instance by using --rpc
with geth), or use a public service like infura which web3dart
can connect to. If you passed localhost
, it would try to connect to an Ethereum node running on the same device your flutter app is running on.
If you're getting started, I recommend using a public service like infura so you don't have the hassle of setting everything up yourself. When logging in there and creating a project, it will give you a url that looks like this: https://mainnet.infura.io/v3/YOUR-PROJECT-ID
. When you pass that url to web3dart
, it should work. Feel free to re-open if that doesn't work or you have further problems.
from web3dart.
I've just put together this working example: https://gist.github.com/simolus3/b28756ff133f5424b8e9a85ebc16ea2e
I think your problem might be a permission error, see dart-lang/http#185 (comment) for a possible solution. Does that fix your problem?
from web3dart.
i have tried with infura node i am getting same error
from web3dart.
@simolus3 Main problem is doc which is not clear , help me writing web3 connection code in flutter , i think i am doing some mistake in writing web3 connection code
from web3dart.
Thanks @simolus3
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.