0xc765cbe5a16f12796ebdbdce684e336b4fa565ce

deployer: unknown relevance score: 10 status: identified bytecode: 1494 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 {
    mapping(bytes32 => bytes32) storage_map_a;
    uint256 public totalShares;
    bytes32 store_d;
    bytes32 store_e;
    mapping(bytes32 => bytes32) storage_map_c;
    
    
    /// @custom:selector    0xc45ac050
    /// @custom:signature   releasable(address arg0, address arg1) public payable returns (uint256)
    /// @param              arg0 ["address", "uint160", "bytes20", "int160"]
    /// @param              arg1 ["address", "uint160", "bytes20", "int160"]
    function releasable(address arg0, address arg1) public payable returns (uint256) {
        require(msg.value);
        require((0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc + msg.data.length) < 0x40);
        require(arg0 - (address(arg0)));
        require(arg1 - (address(arg1)));
        address var_b = address(this);
        (bool success, bytes memory ret0) = address(arg0).Unresolved_70a08231(var_b); // staticcall
        address var_c = address(arg0);
        require(0 > (0 + storage_map_a[var_c]));
        var_c = address(arg1);
        require(!(storage_map_a[var_c] == ((0 + storage_map_a[var_c]) * storage_map_a[var_c] / (0 + storage_map_a[var_c]))) | (!0 + storage_map_a[var_c]));
        var_c = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
        require(!totalShares);
        require(((0 + storage_map_a[var_c]) * storage_map_a[var_c] / totalShares) - storage_map_a[var_c] > ((0 + storage_map_a[var_c]) * storage_map_a[var_c] / totalShares));
        var_c = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
        return ((0 + storage_map_a[var_c]) * storage_map_a[var_c] / totalShares) - storage_map_a[var_c];
        require(0x20 > ret0.length);
        require(((var_f + 0x20) > 0xffffffffffffffff) | ((var_f + 0x20) < var_f));
        uint256 var_f = var_f + 0x20;
        require(((var_f + 0x20) - var_f) < 0x20);
    }
    
    /// @custom:selector    0xd79779b2
    /// @custom:signature   totalReleased(address arg0) public view returns (uint256)
    /// @param              arg0 ["address", "uint160", "bytes20", "int160"]
    function totalReleased(address arg0) public view returns (uint256) {
        require(msg.value);
        require((0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc + msg.data.length) < 0x20);
        require(arg0 - (address(arg0)));
        address var_a = address(arg0);
        return storage_map_c[var_a];
    }
    
    /// @custom:selector    0x48b75044
    /// @custom:signature   release(address arg0, address arg1) public payable
    /// @param              arg0 ["address", "uint160", "bytes20", "int160"]
    /// @param              arg1 ["address", "uint160", "bytes20", "int160"]
    function release(address arg0, address arg1) public payable {
        require(msg.value);
        require((0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc + msg.data.length) < 0x40);
        require(arg0 - (address(arg0)));
        require(arg1 - (address(arg1)));
        address var_a = address(arg1);
        require(!storage_map_c[var_a]);
        address var_d = address(this);
        (bool success, bytes memory ret0) = address(arg0).Unresolved_70a08231(var_d); // staticcall
        var_a = address(arg0);
        require(0 > (0 + storage_map_c[var_a]), "PaymentSplitter: account is not due payment");
        var_a = address(arg1);
        require(!(storage_map_c[var_a] == ((0 + storage_map_c[var_a]) * storage_map_c[var_a] / (0 + storage_map_c[var_a])) | (!0 + storage_map_c[var_a])), "PaymentSplitter: account is not due payment");
        var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
        require(!totalShares, "PaymentSplitter: account is not due payment");
        require(((0 + storage_map_c[var_a]) * storage_map_c[var_a] / totalShares) - storage_map_c[var_a] > ((0 + storage_map_c[var_a]) * storage_map_c[var_a] / totalShares), "PaymentSplitter: account is not due payment");
        var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
        require(!(((0 + storage_map_c[var_a]) * storage_map_c[var_a] / totalShares) - storage_map_c[var_a]), "PaymentSplitter: account is not due payment");
        var_a = address(arg1);
        require(storage_map_c[var_a] > (storage_map_c[var_a] + (((0 + storage_map_c[var_a]) * storage_map_c[var_a] / totalShares) - storage_map_c[var_a])), "PaymentSplitter: account is not due payment");
        require(0x20 > ret0.length);
        require(((var_i + 0x20) > 0xffffffffffffffff) | ((var_i + 0x20) < var_i));
        uint256 var_i = var_i + 0x20;
        require(((var_i + 0x20) - var_i) < 0x20);
    }
    
    /// @custom:selector    0x8b83209b
    /// @custom:signature   payee(uint256 arg0) public view returns (address)
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function payee(uint256 arg0) public view returns (address) {
        require(msg.value);
        require((0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc + msg.data.length) < 0x20);
        require(!arg0 < store_d);
        return address(store_e);
    }
    
    /// @custom:selector    0x406072a9
    /// @custom:signature   released(address arg0, address arg1) public view returns (uint256)
    /// @param              arg0 ["address", "uint160", "bytes20", "int160"]
    /// @param              arg1 ["address", "uint160", "bytes20", "int160"]
    function released(address arg0, address arg1) public view returns (uint256) {
        require(msg.value);
        require((0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc + msg.data.length) < 0x40);
        require(arg0 - (address(arg0)));
        require(arg1 - (address(arg1)));
        var_a = address(arg1);
        return storage_map_c[var_a];
    }
    
    /// @custom:selector    0xce7c2ac2
    /// @custom:signature   shares(address arg0) public view returns (uint256)
    /// @param              arg0 ["address", "uint160", "bytes20", "int160"]
    function shares(address arg0) public view returns (uint256) {
        require(msg.value);
        require((0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc + msg.data.length) < 0x20);
        require(arg0 - (address(arg0)));
        address var_a = address(arg0);
        return storage_map_c[var_a];
    }
}

ABI

[
  {
    "type": "function",
    "name": "payee",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "releasable",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      },
      {
        "name": "arg1",
        "type": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "release",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      },
      {
        "name": "arg1",
        "type": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "released",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      },
      {
        "name": "arg1",
        "type": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "shares",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "totalReleased",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "totalShares",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  }
]

UNKNOWN SELECTORS (0)

(none -- all recognized)
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)