- CoreBookClient: full read/write surface for AereCoreBookV0 (placeGTC/IOC/
withSlippage/Protected, cancel, claim base+quote, flushFees; bestBid/bestAsk/
marketInfo/depth/openOrdersOf via Lens), price math mirrors (_computeQuote,
_lockBuyFunds incl. 256-wei buffer), orderId derivation (pre-incremented
nonce keccak), event decode for OrderPlaced/Filled/OrderCancelled/Claimed.
Verified 63/63 against ethers v6 ground truth.
- AereCoreBookClient (pre-existing): fixed 11 wrong read selectors (bestBid,
bestAsk, pendingSinkFee, TAKER_FEE_BPS, PRICE_TICK, LOT_SIZE, decimals
factors, PRICE_SCALE, cancel-delay constants) - every read would have
thrown before.
- addresses.ts: AERE_COREBOOK = { markets: {} } - founder gate, no market
listed until explicit approval.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
205 lines
14 KiB
TypeScript
205 lines
14 KiB
TypeScript
/**
|
||
* Canonical AERE Network mainnet contract addresses (chain 2800).
|
||
* Last updated: 2026-06-01 · SDK v0.16.1 (Tier 1.17 AereUSDC removed — AERE is the only token)
|
||
*
|
||
* EVM ruleset: Pectra + Fusaka — full functional parity with Ethereum mainnet.
|
||
* Pectra (Prague/Cancun) activated at unix 1780189051, block 2,075,363 (2026-05-31 00:57:31 UTC).
|
||
* Fusaka (Osaka) activated at unix 1780220351, block 2,106,606 (2026-05-31 09:39:11 UTC).
|
||
*
|
||
* Fusaka adds:
|
||
* - RIP-7951 — secp256r1 / P-256 precompile at 0x100 for native passkey
|
||
* signature verification (Apple Face ID/Touch ID/Secure Enclave,
|
||
* Windows Hello, Android biometric, YubiKey, EU Digital Identity Wallet).
|
||
* Fixed cost ~3,450 gas vs ~250,000 gas in Solidity.
|
||
*
|
||
* Pectra supports:
|
||
* - EIP-7702 (EOA delegation / native account abstraction)
|
||
* - EIP-2537 (BLS12-381 precompiles at 0x0b-0x11)
|
||
* - EIP-2935 (historical block hashes contract)
|
||
* - EIP-1153 (transient storage TSTORE/TLOAD)
|
||
* - EIP-5656 (MCOPY), EIP-6780 (SELFDESTRUCT change)
|
||
* - EIP-4788 (parent beacon block root, set to 0x0 on QBFT — no consensus layer)
|
||
* - EIP-7516 (BLOBBASEFEE — returns 0 on QBFT, no blobs)
|
||
*
|
||
* Total supply: 2,800,000,000 AERE (capped at genesis-v2, 2026-05-07)
|
||
* 100M Strategic Investor (0xaee2…1311) — sold off-chain
|
||
* 180M Foundation (0x0243…f3C3) — chain admin / contract owner
|
||
* 1.4B Mining Reserve (0x038f…fFB8)
|
||
* 560M Ecosystem Reserve (0xB6a3…1C75)
|
||
* 420M Team Reserve (0x7968…CCdf)
|
||
* 140M Airdrop Reserve (0x2619…28B1)
|
||
*
|
||
* Consensus: Hyperledger Besu QBFT, 1-second blocks, sub-second finality, 3 validators.
|
||
* All Ownable contracts owned by Foundation `0x0243A4f47D44b40b65D33f20329dE20D00c6f3C3`.
|
||
* Source of truth: https://aere.network/docs.html
|
||
*/
|
||
export const AERE_MAINNET = {
|
||
chainId: 2800,
|
||
chainIdHex: '0xAF0',
|
||
rpc: 'https://rpc.aere.network',
|
||
ws: 'wss://wss.aere.network',
|
||
explorer: 'https://explorer.aere.network',
|
||
indexer: 'https://api.aere.network',
|
||
|
||
// ── Genesis wallets ───────────────────────────────────────
|
||
StrategicInvestor: '0xaee2f3989f0AB23296Fa3b92247fe67587141311',
|
||
Foundation: '0x0243A4f47D44b40b65D33f20329dE20D00c6f3C3',
|
||
MiningReserve: '0x038f59A40ceeCd599A4588E4B0ff4642a0fbfFB8',
|
||
EcosystemReserve: '0xB6a364F47d21DC2CbEB803565c111c1026e11C75',
|
||
TeamReserve: '0x7968C438204a78B4e032fcFFd9A56Edb15fdCCdf',
|
||
AirdropReserve: '0x261913fA73D6F109382F1aE98Ff6822ff03628B1',
|
||
|
||
// ── Core contracts (deployed 2026-05-07, owner = Foundation) ──
|
||
WAERE: '0x7e84d7d66d5da4cfE46Da67CDEeB05B323e1f5e8',
|
||
AereTreasury: '0x687933AE7ea4927867AC227F1b60d476003e6119',
|
||
AereOracle: '0xf0A13823A4bFa86358Fe30aaf1f44A36AcbCf399',
|
||
AereIdentity: '0x658dD2CD1F798AAb19fEc8FF69A270B2d192CaD1',
|
||
AereFaucet: '0xDdBe942aD9eB0F3E7C541BdCF7CC2cfA29d35aE4',
|
||
AereCardEscrow: '0xD1f7f12830AdCFd1B7676C8460B9e30602b1f059',
|
||
AereSecurity: '0xaD305e4D91e0a9160Bd338Fd1ecb2Ee1645daC44',
|
||
AereStaking: '0xAbDb01d9A4f41792129b2654Fb6DDB9689360DEc', // delegated, 8% APY, 7-day unbonding
|
||
AereConsensus: '0xF8bDDad4aDACF9d38711e8f9aFC8a2697aBF0d47',
|
||
|
||
// ── Audit-pass-stack (deployed 2026-06-09 via Foundation MetaMask) ────────
|
||
sAERE: '0xA2125bE9C6fd4196D9F94757Df18B3a2A5e650b0', // R6-hardened ERC-4626 with 7-day drip
|
||
AereSink: '0x69581B86A48161b067Ff4E01544780625B231676', // Immutable 3-bucket router 15/40/45
|
||
AereBugBountyVault: '0x253fDCb248649396CBDaD320F81869A570d69cD3', // 5% max payout
|
||
AereSanctionsRegistry: '0xb7d235718D99560F6EA4Fc5eAea2F8a306A3Cacf',
|
||
AereTravelRuleHashRegistry: '0xcF0E2e010E6e4506672019b1e570874AEeBC4c84',
|
||
AereStateChannels: '0x64488eda27fA5b55A277ac8D386E169DC78cd7b6', // 24h challenge window
|
||
AereRaaSFactory: '0x8C1b0018ab8C4299a75621a4BdD3cF26971B26Cd', // 1000 AERE bond, 10% sink share, 6h window
|
||
ChainalysisOracleWrapper: '0x1B7Be82C80f368f75Cb3807B1bc05E86A498f85c',
|
||
AereForensicEventRegistry: '0x4a7526A068e5DDE9788f6571E4A99095b14C6fff',
|
||
AereZKScreen: '0xE9da9c5F40c2CDfda368885832C59609286e04ee', // SP1Gateway-backed
|
||
AereAIProof: '0xFf92c669AbF4C1DAE31eBFCC017764036d9D97e6',
|
||
AereAttestationGateway: '0x9bdacA8dfF39Fc688e8D3c4bbA13bCFC0580c325',
|
||
AereBestExReceipt: '0x3c80BD6fa0d9a2274c7fBD5943B5EC03313D92d7', // MiCA Article 78
|
||
AereSettlementHub: '0x2a02fD80c16293D2B5D8a295F31D1a6E6a582c02',
|
||
AereCoinbaseSplitterV2: '0x8C1A48eFA57b66fEE743A00E3899c29ad3Fd27b4',
|
||
AereAgent: '0xE96396B4b596B3A74e4195Be12aADd5257863536',
|
||
AERE402Facilitator: '0xbA6e6700D629a5E3C885778a42885a944CA84E56',
|
||
AereDelegate7702: '0x5673D92080efbd0987402E9335c14200d0a5EaeF',
|
||
AereDelegationRegistry: '0x6c25c07D134713b6C2F8E19D807423f022903D63',
|
||
AereInsuranceFund: '0x5Ab95C549c2A2b07913Df7edD4a16fd108B7CAAC', // 7-day cooldown
|
||
AereNavOracle: '0xC8D12E44f10b03477330b35115b432750831fEBD',
|
||
// ── PENDING (blocked on Hyperlane USDC.e bootstrap post-MEXC payment) ────
|
||
// AereCoreBookV0 — per-market deploy, needs BASE + QUOTE=USDC.e
|
||
// AereLendingMarket × 6 — needs USDC.e + bridged RWAs
|
||
// AereCompliancePool — needs USDC.e as TOKEN
|
||
// AereSpokePool — needs USDC.e
|
||
// AereHypERC20Synthetic/Collateral — Hyperlane Warp Routes (Ethereum-side gas required)
|
||
// RWATransferAdapter — needs Foundation NAV aggregators
|
||
// AereCompliancePoolSP1Verifier — needs VKEY from cargo-prove build
|
||
|
||
// ── dApp contracts (deployed 2026-05-22, owner = Foundation) ──
|
||
AereSwapFactory: '0xf0a8df7BDc25721892475B21271e52D77B0e84DC', // V2 AMM factory
|
||
AereSwapRouter: '0x7526B2E5526EfA84018378b60F2844Dad77523D8', // V2-style periphery (add/remove liquidity + swap)
|
||
AereBridge: '0x7eDa66cd93baAE19530839Bbb28ee36aC8aFAd68', // 1-of-1 Foundation signer (relayer pending)
|
||
AereMiningSubscription: '0xDad25d2163187DF8AAEcf9EA31b6355315Bb69f1', // 4 tiers, 30-day periods
|
||
AereNFT: '0x3f9A9D9CAB005327869396C69bE226ef98039f1c', // ERC-721 + EIP-2981 royalties
|
||
AereNFTMarketplace: '0x852e07F2619F7F4aD10d9f2aC681310301d99528', // on-chain marketplace, 2.5% fee
|
||
|
||
// ── Governance + locked staking ───────────────────────────
|
||
AereGovernanceStaked: '0x8D77C888e439C4fADb2e23F1567a0A1965F80bCb', // stake-weighted (reads AereStaking)
|
||
AereLockedStaking: '0x21108c28A849b05aE6b7a3a5bc435C9Bc897E7Ad', // fixed-term locks: 30d/10%, 90d/15%, 180d/22%, 365d/30% APY
|
||
|
||
// ── Tier-1 DeFi (deployed 2026-05-31) ─────────────────────
|
||
AereFeeBurnVault: '0x696afDF4f814e6Fd6aa45CE14C498ed9375fB2c6', // protocol-fee burn endpoint (stateless, no admin)
|
||
AereYieldFarm: '0xF86Fb0Eb3262C4e93Dbb349d63023218a5Db713F', // MasterChef-style LP staking → native AERE rewards
|
||
AereMiningDistributor: '0x0607ad23534ee251f359D960f7a6823C6b876b26', // Merkle-claim AireFlow payout (per-epoch, sweepable)
|
||
|
||
// ── Tier-1.3 paymaster stack (deployed 2026-05-31) ──────────
|
||
AereEntryPoint: '0x19773ba45287A64B05d0BCBD59D1371BF51Bd5D2', // Lightweight ERC-4337 EntryPoint compatible with our paymasters
|
||
AereOnboardingPaymaster: '0x4058E406475Dbed7056Aee0c808f293F05fEa879', // Foundation-funded · 3 lifetime UserOps/sender · 100/day sitewide cap
|
||
AereTokenPaymaster: '0xEb6e2Eb24e597C85392DdCD68a1F9b654FffdcB2', // Pay gas in any whitelisted ERC-20 (Foundation enables tokens)
|
||
AereStakeQuotaPaymaster: '0xD16C86D792444c2667A26dB62f01b90FC0DaB87b', // Stake AERE → daily free-tx quota (Tron-style UX)
|
||
AereAppPaymasterFactory: '0xEC22603E8712cBc5c31E53370D10f1a80CcB4DF0', // Permissionless factory — any dApp clones its own AereAppPaymaster
|
||
|
||
// ── Tier-1.4 cross-chain messaging (deployed 2026-05-31) ──────────
|
||
AereMessenger: '0xe54c2329f0786CFE3420c566B646148D25477325', // Hyperlane Mailbox-compatible cross-chain message bus
|
||
AereIGP: '0x61B48615F490A23945988c92835eF35fdD86E837', // Interchain Gas Paymaster — receives AERE for outbound message gas
|
||
|
||
// ── Tier-1.5 intent-based cross-chain (deployed 2026-05-31) ──────────
|
||
AereSpokePool: '0xCAB1DBA5f6F06198000C20a974d675f1B3181AbD', // Across-v3-compatible SpokePool (deposit + fill + settlement)
|
||
AereERC7683: '0x67Fb9830e3a2BC06cEb641cfF3beD87b273ccb29', // ERC-7683 IOriginSettler — gasless cross-chain intents
|
||
|
||
// ── Tier-1.6 oracle stack (deployed 2026-05-31) ──────────
|
||
AerePyth: '0xb7F3354C1E0C5ef89D8b1072a3CEa7FFEf2FfE3F', // Pyth-IPyth-compatible pull oracle (publisher-signed updates)
|
||
AereOracleAdapter: '0xb28A23dc177794DEC2Cacd2738fCc6c5C1Fc4Fe6', // Unified price-quote interface (routes Pyth → legacy AereOracle fallback)
|
||
|
||
// ── Tier-1.7 verifiable randomness (deployed 2026-05-31) ──────────
|
||
AereRandomnessBeacon: '0x25b6317efD8C7d425210F56Ee1E204852CD8213C', // Permissionless drand beacon — anyone submits, consumers pay own gas
|
||
AereDrandConsumer: '0xeBA8De4f61c923a2E43eA8d7233Cf8e1Db5911B5', // Reference consumer (example/library)
|
||
|
||
// ── Tier-1.8 burn flow (deployed 2026-05-31) ──────────
|
||
AereCoinbaseSplitter: '0xb4b0eCe9011613A5b84248a9B42a0f309E6F01Ec', // 37.5% to FeeBurnVault, 62.5% to validator. Whitepaper §3.3 made real.
|
||
|
||
// ── Tier-1.9 batch-auction DEX (deployed 2026-05-31) ──────────
|
||
AereVaultRelayer: '0x9FCA122e87E36D7cba20DbEA7b9b7354A4Cece91', // Token allowance proxy for batch settlement
|
||
AereSolverRegistry: '0xDBD29332a9993d2816EF0bD240288E03a8103f3B', // Permissioned solver allowlist (Phase 1)
|
||
AereSettlement: '0x9C2957b1622567B4802E4AFd4c42FB2ec70dE875', // CoW-style batch-atomic settlement (MEV-resistant)
|
||
|
||
// ── Tier-1.10 fee monetization (deployed 2026-05-31) ──────────
|
||
AereFeeMonetization: '0x6b62DC6cC974F779354c953F41b64a7aB994dd98', // Developer fee-share NFTs + 5% Foundation treasury slice
|
||
// NOTE: AERE is the network's only native token. No stablecoin issuance.
|
||
|
||
// ── Tier-1.14 zk-verifier stack (deployed 2026-05-31) ──────────
|
||
// Multi-prover zk verification. Apps integrate against the gateway/router
|
||
// addresses — future SP1/RISC Zero verifier versions plug in via addRoute
|
||
// with zero downstream migration.
|
||
//
|
||
// SP1 (Succinct Labs)
|
||
SP1VerifierGateway: '0x9ca479C8c52C0EbB4599319a36a5a017BCC70628', // Stable address — route here
|
||
SP1VerifierGroth16_v6_1_0: '0xb5456d48bFdA70635c13b6CBE1Ad0310Dc0171aD', // Concrete v6.1.0 Groth16 (current production)
|
||
SP1VerifierGroth16_v6_0_0: '0xa9BD3020bC9a9614F9e2BC1618153c9fB1890ca6', // Concrete v6.0.0 Groth16 (prior production, retained)
|
||
SP1VerifierPlonk_v6_1_0: '0x24a7a85E6D9A2b120F2730880bE7283dFB14d29B', // Concrete v6.1.0 Plonk (no per-circuit trusted setup)
|
||
// RISC Zero
|
||
RiscZeroVerifierRouter: '0x3f7015BC3290e63F7EC68ecF769b00aB296a249C', // Stable address — route here
|
||
RiscZeroGroth16Verifier: '0x95cB30f3bdb3187f39203A9907bf707Aef07a1FD', // Concrete Groth16 verifier (selector 0xc27d1bc0)
|
||
// AERE registry — multi-prover proof attestation log with permissionless program registration
|
||
AereProofRegistry: '0x0A9b09677DbE995ACfC0A28F0033e68F068517Ee', // Routes proofs through SP1 gateway + R0 router
|
||
|
||
// ── Tier-1.15 passkey wallets v1 (deployed 2026-06-01, legacy) ──────────
|
||
// Single-passkey-owner smart account. Retained for the original demo account.
|
||
// For new wallets use AerePasskeyAccountFactoryV2 below.
|
||
AerePasskeyAccountFactory: '0xfB0eF980667A79Fe1AB69c5f2d512118F1B30739', // V1 — legacy
|
||
|
||
// ── Tier-1.16 Universal Login (deployed 2026-06-01) ──────────
|
||
// V2 passkey accounts: MultiOwnable (passkey + EOA owners), ERC-4337
|
||
// validateUserOp shim, EIP-1271 isValidSignature, recovery via owner-self-add.
|
||
AereEntryPointV2: '0x8D6f40598d552fF0Cb358b6012cF4227B86aF770', // Real ERC-4337-shaped EntryPoint
|
||
AerePasskeyAccountFactoryV2: '0x5FFa9a6487DA4641a1A1e7900ff2bD4525D34fdA', // V2 factory — predictAddress(initialOwners[], salt)
|
||
|
||
// ── Tier-1.17 DELETED 2026-06-01 — AERE is the only token, no wrapped stablecoins ──────────
|
||
// AereUSDC + AereBridge were deployed without explicit user approval and removed same day.
|
||
// Bridge watcher container archived at /opt/aere-bridge-watcher.killed-2026-06-01 on aere-infra.
|
||
// The AereUSDC + AereBridge contracts remain on-chain but are inert (bridge watcher dead).
|
||
// Foundation will pause+renounce AereUSDC.MINTER_ROLE when Foundation key is available.
|
||
|
||
// ── Deferred to future phases (not yet deployed) ──────────
|
||
// AereSwapRouter, AereYieldFarm,
|
||
// AereVesting, AereInsurancePool, AereLaunchpad, AereAirdrop, AereMultiSig,
|
||
// AereNameService, AereSubscriptions, AereFeeBurnVault,
|
||
// AereHTLC, AerePaymentChannels, AereLightningChannels, AereChannelRegistry,
|
||
// AereEntryPoint (ERC-4337), AereSmartAccountFactory, AerePaymaster,
|
||
// AereZK*, AerePlasmaRootV2 x6, AereL2Inbox x8, AereTravelRule
|
||
} as const;
|
||
|
||
export type AereContractName = keyof Omit<
|
||
typeof AERE_MAINNET,
|
||
'chainId' | 'chainIdHex' | 'rpc' | 'ws' | 'explorer' | 'indexer'
|
||
>;
|
||
|
||
// ── AereCoreBookV0 — native CLOB (per-market deploys) ─────────────────────
|
||
// One AereCoreBookV0 contract per (base, quote) market. NOTHING is deployed
|
||
// or listed yet: market listing is founder-gated, and the trade UI must fall
|
||
// back to demo mode while this map is empty. Keys are human market symbols
|
||
// ("WAERE/USDC.e"), values are the per-market AereCoreBookV0 addresses.
|
||
export const AERE_COREBOOK = {
|
||
markets: {
|
||
// no markets listed — founder gate
|
||
} as Record<string, `0x${string}`>,
|
||
} as const;
|
||
|
||
export type CoreBookMarketSymbol = keyof typeof AERE_COREBOOK.markets;
|