Cryo Explorer Ethereum Mainnet

Address Contract Verified

Address 0xbb1C71Bc7A9898F56e0305FCf4fB3d0141F298e0
Balance 0.001000 ETH
Nonce 1
Code Size 6230 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

6230 bytes
0x6080604052600436106101bb5760003560e01c806349bd5a5e116100ec578063a9059cbb1161008a578063dd62ed3e11610064578063dd62ed3e14610775578063dde5541b146107ad578063e4b37447146107e1578063ed75fa02146107f657600080fd5b8063a9059cbb14610701578063d505accf14610721578063d8b9c8541461074157600080fd5b806370a08231116100c657806370a082311461065e5780637ecebe001461068b57806395d89b41146106b85780639649b910146106cd57600080fd5b806349bd5a5e146105e95780634d23ec03146106095780636751b0ab1461062a57600080fd5b80631f76a7af11610159578063330e025611610133578063330e02561461055d5780633644e5151461059157806337c08923146105a657806342e94c90146105bc57600080fd5b80631f76a7af146104d757806323b872dd146104f7578063313ce5671461051757600080fd5b80630c340a24116101955780630c340a24146104555780630cd865ec1461048d5780630f560cd7146104ad57806318160ddd146104c257600080fd5b80630218a5c9146103da57806306fdde0314610403578063095ea7b31461042557600080fd5b366103d557600754600160a01b900460ff1661034157336000908152600b6020526040812054900361020057604051631570544960e31b815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000003066a600a5461022e91906114ee565b43101561024e57604051630287065160e41b815260040160405180910390fd5b600854336000908152600b60205260408120546009549192916102719190611501565b61027b9190611518565b336000818152600b602052604080822091909155600654905163a9059cbb60e01b81526004810192909252602482018390529192506001600160a01b039091169063a9059cbb906044016020604051808303816000875af11580156102e4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610308919061153a565b5060405181815233907f6381d9813cabeb57471b5a7e05078e64845ccdb563146a6911d536f24ce960f1906020015b60405180910390a2005b666a94d74f43000034101561036957604051636c7591b560e11b815260040160405180910390fd5b67016345785d8a0000341061037d5743600a555b336000908152600b60205260408120805434929061039c9084906114ee565b909155505060405134815233907f4d154d4aae216bed6d0926db77c00df2b57c6b5ba4eee05775de20facede3a7b90602001610337565b005b600080fd5b3480156103e657600080fd5b506103f060095481565b6040519081526020015b60405180910390f35b34801561040f57600080fd5b5061041861080c565b6040516103fa919061155c565b34801561043157600080fd5b506104456104403660046115c6565b61089a565b60405190151581526020016103fa565b34801561046157600080fd5b50600754610475906001600160a01b031681565b6040516001600160a01b0390911681526020016103fa565b34801561049957600080fd5b506103d36104a83660046115f0565b610907565b3480156104b957600080fd5b506103d3610a92565b3480156104ce57600080fd5b506002546103f0565b3480156104e357600080fd5b506103d36104f23660046115f0565b610d23565b34801561050357600080fd5b5061044561051236600461160b565b610d97565b34801561052357600080fd5b5061054b7f000000000000000000000000000000000000000000000000000000000000001281565b60405160ff90911681526020016103fa565b34801561056957600080fd5b506103f07f000000000000000000000000000000000000000000000000000000000000012c81565b34801561059d57600080fd5b506103f0610e97565b3480156105b257600080fd5b506103f060085481565b3480156105c857600080fd5b506103f06105d73660046115f0565b600b6020526000908152604090205481565b3480156105f557600080fd5b50600654610475906001600160a01b031681565b34801561061557600080fd5b5060075461044590600160a01b900460ff1681565b34801561063657600080fd5b506103f07f000000000000000000000000000000000000000000000000000000000003066a81565b34801561066a57600080fd5b506103f06106793660046115f0565b60036020526000908152604090205481565b34801561069757600080fd5b506103f06106a63660046115f0565b60056020526000908152604090205481565b3480156106c457600080fd5b50610418610ef2565b3480156106d957600080fd5b506103f07f000000000000000000000000000000000000000000000000000000000000005081565b34801561070d57600080fd5b5061044561071c3660046115c6565b610eff565b34801561072d57600080fd5b506103d361073c366004611647565b610ff7565b34801561074d57600080fd5b506103f07f0000000000000000000000000000000000000000045249d942beccd1d6c4000081565b34801561078157600080fd5b506103f06107903660046116ba565b600460209081526000928352604080842090915290825290205481565b3480156107b957600080fd5b506103f07f000000000000000000000000000000000000000000000000000000000000006481565b3480156107ed57600080fd5b506103f0611240565b34801561080257600080fd5b506103f0600a5481565b60008054610819906116ed565b80601f0160208091040260200160405190810160405280929190818152602001828054610845906116ed565b80156108925780601f1061086757610100808354040283529160200191610892565b820191906000526020600020905b81548152906001019060200180831161087557829003601f168201915b505050505081565b3360008181526004602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906108f59086815260200190565b60405180910390a35060015b92915050565b600754600160a01b900460ff161561093257604051630c10170360e01b815260040160405180910390fd5b6006546001600160a01b0390811690821603610961576040516305a5fdf360e01b815260040160405180910390fd5b6001600160a01b0381166109ac576007546040516001600160a01b03909116904780156108fc02916000818181858888f193505050501580156109a8573d6000803e3d6000fd5b5050565b6007546040516370a0823160e01b81523060048201526001600160a01b038381169263a9059cbb9291169083906370a0823190602401602060405180830381865afa1580156109ff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a239190611727565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610a6e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a8919061153a565b600a54600003610ab557604051631486cb8360e31b815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000012c600a54610ae391906114ee565b431015610b03576040516369bd17c960e01b815260040160405180910390fd5b4760085560405163095ea7b360e01b8152737a250d5630b4cf539739df2c5dacb4c659f2488d60048201527f0000000000000000000000000000000000000000045249d942beccd1d6c400006024820152309063095ea7b3906044016020604051808303816000875af1158015610b7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba2919061153a565b5060405163f305d71960e01b815230600482018190527f0000000000000000000000000000000000000000045249d942beccd1d6c400006024830152600060448301819052606483015260848201524260a4820152737a250d5630b4cf539739df2c5dacb4c659f2488d9063f305d71990479060c40160606040518083038185885af1158015610c36573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610c5b9190611740565b50506006546040516370a0823160e01b81523060048201526001600160a01b0390911691506370a0823190602401602060405180830381865afa158015610ca6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cca9190611727565b60098190556007805460ff60a01b191690556008546040805133815260208101929092528101919091527f6935191bc626032d8c74ced321b2d6a62df2578bf60599625cb4f59d51e3849f9060600160405180910390a1565b6007546001600160a01b03163314610d4e57604051633b8d9d7560e21b815260040160405180910390fd5b6001600160a01b038116610d75576040516366385fa360e01b815260040160405180910390fd5b600780546001600160a01b0319166001600160a01b0392909216919091179055565b60065460009081906001600160a01b038581169116148015610dc35750600754600160a01b900460ff16155b15610e7757610df27f000000000000000000000000000000000000000000000000000000000000006484611518565b600654909150610e0d9086906001600160a01b031683611259565b50600660009054906101000a90046001600160a01b03166001600160a01b031663fff6cae96040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610e5e57600080fd5b505af1158015610e72573d6000803e3d6000fd5b505050505b610e8b8585610e86848761176e565b611259565b50600195945050505050565b60007f00000000000000000000000000000000000000000000000000000000000000014614610ecd57610ec861134b565b905090565b507fdfc3f9ba703fddaa1b87cf53dc8eb0b8f01ebe546edccd7106c07b548b8a3ab990565b60018054610819906116ed565b60006001600160a01b03831630148015610f205750610f1c611240565b8210155b15610fe65760006064610f537f00000000000000000000000000000000000000000000000000000000000000508261176e565b610f5d9085611501565b610f679190611518565b43600a559050610f8033610f7b838661176e565b6113e5565b337f442fb7069f6c5497dd3f418c8567eb7e177d3dd63e33af0d0db1253fe7d7aa9d610faa611240565b6040805191825260208201879052810184905260600160405180910390a2600754610fde906001600160a01b031682611460565b915050610901565b610ff08383611460565b9392505050565b4284101561104c5760405162461bcd60e51b815260206004820152601760248201527f5045524d49545f444541444c494e455f4558504952454400000000000000000060448201526064015b60405180910390fd5b60006001611058610e97565b6001600160a01b038a811660008181526005602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015611164573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580159061119a5750876001600160a01b0316816001600160a01b0316145b6111d75760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa9a4a3a722a960911b6044820152606401611043565b6001600160a01b0390811660009081526004602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b6000620186a061124f60025490565b610ec89190611518565b6001600160a01b038316600090815260046020908152604080832033845290915281205460001981146112b557611290838261176e565b6001600160a01b03861660009081526004602090815260408083203384529091529020555b6001600160a01b038516600090815260036020526040812080548592906112dd90849061176e565b90915550506001600160a01b03808516600081815260036020526040908190208054870190555190918716907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906113389087815260200190565b60405180910390a3506001949350505050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f600060405161137d9190611781565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b6001600160a01b0382166000908152600360205260408120805483929061140d90849061176e565b90915550506002805482900390556040518181526000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b3360009081526003602052604081208054839190839061148190849061176e565b90915550506001600160a01b038316600081815260036020526040908190208054850190555133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906108f59086815260200190565b634e487b7160e01b600052601160045260246000fd5b80820180821115610901576109016114d8565b8082028115828204841417610901576109016114d8565b60008261153557634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561154c57600080fd5b81518015158114610ff057600080fd5b600060208083528351808285015260005b818110156115895785810183015185820160400152820161156d565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b03811681146115c157600080fd5b919050565b600080604083850312156115d957600080fd5b6115e2836115aa565b946020939093013593505050565b60006020828403121561160257600080fd5b610ff0826115aa565b60008060006060848603121561162057600080fd5b611629846115aa565b9250611637602085016115aa565b9150604084013590509250925092565b600080600080600080600060e0888a03121561166257600080fd5b61166b886115aa565b9650611679602089016115aa565b95506040880135945060608801359350608088013560ff8116811461169d57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156116cd57600080fd5b6116d6836115aa565b91506116e4602084016115aa565b90509250929050565b600181811c9082168061170157607f821691505b60208210810361172157634e487b7160e01b600052602260045260246000fd5b50919050565b60006020828403121561173957600080fd5b5051919050565b60008060006060848603121561175557600080fd5b8351925060208401519150604084015190509250925092565b81810381811115610901576109016114d8565b600080835481600182811c91508083168061179d57607f831692505b602080841082036117bc57634e487b7160e01b86526022600452602486fd5b8180156117d057600181146117e557611812565b60ff1986168952841515850289019650611812565b60008a81526020902060005b8681101561180a5781548b8201529085019083016117f1565b505084890196505b50949897505050505050505056fea2646970667358221220c3c6c62d0373a14c26542e9d516118520aa4a37583aafdb77e33309ad7b3f4d864736f6c63430008130033

