How do I connect to Rinkeby?
See original GitHub issueCurrently trying to create and listen to contracts, testing on Rinkeby
- Version: 3.16.4
- Python: 3.5
- OS: osx
What was wrong?
Please include any of the following that are applicable:
- The code which produced the error
`from web3 import Web3, HTTPProvider, IPCProvider web3 = Web3(HTTPProvider(‘https://rinkeby.infura.io’))
web3.personal.unlockAccount(“[address]”,“[psw]”)`
- The full output of the error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ".../py3/lib/python3.5/site-packages/web3/personal.py", line 93, in unlockAccount
[account, passphrase, duration],
File ".../py3/lib/python3.5/site-packages/web3/manager.py", line 93, in request_blocking
response = self._make_request(method, params)
File ".../py3/lib/python3.5/site-packages/web3/manager.py", line 76, in _make_request
return request_func(method, params)
File ".../py3/lib/python3.5/site-packages/web3/middleware/attrdict.py", line 20, in middleware
response = make_request(method, params)
File ".../py3/lib/python3.5/site-packages/web3/middleware/formatting.py", line 25, in middleware
response = make_request(method, params)
File ".../py3/lib/python3.5/site-packages/web3/providers/rpc.py", line 52, in make_request
**self.get_request_kwargs()
File ".../py3/lib/python3.5/site-packages/web3/utils/compat/compat_requests.py", line 22, in make_post_request
response.raise_for_status()
File ".../py3/lib/python3.5/site-packages/requests/models.py", line 935, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 405 Client Error: Method Not Allowed for url: https://rinkeby.infura.io/
- What type of node you were connecting to. Rinkeby
Issue Analytics
- State:
- Created 6 years ago
- Comments:13
Top Results From Across the Web
Connect Metamask to Ethereum Testnet Rinkeby (RIN)
Connect Metamask wallet to Ethereum Testnet Rinkeby RIN. Configure metamask wallet to connect to another RPC.
Read more >The Beginners Guide to Using an Ethereum Test Network
Rinkeby : A proof-of-authority blockchain, started by the Geth team. Ether can't be mined; it has to be requested. Connecting to a testnet....
Read more >A Complete Guide to Ethereum's Rinkeby Testnet - Alchemy
How to get Rinkeby testnet ETH · Step 1: Sign up · Step 2: Change your Network in Metamask · Step 3: Add...
Read more >How To Add Rinkeby To MetaMask: Guide With Images ...
How to Add Rinkeby Network to MetaMask – Mobile · Open MetaMask Mobile Application · Navigate to Menu & Go To Settings ·...
Read more >How To Add Rinkeby Network To Metamask Easily - IsItCrypto
How To Add Rinkeby Testnet To Metamask Quickly · Launch the Metamask extension/mobile app and unlock your account. · Click on the network...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is the important part of that error:
Infura does not support private keys stored on their server (which is a good thing, that would be a gaping security hole). On mainnet, do not send your private keys or passwords to any remote service! If you do accidentally, you should empty the account and never use it again, and change the password.
In Web3 v3, sending transactions to Infura is a bit cumbersome. One needs to sign the transaction locally, and send with
w3.eth.sendRawTransaction
. Either use a local geth/parity/etc node, or upgrade to the beta v4, which has some convenience tools for signing transactions locally.There is an ongoing project to sign transactions locally using middleware that will handle this logic of signing locally before sending as a raw transaction, but it will probably be at least a couple weeks until it is released. #493
Sure thing, I’m happy to help. There’s still so many docs to write and infrastructure to build! Which brings me to…
I am now realizing that there is no good documentation or public API for deploying a contract with a private key.
buildTransaction()
won’t work for you for deploying the contract. That means web3 should probably add a new method. In the meantime, you can do this using a non-public method (_encode_constructor_data()
), like so:contract_interface
with the quickstart instructions you found.Note that the private key signing in w3.eth.account has not yet been audited, it’s in beta, use at your own risk.