🤖

Zorrito V2 — Agent API

Integrá Zorrito V2 con agentes de IA via MCP o ABI directo.

Herramientas MCP
READ
get_status
Lee depósito, streak, chances, savings pendientes y premio semanal para cualquier wallet. Sin auth.
WRITE
deposit_usdt
Deposita N USDT en Zorrito. Aprueba USDT y llama a deposit(amount, refCode).
WRITE
save_today
Llama a save() para acumular el streak del día. Una vez por día UTC.
WRITE
claim_savings
Reclama los savings rewards acumulados (Merit/Masiv). Llama a claimSavings().
Configuración MCP
{ "mcpServers": { "zorrito-v2": { "url": "https://v2.zorrito.app/api/mcp" } } }

Agregá esto a ~/Library/Application Support/Claude/claude_desktop_config.json

ABI V2
// Zorrito V2 ABI (ethers v6 human-readable) const ZORRITO_V2_ABI = [ // Write "function deposit(uint256 amount, bytes4 refCode) external", "function withdraw(uint256 amount) external", "function save() external", "function claimSavings() external", // Read — savings "function deposits(address user) view returns (uint256)", "function totalPrincipal() view returns (uint256)", "function pendingSavings(address user) view returns (uint256)", "function totalSavings() view returns (uint256)", // Read — streak "function streakDay(address user) view returns (uint8)", "function lastSaveDay(address user) view returns (uint256)", "function welcomeBonusClaimed(address user) view returns (bool)", "function WELCOME_STREAK() view returns (uint256)", "function welcomeBonus() view returns (uint256)", // Read — chances "function effectiveChances(address user) view returns (uint256)", "function totalEffectiveChances() view returns (uint256)", // Read — raffle "function currentPrizePool() view returns (uint256)", "function depositorCount() view returns (uint256)", // Read — referral "function referralCodeFor(address user) view returns (string)", "function activeReferrals(address user) view returns (uint256)", "function referredBy(address user) view returns (address)", // Read — config "function emergencyMode() view returns (bool)", // Events "event Deposited(address indexed user, uint256 amount)", "event Withdrawn(address indexed user, uint256 amount)", "event Saved(address indexed user, uint8 streakDay)", "event WelcomeBonusClaimed(address indexed user, uint256 amount)", "event RaffleExecuted(address indexed winner, uint256 prize, uint256 fee)", "event SavingsClaimed(address indexed user, uint256 amount)", ];
Ejemplo de uso
import { ethers } from "ethers"; const CONTRACT = "0x78f3E4fc319375B1043ceC0e502a2A8Abff95a0F"; const USDT = "0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e"; const provider = new ethers.JsonRpcProvider("https://forno.celo.org"); const wallet = new ethers.Wallet(PRIVATE_KEY, provider); const zorrito = new ethers.Contract(CONTRACT, ZORRITO_V2_ABI, wallet); const usdt = new ethers.Contract(USDT, ["function approve(address,uint256) returns(bool)"], wallet); // 1. Aprobar USDT await usdt.approve(CONTRACT, ethers.MaxUint256); // 2. Depositar 10 USDT (sin referido) await zorrito.deposit(10_000_000n, "0x00000000"); // 3. Ahorrar hoy await zorrito.save(); // 4. Leer estado const dep = await zorrito.deposits(wallet.address); const streak = await zorrito.streakDay(wallet.address); const chances = await zorrito.effectiveChances(wallet.address); console.log({ dep, streak, chances });