📦 SDKMulti-Token Support

Multi-Token Support

Last Updated: 2026-03-03

The AbbaBabaEscrow contract supports any whitelisted ERC-20 token for settlement via the TOKEN_REGISTRY. The seller chooses which token to accept when listing a service, and the buyer pays in that token.

Supported Tokens

Base Sepolia (Primary Testnet)

TokenDecimalsAddressFaucet
USDC60x036CbD53842c5426634e7929541eC2318f3dCF7eCircle Faucet

Base Mainnet (Chain ID 8453)

Tier 1 (Whitelisted at deploy)

TokenDecimalsAddress
USDC60x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
WETH180x4200000000000000000000000000000000000006
USDT60xfde4C96c8593536E31F229EA8f37b2ADa2699bb2
DAI180x50c5725949A6F0c72E6C4a641F24049A917DB0Cb

Tier 2 (Added post-launch)

TokenDecimalsAddress
cbBTC80xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf
AERO180x940181a94A35A4569E4529A3CDfB74e38FD98631

Polygon Amoy (Testnet — Chain ID 80002)

TokenDecimalsAddress
USDC60x41E94Eb019C0762f9Bfcf9Fb1E58725BfB0e7582

Polygon Mainnet (Chain ID 137)

Tier 1

TokenDecimalsAddress
USDC60x3c499c542cEF5E3811e1192ce70d8cC03d5c3359
WPOL180x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270
USDT60xc2132D05D31c914a87C6611C10748AEb04B58e8F
DAI180x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063

Tier 2

TokenDecimalsAddress
AAVE180xD6DF932A45C0f255f85145f286eA0b292B21C90B
WETH180x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619
UNI180xb33EaAd8d922B1083446DC23f610c2567fB5180f

Tier 3

TokenDecimalsAddress
WBTC80x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6

Additional tokens can be added to the whitelist by the contract admin.

Token Registry

The SDK provides a structured token registry:

import {
  TOKEN_REGISTRY,
  getToken,
  getTokensByTier,
  isTokenSupported,
  BASE_SEPOLIA_CHAIN_ID,
  BASE_MAINNET_CHAIN_ID,
} from '@abbababa/sdk/wallet'
 
// Look up a specific token
const usdc = getToken(BASE_SEPOLIA_CHAIN_ID, 'USDC')
// { symbol: 'USDC', address: '0x036CbD...', decimals: 6, tier: 1 }
 
// Get all Tier 1 tokens for a chain
const tier1 = getTokensByTier(BASE_SEPOLIA_CHAIN_ID, 1)
// [USDC]
 
// Check if a token is supported
isTokenSupported(84532, 'USDC')  // true (Base Sepolia)
isTokenSupported(8453, 'USDC')   // true (Base Mainnet)

Token Decimals

Different tokens have different decimal places. The SDK handles this automatically, but if you’re calculating amounts manually:

// USDC (6 decimals): $1.00 = 1_000_000
// WETH (18 decimals): 1.0 ETH = 1_000_000_000_000_000_000
 
import { getToken, BASE_SEPOLIA_CHAIN_ID } from '@abbababa/sdk/wallet'
 
const token = getToken(BASE_SEPOLIA_CHAIN_ID, 'USDC')
const amount = BigInt(Math.round(10.50 * 10 ** token.decimals))
// 10_500_000 for USDC, 10_500_000_000_000_000_000 for WETH

Seller: Listing in a Specific Token

const service = await seller.listService({
  title: 'Data Analysis',
  description: '...',
  category: 'data',
  price: 5.00,
  priceUnit: 'per_request',
  currency: 'USDC',  // Buyers must pay in USDC
})

Buyer: Paying in the Seller’s Token

The checkout response tells the buyer which token to use:

const checkout = await buyer.purchase({
  serviceId: service.id,
  paymentMethod: 'crypto',
  callbackUrl: '...',
})
 
const pi = checkout.paymentInstructions
console.log(pi.tokenSymbol)    // 'USDC'
console.log(pi.tokenAddress)   // '0x036CbD...'
console.log(pi.tokenDecimals)  // 6
console.log(pi.totalWithFee)   // '5000000' (5.00 USDC — 2% fee is deducted from this deposit, not added on top)
 
// Fund with the correct token
await buyer.fundAndVerify(
  checkout.transactionId,
  pi.sellerAddress,
  BigInt(pi.totalWithFee),
  pi.tokenSymbol,  // 'USDC' — SDK looks up the token automatically
)

On-Chain Token Whitelist

The escrow contracts maintain an admin-managed whitelist. Only whitelisted tokens can be used in escrow. The addToken and removeToken functions are restricted to the contract admin.

Existing escrows survive token removal — if a token is removed from the whitelist, escrows already funded with that token can still be released or refunded. Only new escrows with the removed token are blocked.

Cross-Token Settlement (Phase 2)

Currently, the buyer must pay in the exact token the seller specified. Cross-token settlement (buyer pays in USDC, seller receives WETH) is planned for Phase 2 with Uniswap V3 integration.