Problem: org.web3j.tx.exceptions.ContractCallException: Empty value (0x) returned from contract
The code is as follows....
My java:
String owner = managedWalletLookup.getOwner(contractAddress).send();
This ^ line of code calls this auto-generated Java wrapper:
public RemoteCall<String> getOwner(String wallet) {
final Function function = new Function(FUNC_GETOWNER,
Arrays.<Type>asList(new org.web3j.abi.datatypes.Address(wallet)),
Arrays.<TypeReference<?>>asList(new TypeReference<Address>() {}));
return executeRemoteCallSingleValueReturn(function, String.class);
}
This is the original solidity, from which the Java wrapper gets generated:
mapping(address => address) public _managedWallets;
function updateManagedWallets(address wallet, address owner) public isOwner {
_managedWallets[wallet] = owner;
}
function getOwner(address wallet) public view returns (address owner) {
owner = _managedWallets[wallet];
return owner;
}
Every time I call updateManagedWallets, I get a successful TransactionReciept, but the getOwner function always generates an error.
Any thoughts?