Verified Source Code Full Match

Compiler: v0.8.19+commit.7dd6d404 EVM: london Optimization: Yes (200 runs)
MemeFi.sol 214 lines
pragma solidity 0.8.19;

    /*
    $$\      $$\                                   $$$$$$$$\ $$\ 
    $$$\    $$$ |                                  $$  _____|\__|
    $$$$\  $$$$ | $$$$$$\  $$$$$$\$$$$\   $$$$$$\  $$ |      $$\ 
    $$\$$\$$ $$ |$$  __$$\ $$  _$$  _$$\ $$  __$$\ $$$$$\    $$ |
    $$ \$$$  $$ |$$$$$$$$ |$$ / $$ / $$ |$$$$$$$$ |$$  __|   $$ |
    $$ |\$  /$$ |$$   ____|$$ | $$ | $$ |$$   ____|$$ |      $$ |
    $$ | \_/ $$ |\$$$$$$$\ $$ | $$ | $$ |\$$$$$$$\ $$ |      $$ |
    \__|     \__| \_______|\__| \__| \__| \_______|\__|      \__|
                                                              */
                                                              /*
    This contract was never owned, and never will be.
    The liquidity is entirely owned by the community.
    The liquidity lock is entirely maintained by the community.
    There is community. You are the community. 
    We, together, are MemeFi.

    https://memefi.wtf
    https://twitter.com/MemeFi__

    There are three stages to this contract.

        1. Liquidity Generation Event
        2. Trading
        3. Unlocking

    It is up to us to determine the best way to transition between these stages.
    It is up to us to determine the duration of the liquidity generation event.
    MemeFi your life. MemeFi your world. MemeFi your future.

    We start with a liquidity generation event. It accepts all ETH above 0.03.
    If the amount is 0.1 ETH or grater, it increases the duration of the LGE by 300 blocks. 
    If it stalls for 300 blocks, we can list it.
    At that point the LGE is over and we begin trading.
    
        * 100% of the circulating supply and 100% of the ETH raised in the LGE will be added to a Uniswap V2 Listing.
        * Selling the token incurs a 1% transaction fee that's given to LP providers to help combat IL.
        * During trading, liquidity can be locked in a rolling ~30 day period (198250 blocks).
        * Once LP Tokens are unlocked, providers are able to remove/sell freely.
        * At any point during the unlock period the 30 day rolling lock is able to be reactivated.

    During trading, the way to lock liquidity is to send an amount of MEFI greater than or equal to the reset amount.
    The first payment to lock liquidity will be 13374.20697 MEFI.

        * 80% of the payment is burned.
        * 20% is sent to the governor.

    If/when the liquidity unlocks, you simply send 0 ETH to the contract to receive your proportional LP Tokens.
    Governor can be renounced at any time to a community controlled contract or even the dEaD address.
                                                  \*/

