ETH Price: $2,336.40 (-1.84%)

Contract Diff Checker

Contract Name:
Legendary

Contract Source Code:

// Deployed with the Atlas IDE
// https://app.atlaszk.com/
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.0;

contract Legendary {
    address public owner;
    mapping(address => bool) public eligibleParticipants;

    event Claimed(address indexed participant);
    event Withdrawn(address indexed owner, uint256 amount);
    event Minted(address indexed recipient, uint256 amount);

    constructor() {
        owner = msg.sender;
    }

    modifier onlyOwner() {
        require(msg.sender == owner, "s");
        _;
    }

    function claim() external payable {
        require(msg.value == 0.00003 ether, "shit happens");

        // Save the participant's wallet address
        eligibleParticipants[msg.sender] = true;

        emit Claimed(msg.sender);
    }

    function mint() external payable {
        require(msg.value == 0.00001 ether, "shit happens");

        emit Minted(msg.sender, msg.value);
    }

    function mintLoto() external payable {
        require(msg.value == 0.000005 ether, "shit happens");

        emit Minted(msg.sender, msg.value);
    }

    function sendEthTo(address payable _recipient, uint256 _amount) external onlyOwner {
        require(_amount > 0, "Amount must be greater than zero");
        require(address(this).balance >= _amount, "Insufficient contract balance");

        _recipient.transfer(_amount);
        emit Withdrawn(owner, _amount);
    }

    function withdrawAll() external onlyOwner {
        uint256 contractBalance = address(this).balance;
        require(contractBalance > 0, "Contract balance is zero");

        payable(owner).transfer(contractBalance);
        emit Withdrawn(owner, contractBalance);
    }

    function getContractBalance() external view returns (uint256) {
        return address(this).balance;
    }
}

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

Context size (optional):