For integrators
For bots, terminals, aggregators and wallets: contracts, trading calls and events to index.
GIWA Sepolia·Launch your token on testnet now. Gamapad goes live on GIWA mainnet from Day 1.
Get test ETHBridge ETHFor bots, terminals, aggregators and wallets: contracts, trading calls and events to index.
Everything on Gamapad happens on-chain on GIWA Sepolia, so bots, terminals and wallets can integrate straight from the contracts, with no API key. Every contract is verified on the explorer: take the ABIs from the verified source there.
Tokens. Every token is a plain ERC-20 with 18 decimals and a fixed supply of 1,000,000,000, minted once to its own bonding curve. It has no owner and no special controls.
Live values for GIWA Sepolia, read from the active deployment, so they always match the network the app uses.
91342https://sepolia-rpc.giwa.ioexport RPC=https://sepolia-rpc.giwa.ioEach token’s curve reports its stage through phase():
phase() | Stage | What you can do |
|---|---|---|
0 | Curve trading | Buy and sell on the curve. |
1 | Ready to graduate | The curve is full. Buys are closed, sells still work, and anyone may call graduate() to finish the move. |
2 | Graduated | The curve is closed. Trade in the v4 pool. |
Graduation normally happens inside the buy that fills the curve, so most tokens go from 0 to 2 in one transaction. Phase 1 only shows when that step couldn’t finish.
The factory emits LaunchCreated once per token, in the launch transaction:
event LaunchCreated(address indexed token, address indexed curve, address indexed creator, address feeRecipient,
bytes32 metadataHash, bytes32 economicsHash, uint16 creatorTaxBps, uint16 protocolShareBps,
uint256 virtualEth, uint256 graduationEth);To backfill or poll instead, read launchCount() and launches(i) (token addresses in launch order), and curveOf(token) for a token’s curve. The factory was deployed at block 37509213, so log scans can start there.
N=$(cast call 0xa06afA279a704960e7bFc17d5113a2283dD4E7d4 "launchCount()(uint256)" --rpc-url $RPC | head -n1 | cut -d' ' -f1)
TOKEN=$(cast call 0xa06afA279a704960e7bFc17d5113a2283dD4E7d4 "launches(uint256)(address)" $((N - 1)) --rpc-url $RPC)
cast call 0xa06afA279a704960e7bFc17d5113a2283dD4E7d4 "curveOf(address)(address)" $TOKEN --rpc-url $RPCBefore graduation, every token trades against its own curve in native ETH. All calls go to the curve address from curveOf(token).
function quoteBuy(uint256 ethIn, bool allowPartialFill) view
returns (uint256 tokensOut, uint256 spentWei, uint256 refundWei, uint256 totalFeeWei);
function buy(uint256 minTokensOut, uint256 deadline, bool allowPartialFill,
uint256 minFillTokensPerEthWad, uint16 maxTotalFeeBps) payable
returns (uint256 tokensOut, uint256 spentWei, uint256 refundWei);
function quoteSell(uint256 tokenIn) view returns (uint256 ethOut, uint256 totalFeeWei);
function sell(uint256 tokenAmount, uint256 minEthOut, uint256 deadline, uint16 maxTotalFeeBps)
returns (uint256 ethOut);
function phase() view returns (uint8);
function creatorTaxBps() view returns (uint16);FeePolicy.baseFeeBps() (now 100 bps, 1%), plus the curve’s creatorTaxBps(). must be at least their sum or the trade reverts, so a fee change can never surprise you.On GIWA Sepolia, graduated pools accept swaps only through Gamapad’s router. Buy with dexBuy, sell with dexSell, and quote both with quote on the quoter. Trading these pools through standard v4 routers needs Gamapad’s newer contracts, which this network doesn’t run.
// GamaRouter 0x01E01B9d070262aD1D4B0a0D894556B4fE7A2e44
function dexBuy(address token, uint256 minTokensOut, uint256 deadline, uint16 maxTotalFeeBps,
uint24 expectedDexProtocolFee, uint160 sqrtPriceLimitX96) payable returns (uint256 tokensOut);
function dexSell(address token, uint256 tokenIn, uint256 minEthOut, uint256 deadline,
uint16 maxTotalFeeBps, uint24 expectedDexProtocolFee, uint160 sqrtPriceLimitX96) returns (uint256 ethOut);
// GamaQuoter 0x68329CB8eb090404026acc27E89d8FEbfdDef2af
function quote(address token, bool isBuy, uint256 amountIn) view
returns (uint256 amountOut, uint256 totalFeeWei, uint24 protocolFee, uint160 sqrtPriceAfterX96);Everything the site shows can be rebuilt from these events:
| Event | Emitted by | Use it for |
|---|---|---|
LaunchCreated | LaunchFactory | New tokens with their curve, creator, creator tax and curve settings |
CurveTrade | Curve | Every curve trade with its fees and the reserves after it: price, market cap, graduation progress |
Graduated | Curve | The pool ID and the ETH and tokens that went into the pool |
DexTrade | GamaHook | Every pool trade with its fees. trader is Gamapad’s router, so credit the trade to the transaction’s sender. |
Gamapad’s web API (/api/tokens and the rest) is built for this site. It sits behind bot protection, so requests from scripts and servers can be blocked, and it can change without notice. Read the chain instead: everything on this page is public.
If your team needs the HTTP feed, for example for token lists or images, apply through the partner program or send us a DM on X, and we can allow your servers’ IPs.
maxTotalFeeBpsminTokensOut or minEthOut from a fresh quote, minus your own slippage tolerance. deadline is a Unix timestamp in seconds.approve(curve, amount) on the token first, then sell.allowPartialFill is true. Then the curve fills what it can and refunds the rest, and minFillTokensPerEthWad (above 0: tokens per ETH, scaled by 1e18) bounds the fill rate.GRADUATION_MIN_GAS). Give buys near the end a generous gas limit, such as 2,000,000.Examples with Foundry’s cast. Replace <CURVE> and <TOKEN> with the token’s curve and token addresses, and <YOUR_KEY_OR_ACCOUNT> with your cast wallet account.
BASE=$(cast call 0x5E84dD21CB0db9bf60264c3aa546223F8C69Cccf "baseFeeBps()(uint16)" --rpc-url $RPC)
TAX=$(cast call <CURVE> "creatorTaxBps()(uint16)" --rpc-url $RPC)
CAP=$((BASE + TAX))ETH_IN=$(cast to-wei 0.01)
OUT=$(cast call <CURVE> "quoteBuy(uint256,bool)(uint256,uint256,uint256,uint256)" $ETH_IN false --rpc-url $RPC | head -n1 | cut -d' ' -f1)
MIN_OUT=$(echo "$OUT * 99 / 100" | bc)
cast send <CURVE> "buy(uint256,uint256,bool,uint256,uint16)" $MIN_OUT $(($(date +%s)+120)) false 0 $CAP \
--value $ETH_IN --gas-limit 2000000 --rpc-url $RPC --account <YOUR_KEY_OR_ACCOUNT>AMOUNT=$(cast to-wei 1000)
cast send <TOKEN> "approve(address,uint256)" <CURVE> $AMOUNT --rpc-url $RPC --account <YOUR_KEY_OR_ACCOUNT>
OUT=$(cast call <CURVE> "quoteSell(uint256)(uint256,uint256)" $AMOUNT --rpc-url $RPC | head -n1 | cut -d' ' -f1)
MIN_OUT=$(echo "$OUT * 99 / 100" | bc)
cast send <CURVE> "sell(uint256,uint256,uint256,uint16)" $AMOUNT $MIN_OUT $(($(date +%s)+120)) $CAP --rpc-url $RPC --account <YOUR_KEY_OR_ACCOUNT>Reading right after a transaction
cast call … --block <n>) or retry briefly.sqrtPriceLimitX96expectedDexProtocolFee to protocolFee from the quote. If the PoolManager’s protocol fee changes before your trade lands, it reverts.maxTotalFeeBps works as on the curve. Before dexSell, call approve(router, amount) on the token.ETH_IN=$(cast to-wei 0.01)
Q=$(cast call 0x68329CB8eb090404026acc27E89d8FEbfdDef2af "quote(address,bool,uint256)(uint256,uint256,uint24,uint160)" <TOKEN> true $ETH_IN --rpc-url $RPC)
MIN_OUT=$(echo "$(echo "$Q" | sed -n 1p | cut -d' ' -f1) * 99 / 100" | bc)
PFEE=$(echo "$Q" | sed -n 3p | cut -d' ' -f1)
cast send 0x01E01B9d070262aD1D4B0a0D894556B4fE7A2e44 "dexBuy(address,uint256,uint256,uint16,uint24,uint160)" <TOKEN> $MIN_OUT $(($(date +%s)+120)) $CAP $PFEE 4295128740 \
--value $ETH_IN --rpc-url $RPC --account <YOUR_KEY_OR_ACCOUNT>
AMOUNT=$(cast to-wei 1000)
cast send <TOKEN> "approve(address,uint256)" 0x01E01B9d070262aD1D4B0a0D894556B4fE7A2e44 $AMOUNT --rpc-url $RPC --account <YOUR_KEY_OR_ACCOUNT>
Q=$(cast call 0x68329CB8eb090404026acc27E89d8FEbfdDef2af "quote(address,bool,uint256)(uint256,uint256,uint24,uint160)" <TOKEN> false $AMOUNT --rpc-url $RPC)
MIN_OUT=$(echo "$(echo "$Q" | sed -n 1p | cut -d' ' -f1) * 99 / 100" | bc)
PFEE=$(echo "$Q" | sed -n 3p | cut -d' ' -f1)
cast send 0x01E01B9d070262aD1D4B0a0D894556B4fE7A2e44 "dexSell(address,uint256,uint256,uint256,uint16,uint24,uint160)" <TOKEN> $AMOUNT $MIN_OUT $(($(date +%s)+120)) $CAP $PFEE \
1461446703485210103287273052203988822378723970341 --rpc-url $RPC --account <YOUR_KEY_OR_ACCOUNT>Transfer |
| Token |
| Balances and holders |
event LaunchCreated(address indexed token, address indexed curve, address indexed creator, address feeRecipient,
bytes32 metadataHash, bytes32 economicsHash, uint16 creatorTaxBps, uint16 protocolShareBps,
uint256 virtualEth, uint256 graduationEth);
event CurveTrade(address indexed token, address indexed trader, bool isBuy, uint256 grossEthWei,
uint256 netEthWei, uint256 tokenAmount, uint256 baseFeeWei, uint256 creatorTaxWei, uint256 protocolFeeWei,
uint256 creatorFeeWei, uint256 reserveEthWei, uint256 tokenReserveBaseUnits, uint8 phase);
event Graduated(address indexed token, bytes32 indexed poolId, uint256 ethAddedWei, uint256 tokenAdded,
uint256 tokenLocked);
event DexTrade(address indexed token, address indexed trader, bool isBuy, uint256 grossEthWei,
uint256 netEthWei, uint256 tokenAmount, uint256 baseFeeWei, uint256 creatorTaxWei, uint256 protocolFeeWei,
uint256 creatorFeeWei);
event Transfer(address indexed from, address indexed to, uint256 value);