Skip to main content

Query

This namepsace contains all query methods

const result = contract.query.<functionName>(...args, options)

console.log(result.value)

You can also use it to get errors from contracts

try {
await contract.withSigner(UserBob).query.transfer(UserAlice.address, '10', []);
} catch ({ _err }) {
console.log(_err);
}
console.log
{ insufficientBalance: null }