Operations Reference
Detailed guides for each multicall operation in TypeScript.
For Solidity multicall encoding, see Multicalls.
Why This Section?
The main multicalls.md covers the basics: SDK service helpers, combining with raw encoding, and a complete example. This section goes deeper on each operation - when you need it, complete examples, and what can go wrong.
Quick Reference
Page Structure
Each operation guide follows the same structure:
Why - When you need this operation
What - What it does and how it fits the system
How - Working TypeScript code
Gotchas - Common mistakes and edge cases
See Also - Related operations and Solidity reference
SDK Helpers vs Manual Encoding
Five operations have SDK helpers via createCreditAccountService:
prepareAddCollateral(token, amount)prepareIncreaseDebt(amount)prepareDecreaseDebt(amount)prepareUpdateQuota(token, change, minQuota)prepareWithdrawCollateral(token, amount, to)
Six operations require manual encoding with viem's encodeFunctionData:
storeExpectedBalances/compareBalancesenableToken/disableTokenonDemandPriceUpdatesetFullCheckParamsrevokeAdapterAllowances
All manual encoding uses iCreditFacadeV300MulticallAbi from @gearbox-protocol/sdk.
Related
Multicalls Overview - Basic patterns and complete example
Credit Accounts - Account data and services
Solidity Multicalls - On-chain implementation details
Last updated