import "lib/solmate/src/tokens/ERC20.sol";
import "lib/v2-core/contracts/interfaces/IUniswapV2Pair.sol";
import "lib/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "lib/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";

error ContributionTooLow();
error ListingDelayNotElapsed();
error UnlockDelayNotElapsed();
error CanOnlyUnlock();
error LGEEnded();
error NotGovernor();
error ZeroContribution();
error NotZeroAddress();
error LGEHasNotBegun();
error NotDuringLGE();

contract MemeFi is ERC20 {
    address public uniswapV2Pair;
    address payable public governor;

    bool public lgeActive = true;

    uint256 public totalContributions;
    uint256 public listingLPBalance;
    uint256 public lastLockContribution;

    mapping(address => uint256) public contributions;

    uint256 public immutable unlockBlockDelay = 198250;
    uint256 public immutable fee_divisor = 100;
    uint256 public immutable MAXIMUM_CIRCULATING_SUPPLY = 1_337_420_697 ether;
    uint256 public immutable BURN_PERCENTAGE = 80;
    uint256 public immutable blockListingDelay = 300;

    event Contribution(address indexed sender, uint256 amount);
    event Listing(
        address lister,
        uint256 totalContributions,
        uint256 listingLPBalance
    );
    event Unlock(address indexed sender, uint256 amount);
    event LiquidityLockReset(
        address indexed sender,
        uint new_amount,
        uint old_amount,
        uint treasury
    );

    receive() external payable {
        if (!lgeActive) {
            if (contributions[msg.sender] == 0) revert ZeroContribution();
            if (block.number < lastLockContribution + unlockBlockDelay)
                revert UnlockDelayNotElapsed();

            uint256 amount = (listingLPBalance * contributions[msg.sender]) /
                totalContributions;

            contributions[msg.sender] = 0;
            ERC20(uniswapV2Pair).transfer(msg.sender, amount);

            emit Unlock(msg.sender, amount);
        } else {
            if (msg.value < 0.03 ether) revert ContributionTooLow();
            if (msg.value >= 0.1 ether) lastLockContribution = block.number;
            contributions[msg.sender] += msg.value;
            emit Contribution(msg.sender, msg.value);
        }
    }

    constructor() ERC20("MemeFi", "MEFI", 18) {
        lastLockContribution = block.number;
        uniswapV2Pair = IUniswapV2Factory(
            0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f
        ).createPair(address(this), 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);

        _mint(address(this), MAXIMUM_CIRCULATING_SUPPLY);
        governor = payable(msg.sender);
    }

    function list() external {
        if (lastLockContribution == 0) revert LGEHasNotBegun();
        if (block.number < lastLockContribution + blockListingDelay)
            revert ListingDelayNotElapsed();
        totalContributions = address(this).balance;
        ERC20(address(this)).approve(
            0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D,
            MAXIMUM_CIRCULATING_SUPPLY
        );
        IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D)
            .addLiquidityETH{value: address(this).balance}(
            address(this),
            MAXIMUM_CIRCULATING_SUPPLY,
            0,
            0,
            address(this),
            block.timestamp
        );
        listingLPBalance = IUniswapV2Pair(uniswapV2Pair).balanceOf(
            address(this)
        );
        lgeActive = false;
        emit Listing(msg.sender, totalContributions, listingLPBalance);
    }

    function recover(address token) external {
        if (lgeActive) revert NotDuringLGE();
        if (token == uniswapV2Pair) revert CanOnlyUnlock();
        if (token == address(0)) {
            governor.transfer(address(this).balance);
        } else {
            ERC20(token).transfer(
                governor,
                ERC20(token).balanceOf(address(this))
            );
        }
    }

    function renounce(address _new_governor) external {
        if (msg.sender != governor) revert NotGovernor();
        if (_new_governor == address(0)) revert NotZeroAddress();
        governor = payable(_new_governor);
    }

    function transfer(
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        if (to == address(this) && amount >= requiredResetAmount()) {
            uint256 treasury = (amount * (100 - BURN_PERCENTAGE)) / 100;
            lastLockContribution = block.number;
            _burn(msg.sender, amount - treasury);
            emit LiquidityLockReset(
                msg.sender,
                requiredResetAmount(),
                amount,
                treasury
            );
            return super.transfer(governor, treasury);
        }
        return super.transfer(to, amount);
    }

    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        uint256 fee = 0;
        if (to == uniswapV2Pair && !lgeActive) {
            fee = amount / fee_divisor;
            super.transferFrom(from, uniswapV2Pair, fee);
            IUniswapV2Pair(uniswapV2Pair).sync();
        }
        super.transferFrom(from, to, amount - fee);
        return true;
    }

    function requiredResetAmount() public view returns (uint256) {
        return totalSupply() / 10 ** 5;
    }
}
ERC20.sol 209 lines
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol)
/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)
/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.
abstract contract ERC20 {
    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

    event Transfer(address indexed from, address indexed to, uint256 amount);

    event Approval(address indexed owner, address indexed spender, uint256 amount);

    /*//////////////////////////////////////////////////////////////
                            METADATA STORAGE
    //////////////////////////////////////////////////////////////*/

    string public name;

    string public symbol;

    uint8 public immutable decimals;

    /*//////////////////////////////////////////////////////////////
                              ERC20 STORAGE
    //////////////////////////////////////////////////////////////*/

    uint256 private _totalSupply;

    mapping(address => uint256) public balanceOf;

    mapping(address => mapping(address => uint256)) public allowance;

    /*//////////////////////////////////////////////////////////////
                            EIP-2612 STORAGE
    //////////////////////////////////////////////////////////////*/

    uint256 internal immutable INITIAL_CHAIN_ID;

    bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;

    mapping(address => uint256) public nonces;

    /*//////////////////////////////////////////////////////////////
                               CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    constructor(
        string memory _name,
        string memory _symbol,
        uint8 _decimals
    ) {
        name = _name;
        symbol = _symbol;
        decimals = _decimals;

        INITIAL_CHAIN_ID = block.chainid;
        INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();
    }

    /*//////////////////////////////////////////////////////////////
                               ERC20 LOGIC
    //////////////////////////////////////////////////////////////*/
    function totalSupply() public view returns (uint256) {
        return _totalSupply;
    }

    function approve(address spender, uint256 amount) public virtual returns (bool) {
        allowance[msg.sender][spender] = amount;

        emit Approval(msg.sender, spender, amount);

        return true;
    }

    function transfer(address to, uint256 amount) public virtual returns (bool) {
        balanceOf[msg.sender] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(msg.sender, to, amount);

        return true;
    }

    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual returns (bool) {
        uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.

        if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;

        balanceOf[from] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(from, to, amount);

        return true;
    }

    /*//////////////////////////////////////////////////////////////
                             EIP-2612 LOGIC
    //////////////////////////////////////////////////////////////*/

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual {
        require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED");

        // Unchecked because the only math done is incrementing
        // the owner's nonce which cannot realistically overflow.
        unchecked {
            address recoveredAddress = ecrecover(
                keccak256(
                    abi.encodePacked(
                        "\x19\x01",
                        DOMAIN_SEPARATOR(),
                        keccak256(
                            abi.encode(
                                keccak256(
                                    "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"
                                ),
                                owner,
                                spender,
                                value,
                                nonces[owner]++,
                                deadline
                            )
                        )
                    )
                ),
                v,
                r,
                s
            );

            require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER");

            allowance[recoveredAddress][spender] = value;
        }

        emit Approval(owner, spender, value);
    }

    function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {
        return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();
    }

    function computeDomainSeparator() internal view virtual returns (bytes32) {
        return
            keccak256(
                abi.encode(
                    keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
                    keccak256(bytes(name)),
                    keccak256("1"),
                    block.chainid,
                    address(this)
                )
            );
    }

    /*//////////////////////////////////////////////////////////////
                        INTERNAL MINT/BURN LOGIC
    //////////////////////////////////////////////////////////////*/

    function _mint(address to, uint256 amount) internal virtual {
        _totalSupply += amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(address(0), to, amount);
    }

    function _burn(address from, uint256 amount) internal virtual {
        balanceOf[from] -= amount;

        // Cannot underflow because a user's balance
        // will never be larger than the total supply.
        unchecked {
            _totalSupply -= amount;
        }

        emit Transfer(from, address(0), amount);
    }
}
IUniswapV2Pair.sol 6 lines
pragma solidity >=0.5.0;

