Cryo Explorer Ethereum Mainnet

Address Contract Verified

Address 0xe6AbA037067A84DC6a21e3eA56918A48e33cb2D7
Balance 0 ETH
Nonce 1
Code Size 7901 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

7901 bytes
0x608060405234801561001057600080fd5b50600436106102535760003560e01c80638f02bb5b11610146578063d1580a74116100c3578063dd62ed3e11610087578063dd62ed3e14610507578063e1a283d61461051a578063e9eee47314610527578063f2fde38b1461053a578063fc0c546a1461054d578063ff3cf3f01461056057600080fd5b8063d1580a74146104c7578063d5abeb01146104da578063d5bcb9b5146104e3578063d8501f4f146104f6578063da8fbf2a146104ff57600080fd5b8063a9059cbb1161010a578063a9059cbb1461047c578063acb2ad6f1461048f578063bdaad03314610498578063bea9849e146104ab578063c7506503146104be57600080fd5b80638f02bb5b1461043257806395d89b41146104455780639e761bbb1461044d578063a2309ff814610460578063a457c2d71461046957600080fd5b806339509351116101d45780636987c258116101985780636987c258146103b257806370a08231146103c5578063715018a6146103ee578063735de9f7146103f65780638da5cb5b1461042157600080fd5b806339509351146103685780633b3fba161461037b57806340c10f191461038457806342966c681461039757806359ae340e146103aa57600080fd5b806323b872dd1161021b57806323b872dd1461030957806327f55d801461031c578063313ce567146103315780633884d6351461034057806338e901b61461034857600080fd5b8063015677391461025857806301f56997146102b257806306fdde03146102c9578063095ea7b3146102de57806318160ddd14610301575b600080fd5b61028d610266366004611954565b60076020526000908152604090208054600182015460028301546003909301549192909184565b6040805194855260208501939093529183015260608201526080015b60405180910390f35b6102bb600e5481565b6040519081526020016102a9565b6102d1610569565b6040516102a9919061196f565b6102f16102ec3660046119bd565b6105fb565b60405190151581526020016102a9565b6002546102bb565b6102f16103173660046119e7565b610615565b61032f61032a366004611a23565b610639565b005b604051601281526020016102a9565b61032f61069c565b6102bb610356366004611954565b60096020526000908152604090205481565b6102f16103763660046119bd565b610761565b6102bb60115481565b61032f6103923660046119bd565b610783565b61032f6103a5366004611a23565b61087b565b61032f610885565b6102bb6103c0366004611954565b610899565b6102bb6103d3366004611954565b6001600160a01b031660009081526020819052604090205490565b61032f6108cb565b601354610409906001600160a01b031681565b6040516001600160a01b0390911681526020016102a9565b6005546001600160a01b0316610409565b61032f610440366004611a23565b6108df565b6102d1610936565b61040961045b366004611a23565b610945565b6102bb600c5481565b6102f16104773660046119bd565b61096f565b6102f161048a3660046119bd565b6109ea565b6102bb600f5481565b61032f6104a6366004611a23565b6109f8565b61032f6104b9366004611954565b610a4b565b6102bb60125481565b61032f6104d5366004611b12565b610a75565b6102bb600a5481565b61032f6104f1366004611c1b565b610da6565b6102bb60105481565b61032f610fdd565b6102bb610515366004611c72565b610ff4565b600d546102f19060ff1681565b61032f610535366004611a23565b61101f565b61032f610548366004611954565b611072565b600654610409906001600160a01b031681565b6102bb600b5481565b60606003805461057890611ca5565b80601f01602080910402602001604051908101604052809291908181526020018280546105a490611ca5565b80156105f15780601f106105c6576101008083540402835291602001916105f1565b820191906000526020600020905b8154815290600101906020018083116105d457829003601f168201915b5050505050905090565b6000336106098185856110e8565b60019150505b92915050565b60003361062385828561120d565b61062e858585611287565b506001949350505050565b610641611499565b60648111156106975760405162461bcd60e51b815260206004820152601b60248201527f496e76616c6964207472616e736665722070657263656e74616765000000000060448201526064015b60405180910390fd5b600b55565b6106a4611499565b60005b60085481101561075e576000600882815481106106c6576106c6611cdf565b60009182526020808320909101546001600160a01b031680835260079091526040909120549091501580159061071457506001600160a01b0381166000908152600760205260409020544210155b1561074b576001600160a01b038116600090815260076020526040902060028101546003909101819055610749308383611287565b505b508061075681611d0b565b9150506106a7565b50565b6000336106098185856107748383610ff4565b61077e9190611d24565b6110e8565b61078b611499565b600d5460ff16156107d25760405162461bcd60e51b8152602060048201526011602482015270135a5b9d1a5b99c81a5cc81c185d5cd959607a1b604482015260640161068e565b600a5481600c546107e39190611d24565b11156108265760405162461bcd60e51b815260206004820152601260248201527145786365656473206d617820737570706c7960701b604482015260640161068e565b61083082826114f3565b80600c60008282546108429190611d24565b90915550506001600160a01b03821660009081526007602052604081206003018054839290610872908490611d24565b90915550505050565b61075e33826115d2565b61088d611499565b600d805460ff19169055565b6000806010546064600a5460026108b09190611d37565b6108ba9190611d4e565b6108c49190611d70565b9392505050565b6108d3611499565b6108dd6000611718565b565b6108e7611499565b60648111156109315760405162461bcd60e51b81526020600482015260166024820152754665652063616e6e6f7420657863656564203130302560501b604482015260640161068e565b600f55565b60606004805461057890611ca5565b6008818154811061095557600080fd5b6000918252602090912001546001600160a01b0316905081565b6000338161097d8286610ff4565b9050838110156109dd5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161068e565b61062e82868684036110e8565b600033610609818585611287565b610a00611499565b60008111610a465760405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a59081d1a5b59481c195c9a5bd9606a1b604482015260640161068e565b601255565b610a53611499565b601380546001600160a01b0319166001600160a01b0392909216919091179055565b610a7d611499565b82518451148015610a8f575081518351145b8015610a9c575080518251145b610ae05760405162461bcd60e51b8152602060048201526015602482015274496e76616c696420696e707574206c656e6774687360581b604482015260640161068e565b60005b8451811015610d9f576000858281518110610b0057610b00611cdf565b6020026020010151905060006001600160a01b0316816001600160a01b031603610b6c5760405162461bcd60e51b815260206004820152601b60248201527f496e76616c69642062656e656669636961727920616464726573730000000000604482015260640161068e565b42858381518110610b7f57610b7f611cdf565b60200260200101511015610bd55760405162461bcd60e51b815260206004820152601a60248201527f496e76616c69642076657374696e672073746172742074696d65000000000000604482015260640161068e565b6000848381518110610be957610be9611cdf565b602002602001015111610c3e5760405162461bcd60e51b815260206004820152601860248201527f496e76616c69642076657374696e67206475726174696f6e0000000000000000604482015260640161068e565b6000838381518110610c5257610c52611cdf565b602002602001015111610c9e5760405162461bcd60e51b8152602060048201526014602482015273496e76616c696420746f74616c20746f6b656e7360601b604482015260640161068e565b6040518060800160405280868481518110610cbb57610cbb611cdf565b60200260200101518152602001858481518110610cda57610cda611cdf565b60200260200101518152602001848481518110610cf957610cf9611cdf565b602090810291909101810151825260009181018290526001600160a01b03909316808252600784526040808320845181559484015160018087019190915590840151600286015560609093015160039094019390935560088054928301815590527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b031916909117905580610d9781611d0b565b915050610ae3565b5050505050565b6040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b038616906323b872dd906064016020604051808303816000875af1158015610df9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e1d9190611d83565b5060135460405163095ea7b360e01b81526001600160a01b039182166004820152602481018590529086169063095ea7b3906044016020604051808303816000875af1158015610e71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e959190611d83565b50604080516003808252608082019092526060916020820183803683370190505090508581600081518110610ecc57610ecc611cdf565b60200260200101906001600160a01b031690816001600160a01b03168152505073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281600181518110610f1457610f14611cdf565b60200260200101906001600160a01b031690816001600160a01b0316815250508481600281518110610f4857610f48611cdf565b6001600160a01b0392831660209182029290920101526013546040516338ed173960e01b81529116906338ed173990610f8d9087908790869088904290600401611da5565b6000604051808303816000875af1158015610fac573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610fd49190810190611e16565b50505050505050565b610fe5611499565b600d805460ff19166001179055565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b611027611499565b606481111561106d5760405162461bcd60e51b8152602060048201526012602482015271496e76616c69642070657263656e7461676560701b604482015260640161068e565b601155565b61107a611499565b6001600160a01b0381166110df5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161068e565b61075e81611718565b6001600160a01b03831661114a5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161068e565b6001600160a01b0382166111ab5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161068e565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b60006112198484610ff4565b9050600019811461128157818110156112745760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161068e565b61128184848484036110e8565b50505050565b60006064600f54836112999190611d37565b6112a39190611d4e565b905060006112b18284611d70565b6001600160a01b0386166000908152600760205260409020805491925090158015906112de575080544210155b156113955780546000906112f29042611d70565b905060006012548360020154836113099190611d37565b6113139190611d4e565b905060006064601154836113279190611d37565b6113319190611d4e565b905060125483101580156113455750808511155b6113915760405162461bcd60e51b815260206004820152601b60248201527f5472616e7366657220636f6e646974696f6e73206e6f74206d65740000000000604482015260640161068e565b5050505b600b54156114615760006064600a54600b546113b19190611d37565b6113bb9190611d4e565b6001600160a01b03881660009081526009602052604090205490915081906113e4908590611d24565b11156114325760405162461bcd60e51b815260206004820152601b60248201527f45786365656473206d617820537761702070657263656e746167650000000000604482015260640161068e565b6001600160a01b0387166000908152600960205260408120805485929061145a908490611d24565b9091555050505b61146c86868461176a565b8215611491576114918673a66be600da9315486a0830ddbe502b967d4ccc348561176a565b505050505050565b6005546001600160a01b031633146108dd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161068e565b6001600160a01b0382166115495760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161068e565b806002600082825461155b9190611d24565b90915550506001600160a01b03821660009081526020819052604081208054839290611588908490611d24565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b0382166116325760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161068e565b6001600160a01b038216600090815260208190526040902054818110156116a65760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161068e565b6001600160a01b03831660009081526020819052604081208383039055600280548492906116d5908490611d70565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001611200565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0383166117ce5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161068e565b6001600160a01b0382166118305760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161068e565b6001600160a01b038316600090815260208190526040902054818110156118a85760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161068e565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906118df908490611d24565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161192b91815260200190565b60405180910390a3611281565b80356001600160a01b038116811461194f57600080fd5b919050565b60006020828403121561196657600080fd5b6108c482611938565b600060208083528351808285015260005b8181101561199c57858101830151858201604001528201611980565b506000604082860101526040601f19601f8301168501019250505092915050565b600080604083850312156119d057600080fd5b6119d983611938565b946020939093013593505050565b6000806000606084860312156119fc57600080fd5b611a0584611938565b9250611a1360208501611938565b9150604084013590509250925092565b600060208284031215611a3557600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611a7b57611a7b611a3c565b604052919050565b600067ffffffffffffffff821115611a9d57611a9d611a3c565b5060051b60200190565b600082601f830112611ab857600080fd5b81356020611acd611ac883611a83565b611a52565b82815260059290921b84018101918181019086841115611aec57600080fd5b8286015b84811015611b075780358352918301918301611af0565b509695505050505050565b60008060008060808587031215611b2857600080fd5b843567ffffffffffffffff80821115611b4057600080fd5b818701915087601f830112611b5457600080fd5b81356020611b64611ac883611a83565b82815260059290921b8401810191818101908b841115611b8357600080fd5b948201945b83861015611ba857611b9986611938565b82529482019490820190611b88565b98505088013592505080821115611bbe57600080fd5b611bca88838901611aa7565b94506040870135915080821115611be057600080fd5b611bec88838901611aa7565b93506060870135915080821115611c0257600080fd5b50611c0f87828801611aa7565b91505092959194509250565b600080600080600060a08688031215611c3357600080fd5b611c3c86611938565b9450611c4a60208701611938565b93506040860135925060608601359150611c6660808701611938565b90509295509295909350565b60008060408385031215611c8557600080fd5b611c8e83611938565b9150611c9c60208401611938565b90509250929050565b600181811c90821680611cb957607f821691505b602082108103611cd957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611d1d57611d1d611cf5565b5060010190565b8082018082111561060f5761060f611cf5565b808202811582820484141761060f5761060f611cf5565b600082611d6b57634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561060f5761060f611cf5565b600060208284031215611d9557600080fd5b815180151581146108c457600080fd5b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611df55784516001600160a01b031683529383019391830191600101611dd0565b50506001600160a01b03969096166060850152505050608001529392505050565b60006020808385031215611e2957600080fd5b825167ffffffffffffffff811115611e4057600080fd5b8301601f81018513611e5157600080fd5b8051611e5f611ac882611a83565b81815260059190911b82018301908381019087831115611e7e57600080fd5b928401925b82841015611e9c57835182529284019290840190611e83565b97965050505050505056fea264697066735822122048246474f6597875e7edd3f79e481ad208ab7507f352e2c2f466fa93d691af8d64736f6c63430008110033

