Lemur : Contract Address and Detailed Description


// SPDX-License-Identifier: MIT
/*
     _                                _             
    | |    ___ _ __ ___  _   _ _ __  (_)_ __  _   _ 
    | |   / _ \ '_ ` _ \| | | | '__| | | '_ \| | | |
    | |__|  __/ | | | | | |_| | |    | | | | | |_| |
    |_____\___|_| |_| |_|\__,_|_|    |_|_| |_|\__,_|

    Official website: https://lemuravax.xyz/
    X (twitter) : https://twitter.com/LemurAvax
    Telegram : https://t.me/LemurAvax
    White paper : https://avax.gitbook.io/lemur
 */

pragma solidity ^0.8.20;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

Solidity version is set to ^0.8.0 and ERC20 and Ownable libraries have been imported from OpenZeppelin library. For detailed information, you can examine the docs of the libraries.


contract LEMUR is ERC20, Ownable(msg.sender) {
    bool public lubricating = true;
    address public liquidityPool;

Lemur is a token contract on ERC20 standards and is owned by the creator of this contract. The Lubricating variable indicates whether the anti-whaling system is active or not. The LiquidityPool variable is used to prevent the anti-whaling system from affecting the pool (details explained below).


 constructor() ERC20("Lemur Inu", "LEMUR") {
        _mint(msg.sender, (9_000_000_000_000 * (1e18)));
        /* 
            COMMUNITY AND AIRDROP ADDRESS     |  %34  => 0x222b2f5E7E8a192A7c070e6c2746BfF54932bd28
            NEW POOL AND LISTING FUND ADDRESS |  %27   => 0x21fA7BC2cab2778D9F8326064DbC2951a54dE5Aa
        */
    }

When created, it generates and sends 9,000,000,000,000,000 Lemurs to the creating account. Owner (the creator of the contract) sends 34% of these tokens to the address named COMMUNITY AND AIRDROP ADDRESS, 27% will be sent to NEW POOL AND LISTING FUND ADDRESS.


  // Function to set lubricating state
    function setLubricating() external onlyOwner {
        lubricating = false;
    }

The anti-whaling system (lubricating), once stopped, cannot be switched on again. This function is used to change the state of the anti whale system. Only the person who created the contract (Owner) can use it.


// Define the LP address to enable trading!
    function setLiquidityPool(address _liquidityPool) external onlyOwner {
        require(
            _liquidityPool != address(0),
            "_liquidityPool address cannot be equal to 0"
        );
        liquidityPool = _liquidityPool;
    }

Used to determine the Liquidity address. This function is available to the creator of the contract (Owner).

  1. To block the bots used at first.

  2. To prevent the anti whale system from being affected by the pool. It is important that the pool is not affected by the anti whale system so that people do not have restrictions on selling their money.


 // Override _update function to include lubricating logic (previously _beforeTokenTransfer)
    function _update(
        address from,
        address to,
        uint256 amount
    ) internal virtual override {
        super._update(from, to, amount);
        // If liquidityPool is address(0) we've not yet enabled trading. Liquidity Loading....
        if (liquidityPool == address(0)) {
            require(
                from == owner() || to == owner(),
                "Patience - Trading Not Started Yet!"
            );
            return;
        }
        // Allow deployer (owner) to send/receive any amount and the liquidityPool to receive any amount.
        // This allows for loading of the LP, and for people to sell tokens into the LP whilst lubrication in progress.
        if (lubricating && from != owner() && to != liquidityPool) {
            // Require that a receiving wallet will not hold more than 0.5% of supply after a transfer whilst lubrication is in effect
            require(
                balanceOf(to) <= totalSupply() / 200,
                "Just getting warmed up, limit of 0.5% of $LEMUR can be Inu until Lubrication is complete!"
            );
        }
    }

Lemur is an ERC20 token contract that handles token transfers and includes the lubrication (anti-whale) logic.

Operation:

  1. If the liquidity pool is not yet determined: Only the contract owner can perform token transfers, and tokens can only be transferred to the owner. This restriction is implemented considering the scenario where the owner needs to add Lemur to the pool.

  2. If the liquidity pool is determined: If the lubrication variable is true and the sender of the transfer is not the owner and the recipient of the transfer is not the liquidity pool, the anti-whale system becomes active. In this case, the recipient's wallet is not allowed to hold more than 0.5% of the total Lemur token supply. This restriction applies during the first 10 minutes of the anti-whale system activation.


 // Renounce the contract and pass ownership to address(0) to lock the contract forever more.
    function renounceTokenOwnership() public onlyOwner {
        require(
            lubricating == false,
            "Hey, didn't you set lubricating to false?"
        );
        renounceOwnership();
    }

The contract will be cancelled after we shut down the anti-whaling system.

Last updated