interface IUniswapV2Pair {
    function balanceOf(address owner) external view returns (uint);
    function sync() external;
}
IUniswapV2Factory.sol 5 lines
pragma solidity >=0.5.0;

interface IUniswapV2Factory {
    function createPair(address tokenA, address tokenB) external returns (address pair);
}
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 21 lines
pragma solidity >=0.6.2;

import './IUniswapV2Router01.sol';

interface IUniswapV2Router02 is IUniswapV2Router01 {
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
   function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;    
}

Read Contract

BURN_PERCENTAGE 0x9649b910 → uint256
DOMAIN_SEPARATOR 0x3644e515 → bytes32
MAXIMUM_CIRCULATING_SUPPLY 0xd8b9c854 → uint256
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
blockListingDelay 0x330e0256 → uint256
contributions 0x42e94c90 → uint256
decimals 0x313ce567 → uint8
fee_divisor 0xdde5541b → uint256
governor 0x0c340a24 → address
lastLockContribution 0xed75fa02 → uint256
lgeActive 0x4d23ec03 → bool
listingLPBalance 0x0218a5c9 → uint256
name 0x06fdde03 → string
nonces 0x7ecebe00 → uint256
requiredResetAmount 0xe4b37447 → uint256
symbol 0x95d89b41 → string
totalContributions 0x37c08923 → uint256
totalSupply 0x18160ddd → uint256
uniswapV2Pair 0x49bd5a5e → address
unlockBlockDelay 0x6751b0ab → uint256

Write Contract 7 functions

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

approve 0x095ea7b3
address spender
uint256 amount
returns: bool
list 0x0f560cd7
No parameters
permit 0xd505accf
address owner
address spender
uint256 value
uint256 deadline
uint8 v
bytes32 r
bytes32 s
recover 0x0cd865ec
address token
renounce 0x1f76a7af
address _new_governor
transfer 0xa9059cbb
address to
uint256 amount
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 amount
returns: bool

Recent Transactions

No transactions found for this address