Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Update examples.rst with Infura/rinkeby steps #1444
Using Infura Rinkeby Node
Import your required libraries
Initialize a web3 instance with an Infura node
Inject the middleware into the middleware onion
Just remember that you have to sign all transactions locally, as infura does not handle any keys from your wallet
P,S : the two updates are done to the transaction dictionary, since it might not contain gas & nonce amounts, so you have to add them manually.
And then send the transaction
What was wrong?
Related to Issue # ; not sure about which issue this might correspond to, but there was terrible documentation regarding how to inject the POA middleware and calling a state-changing transaction also yielded alot of errors in my experimentation. so i thought to contribute a combined solution, outlining the simple yet subtle step of injecting middle-ware and also how to constuct a raw transaction to interact with a state-changing function in your smart contract.
How was it fixed?
It can be seen in the code. However, to put it briefly, i just simplified the steps on injecting the geth-style middleware in web3.py, when using an Infura Rinkeby node and i also outlined the steps on how to properly construct a transaction for calling a state-changing function in a smart-contract deployed on Rinkeby testnet.
Cute Animal Picture
thanks for reassuring me on those tests
yeah, go ahead !
P.S : should i update the stuff in this pull request before you make the changes ?