Skip to content
Verified contractPartialMIT

DateMint

Address0x00fb0bc5ec5940d8431b11ae46e27ee582ba0dee
Balance

0 ETH

 

Transactions

1

 

Compiler

solc 0.8.28

 

Same code

Only this contract

 

Details

Compiler
solc 0.8.28+commit.7893614a
Language
solidity
Optimization
No
License
MIT
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
26,500,955
Creation transaction
0x1c6239bfba…fd9ce10a30

DateMint.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

interface IToken {
    function mint(address to, uint256 amount) external;
}

contract DateMint {
    IToken public immutable TOKEN;           
    uint256 public constant AMOUNT = 1 ether; 
    address public immutable recipient1;      
    address public immutable recipient2;      
    uint256 public immutable releaseDay;      

    event Receipt(address indexed caller, address indexed recipient, uint256 amount, string text);

    constructor(IToken _token, address _recipient1, address _recipient2, uint256 releaseTimestamp) {
        TOKEN = _token;
        recipient1 = _recipient1;
        recipient2 = _recipient2;
        releaseDay = releaseTimestamp / 1 days;
    }

    // Anyone may call; this contract must hold the minter role on TOKEN.
    function mint(bool second) external {
        require(block.timestamp / 1 days >= releaseDay, "date not reached"); // reverts everything
        address to = second ? recipient2 : recipient1;
        TOKEN.mint(to, AMOUNT);
        emit Receipt(msg.sender, to, AMOUNT, "DateMint receipt: minted. Paid: 0. Thank you.");
    }
}
Compiler settingsShow
{
  "libraries": {},
  "optimizer": {
    "runs": 200,
    "enabled": false
  }
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.