When calling a contract usign the try_contractAll
construction:
export function getResult(address: Address): BigInt {
let callResult = contract.try_getData(address);
if (callResult.reverted) {
return constants.BIGINT_ZERO;
} else {
return callResult.value;
}
}
If there is a problem with the web3 node, is it possible for the result from this function to not be the same for each sync?
In the past, I’ve hit rate limit errors on the public infrastructure that implied after 10 retries it would time out, but I don’t know exactly what happens after that point- whether the call gets skipped if it reports callResult.reverted, or otherwise, but would this lead to inconsistencies between syncs?
EDIT: To be clear, I’m not asking if the result returned from a contract call is deterministic, I’m asking if the contract.try_function
call is deterministic or if it can sometimes fail.