Ethereum

0xf017d3690346eb8234b85f74cee5e15821fee1f4

Decompiled Solidity recovered from this contract's runtime bytecode. Best-effort reconstruction — confirm behaviour against on-chain state.

Decompilation outputEthereum · 0xf017d36921fee1f42.8 KB802 ms
Share
//decompiled by exvvul decompiler tool contact@exvul.com https://x.com/exvulsec
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

contract DesolexContract {
    uint8 public constant decimals = 18;
    
    address public owner; // STORAGE[0x0]
    mapping(address => uint256) public balanceOf; // STORAGE[0x1]
    mapping(address => mapping(address => uint256)) public allowance; // STORAGE[0x2]
    uint256 public totalSupply; // STORAGE[0x3]
    string _name; // STORAGE[0x4]
    string _symbol; // STORAGE[0x5]
    
    event Transfer(address indexed, address indexed, uint256);
    event Approval(address indexed, address indexed, uint256);
    event OwnershipTransferred(address indexed, address indexed);
    
    modifier onlyOwner() {
        require(owner == msg.sender, "Ownable: caller is not the owner");
        _;
    }
    
    function name() public view returns (string memory) {
        return _name;
    }
    
    function approve(address spender, uint256 amount) public payable returns (bool) {
        require(msg.sender != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");
        allowance[msg.sender][spender] = amount;
        emit Approval(msg.sender, spender, allowance[msg.sender][spender]);
        return true;
    }
    
    function transferFrom(address from, address to, uint256 amount) public payable returns (bool) {
        if (!(allowance[from][msg.sender] == 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)) {
            require(!(allowance[from][msg.sender] < amount), "ERC20: insufficient allowance");
            require(from != address(0), "ERC20: approve from the zero address");
            require(msg.sender != address(0), "ERC20: approve to the zero address");
            allowance[from][msg.sender] = allowance[from][address(msg.sender)] - amount;
            emit Approval(from, msg.sender, allowance[from][msg.sender]);
        }
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");
        require(!(balanceOf[from] < amount), "ERC20: transfer amount exceeds balance");
        balanceOf[from] = balanceOf[from] - amount;
        balanceOf[to] = amount + balanceOf[to];
        emit Transfer(from, to, amount);
        return true;
    }
    
    function increaseAllowance(address spender, uint256 addedValue) public payable returns (bool) {
        require(msg.sender != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");
        allowance[msg.sender][spender] = allowance[msg.sender][spender] + addedValue;
        emit Approval(msg.sender, spender, allowance[msg.sender][spender]);
        return true;
    }
    
    function burn(uint256 arg0) public payable {
        require(msg.sender != address(0), "ERC20: burn from the zero address");
        require(!(balanceOf[msg.sender] < arg0), "ERC20: burn amount exceeds balance");
        balanceOf[msg.sender] = balanceOf[msg.sender] - arg0;
        totalSupply = totalSupply - arg0;
        emit Transfer(msg.sender, address(0), arg0);
    }
    
    function renounceOwnership() public payable onlyOwner {
        emit OwnershipTransferred(owner, address(0));
        owner = address(0);
    }
    
    function symbol() public view returns (string memory) {
        return _symbol;
    }
    
    function decreaseAllowance(address spender, uint256 subtractedValue) public payable returns (bool) {
        require(!(allowance[msg.sender][spender] < subtractedValue), "ERC20: decreased allowance below zero");
        require(msg.sender != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");
        allowance[msg.sender][spender] = allowance[msg.sender][spender] - subtractedValue;
        emit Approval(msg.sender, spender, allowance[msg.sender][spender]);
        return true;
    }
    
    function transfer(address to, uint256 amount) public payable returns (bool) {
        require(msg.sender != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");
        require(!(balanceOf[msg.sender] < amount), "ERC20: transfer amount exceeds balance");
        balanceOf[msg.sender] = balanceOf[msg.sender] - amount;
        balanceOf[to] = amount + balanceOf[to];
        emit Transfer(msg.sender, to, amount);
        return true;
    }
    
    function transferOwnership(address newOwner) public payable onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(owner, newOwner);
        owner = newOwner;
    }
    
    // Note: This selector table is synthetic and is not part of the original Solidity source.
    // It records the recovered selector-to-signature mapping without executable behavior.
    
    // 0x06fdde03 => name()
    // 0x095ea7b3 => approve(address,uint256)
    // 0x18160ddd => totalSupply()
    // 0x23b872dd => transferFrom(address,address,uint256)
    // 0x313ce567 => decimals()
    // 0x39509351 => increaseAllowance(address,uint256)
    // 0x42966c68 => burn(uint256)
    // 0x70a08231 => balanceOf(address)
    // 0x715018a6 => renounceOwnership()
    // 0x8da5cb5b => owner()
    // 0x95d89b41 => symbol()
    // 0xa457c2d7 => decreaseAllowance(address,uint256)
    // 0xa9059cbb => transfer(address,uint256)
    // 0xdd62ed3e => allowance(address,address)
    // 0xf2fde38b => transferOwnership(address)
}
0xf017d3…fee1f4 on Ethereum — Decompiled Solidity