I have deployed contract to rinkeby. Contract method refuses any call except a call from contract owner (aka contract deployer). I can't use Java bindings.
I'm trying to use Function API but it doesn't work. I suppose my call is not signed so contract refuses the call. code:
val transaction = Transaction.createFunctionCallTransaction( contractOwner, tnxNonce, ManagedTransaction.GAS_PRICE, Contract.GAS_LIMIT, contractAddress, encodedFunction) val transactionResponse = web3j.ethSendTransaction(transaction).send() val transactionHash = transactionResponse.getTransactionHash
[debug] o.w.p.h.HttpService - <-- 405 Method Not Allowed Invalid response received: okhttp3.internal.http.RealResponseBody@52ca2652 org.web3j.protocol.exceptions.ClientConnectionException: Invalid response received: okhttp3.internal.http.RealResponseBody@52ca2652 at org.web3j.protocol.http.HttpService.performIO(HttpService.java:114) at org.web3j.protocol.Service.send(Service.java:31) at org.web3j.protocol.core.Request.send(Request.java:71) at services.OneOffEthereumServiceTest.$anonfun$new$2(OneOffEthereumServiceTest.scala:196)
what can I try next? How can I sign transaction? I didn' t find proper API.