I would like to get information about token. For example total supply and so on. For this I need the contract. However what is the way to actually load it/access it from Java?
Checking examples in languages such as python, it seems trivial:
contract_address = 'CONTRACT_ADDRESS'
abi = json.loads(abiJson)
contract = web3.eth.contract(address=contract_address, abi=abi)
totalSupply = contract.functions.totalSupply().call()
However how to actually do this using Java? Do I need to generate .abi file and then compile it to java? This way, wouldn't I need to recompile the project everytime I wanted to find info about another contract?
Thanks for help!