{
  "version": 3,
  "chain": {
    "id": 56,
    "name": "BNB Smart Chain",
    "rpcUrl": "https://bsc-rpc.publicnode.com",
    "rpcUrls": [
      "https://bsc-rpc.publicnode.com",
      "https://bsc-dataseed.bnbchain.org",
      "https://api.blockvectra.com/v1/bsc_mainnet/public",
      "https://bsc.blockrazor.xyz",
      "https://bsc.api.pocket.network",
      "https://bnb-mainnet.rpc.thyme.sh/public",
      "https://binance.nodereal.io"
    ]
  },
  "pages": {
    "presale": "https://bgoat.xyz/presale",
    "presaleApi": "https://bgoat.xyz/presale/agent.json",
    "publicToken": "https://bgoat.xyz/launch/token/{token}",
    "campaign": "https://bgoat.xyz/launch/sale/{address}",
    "guide": "https://bgoat.xyz/launch/docs/subscription/agentMint",
    "api": "https://bgoat.xyz/launch/agent.json",
    "agentGuide": "https://bgoat.xyz/launch/agent.txt",
    "agentIdRegistration": "https://www.binance.com/zh-CN/support/announcement/detail/95f5dbe0ea674a48a739b59e046648bf"
  },
  "contracts": {
    "presale": "0x2E77972B1C671a245b7C0a19ca09a6EA7B0D9981",
    "presaleToken": "0x5192721638E88a72329E31F186b3F97ff415f279",
    "publicFactory": "0x21d2Ea406c929662Ed11fDC60552CDA9838A15C3",
    "agentId": "0x60b9262456de011f7d15a54cdd8c48baaa8b022f",
    "presaleImplementation": "0x0CEF65881007fd6801B57DfFd1A95948dC25Fa8A",
    "presaleProxyAdmin": "0x735f838774d990601B32D68476E5F289003EE556"
  },
  "presaleFlow": {
    "agentInstructions": {
      "websiteWalletRequired": false,
      "payer": "Current Binance Agentic Wallet BSC address, or a specified address matching that wallet",
      "addressVerification": "Optional account lookup on the website; purchase enforces Agent ID of the paying wallet",
      "referralLink": "{project URL}/invite/{BSC address}",
      "inviterWithoutLink": "Pass zero; purchase preserves an existing on-chain referral",
      "walletPreview": "Read the sale and use the wallet-native contract-call preview for the user to confirm."
    },
    "tokenDelivery": "on-mint",
    "transferable": "after-official-liquidity-confirmed",
    "settlement": "manual-v2",
    "refundUntil": "sold-out",
    "refundEligibility": "Read agentOnlyRefunds() on the selected sale. When true, only orders bought at AGENT_PRICE() are refundable. When false, either mint mode can refund at its original order price.",
    "referralClaims": "after-sellout",
    "saleIsProxy": true,
    "issuanceFeeBps": 0,
    "requiredFeeCheck": "issuanceFeeBps() == 0 before purchase",
    "requiredReferralCheck": "automaticReferralClaims() == true before purchase"
  },
  "publicFlow": {
    "pricing": "Read NORMAL_PRICE() and AGENT_PRICE() on the selected campaign. Use quotePurchase() for the exact transaction value.",
    "successFeeBps": 1000,
    "tokenDelivery": "on-mint",
    "transferable": "after-liquidity",
    "settlement": "final-mint-atomic-v2",
    "refundUntil": "sold-out",
    "refundEligibility": "Read agentOnlyRefunds() on the selected sale. When true, only orders bought at AGENT_PRICE() are refundable. When false, either mint mode can refund at its original order price.",
    "referralClaims": "after-liquidity",
    "initialLp": "burned"
  },
  "terms": {
    "shareCap": 12800,
    "walletCap": 50,
    "tokensPerShare": "54687000000000000000000",
    "poolTokens": "300006400000000000000000000",
    "nominalRaiseWei": "128000000000000000000",
    "allAgentRaiseWei": "115200000000000000000",
    "paymentMustBeExact": true
  },
  "actions": {
    "resolveProject": {
      "presale": "contracts.presale",
      "saleLink": "/launch/sale/{campaign}",
      "tokenLink": "/launch/token/{token}",
      "publicRegistry": "contracts.publicFactory",
      "verifyPublic": "isCampaign(campaign)",
      "verifyToken": "campaign().token"
    },
    "mint": {
      "target": "campaign",
      "method": "purchase",
      "args": [
        "shares",
        "agent",
        "inviter"
      ],
      "quote": "quotePurchase(payer,shares,agent,inviter)",
      "value": "exact quote in wei",
      "shares": "integer",
      "agentMode": "true for Agent Mint; check eligibleAgent(payer)"
    },
    "invitation": {
      "link": "{project URL}/invite/{BSC address}",
      "binds": "first successful eligible mint",
      "separateCall": false,
      "check": "referrerOf(payer) and canAcceptInviter(payer,inviter)",
      "withoutNewInviter": "0x0000000000000000000000000000000000000000"
    },
    "refund": {
      "target": "campaign",
      "method": "refund",
      "args": [
        "orderId",
        "shares"
      ],
      "valueWei": "0",
      "signer": "original payer",
      "orders": [
        "orderCount(payer)",
        "orderAt(payer,orderId)"
      ],
      "firstOrderId": 0,
      "amount": "requestedShares * order.unitPrice",
      "available": "campaign().isOpen && campaign().lockedAt == 0 && order.shares > 0 && (!agentOnlyRefunds() || order.unitPrice == AGENT_PRICE())"
    }
  },
  "preparation": {
    "method": "GET",
    "url": "https://bgoat.xyz/chain/bsc?view=agent",
    "project": "sale=bgoat for the platform presale, sale=<campaign> for a sale link, or token=<token> for a public token link. Include payer=<current wallet>.",
    "mint": "action=mint&shares=<integer>&agent=true&inviter=<optional address>",
    "invitation": "action=invite&inviter=<address>. USE_ON_NEXT_MINT and ALREADY_BOUND do not contain a transaction.",
    "refund": "action=refund lists refundable orders. Use nextBefore as before to read another page. Include orderId and optionally shares to prepare a selected order.",
    "preview": "PREVIEW_REQUIRED includes transaction.from, transaction.to, transaction.valueWei and transaction.calldata. The connected wallet must preview these exact parameters before confirmation."
  },
  "rpcMethods": [
    "eth_chainId",
    "eth_getCode",
    "eth_call",
    "eth_getBalance",
    "eth_estimateGas"
  ],
  "rpcRequests": {
    "presaleCampaign": {
      "jsonrpc": "2.0",
      "id": 1,
      "method": "eth_call",
      "params": [
        {
          "to": "0x2E77972B1C671a245b7C0a19ca09a6EA7B0D9981",
          "data": "0x811e539c"
        },
        "latest"
      ]
    }
  },
  "assertions": {
    "saleOpen": [
      "campaign().isOpen == true",
      "campaign().lockedAt == 0",
      "Prefer saleActive() when the contract has been upgraded"
    ],
    "agentMint": [
      "eligibleAgent(payer) == true",
      "Do not retry with agent=false if the payer has no Agent ID",
      "value == shares * AGENT_PRICE() on the target campaign",
      "sharesOf(payer)+shares <= campaign().walletCap",
      "soldShares+shares <= campaign().shareCap"
    ],
    "inviter": [
      "If inviter is 0x0, purchase keeps any existing referral and skips a new binding",
      "A nonzero inviter must match an existing binding or be eligible for a new binding",
      "If available, quotePurchase or canAcceptInviter can check the purchase argument"
    ],
    "token": [
      "Verify campaign().token; the sale may be a proxy",
      "Compare campaign().tokensPerShare with the quoted allocation per share before confirming",
      "Do not compare implementation bytecode"
    ]
  },
  "reads": {
    "factory": [
      "function isCampaign(address) view returns (bool)",
      "function creationEnabled() view returns (bool)",
      "function creatorOf(address campaign) view returns (address)",
      "function campaignForToken(address token) view returns (address)"
    ],
    "campaign": [
      "function campaign() view returns ((string name,string symbol,uint256 supply,uint256 shareCap,uint256 walletCap,uint256 tokensPerShare,uint256 poolTokens,uint256 soldShares,uint256 raised,uint256 referralReserve,uint256 lockedAt,uint256 readyAt,bool isOpen,address token,address pair))",
      "function NORMAL_PRICE() view returns (uint256)",
      "function AGENT_PRICE() view returns (uint256)",
      "function issuanceFeeBps() view returns (uint16)",
      "function saleActive() view returns (bool)",
      "function agentOnlyRefunds() view returns (bool)",
      "function quotePurchase(address buyer,uint32 shares,bool agent,address inviter) view returns (bool ok,bytes32 reason,uint256 value)",
      "function canAcceptInviter(address buyer,address inviter) view returns (bool)",
      "function agentIdentity() view returns (address)",
      "function eligibleAgent(address) view returns (bool)",
      "function sharesOf(address) view returns (uint32)",
      "function referrerOf(address) view returns (address)",
      "function canInvite(address) view returns (bool)",
      "function canBindInviter(address buyer,address inviter) view returns (bool)",
      "function orderCount(address) view returns (uint256)",
      "function orderAt(address,uint256) view returns ((uint32 shares,uint32 initialShares,uint96 unitPrice,uint96 unitReward))",
      "function pendingReferral(address) view returns (uint256)"
    ],
    "agentId": [
      "function balanceOf(address) view returns (uint256)"
    ],
    "manualPresale": [
      "function automaticReferralClaims() view returns (bool)",
      "function manualLiquidity() view returns (bool)",
      "function liquidityReleased() view returns (bool)",
      "function referralClaimsOpen() view returns (bool)"
    ]
  },
  "transaction": {
    "buy": "function purchase(uint32 shares,bool agent,address inviter) payable",
    "refund": "function refund(uint256 orderId,uint32 shares)",
    "claimReferral": "function claimReferral(address recipient)",
    "paymentWeiPerShareScope": "BGOAT presale. For public campaigns read their individual price getters.",
    "paymentWeiPerShare": {
      "standard": "10000000000000000",
      "agent": "9000000000000000"
    }
  }
}
