DEVELOPER DOCS
Technical integration guide
Complete documentation for building on GoodsMash: contract ABIs, integration patterns, API endpoints, and proven code examples for machines, notes, and fee loops.
🏗️ Contract Addresses
PerpetualEngine0xb863ed36cE79d2F18b9869a89501B63D5385fdB9StructuredNoteMachine0xDefE68715234B006d35Eb41698f8f850f73f071eTokenLaunchFeeLoop0x69fd3d5f9Ed2c811473EA9DF453AB11390AEd342RWACompositeIndex0x415B3c602bf01FC4A6d2106e2F32e7a4AD23db00DailyRotationNote0x51aC29E278835C081C4fDc6300cD44E5c6D9B109All deployed on Robinhood Chain testnet 46630
⚡ Quick Start
RPC: https://rpc.testnet.ourchain..com
Mint sUSD: 0x4786bbf200c53eE069e6E9d3B29C4D5a06C570da
Call mintMachine() with 0.01 ETH
Daily accrue() calls earn trait-based points
Code Examples
Mint Perpetual Machine
// Mint a perpetual yield machine
const engine = new ethers.Contract(ENGINE_ADDRESS, ENGINE_ABI, signer);
const tx = await engine.mintMachine(userAddress, traitSeed, { value: ethers.parseEther("0.01") });
await tx.wait();Mint Structured Note
// Mint a structured note (PPN = 0, BULL2x = 1, etc.)
const notes = new ethers.Contract(NOTES_ADDRESS, NOTES_ABI, signer);
const principal = ethers.parseEther("1000"); // 1000 sUSD
const tx = await notes.mintNote(0, principal, block.timestamp + 86400);
await tx.wait();Feed Trading Volume
// Feed trading volume to the fee loop
const feeLoop = new ethers.Contract(LOOP_ADDRESS, LOOP_ABI, signer);
const volume = ethers.parseEther("5000"); // 5000 sUSD
await stable.approve(LOOP_ADDRESS, volume);
const tx = await feeLoop.onFees(volume);
await tx.wait(); // Splits into 10/40/50🔧 Integration Patterns
- Volume Routing: DEX trades → TaxedToken → onFees()
- Yield Accrual: Daily cron → accrue() → points update
- Note Settlement: Maturity → noteValue() → redeem
- Treasury Voting: Weekly → setAllocation() → new splits
- Index Updates: oracle feeds → composite mark
🧪 Testing Tools
- Anvil Local: --chain-id 46631 --block-time 1
- Volume Simulator: scripts/mega-volume-stress.cjs
- 30-Day Accrual: scripts/test-30day.ts
- Security Audit: scripts/comprehensive-audit.cjs
- Exploit Hunt: scripts/test-real-exploits.cjs
📊 Analytics Endpoints
- Treasury State: treasuryReserve(), buybackVault()
- Machine Data: machineOf(), pendingPoints()
- Note Values: noteValue(), timeToMaturity()
- Index Mark: previewMark(), lastUpdated()
- Allocation: alloc(), setAllocation()
🛡️ Security Notes
- Zero-amount: All onFees() require amount > 0
- Reentrancy: nonReentrant on all state changes
- Ownership: onlyOwner for admin functions
- Precision: 18 decimals, 10000 BPS allocation
- Audit Status: 22 tests passed, 0 critical issues