duly / evidence/mainnet.js · raw
// The mainnet run of 2026-11-01, as data. One source for the landing page, the// invoice pages and scripts/verify-mainnet.mjs, which re-checks every line here// against public RPCs with no keys. evidence/mainnet.md is the same run in prose.// Amounts are USDC base units (6 decimals). All of the money was ours.export const MAINNET = {  date: '2026-11-01',  contract: 'dulypay.near',  codeHash: '7jt6GbQnA7VyUGs65Azim73ypuZbBZa2GSKfXHkMQqvj',  usdc: '17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1',  baseUsdc: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913',  relayer: 'relayer.dulypay.near',  agent: 'agent.dulypay.near',  merchant: 'aaada43544e7716148fc48dd49488021e1ea6f096e1661bcc4393ec7c02e05b9',  taxJar: '119327eb3f12165cf0bcaf60b2d1d6906df2fb237b962053de02f911931a0961',  payer: '0xa30bdf2ea82d86a5fef686999b0b6c3d80c788cd',  // Every NEAR transaction: hash, who signed it, and what it must show.  near: [    { key: 'deploy', hash: '3vrVYotbr7whJDaQfcnNKtvpjg5ie6R6cHMhR93Y3yCD', signer: 'dulypay.near', label: 'Deploy and initialise the contract' },    { key: 'account', hash: 'EPm2hudoi6LsMHxsfDwraNrM1wgdk4RNpYCe1ezC37fi', signer: 'relayer.dulypay.near', label: 'Relayer creates the merchant account (no wallet, no NEAR)' },    { key: 'register', hash: '7bfLJrDnS3rXqAh7BffkG1KN2Cv46kJBaoiM249DJynw', signer: 'relayer.dulypay.near', method: 'register', label: 'Merchant registers, gas paid by the relayer' },    { key: 'shares', hash: '8HoePX1r6otRmqwBstZ6ymgxEsXEfuyfA6BfRiY2A85N', signer: 'relayer.dulypay.near', method: 'set_shares', label: 'Merchant sets a 20% tax set-aside' },    { key: 'issue1', hash: '9tzf64SCWhzb2o485rv2mrKNy6Bp8zZF7J2BKMTbjASW', signer: 'relayer.dulypay.near', method: 'create_invoice', label: 'Invoice 1-1 issued (0.25 USDC)' },    { key: 'issue2', hash: 'DziDnTWduuRCK1sBwdLQu9FxB5C51HKJZaea4Y31o19k', signer: 'relayer.dulypay.near', method: 'create_invoice', label: 'Invoice 1-2 issued (0.10 USDC, left open; the first public sample)' },    { key: 'issue3', hash: '2KL2g9WphrkmctLgwjxS3ZzoTzXu8rDDmdp4kpK4NCJz', signer: 'relayer.dulypay.near', method: 'create_invoice', label: 'Invoice 1-3 issued (1.00 USDC) from the web page' },    { key: 'issue4', hash: '3wQodfCSquw6K9H11w98iJhZdoEDLnm1nkMebtmCX2P8', signer: 'relayer.dulypay.near', method: 'create_invoice', label: 'Invoice 1-4 issued on 2026-11-10 (0.10 USDC, due 2026-11-30, the public sample)' },    { key: 'settle1', hash: '3dgog4LYEb3rjWCJN8E52GjNu3L1rSnstbGG6TWTKQXN', signer: 'intents.near', settles: '1-1', label: 'NEAR Intents delivers 0.25 USDC; ft_on_transfer closes invoice 1-1' },    { key: 'settle3', hash: 'GceCNYM3VvWnnN4x6ha7T9aU2j9PmzHyJnP6oc6pkreF', signer: 'intents.near', settles: '1-3', label: 'NEAR Intents delivers 1.00 USDC; ft_on_transfer closes invoice 1-3' },    { key: 'withdraw', hash: '8W9cfQoLv1Uyx13H9eBMrcEJYrqJBWeYKScxXuKc3LDV', signer: 'relayer.dulypay.near', method: 'withdraw', label: 'Merchant withdraws 0.10 USDC to Base, gas sponsored' },    { key: 'refund', hash: '2mq3WzG1rYCZRB92RGyXPx6o8y6p6QRoDGuxLWsWwLJq', signer: 'relayer.dulypay.near', method: 'refund', label: 'Merchant refunds 0.05 USDC of invoice 1-1 to the payer on Base' },  ],  // Every Base transaction, with the USDC transfer it must contain.  base: [    { key: 'pay1', hash: '0x9f6b846b749a022e3dde57c3dbef6287549daeaac13ca219b00046f945184eb6', from: '0xa30bdf2ea82d86a5fef686999b0b6c3d80c788cd', to: '0xba80df081227ce4ed5e9bbc73333e81b2ddae2fd', amount: '252579', label: 'Client pays invoice 1-1 from Base (to a 1Click deposit address)' },    { key: 'pay3', hash: '0x0429a3f18c6b1a8681afb92ab58fb595e82672d9f5ecd94af57204370c63fa9a', from: '0xa30bdf2ea82d86a5fef686999b0b6c3d80c788cd', to: '0x7cf650c4daa945580aa214d023fae04973b3f811', amount: '1002210', label: 'Client pays invoice 1-3 from Base through the web page' },    { key: 'payout', hash: '0x11374a0b8f06e4655b3b4c6ebcb127d12191fef9563014210c15785c723c5955', to: '0xa30bdf2ea82d86a5fef686999b0b6c3d80c788cd', amount: '97579', label: 'Withdrawal lands on Base' },    { key: 'refundOut', hash: '0xcd22d0141c3145116d6206154eee3a8f83a635bb6f818fb4285ee14da726ebb3', to: '0xa30bdf2ea82d86a5fef686999b0b6c3d80c788cd', amount: '47588', label: 'Refund lands back with the payer on Base' },  ],  // What the contract holds for each invoice today. 1-1 was part refunded on purpose.  // 1-2 and 1-4 are left open for anyone to pay (1-4 is the public sample; 1-2 was  // the first one and falls due on 2026-11-15), so a payment there is not a mismatch.  invoices: [    { id: '1-1', amount: '250000', paid: '250000', setAside: '50000', refunded: '50000', status: 'partially_refunded', paidFrom: 'pay1', settledBy: 'settle1' },    { id: '1-2', amount: '100000', paid: '0', setAside: '0', refunded: '0', status: 'open', leftOpen: true },    { id: '1-3', amount: '1000000', paid: '1000000', setAside: '200000', refunded: '0', status: 'paid', paidFrom: 'pay3', settledBy: 'settle3' },    { id: '1-4', amount: '100000', paid: '0', setAside: '0', refunded: '0', status: 'open', sample: true },  ],  // Seconds from the Base block that carried the client's payment to the contract  // closing the invoice (closed_at_ms). The verifier recomputes this.  secondsToClose: { '1-3': 31.8 },  // Routes 1Click quoted for the 0.10 USDC sample invoice (dry quotes, 2026-11-04).  sampleRoutes: ['USDC on Arbitrum', 'USDC on Optimism', 'USDC on Polygon', 'USDC on Gnosis', 'USDC on NEAR'],  sampleRoutesRefused: ['USDC on Base and Ethereum: 0.10 is below that route’s minimum'],};export const NEARBLOCKS_TX = (h) => `https://nearblocks.io/txns/${h}`;export const NEARBLOCKS_API_TX = (h) => `https://api.nearblocks.io/v1/txns/${h}`;export const BASESCAN_TX = (h) => `https://basescan.org/tx/${h}`;export const BLOCKSCOUT_TX = (h) => `https://base.blockscout.com/tx/${h}`;