So i have trouble using a smart contract on Rinkeby through infura as it gives an "extra-data" error, which as far as i have read, is due to Rinkeby being a POA testnet. There are suggestions of using a middle-ware for this, but there's no good documentation to describe how it can be done …
Also, the extra-data error occurs when calling a state-changing function ( like assigning a new value to a storage variable ), not when calling a read only function ( like a "getter" method )
anyone has any idea how to fix this ?
Best Answer
easy solution RIGHT HERE;
Import your required libraries
Intialize your infura node in a variable
aand.. the most SIMPLE part, which TOOK OVER THREE WEEKS to figure out because the documentation is absolutely horrenous ;
inject the damn middle-ware in the variable holding your infura node;
just remember that you have to sign all transactions LOCALLY, as infura does not handle any keys from your wallet
and then send;
there you go, an all in one solution !
P.S : use print(txn_receipt) to get transaction id to view in etherscan