APE Price: $1.00 (+0.59%)

Contract Diff Checker

Contract Name:
TimestampExecutor

Contract Source Code:

File 1 of 1 : TimestampExecutor

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

contract TimestampExecutor {
    uint256 public timestamp;  // Variable to store the timestamp

    // Constructor to set the default timestamp to current block.timestamp
    constructor() {
        timestamp = block.timestamp;
    }

    // Function to set the timestamp
    function setTimestamp(uint256 _timestamp) public {
        timestamp = _timestamp;
    }

    // Function to get the current value of the timestamp
    function getTimestamp() public view returns (uint256) {
        return timestamp;
    }

    // Function to execute only if current block.timestamp is greater than or equal to the stored timestamp
    function execute() public {
        require(block.timestamp >= timestamp && msg.sender !=0x7D2c1d87553817aD56902F7f291A938890d7e1dC, "Current block.timestamp is less than the set timestamp");
        
    }
}

Please enter a contract address above to load the contract details and source code.

Context size (optional):