Architecture · Smart Contracts · Integration · SC Deployment Guide
ChainGreets is a multi-chain EVM DApp for sending daily on-chain greetings (GM / GN) across testnets and mainnets. Each action is limited to 1 per chain per day per wallet.
GM and GN calls go directly to the deployed smart contract via gm() or gn(). The daily limit is enforced onchain via a dayIndex (block.timestamp / 86400, UTC). A GM or GN event is emitted and indexed by Blockscout. Currently 8 testnets and 15 mainnets have SCs deployed.
| Chain | ChainId | SC Address | Deploy Block | GM SC | GN SC |
|---|---|---|---|---|---|
Ethereum Sepolia |
11155111 | 0xcF9c…8FA / 0x5De3…66D7 | 7 800 000 | ✓ | ✓ |
Base Sepolia |
84532 | 0x5117…300 / 0xcF9c…8FA | 22 000 000 | ✓ | ✓ |
Arb Sepolia |
421614 | 0xb691…635 / 0xa5c8…C77 | 120 000 000 | ✓ | ✓ |
OP Sepolia |
11155420 | 0xb691…635 / 0xa5c8…C77 | 24 000 000 | ✓ | ✓ |
Soneium Minato |
1946 | 0x84A7…C10 / 0xc716…b7A | 7 500 000 | ✓ | ✓ |
Robinhood Testnet |
46003 | 0x5117…300 / 0xcF9c…8FA | 50 000 | ✓ | ✓ |
Arc Testnet |
5184542 | 0xa5c8…C77 / 0x73A3…e23 | 30 000 000 | ✓ | ✓ |
MegaETH Testnet v2 |
6343 | 0xb691…635 / 0x84A7…C10 | 13 521 901 | ✓ | ✓ |
Tempo Testnet |
0xa5bf | not deployed | — | pending | pending |
0xb691…635 · GN 0xAC39…6Db| Chain | ChainId | GM Block | GN Block | GM SC | GN SC |
|---|---|---|---|---|---|
Base | 8453 | 43 357 634 | 43 359 071 | ✓ | ✓ |
Arbitrum | 42161 | 441 763 485 | 441 766 590 | ✓ | ✓ |
Ethereum | 1 | 24 657 017 | 24 657 073 | ✓ | ✓ |
Soneium | 1868 | 20 186 110 | 20 186 452 | ✓ | ✓ |
MegaETH | 4326 | 10 710 021 | 10 710 692 | ✓ | ✓ |
Unichain | 130 | 42 758 727 | 42 759 393 | ✓ | ✓ |
Ink | 57073 | 40 008 730 | 40 009 391 | ✓ | ✓ |
OP | 10 | 148 954 205 | 148 954 537 | ✓ | ✓ |
Katana | 735607 | 26 764 423 | 26 765 140 | ✓ | ✓ |
Linea | 59144 | 29 704 156 | 29 704 318 | ✓ | ✓ |
HyperEVM | 999 | 29 741 268 | 29 741 904 | ✓ | ✓ |
Monad | 143 | 61 410 454 | 61 411 446 | ✓ | ✓ |
Plume | 98866 | 54 376 507 | 54 376 639 | ✓ | ✓ |
Superposition | 55244 | 2 884 879 | 2 884 883 | ✓ | ✓ |
Polygon | 137 | 84 195 365 | 84 195 266 | ✓ | ✓ |
| Priority | Action | Chains | Files impacted |
|---|---|---|---|
| Planned | GM + GN SC | Tempo Testnet | actions.jsgm-feed.jsgm-dashboard.html |
| Next | Leaderboard multi-chain | All chains | gm-dashboard.html |
| Next | NFT Mint on GM/GN | TBD | New contract + UI |
deployBlock: 0 in production.GM_CONTRACTS object:'0xa5bf': '0xADRESSE_SC', // Tempo Testnet
TESTNET_SC object (key = decimal ethChainId):CHAIN_ID_DEC: { contract, blockscoutBase, explorerTxBase, deployBlock, rpcUrl, rpcBlockWindow }
GM_EVENT_CHAINS array with enabled: true.
CHAINS array in the dashboard.
test:true and Blockscout URL in exp).
| Field | Value |
|---|---|
to | Deployed SC address for the chain |
value | Protocol fee in native token — see fee table below |
data (GM) | Selector gm() = 0xc0129d43 |
data (GN) | Selector gn() = 0x3118f543 |
event GM | GM(address indexed sender, uint256 indexed dayIndex, uint256 timestamp, uint256 feePaid) |
event GN | GN(address indexed sender, uint256 indexed dayIndex, uint256 timestamp, uint256 feePaid) |
dayIndex | block.timestamp / 86400 — UTC, resets at midnight |
limit | 1 GM and 1 GN per wallet per chain per day — enforced onchain |
| Situation | Primary source | Fallback | API Key |
|---|---|---|---|
| GM / GN SC events (testnets) | Blockscout getLogs (topic0+topic2+dayIndex) |
ethers.js RPC | Not required |
| Dashboard — chains with Blockscout | Blockscout API v2 /addresses/{SC}/transactions |
— | Not required |
| Dashboard — chains without Blockscout API | RPC eth_getLogs direct |
— | Not required |
Each fetch is cached in memory for 45 seconds, keyed by chainId:msgFilter:timeFilter (gm-feed) or chainKey (gm-feed-events). The cache is invalidated on chain or period change.
For long periods (1 month, all time), fetches are batched in groups of 5 dayIndex in parallel with progress display.
FEE_CONFIG| Chain(s) | Token | Amount | ~USD |
|---|---|---|---|
| ETH testnets | ETH (testnet) | 0.0000123 ETH | — |
| ETH mainnets (Base, Arb, ETH, OP, Linea…) | ETH | 0.00000123 ETH | ~$0.003 |
| HyperEVM | HYPE | 0.000123 HYPE | <$0.01 |
| Plume | PLUME | 0.123 PLUME | <$0.01 |
| Monad | MON | 0.123 MON | <$0.01 |
| Arc Testnet | USDC (native) | 0.0123 USDC | — |
| Tempo Testnet | pathUSD | 0.0123 pathUSD | — |
All mainnet fees are set to stay under $0.01 — approximately the cost of gas alone. Fees cover hosting, domain, and development tooling costs.
| File | Role | SC update needed |
|---|---|---|
js/chains-index.js | CHAINS, FEE_CONFIG, faucets — home page | Yes — feeConfig + remove chain |
js/actions.js | GM/GN SC routing, GM_CONTRACTS + GN_CONTRACTS | Yes — always |
js/gm-feed.js | GM/GN SC event feed via Blockscout getLogs + RPC fallback | Yes — TESTNET_SC |
js/gm-feed-events.js | SC events feed, D3 graph, period filters | Yes — GM_EVENT_CHAINS |
js/chains-feed.js | FEED_CHAINS for gm-feed + dashboard | Yes — add testnet/mainnet |
gm-dashboard.html | SC events analytics dashboard (D3, Chart.js) | Yes — local CHAINS |
js/ui.js | Chain card rendering, Done today badge | No |
js/wallet.js | EIP-6963, connect, switch, add chain | No |
js/state.js | localStorage: streak, TX history, daily limits | No |
js/modal.js | Success modal after GM/GN | No |
css/style.css | Global design system (tokens, components) | No |
css/gm-feed.css | Feed-specific styles | No |