Contract requirements

(to be completed before backend and front end work)

Squid Router Contract Requirements

Backend and frontend requirements

All code below should be in typescript

SDK

https://github.com/0xsquid/squid-sdk/

getChainnameBalance

Get the balance of a specific token owned at an address, given an address and token address as an input.

getChainnameBalances

Get the balance of every token owned at an address, given an address as an input.

https://github.com/0xsquid/squid-sdk/blob/7b17e405f410d28ba279611e22004fb9542858a8/src/services/getCosmosBalances.ts#L9

executeRoute

Sign and execute a transaction on chain. Using equivalent of Ethers for that chain.

https://github.com/0xsquid/squid-sdk/blob/7b17e405f410d28ba279611e22004fb9542858a8/src/index.ts#L311

API

quoteSwap

For order book DEXs we can instead pull the book for each pool and quote locally based on this.

generateSwapCalls