RootQueryBuilder
class provides methods to query the Root Network.
The query
capability is exposed from the root of the Transaction Builder class, enabling developers to query the chain without manually instantiating the class. it expects two parameters:
api
: the trnApi to use for interaction.walletAddress
: the wallet address to use for interaction. Note: It should be the EOA address for the signer, not the FuturePass address.checkBalance()
walletAddress
: the wallet address to get the balance for. Wallet address is optional. When not provided, the wallet address of the instance will be used instead.assetId
: the asset ID to get the balance for.checkBalances()
walletAddress
and assetsId
: an array of the [walletAddresses, assetId] pair to check balances for. Wallet address is optional. When not provided, the wallet address of the instance will be used instead.getAmountsIn()
amount
: the amount to get the amounts in for.assetId
: the asset ID to get the amounts in for.slippage
: the slippage to use for the amounts in. Optional parameter. Defaults to value 5
.getFuturePass()
walletAddress
: the wallet address to get the FuturePass for.readContract()
contractAddress
: the contract address to read from.abi
: the ABI of the contract.functionName
: the function name to read.args
: the arguments to pass to the function. Optional parameter.