hyperledger-web3j / web3j

Lightweight Java and Android library for integration with Ethereum clients
https://www.web3labs.com/web3j-sdk
Other
5.09k stars 1.68k forks source link

createEthCallTransaction not returning response #1893

Open nidhi-singh02 opened 1 year ago

nidhi-singh02 commented 1 year ago

web3j createEthCallTransaction function return no response.

I am invoking a smart contract function "get" which is having a return type in solidity. Using web3j createEthCallTransaction function doesn't return any response. Same SC function is returning response when I tested it through Remix IDE.

This is what I followed - https://docs.web3j.io/4.8.7/transactions/transactions_and_smart_contracts/#querying-the-state-of-a-smart-contract

I have my SC deployed on the network, not sure what I am missing here. SC that I am using - https://solidity-by-example.org/state-variables/

Happy to provide more details on this.

saugion commented 1 year ago

Could you paste the java code?

nidhi-singh02 commented 1 year ago

My Java code is in line with the code given here - https://docs.web3j.io/4.9.7/transactions/transactions_and_smart_contracts/#querying-the-state-of-a-smart-contract

saugion commented 1 year ago

Hi @nidhi-singh02, which network are you using? Which web3j-junit version? I did a test and didn't have any issue