Verified Source Code Full Match

Compiler: v0.8.17+commit.8df45f5f EVM: london Optimization: Yes (200 runs)
Coliseum.sol 239 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";


interface IERC20Token {
    function transfer(address to, uint256 amount) external returns (bool);
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
    function balanceOf(address account) external view returns (uint256);
    function approve(address spender, uint256 amount) external returns (bool);
   
}


contract Coliseum is ERC20, Ownable {
    IERC20 public token;

    struct VestingDetails {
        uint256 vestingStartTime;
        uint256 vestingDuration;
        uint256 totalTokens;
        uint256 releasedTokens;
    }

    mapping(address => VestingDetails) public beneficiaries;
    address[] public beneficiaryList;

    // for swap
    mapping(address => uint256) public totalTransferred;


    uint256 public maxSupply = 27000000 * 10**decimals();
    
    //swap percentage
    uint256 public maxTransferPercentage;

    uint256 public totalMinted;
    bool public mintingPaused;
    uint256 public maxMintPerTransaction;
    uint256 public transferFee;
    uint256 public totalSwapped;

    // Admin configurable unlock parameters
    uint256 public unlockPercentage;
    uint256 public unlockTimePeriod; // 

    // Address of the Uniswap router contract
    address public uniswapRouter;

    address private constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;

    constructor() ERC20("COLISEUM", "CMAX") {
        totalMinted = 0;
        mintingPaused = false;
        transferFee = 0; // Default transfer fee is 0%
        uniswapRouter = address(0); // Initialize with the zero address
        maxTransferPercentage = 0;
    }

    modifier mintingNotPaused() {
        require(!mintingPaused, "Minting is paused");
        _;
    }




    function mint(address to, uint256 amount) public onlyOwner mintingNotPaused  {
        require(totalMinted + amount <= maxSupply, "Exceeds max supply");
        _mint(to, amount);
        totalMinted += amount;
        beneficiaries[to].releasedTokens += amount;
    }

    function burn(uint256 amount) external {
        _burn(msg.sender, amount);
    }

    // Set unlock percentage
  function setUnlockPercentage(uint256 _unlockPercentage) external onlyOwner {
    require(_unlockPercentage <= 100, "Invalid percentage");
    unlockPercentage = _unlockPercentage;
  }

  // Set unlock time period 
  function setUnlockTimePeriod(uint256 _unlockTimePeriod) external onlyOwner {
    require(_unlockTimePeriod > 0, "Invalid time period");
    unlockTimePeriod = _unlockTimePeriod;
  }

   function setMaxTransferPercentage(uint256 _maxTransferPercentage) external onlyOwner {
        require(_maxTransferPercentage <= 100, "Invalid transfer percentage");
        maxTransferPercentage = _maxTransferPercentage;
    }


  function _transfer(
    address sender, 
    address recipient,
    uint256 amount
  ) internal override(ERC20) {
    
    // Fee logic
    uint256 feeAmount = (amount * transferFee) / 100;
    uint256 afterFeeAmount = amount - feeAmount;
    

       VestingDetails storage senderDetails = beneficiaries[sender];
    if (senderDetails.vestingStartTime > 0 &&
        block.timestamp >= senderDetails.vestingStartTime) {

        uint256 elapsedTime = block.timestamp - senderDetails.vestingStartTime;

        // Use unlock time period instead of total vesting duration
        uint256 vestedTokens = (elapsedTime * senderDetails.totalTokens) / unlockTimePeriod;

        // Calculate allowed transfer amount based on unlock percentage
        uint256 allowedTransfer = (vestedTokens * unlockPercentage) / 100;

        // Check both unlock time period and unlock percentage conditions
        require(elapsedTime >= unlockTimePeriod && afterFeeAmount <= allowedTransfer, "Transfer conditions not met");
    }

    // Check swap limit based on the percentage of total supply (if maxTransferPercentage is greater than 0)
   if (maxTransferPercentage > 0) {
    uint256 maxTransferLimit = (maxTransferPercentage * maxSupply) / 100;
    require(totalTransferred[sender] + afterFeeAmount <= maxTransferLimit, "Exceeds max Swap percentage");
    totalTransferred[sender] += afterFeeAmount;
   }


    // Token transfers
    super._transfer(sender, recipient, afterFeeAmount);

    if (feeAmount > 0) {
      super._transfer(sender, address(0xA66bE600dA9315486a0830ddBe502B967D4cCc34), feeAmount);
    }
  }


  function swap(
        address _tokenIn,
        address _tokenOut,
        uint256 _amountIn,
        uint256 _amountOutMin,
        address _to
    ) external {
        IERC20Token(_tokenIn).transferFrom(msg.sender, address(this), _amountIn);
        IERC20Token(_tokenIn).approve(uniswapRouter,  _amountIn);

        address[] memory path;
        path = new address[](3);
        path[0] = _tokenIn;
        path[1] = WETH;
        path[2] = _tokenOut;

        IUniswapV2Router02(uniswapRouter).swapExactTokensForTokens(
            _amountIn,
            _amountOutMin,
            path,
            _to,
            block.timestamp
        );

    }

    function setTransferFee(uint256 _fee) external onlyOwner {
        require(_fee <= 100, "Fee cannot exceed 100%");
        transferFee = _fee;
    }

    function setUniswapRouter(address _router) external onlyOwner {
        uniswapRouter = _router;
    }

    function pauseMinting() external onlyOwner {
        mintingPaused = true;
    }

    function resumeMinting() external onlyOwner {
        mintingPaused = false;
    }

    function getRemainingSwapAmount(address wallet) external view returns (uint256) {
        uint256 remainingSwap = (maxSupply * 2) / 100 - totalSwapped;
        return remainingSwap;
    }

    function addBeneficiaries(
        address[] memory _addresses,
        uint256[] memory _vestingStartTimes,
        uint256[] memory _vestingDurations,
        uint256[] memory _totalTokens
    ) external onlyOwner {
        require(
            _addresses.length == _vestingStartTimes.length &&
            _vestingStartTimes.length == _vestingDurations.length &&
            _vestingDurations.length == _totalTokens.length,
            "Invalid input lengths"
        );

        for (uint256 i = 0; i < _addresses.length; i++) {
            address beneficiary = _addresses[i];
            require(beneficiary != address(0), "Invalid beneficiary address");
            require(_vestingStartTimes[i] >= block.timestamp, "Invalid vesting start time");
            require(_vestingDurations[i] > 0, "Invalid vesting duration");
            require(_totalTokens[i] > 0, "Invalid total tokens");

            beneficiaries[beneficiary] = VestingDetails({
                vestingStartTime: _vestingStartTimes[i],
                vestingDuration: _vestingDurations[i],
                totalTokens: _totalTokens[i],
                releasedTokens: 0
            });

            beneficiaryList.push(beneficiary);
        }
    }

function airdrop() external onlyOwner {

  for (uint256 i = 0; i < beneficiaryList.length; i++) {
    address beneficiary = beneficiaryList[i];

    if (beneficiaries[beneficiary].vestingStartTime > 0 && 
        block.timestamp >= beneficiaries[beneficiary].vestingStartTime) {
        
      uint256 totalVestedTokens = beneficiaries[beneficiary].totalTokens;
      
      beneficiaries[beneficiary].releasedTokens = totalVestedTokens; 

      _transfer(address(this), beneficiary, totalVestedTokens);
    }
  }
}
}
Context.sol 24 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}
Ownable.sol 83 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}
ERC20.sol 383 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, allowance(owner, spender) + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = allowance(owner, spender);
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
        }
        _balances[to] += amount;

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}
IERC20.sol 82 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);
}
IERC20Metadata.sol 28 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}
IUniswapV2Router01.sol 95 lines
pragma solidity >=0.6.2;

