OnChainGM is a smart contract that enables users to send a "GM" (Good Morning) transaction once every 24 hours on-chain. Each GM transaction requires a small ETH fee and is recorded on the blockchain. The project supports a referral-based reward system and tracks user activity on multiple networks.
OnChainGM is a minimalist Ethereum smart contract that lets users send an on-chain βGMβ (Good Morning) message once per day, optionally rewarding the person who referred them.
- β Daily GM β only once per day per address
- πΈ Optional referral reward (10% of the fee)
- π¦ Emits events for every GM and failed referral
- π Fully on-chain and permissionless
- Name:
OnChainGM - Language: Solidity
^0.8.0 - License: MIT
- Fee:
0.000029 ETH(29,000 Gwei)
| Purpose | Amount |
|---|---|
| Total Fee | 0.000029 ETH |
| Referral Reward (10%) | 0.0000029 ETH |
| Sent to Fee Recipient | 0.0000261 ETH |
- Fee Recipient:
0x7500A83DF2aF99B2755c47B6B321a8217d876a85
Send your daily GM and optionally specify a referrer.
- Requires exactly
0.000029 ETHas msg.value - Emits
OnChainGMEvent(sender, referrer) - If referrer is non-zero and transfer succeeds β sends 10% of fee
- If transfer fails β logs
ReferralFailed
Returns how many seconds remain until the specified user can GM again.
event OnChainGMEvent(address indexed sender, address indexed referrer);
event ReferralFailed(address indexed referrer, uint256 amount);- User sends exactly
0.000029 ETHby callingonChainGM(referrer) - Contract checks if
msg.senderhas already GMed today (based on UTC) - If not:
- Attempts to send 10% of fee to
referrer - Sends remaining ETH to
feeRecipient - Emits
OnChainGMEvent
- Attempts to send 10% of fee to
- If referral payment fails, logs
ReferralFailedbut does not revert
onChainGM("0xYourReferrersAddress")π Be sure to send exactly
0.000029 ETHas value.
The contract can be deployed to any EVM-compatible chain.
There is no owner, no upgradeability, and no admin β it's fully immutable.
MIT License β feel free to build on it, fork it, or integrate it into your dApp.
This contract is deployed and verified on Optimism:
π View on Blockscout
- Network: **Optimism**
- Address: `0x98F935ed6BD5b749AdeA581B50aF2ff0C1F89dEC`
- Verified Source Code: β
You can interact with it directly via Blockscout, Etherscan-compatible tools, or use it in your own dApps.