Bridge API (Token list/Tx Status)
Token Information End point:
Architecture:
{
"chainId" : "chainId", // Source Chain ID
"address": "address", // token address
"name": "name", // token name
"symbol": "symbol", // token symbol
"decimals": "decimals", // token decimals
"price" : "price", // token price
"logoUrl" : "logoUrl", // token logo url
"tokenType": "tokenType", // This is either "NATIVE" for native gas token or "TOKEN" for all other tokens
"destChains": { // An object with all possible destination chains as keys.
"chainId": { // Destination Chain ID
"key": { // Unique hash for each pair
"address": "address", // Destination token address
"name": "name", // Destination token name
"symbol": "symbol", // Destination token symbol
"decimals": "decimals", // Destination token decimals
"anytoken": { // Destination anytoken information
"address": "address", //
"symbol": "symbol", //
"decimals": "decimals", //
},
"fromanytoken": { // Source Chain anytoken information
"address": "address", //
"symbol": "symbol", //
"decimals": "decimals", //
},
"underlying": { // Destination underlying information, if it doesn't exist, return false.
"address": "address", //
"symbol": "symbol", //
"decimals": "decimals", //
},
"type": "type", // The type of bridge tx. It would say router for most tokens. And it'd say swapin or swapout for older V2 setup.
"router": "router", // router address. The address you interace with.
"tokenid": "tokenid", // tokenid
"routerABI": "routerABI", // The abi and function you cal to bridge this token.
"isLiquidity": "isLiquidity", // If liquidity is needed.
"isApprove": "isApprove", // Is approval needed.
"isFromLiquidity": "isFromLiquidity", // Is source chain liquidity shown on frontend.
"BigValueThreshold": "BigValueThreshold", // Big value threshold. It'd take longer over this threshold.
"MaximumSwap": "MaximumSwap", // Maximum amount to bridge
"MaximumSwapFee": "MaximumSwapFee", //
"MinimumSwap": "MinimumSwap", // Minimal amount to bridge. Lower than this won't be processed.
"MinimumSwapFee": "MinimumSwapFee", //
"SwapFeeRatePerMillion": "SwapFeeRatePerMillion", // % of fee. 0.1 means 0.1% fee of the total amount.
"pairid": "pairid", // pairid
"DepositAddress": "DepositAddress", // Deposit address for older V2 bridge setup.
"BaseFeePercent": "BaseFeePercent", // Fee percentage for V2 bridge.
"sortId": "sortId", //
"chainId": "chainId", // chainId
"tokenType": "tokenType", // token type.
}
}
}
}Tx Status Endpoint:
Code
Status
How to integrate the router contract
Liquidity Pool Model
Last updated