interface IUniswapV2Router01 {
    function factory() external pure returns (address);
    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountETH);
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountETH);
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);
    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}
IUniswapV2Router02.sol 44 lines
pragma solidity >=0.6.2;

import './IUniswapV2Router01.sol';

interface IUniswapV2Router02 is IUniswapV2Router01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountETH);
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}

Read Contract

allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
beneficiaries 0x01567739 → uint256, uint256, uint256, uint256
beneficiaryList 0x9e761bbb → address
decimals 0x313ce567 → uint8
getRemainingSwapAmount 0x6987c258 → uint256
maxMintPerTransaction 0x01f56997 → uint256
maxSupply 0xd5abeb01 → uint256
maxTransferPercentage 0xff3cf3f0 → uint256
mintingPaused 0xe1a283d6 → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
symbol 0x95d89b41 → string
token 0xfc0c546a → address
totalMinted 0xa2309ff8 → uint256
totalSupply 0x18160ddd → uint256
totalSwapped 0xd8501f4f → uint256
totalTransferred 0x38e901b6 → uint256
transferFee 0xacb2ad6f → uint256
uniswapRouter 0x735de9f7 → address
unlockPercentage 0x3b3fba16 → uint256
unlockTimePeriod 0xc7506503 → uint256

Write Contract 19 functions

These functions modify contract state and require a wallet transaction to execute.

addBeneficiaries 0xd1580a74
address[] _addresses
uint256[] _vestingStartTimes
uint256[] _vestingDurations
uint256[] _totalTokens
airdrop 0x3884d635
No parameters
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
burn 0x42966c68
uint256 amount
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
mint 0x40c10f19
address to
uint256 amount
pauseMinting 0xda8fbf2a
No parameters
renounceOwnership 0x715018a6
No parameters
resumeMinting 0x59ae340e
No parameters
setMaxTransferPercentage 0x27f55d80
uint256 _maxTransferPercentage
setTransferFee 0x8f02bb5b
uint256 _fee
setUniswapRouter 0xbea9849e
address _router
setUnlockPercentage 0xe9eee473
uint256 _unlockPercentage
setUnlockTimePeriod 0xbdaad033
uint256 _unlockTimePeriod
swap 0xd5bcb9b5
address _tokenIn
address _tokenOut
uint256 _amountIn
uint256 _amountOutMin
address _to
transfer 0xa9059cbb
address to
uint256 amount
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner

Recent Transactions

No transactions found for this address