Mobile SDK Batch Requests

Symbiosis Mobile SDK for Symbiosis protocol V1: Batch Requests


Json-RPC allows packing several requests into one called a batch request.
Symbiosis Mobile SDK supports batch requests: there is a "builder" and an "executor" for each request.
For example,
  • moko-web3 has Web3Requests, and
  • The classes defined in the contracts package have fun something() in addition to fun somethingRequest() method.
For example: balanceOf() → balanceOfRequest(), reserves() → reservesRequest()
Important: there is an exception for write transactions. A write transaction should contain a correct, unique nonce. Therefore, you can send only one write transaction at a time.


There is an example of how to use a batch request:
val (uniBalance, daiBalance, ethBalance) = client.executeBatch(
It shows that calls can be repetitive within one batch request.
Limitations: within one batch request, you can work with one blockchain.