Section 18 • Developer Reference, Security & Legal
~5 min read•18 of 20
Complete integration guide, primary write/view methods, and live code snippets
TribFi contracts are deployed natively on Base Mainnet (Chain ID 8453):
TribFiFactory0xFaC7000000000000000000000000000000000001
TribFiBondingCurve0xCuRvE00000000000000000000000000000000002
FeeEscrow0xEsCrOw0000000000000000000000000000000003
LiquidityLockVault0xLoCkVaUlT0000000000000000000000000000004
| Function | Contract | Type | Description |
|---|---|---|---|
| createToken(...) | TribFiFactory | Write | Deploys 1B token & curve atomically |
| buy(address,uint256) | BondingCurve | Write (Payable) | Swaps ETH for tokens on curve |
| sell(address,uint256,uint256) | BondingCurve | Write | Sells tokens back to curve for ETH |
| withdrawCreatorFee(address) | FeeEscrow | Write | Withdraws accumulated 0.5% royalties |
// Ethers v6 Buy Example
import { ethers } from "ethers";
const curveAbi = ["function buy(address token, uint256 minTokensOut) external payable returns (uint256)"];
const curve = new ethers.Contract(CURVE_ADDRESS, curveAbi, signer);
const tx = await curve.buy(tokenAddress, minTokensOut, { value: ethers.parseEther("0.1") });
await tx.wait();