0x282bdd42f4eb70e7a9d9f40c8fea0825b7f68c5d

deployer: unknown relevance score: 0 status: partially_identified bytecode: 7703 bytes

DECOMPILED SOLIDITY (Heimdall)

// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

/// @title            Decompiled Contract
/// @author           Jonathan Becker <jonathan@jbecker.dev>
/// @custom:version   heimdall-rs v0.9.2
///
/// @notice           This contract was decompiled using the heimdall-rs decompiler.
///                     It was generated directly by tracing the EVM opcodes from this contract.
///                     As a result, it may not compile or even be valid solidity code.
///                     Despite this, it should be obvious what each function does. Overall
///                     logic should have been preserved throughout decompiling.
///
/// @custom:github    You can find the open-source decompiler here:
///                       https://heimdall.rs

contract DecompiledContract {
    uint256 public unresolved_18160ddd;
    bytes32 store_d;
    address public punkAddress;
    address public owner;
    uint256 store_f;
    bytes32 store_g;
    mapping(bytes32 => bytes32) storage_map_a;
    
    event Event_8c5be1e5();
    event Event_17307eab();
    event OwnershipTransferred(address, address);
    
    /// @custom:selector    0x095ea7b3
    /// @custom:signature   Unresolved_095ea7b3(address arg0, uint256 arg1) public
    /// @param              arg0 ["address", "uint160", "bytes20", "int160"]
    /// @param              arg1 ["uint256", "bytes32", "int256"]
    function Unresolved_095ea7b3(address arg0, uint256 arg1) public {
        require(arg0 == (address(arg0)));
        uint256 var_a = arg1;
        require(address(storage_map_a[var_a]), "ERC721: owner query for nonexistent token");
        require(!(address(arg0) == (address(storage_map_a[var_a]))), "ERC721: owner query for nonexistent token");
        require(address(storage_map_a[var_a]) == msg.sender, "ERC721: owner query for nonexistent token");
        var_a = address(msg.sender);
        require(bytes1(storage_map_a[var_a]), "ERC721: owner query for nonexistent token");
        var_a = arg1;
        storage_map_a[var_a] = (address(arg0)) | (uint96(storage_map_a[var_a]));
        var_a = arg1;
        require(address(storage_map_a[var_a]), "ERC721: owner query for nonexistent token");
        emit Event_8c5be1e5(address(storage_map_a[var_a]), address(arg0), arg1);
        require(address(storage_map_a[var_a]) == msg.sender, "ERC721: approve caller is not owner nor approved for all");
    }
    
    /// @custom:selector    0xb88d4fde
    /// @custom:signature   Unresolved_b88d4fde(address arg0) public pure
    /// @param              arg0 ["address", "uint160", "bytes20", "int160"]
    function Unresolved_b88d4fde(address arg0) public pure {
        require(arg0 == (address(arg0)));
    }
    
    /// @custom:selector    0x081812fc
    /// @custom:signature   Unresolved_081812fc(uint256 arg0) public view returns (address)
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function Unresolved_081812fc(uint256 arg0) public view returns (address) {
        uint256 var_a = arg0;
        require(address(storage_map_a[var_a]), "ERC721: approved query for nonexistent token");
        var_a = arg0;
        return address(storage_map_a[var_a]);
    }
    
    /// @custom:selector    0x95d89b41
    /// @custom:signature   Unresolved_95d89b41() public view returns (string memory)
    function Unresolved_95d89b41() public view returns (string memory) {
        if (store_d) {
            if (!(store_d) == ((store_d >> 0x01) < 0x20)) {
                uint256 var_c = var_c + (0x20 + (((0x1f + (store_d >> 0x01)) / 0x20) * 0x20));
                if (store_d) {
                    if (!(store_d) == ((store_d >> 0x01) < 0x20)) {
                        if (!store_d >> 0x01) {
                            if (0x1f < (store_d >> 0x01)) {
                                var_a = 0x02;
                                if ((0x20 + var_c) + (store_d >> 0x01) > (0x20 + (0x20 + var_c))) {
                                    if (!0 > var_c.length) {
                                        return abi.encodePacked(0x20, var_c.length);
                                        return abi.encodePacked(0x20, var_c.length);
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    
    /// @custom:selector    0x23b872dd
    /// @custom:signature   Unresolved_23b872dd(address arg0) public pure
    /// @param              arg0 ["address", "uint160", "bytes20", "int160"]
    function Unresolved_23b872dd(address arg0) public pure {
        require(arg0 == (address(arg0)));
    }
    
    /// @custom:selector    0x42842e0e
    /// @custom:signature   Unresolved_42842e0e(address arg0) public pure
    /// @param              arg0 ["address", "uint160", "bytes20", "int160"]
    function Unresolved_42842e0e(address arg0) public pure {
        require(arg0 == (address(arg0)));
    }
    
    /// @custom:selector    0xf2fde38b
    /// @custom:signature   transferOwnership(address arg0) public
    /// @param              arg0 ["address", "uint160", "bytes20", "int160"]
    function transferOwnership(address arg0) public {
        require(arg0 == (address(arg0)));
        require(msg.sender == (address(owner)), "Ownable: caller is not the owner");
        require(address(arg0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(address(owner), address(arg0));
        owner = (address(arg0)) | (uint96(owner));
    }
    
    /// @custom:selector    0x70a08231
    /// @custom:signature   Unresolved_70a08231(address arg0) public view returns (uint256)
    /// @param              arg0 ["address", "uint160", "bytes20", "int160"]
    function Unresolved_70a08231(address arg0) public view returns (uint256) {
        require(arg0 == (address(arg0)));
        require(address(arg0), "ERC721: balance query for the zero address");
        address var_a = address(arg0);
        return storage_map_a[var_a];
    }
    
    /// @custom:selector    0x01ffc9a7
    /// @custom:signature   Unresolved_01ffc9a7(uint32 arg0) public pure returns (bool)
    /// @param              arg0 ["uint32", "bytes4", "int32"]
    function Unresolved_01ffc9a7(uint32 arg0) public pure returns (bool) {
        require(arg0 == (uint32(arg0)));
        require(0x80ac58cd00000000000000000000000000000000000000000000000000000000 == (uint32(arg0)));
        require(0x80ac58cd00000000000000000000000000000000000000000000000000000000 == (uint32(arg0)));
        return !(!0x80ac58cd00000000000000000000000000000000000000000000000000000000 == (uint32(arg0)));
        return !(!(uint32(arg0)) == 0x01ffc9a700000000000000000000000000000000000000000000000000000000);
    }
    
    /// @custom:selector    0x4f558e79
    /// @custom:signature   exists(uint256 arg0) public view returns (bool)
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function exists(uint256 arg0) public view returns (bool) {
        uint256 var_a = arg0;
        return !(!address(storage_map_a[var_a]));
    }
    
    /// @custom:selector    0xe985e9c5
    /// @custom:signature   Unresolved_e985e9c5(address arg0) public pure
    /// @param              arg0 ["address", "uint160", "bytes20", "int160"]
    function Unresolved_e985e9c5(address arg0) public pure {
        require(arg0 == (address(arg0)));
    }
    
    /// @custom:selector    0xc87b56dd
    /// @custom:signature   Unresolved_c87b56dd(uint256 arg0) public view
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function Unresolved_c87b56dd(uint256 arg0) public view {
        uint256 var_a = arg0;
        if (address(storage_map_a[var_a])) {
            if (store_f) {
                require(address(storage_map_a[var_a]), "ERC721Metadata: URI query for nonexistent token");
                uint256 var_d = var_d + (0x20 + (((0x1f + (store_f >> 0x01)) / 0x20) * 0x20));
                require(bytes1(store_f), "ERC721Metadata: URI query for nonexistent token");
                require(!(bytes1(store_f) == ((store_f >> 0x01) < 0x20)), "ERC721Metadata: URI query for nonexistent token");
                require(bytes1(store_f), "ERC721Metadata: URI query for nonexistent token");
                require(!(bytes1(store_f) == ((store_f >> 0x01) < 0x20)), "ERC721Metadata: URI query for nonexistent token");
                var_a = 0x08;
                require(!(store_f >> 0x01), "ERC721Metadata: URI query for nonexistent token");
                require(0x1f < (store_f >> 0x01), "ERC721Metadata: URI query for nonexistent token");
                require((0x20 + var_d) + (store_f >> 0x01) > (0x20 + (0x20 + var_d)), "ERC721Metadata: URI query for nonexistent token");
                require(var_d.length > 0, "ERC721Metadata: URI query for nonexistent token");
                require(arg0, "ERC721Metadata: URI query for nonexistent token");
                require(!arg0, "ERC721Metadata: URI query for nonexistent token");
                require(!(0 == 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff), "ERC721Metadata: URI query for nonexistent token");
                var_d = var_d + 0x20;
                require(0x0a, "ERC721Metadata: URI query for nonexistent token");
                require(!(0 > 0xffffffffffffffff), "ERC721Metadata: URI query for nonexistent token");
                require(!0, "ERC721Metadata: URI query for nonexistent token");
                require(!arg0, "ERC721Metadata: URI query for nonexistent token");
                require(!(0 < 0x01), "ERC721Metadata: URI query for nonexistent token");
                require(0x0a, "ERC721Metadata: URI query for nonexistent token");
                require(!(0x30 > (~(arg0 % 0x0a))), "ERC721Metadata: URI query for nonexistent token");
                require(0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff < var_d.length, "ERC721Metadata: URI query for nonexistent token");
                require(0x0a, "ERC721Metadata: URI query for nonexistent token");
            }
        }
    }
    
    /// @custom:selector    0xa22cb465
    /// @custom:signature   Unresolved_a22cb465(address arg0, uint256 arg1) public
    /// @param              arg0 ["address", "uint160", "bytes20", "int160"]
    /// @param              arg1 ["uint256", "bytes32", "int256"]
    function Unresolved_a22cb465(address arg0, uint256 arg1) public {
        require(arg0 == (address(arg0)));
        require(arg1 == arg1);
        require(!(msg.sender == (address(arg0))), "ERC721: approve to caller");
        var_a = address(arg0);
        storage_map_a[var_a] = arg1 | (uint248(storage_map_a[var_a]));
        emit Event_17307eab(msg.sender, address(arg0), arg1);
    }
    
    /// @custom:selector    0xde0e9a3e
    /// @custom:signature   unwrap(uint256 arg0) public view
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function unwrap(uint256 arg0) public view {
        uint256 var_a = arg0;
        require(address(storage_map_a[var_a]));
        var_a = arg0;
        require(address(storage_map_a[var_a]));
        require(address(msg.sender) == (address(storage_map_a[var_a])));
        var_a = arg0;
        require(address(storage_map_a[var_a]));
        var_a = arg0;
        require(address(storage_map_a[var_a]) == (address(msg.sender)));
        var_a = address(msg.sender);
        require(bytes1(storage_map_a[var_a]));
        require(address(storage_map_a[var_a]) == (address(msg.sender)));
    }
    
    /// @custom:selector    0x6352211e
    /// @custom:signature   Unresolved_6352211e(uint256 arg0) public view returns (address)
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function Unresolved_6352211e(uint256 arg0) public view returns (address) {
        uint256 var_a = arg0;
        require(address(storage_map_a[var_a]), "ERC721: owner query for nonexistent token");
        return address(storage_map_a[var_a]);
    }
    
    /// @custom:selector    0xea598cb0
    /// @custom:signature   wrap(uint256 arg0) public payable
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function wrap(uint256 arg0) public payable {
        uint256 var_b = arg0;
        (bool success, bytes memory ret0) = address(punkAddress).Unresolved_088f11f3(var_b); // staticcall
        uint256 var_c = var_c + (uint248(ret0.length + 0x1f));
        require(!((var_c + ret0.length) - var_c) < 0xa0);
        require(var_c.length == var_c.length);
        require(var_d == (address(var_d)));
    }
    
    /// @custom:selector    0x30176e13
    /// @custom:signature   Unresolved_30176e13(uint256 arg0) public
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function Unresolved_30176e13(uint256 arg0) public {
        require(!arg0 > 0xffffffffffffffff);
        require(!(arg0 > 0xffffffffffffffff), "Ownable: caller is not the owner");
        require(!(((var_c + (uint248(0x3f + (arg0 + 0x1f)))) < var_c) | ((var_c + (uint248(0x3f + (arg0 + 0x1f)))) > 0xffffffffffffffff)), "Ownable: caller is not the owner");
        uint256 var_c = var_c + (uint248(0x3f + (arg0 + 0x1f)));
        require(msg.sender == (address(owner)), "Ownable: caller is not the owner");
        require(bytes1(store_f));
        require(!(bytes1(store_f)) == ((store_f >> 0x01) < 0x20));
        var_a = 0x08;
        require(var_c.length);
        require(0x1f < var_c.length);
        store_f = 0x01 + (var_c.length + var_c.length);
        require(!var_c.length);
        require(!((var_c + 0x20) + var_c.length) > (var_c + 0x20));
        require(!(keccak256(var_a) + ((0x1f + (store_f >> 0x01)) / 0x20)) > keccak256(var_a));
    }
    
    /// @custom:selector    0x06fdde03
    /// @custom:signature   Unresolved_06fdde03() public view returns (string memory)
    function Unresolved_06fdde03() public view returns (string memory) {
        if (store_g) {
            if (!(store_g) == ((store_g >> 0x01) < 0x20)) {
                uint256 var_c = var_c + (0x20 + (((0x1f + (store_g >> 0x01)) / 0x20) * 0x20));
                if (store_g) {
                    if (!(store_g) == ((store_g >> 0x01) < 0x20)) {
                        if (!store_g >> 0x01) {
                            if (0x1f < (store_g >> 0x01)) {
                                var_a = 0x01;
                                if ((0x20 + var_c) + (store_g >> 0x01) > (0x20 + (0x20 + var_c))) {
                                    if (!0 > var_c.length) {
                                        return abi.encodePacked(0x20, var_c.length);
                                        return abi.encodePacked(0x20, var_c.length);
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    
    /// @custom:selector    0x715018a6
    /// @custom:signature   renounceOwnership() public
    function renounceOwnership() public {
        require(msg.sender == (address(owner)), "Ownable: caller is not the owner");
        emit OwnershipTransferred(address(owner), 0);
        owner = uint96(owner);
    }
}

ABI

[
  {
    "type": "function",
    "name": "Unresolved_01ffc9a7",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint32"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "Unresolved_06fdde03",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "string"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "Unresolved_081812fc",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "Unresolved_095ea7b3",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      },
      {
        "name": "arg1",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "Unresolved_18160ddd",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "Unresolved_23b872dd",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "Unresolved_30176e13",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "Unresolved_42842e0e",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "Unresolved_6352211e",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "Unresolved_70a08231",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "Unresolved_95d89b41",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "string"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "Unresolved_a22cb465",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      },
      {
        "name": "arg1",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "Unresolved_b88d4fde",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "Unresolved_c87b56dd",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "Unresolved_e985e9c5",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "exists",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "owner",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "punkAddress",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "renounceOwnership",
    "inputs": [],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "transferOwnership",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "unwrap",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "wrap",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "event",
    "name": "Event_17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31",
    "inputs": [],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "Event_8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
    "inputs": [],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "OwnershipTransferred",
    "inputs": [
      {
        "name": "arg0",
        "type": "address",
        "indexed": false
      },
      {
        "name": "arg1",
        "type": "address",
        "indexed": false
      }
    ],
    "anonymous": false
  }
]

UNKNOWN SELECTORS (1)

0x0a85bd01unknown
These selectors are not yet in the research database — they are being investigated and will be added as known functions once identified. They are also marked in red in the decompiled Solidity above.

KNOWN CLUSTER ADDRESSES IN THIS BYTECODE (0)

(none)