Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

How to connect to a Localhost Node? #1

Closed
johanazu7 opened this issue Jan 18, 2018 · 2 comments
Closed

How to connect to a Localhost Node? #1

johanazu7 opened this issue Jan 18, 2018 · 2 comments

Comments

@johanazu7
Copy link

Hello,

Is it possible to connect to a Node running locally?
I've tried this but it does not work:

let url = URL(string: "http://localhost:8545")
let web3 = Web3.newWeb3(url) // returns nil

What's the procedure to achieve this? or do I have to deploy my contracts to Rinkeby network in order to do some testing?

Thank you.

@shamatar
Copy link
Contributor

I've pushed a fix, plainly forgot to add initialization from custom URL even though HttpProvider was implemented for arbitrary URL. Please make sure that App Transport Security allows insecure (http) connections for your app.

@johanazu7
Copy link
Author

I'll give it a shot! I had to resort to using Rinkeby in the meantime. Eager to see if your fix works, will report in a bit.
Thanks!

@CrisESC93 CrisESC93 mentioned this issue Jan 31, 2018
shamatar pushed a commit that referenced this issue Feb 26, 2018
Merge updates from BANKEX
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants