0x7a6bbe7fdd793cc9ab7e0fc33605fcd2d19371e8

deployer: unknown relevance score: 0 status: partially_identified bytecode: 14282 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 constant proposalMaxOperations = 10;
    uint256 public constant MIN_PROPOSAL_THRESHOLD = 1000000000000000000000;
    uint256 public constant BALLOT_TYPEHASH = 9502247353839574495332276951844984684583132597607571786073323397282563895951;
    uint256 public constant MAX_PROPOSAL_THRESHOLD = 15000000000000000000000;
    uint256 public constant MAX_VOTING_DELAY = 6600;
    string public constant unresolved_06fdde03 = "RAI Governor";
    uint256 public constant MIN_VOTING_PERIOD = 6600;
    uint256 public constant MIN_QUORUM_VOTES = 10000000000000000000000;
    uint256 public constant MAX_VOTING_PERIOD = 46500;
    uint256 public constant DOMAIN_TYPEHASH = 63630494520926674092677056046569304749177344945028501797992170511073678501990;
    uint256 public constant MIN_VOTING_DELAY = 1;
    uint256 public constant MAX_QUORUM_VOTES = 100000000000000000000000;
    
    mapping(bytes32 => bytes32) storage_map_ao;
    uint256 public votingDelay;
    mapping(bytes32 => bytes32) storage_map_q;
    mapping(bytes32 => bytes32) storage_map_al;
    mapping(bytes32 => bytes32) storage_map_s;
    mapping(bytes32 => bytes32) storage_map_ak;
    mapping(bytes32 => bytes32) storage_map_af;
    mapping(bytes32 => bytes32) storage_map_am;
    mapping(bytes32 => bytes32) storage_map_ac;
    mapping(bytes32 => bytes32) storage_map_j;
    address public admin;
    address public pendingAdmin;
    mapping(bytes32 => bytes32) storage_map_i;
    address public timelock;
    mapping(bytes32 => bytes32) storage_map_an;
    uint256 public votingPeriod;
    uint256 public proposalCount;
    mapping(bytes32 => bytes32) storage_map_x;
    mapping(bytes32 => bytes32) storage_map_n;
    mapping(bytes32 => bytes32) storage_map_ae;
    mapping(bytes32 => bytes32) storage_map_o;
    uint256 public quorumVotes;
    mapping(bytes32 => bytes32) storage_map_z;
    mapping(bytes32 => bytes32) storage_map_v;
    mapping(bytes32 => bytes32) storage_map_ah;
    address public governanceToken;
    mapping(bytes32 => bytes32) storage_map_ab;
    mapping(bytes32 => bytes32) storage_map_h;
    uint256 public proposalThreshold;
    mapping(bytes32 => bytes32) storage_map_ad;
    mapping(bytes32 => bytes32) storage_map_t;
    mapping(bytes32 => bytes32) storage_map_aa;
    mapping(bytes32 => bytes32) storage_map_ai;
    mapping(bytes32 => bytes32) storage_map_y;
    mapping(bytes32 => bytes32) storage_map_p;
    mapping(bytes32 => bytes32) storage_map_m;
    mapping(bytes32 => bytes32) storage_map_ag;
    mapping(bytes32 => bytes32) storage_map_u;
    mapping(bytes32 => bytes32) storage_map_l;
    mapping(bytes32 => bytes32) storage_map_aj;
    mapping(bytes32 => bytes32) storage_map_c;
    
    event NewPendingAdmin(address, address);
    event QuorumVotesSet(uint256, uint256);
    event VoteCast(address, uint256, uint8, uint256, string);
    event ProposalCanceled(uint256);
    event VotingPeriodSet(uint256, uint256);
    event NewAdmin(address, address);
    event ProposalExecuted(uint256);
    event ProposalQueued(uint256, uint256);
    event VotingDelaySet(uint256, uint256);
    event NewTimelock(address, address);
    event ProposalThresholdSet(uint256, uint256);
    
    /// @custom:selector    0xda95691a
    /// @custom:signature   Unresolved_da95691a(uint256 arg0, address arg1) public pure
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    /// @param              arg1 ["address", "uint160", "bytes20", "int160"]
    function Unresolved_da95691a(uint256 arg0, address arg1) public pure {
        require(!arg0 > 0xffffffffffffffff);
        require(!(arg0) > 0xffffffffffffffff);
        require(!((var_a + ((0x20 * (arg0)) + 0x20)) < var_a) | ((var_a + ((0x20 * (arg0)) + 0x20)) > 0xffffffffffffffff));
        require(!0 < (arg0));
        require((0x20 + (arg0)) == (address(0x20 + (arg0))));
        require(!arg1 > 0xffffffffffffffff);
    }
    
    /// @custom:selector    0xe9c714f2
    /// @custom:signature   _acceptAdmin() public
    function _acceptAdmin() public {
        require(!(msg.sender == (address(pendingAdmin))), "GovernorBravo:_acceptAdmin: pending admin only");
        require(msg.sender == (address(pendingAdmin)), "GovernorBravo:_acceptAdmin: pending admin only");
        admin = (address(pendingAdmin)) | (uint96(admin));
        pendingAdmin = uint96(pendingAdmin);
        emit NewAdmin(address(admin), address(pendingAdmin | (uint96(admin))));
        emit NewPendingAdmin(address(pendingAdmin), address(pendingAdmin));
        require(msg.sender, "GovernorBravo:_acceptAdmin: pending admin only");
        admin = (address(pendingAdmin)) | (uint96(admin));
        pendingAdmin = uint96(pendingAdmin);
        emit NewAdmin(address(admin), address(pendingAdmin | (uint96(admin))));
        emit NewPendingAdmin(address(pendingAdmin), address(pendingAdmin));
    }
    
    /// @custom:selector    0x17977c61
    /// @custom:signature   latestProposalIds(address arg0) public view returns (uint256)
    /// @param              arg0 ["address", "uint160", "bytes20", "int160"]
    function latestProposalIds(address arg0) public view returns (uint256) {
        require(arg0 == (address(arg0)));
        address var_b = arg0;
        return storage_map_c[var_b];
    }
    
    /// @custom:selector    0x86d37e8b
    /// @custom:signature   _setQuorumVotes(uint256 arg0) public
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function _setQuorumVotes(uint256 arg0) public {
        require(msg.sender == (address(admin)), "GovernorBravo::_setProposalThreshold: admin only");
        require(!(!arg0 < 0x021e19e0c9bab2400000), "GovernorBravo::initialize: invalid vote quorum");
        require(!(arg0 > 0x152d02c7e14af6800000), "GovernorBravo::initialize: invalid vote quorum");
        emit QuorumVotesSet(quorumVotes, arg0);
        quorumVotes = arg0;
        require(!(arg0 < 0x021e19e0c9bab2400000), "GovernorBravo::initialize: invalid vote quorum");
        emit QuorumVotesSet(quorumVotes, arg0);
        quorumVotes = arg0;
    }
    
    /// @custom:selector    0x56781388
    /// @custom:signature   castVote(uint256 arg0, uint8 arg1) public
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    /// @param              arg1 ["bool", "uint8", "bytes1", "int8"]
    function castVote(uint256 arg0, uint8 arg1) public {
        require(arg1 == (bytes1(arg1)));
        require(!(proposalCount < arg0), "GovernorBravo::state: invalid proposal id");
        uint256 var_f = arg0;
        require(!(bytes1(storage_map_h[var_f])), "GovernorBravo::castVoteInternal: invalid vote type");
        require(!(0x02 > 0x07), "GovernorBravo::castVoteInternal: invalid vote type");
        require(0x02 == 0x01, "GovernorBravo::castVoteInternal: invalid vote type");
        require(!(bytes1(arg1) > 0x02), "GovernorBravo::castVoteInternal: invalid vote type");
        var_f = address(msg.sender);
        require(!(bytes1(storage_map_i[var_f])), "GovernorBravo::castVoteInternal: voter already voted");
        address var_b = address(msg.sender);
        require(address(governanceToken).code.length);
        (bool success, bytes memory ret0) = address(governanceToken).Unresolved_782d6fe1(var_b); // staticcall
        uint256 var_h = var_h + (uint248(ret0.length + 0x1f));
        require(!(((var_h + ret0.length) - var_h) < 0x20), "addition overflow");
        require(bytes1(arg1), "addition overflow");
        require(!(0x01 == (bytes1(arg1))), "addition overflow");
        require(!(uint96(var_h.length) + (storage_map_l[var_f]) < (storage_map_l[var_f])), "addition overflow");
        storage_map_m[var_f] = (uint96(var_h.length)) + (storage_map_l[var_f]);
        storage_map_i[var_f] = (uint96(var_h.length) * 0x010000) | (address((bytes1(arg1) * 0x0100) | (uint248(uint248(storage_map_i[var_f]) | 0x01))));
        emit VoteCast(msg.sender, arg0, bytes1(arg1), uint96(var_h.length), 0x80, 0);
        require(!0x02 == (bytes1(arg1)));
        storage_map_i[var_f] = (uint96(var_h.length) * 0x010000) | (address((bytes1(arg1) * 0x0100) | (uint248(uint248(storage_map_i[var_f]) | 0x01))));
        emit VoteCast(msg.sender, arg0, bytes1(arg1), uint96(var_h.length), 0x80, 0);
        if (block.number > (storage_map_n[var_f])) {
            if (block.number > (storage_map_o[var_f])) {
                require(block.number > (storage_map_n[var_f]));
                require(block.number > (storage_map_o[var_f]));
                require(!(storage_map_l[var_f]) > (storage_map_p[var_f]));
                require(!(storage_map_l[var_f]) < quorumVotes);
            }
            require(storage_map_q[var_f]);
        }
    }
    
    /// @custom:selector    0x0ea2d98c
    /// @custom:signature   _setVotingPeriod(uint256 arg0) public
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function _setVotingPeriod(uint256 arg0) public {
        require(msg.sender == (address(admin)), "GovernorBravo::_setVotingPeriod: admin only");
        require(!(!arg0 < 0x19c8), "GovernorBravo::_setVotingPeriod: invalid voting period");
        require(!(arg0 > 0xb5a4), "GovernorBravo::_setVotingPeriod: invalid voting period");
        emit VotingPeriodSet(votingPeriod, arg0);
        votingPeriod = arg0;
        require(!(arg0 < 0x19c8), "GovernorBravo::_setVotingPeriod: invalid voting period");
        emit VotingPeriodSet(votingPeriod, arg0);
        votingPeriod = arg0;
    }
    
    /// @custom:selector    0x3e4f49e6
    /// @custom:signature   state(uint256 arg0) public view returns (uint256)
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function state(uint256 arg0) public view returns (uint256) {
        require(!(proposalCount < arg0), "GovernorBravo::state: invalid proposal id");
        uint256 var_f = arg0;
        if (!storage_map_h[var_f]) {
            if (0x02 < 0x08) {
                return 0x02;
                require(!bytes1(storage_map_h[var_f]));
                require(0x02 < 0x08);
                require(block.number > (storage_map_n[var_f]));
                require(block.number > (storage_map_o[var_f]));
                require(!(storage_map_l[var_f]) > (storage_map_p[var_f]));
                require(!(storage_map_l[var_f]) < quorumVotes);
            }
            require(storage_map_q[var_f]);
        }
    }
    
    /// @custom:selector    0xddf0b009
    /// @custom:signature   queue(uint256 arg0) public
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function queue(uint256 arg0) public {
        require(!(proposalCount < arg0), "GovernorBravo::state: invalid proposal id");
        uint256 var_f = arg0;
        require(!bytes1(storage_map_h[var_f]));
        require(!0x02 > 0x07);
        require(0x02 == 0x04);
        var_f = arg0;
        require(address(timelock).code.length);
        (bool success, bytes memory ret0) = address(timelock).delay(); // staticcall
        uint256 var_h = var_h + (uint248(ret0.length + 0x1f));
        require(!(((var_h + ret0.length) - var_h) < 0x20), "addition overflow");
        require(!((var_h.length + block.timestamp) < block.timestamp), "addition overflow");
        require(!0 < (storage_map_s[var_f]));
        require(0 < (storage_map_t[var_f]));
        var_f = 0x03 + keccak256(var_f);
        require(0 < (storage_map_u[var_f]));
        var_f = keccak256(var_f) + 0x06;
        uint256 var_c = address(storage_map_v[var_f]);
        require(bytes1(storage_map_v[var_f]) == 0);
        require(bytes1(storage_map_v[var_f]) == 0x01);
        var_f = keccak256(var_f) + 0;
        require(!0 < (storage_map_v[var_f] / 0x02));
        require(address(timelock).code.length);
        (bool success, bytes memory ret0) = address(timelock).{ value: 0 ether }Unresolved_7a0c53b2(var_c); // call
        require(address(timelock).code.length);
        storage_map_q[var_f] = var_h.length + block.timestamp;
        emit ProposalQueued(arg0, var_h.length + block.timestamp);
        if (block.number > (storage_map_n[var_f])) {
            if (block.number > (storage_map_o[var_f])) {
                require(block.number > (storage_map_n[var_f]));
                require(block.number > (storage_map_o[var_f]));
                require(!(storage_map_l[var_f]) > (storage_map_p[var_f]));
                require(!(storage_map_l[var_f]) < quorumVotes);
            }
            require(storage_map_q[var_f]);
        }
    }
    
    /// @custom:selector    0x1dfb1b5a
    /// @custom:signature   _setVotingDelay(uint256 arg0) public
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function _setVotingDelay(uint256 arg0) public {
        require(msg.sender == (address(admin)), "GovernorBravo::_setVotingDelay: admin only");
        require(!(!arg0 < 0x01), "GovernorBravo::_setVotingDelay: invalid voting delay");
        require(!(arg0 > 0x19c8), "GovernorBravo::_setVotingDelay: invalid voting delay");
        emit VotingDelaySet(votingDelay, arg0);
        votingDelay = arg0;
        require(!(arg0 < 0x01), "GovernorBravo::_setVotingDelay: invalid voting delay");
        emit VotingDelaySet(votingDelay, arg0);
        votingDelay = arg0;
    }
    
    /// @custom:selector    0x17ba1b8b
    /// @custom:signature   _setProposalThreshold(uint256 arg0) public
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function _setProposalThreshold(uint256 arg0) public {
        require(msg.sender == (address(admin)), "GovernorBravo::_setProposalThreshold: admin only");
        require(!(!arg0 < 0x3635c9adc5dea00000), "GovernorBravo::_setProposalThreshold: invalid proposal threshold");
        require(!(arg0 > 0x032d26d12e980b600000), "GovernorBravo::_setProposalThreshold: invalid proposal threshold");
        emit ProposalThresholdSet(proposalThreshold, arg0);
        proposalThreshold = arg0;
        require(!(arg0 < 0x3635c9adc5dea00000), "GovernorBravo::_setProposalThreshold: invalid proposal threshold");
        emit ProposalThresholdSet(proposalThreshold, arg0);
        proposalThreshold = arg0;
    }
    
    /// @custom:selector    0x013cf08b
    /// @custom:signature   proposals(uint256 arg0) public view returns (bool)
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function proposals(uint256 arg0) public view returns (bool) {
        uint256 var_b = arg0;
        return abi.encodePacked(storage_map_c[var_b], address(storage_map_x[var_b]), storage_map_y[var_b], storage_map_z[var_b], storage_map_aa[var_b], storage_map_ab[var_b], storage_map_ac[var_b], storage_map_ad[var_b], !(!bytes1(storage_map_ae[var_b])), (bytes1(storage_map_ae[var_b] / 0x0100)));
    }
    
    /// @custom:selector    0x328dd982
    /// @custom:signature   getActions(uint256 arg0) public view
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function getActions(uint256 arg0) public view {
        uint256 var_a = arg0;
        uint256 var_c = var_c + (0x20 + (0x20 * (storage_map_af[var_a])));
        if (!storage_map_af[var_a]) {
            var_a = 0x03 + keccak256(var_a);
            if ((0x20 + var_c) + (0x20 * (storage_map_af[var_a])) > (0x20 + (0x20 + var_c))) {
                if (!storage_map_ah[var_a]) {
                    var_a = 0x04 + keccak256(var_a);
                    require(!storage_map_af[var_a]);
                    var_c = var_c + (0x20 + (0x20 * (storage_map_ai[var_a])));
                    require((0x20 + var_c) + (0x20 * (storage_map_af[var_a])) > (0x20 + (0x20 + var_c)));
                    var_a = 0x05 + keccak256(var_a);
                    var_c = 0x20 + (var_c + (0x20 * (((storage_map_aj[var_a] & (((!bytes1(storage_map_aj[var_a])) * 0x0100) + 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) / 0x02) + 0x1f) / 0x20)));
                    require(!storage_map_ah[var_a]);
                    require((0x20 + var_c) + (0x20 * (storage_map_ah[var_a])) > (0x20 + (0x20 + var_c)));
                    var_a = 0 + keccak256(var_a);
                    require(!0 < (storage_map_ai[var_a]));
                }
                require(!(storage_map_aj[var_a] & (((!bytes1(storage_map_aj[var_a])) * 0x0100) + 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)) / 0x02);
                var_a = 0x06 + keccak256(var_a);
                var_c = 0x20 + (var_c + (0x20 * (((storage_map_aj[var_a] & (((!bytes1(storage_map_aj[var_a])) * 0x0100) + 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) / 0x02) + 0x1f) / 0x20)));
                require(0x1f < (storage_map_aj[var_a] & (((!bytes1(storage_map_aj[var_a])) * 0x0100) + 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) / 0x02));
                require(!0 < (storage_map_ak[var_a]));
                var_a = 0 + keccak256(var_a);
                require(!(storage_map_aj[var_a] & (((!bytes1(storage_map_aj[var_a])) * 0x0100) + 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)) / 0x02);
            }
            require(0x1f < (storage_map_aj[var_a] & (((!bytes1(storage_map_aj[var_a])) * 0x0100) + 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) / 0x02));
            require(!0 < (var_o));
        }
    }
    
    /// @custom:selector    0xfe0d94c1
    /// @custom:signature   execute(uint256 arg0) public payable
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function execute(uint256 arg0) public payable {
        require(!(proposalCount < arg0), "GovernorBravo::state: invalid proposal id");
        uint256 var_f = arg0;
        require(!bytes1(storage_map_h[var_f]));
        require(!0x02 > 0x07);
        require(0x02 == 0x05);
        var_f = arg0;
        storage_map_h[var_f] = 0x0100 | (uint248(storage_map_h[var_f]));
        require(!0 < (storage_map_s[var_f]));
        require(0 < (storage_map_t[var_f]));
        var_f = 0x03 + keccak256(var_f);
        require(0 < (storage_map_u[var_f]));
        var_f = keccak256(var_f) + 0x06;
        uint256 var_b = address(storage_map_v[var_f]);
        require(bytes1(storage_map_v[var_f]) == 0);
        require(bytes1(storage_map_v[var_f]) == 0x01);
        var_f = keccak256(var_f) + 0;
        require(!0 < (storage_map_v[var_f] / 0x02));
        require(address(timelock).code.length);
        (bool success, bytes memory ret0) = address(timelock).Unresolved_a48659cc(var_b); // staticcall
        uint256 var_i = var_i + (uint248(ret0.length + 0x1f));
        require(!((var_i + ret0.length) - var_i) < 0x20);
        var_c = var_i.length;
        require(address(timelock).code.length);
        (bool success, bytes memory ret0) = address(timelock).Unresolved_35a27e05(var_c); // staticcall
        var_i = var_i + (uint248(ret0.length + 0x1f));
        require(!((var_i + ret0.length) - var_i) < 0x20);
        require(var_i.length == var_i.length);
        require(!var_i.length);
        require(0 < (storage_map_u[var_f]));
        var_f = keccak256(var_f) + 0x06;
        require(bytes1(storage_map_v[var_f]) == 0);
        require(bytes1(storage_map_v[var_f]) == 0x01);
        require(address(timelock).code.length);
        (bool success, bytes memory ret0) = address(timelock).transfer(0);
        require(address(timelock).code.length);
        require(address(timelock).code.length);
        emit ProposalExecuted(arg0);
        if (block.number > (storage_map_n[var_f])) {
            if (block.number > (storage_map_o[var_f])) {
                require(block.number > (storage_map_n[var_f]));
                require(block.number > (storage_map_o[var_f]));
                require(!(storage_map_l[var_f]) > (storage_map_p[var_f]));
                require(!(storage_map_l[var_f]) < quorumVotes);
            }
            require(storage_map_q[var_f]);
        }
    }
    
    /// @custom:selector    0x87bae18f
    /// @custom:signature   _setTimelock(address arg0) public
    /// @param              arg0 ["address", "uint160", "bytes20", "int160"]
    function _setTimelock(address arg0) public {
        require(arg0 == (address(arg0)));
        require(msg.sender == (address(admin)), "GovernorBravo::_setProposalThreshold: admin only");
        require(address(timelock / 0x01).code.length);
        (bool success, bytes memory ret0) = address(timelock / 0x01).proxy(); // staticcall
        uint256 var_f = var_f + (uint248(ret0.length + 0x1f));
        require(!((var_f + ret0.length) - var_f) < 0x20);
        require(var_f.length == (address(var_f.length)));
        require(!(address(var_f.length)) == (address(admin)));
        emit NewTimelock(address(timelock), address(arg0));
        timelock = (address(arg0)) | (uint96(timelock));
        require(address(arg0).code.length);
        (bool success, bytes memory ret0) = address(arg0).proxy(); // staticcall
    }
    
    /// @custom:selector    0x3bccf4fd
    /// @custom:signature   Unresolved_3bccf4fd(uint256 arg0, bool arg1) public pure
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    /// @param              arg1 ["bool", "uint8", "bytes1", "int8"]
    function Unresolved_3bccf4fd(uint256 arg0, bool arg1) public pure {
        require(arg1 == (bytes1(arg1)));
    }
    
    /// @custom:selector    0xe23a9a52
    /// @custom:signature   getReceipt(uint256 arg0, address arg1) public view returns (bool)
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    /// @param              arg1 ["address", "uint160", "bytes20", "int160"]
    function getReceipt(uint256 arg0, address arg1) public view returns (bool) {
        require(arg1 == (address(arg1)));
        var_e = address(arg1);
        var_a = var_a + 0x60;
        return abi.encodePacked(var_a.length, bytes1(var_o), uint96(var_p));
    }
    
    /// @custom:selector    0x7b3c71d3
    /// @custom:signature   Unresolved_7b3c71d3(uint256 arg0, bool arg1, uint256 arg2) public
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    /// @param              arg1 ["bool", "uint8", "bytes1", "int8"]
    /// @param              arg2 ["uint256", "bytes32", "int256"]
    function Unresolved_7b3c71d3(uint256 arg0, bool arg1, uint256 arg2) public {
        require(arg1 == (bytes1(arg1)));
        require(!arg2 > 0xffffffffffffffff);
        require(!(arg2) > 0xffffffffffffffff);
        require(!(proposalCount < arg0), "GovernorBravo::state: invalid proposal id");
        uint256 var_f = arg0;
        require(!(bytes1(storage_map_h[var_f])), "GovernorBravo::castVoteInternal: invalid vote type");
        require(!(0x02 > 0x07), "GovernorBravo::castVoteInternal: invalid vote type");
        require(0x02 == 0x01, "GovernorBravo::castVoteInternal: invalid vote type");
        require(!(bytes1(arg1) > 0x02), "GovernorBravo::castVoteInternal: invalid vote type");
        var_f = address(msg.sender);
        require(!(bytes1(storage_map_i[var_f])), "GovernorBravo::castVoteInternal: voter already voted");
        address var_b = address(msg.sender);
        require(address(governanceToken).code.length);
        (bool success, bytes memory ret0) = address(governanceToken).Unresolved_782d6fe1(var_b); // staticcall
        uint256 var_h = var_h + (uint248(ret0.length + 0x1f));
        require(!(((var_h + ret0.length) - var_h) < 0x20), "addition overflow");
        require(bytes1(arg1), "addition overflow");
        require(!(0x01 == (bytes1(arg1))), "addition overflow");
        require(!(uint96(var_h.length) + (storage_map_l[var_f]) < (storage_map_l[var_f])), "addition overflow");
        storage_map_m[var_f] = (uint96(var_h.length)) + (storage_map_l[var_f]);
        storage_map_i[var_f] = (uint96(var_h.length) * 0x010000) | (address((bytes1(arg1) * 0x0100) | (uint248(uint248(storage_map_i[var_f]) | 0x01))));
        emit VoteCast(msg.sender, arg0, bytes1(arg1), uint96(var_h.length), 0x80, (arg2));
        require(!0x02 == (bytes1(arg1)));
        storage_map_i[var_f] = (uint96(var_h.length) * 0x010000) | (address((bytes1(arg1) * 0x0100) | (uint248(uint248(storage_map_i[var_f]) | 0x01))));
        emit VoteCast(msg.sender, arg0, bytes1(arg1), uint96(var_h.length), 0x80, (arg2));
        if (block.number > (storage_map_n[var_f])) {
            if (block.number > (storage_map_o[var_f])) {
                require(block.number > (storage_map_n[var_f]));
                require(block.number > (storage_map_o[var_f]));
                require(!(storage_map_l[var_f]) > (storage_map_p[var_f]));
                require(!(storage_map_l[var_f]) < quorumVotes);
            }
            require(storage_map_q[var_f]);
        }
    }
    
    /// @custom:selector    0xb71d1a0c
    /// @custom:signature   _setPendingAdmin(address arg0) public
    /// @param              arg0 ["address", "uint160", "bytes20", "int160"]
    function _setPendingAdmin(address arg0) public {
        require(arg0 == (address(arg0)));
        require(msg.sender == (address(admin)), "GovernorBravo:_setPendingAdmin: admin only");
        pendingAdmin = (uint96(pendingAdmin)) | (address(arg0));
        emit NewPendingAdmin(address(pendingAdmin), address(arg0));
    }
    
    /// @custom:selector    0x40e58ee5
    /// @custom:signature   cancel(uint256 arg0) public
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function cancel(uint256 arg0) public {
        require(!(proposalCount < arg0), "GovernorBravo::state: invalid proposal id");
        uint256 var_f = arg0;
        require(!(bytes1(storage_map_h[var_f])), "GovernorBravo::cancel: cannot cancel executed proposal");
        require(!(0x02 > 0x07), "GovernorBravo::cancel: cannot cancel executed proposal");
        require(!(0x02 == 0x07), "GovernorBravo::cancel: cannot cancel executed proposal");
        var_f = arg0;
        require(msg.sender == (address(storage_map_an[var_f])), "subtraction underflow");
        require(!(0x01 > block.number), "subtraction underflow");
        uint256 var_b = address(storage_map_ao[var_f]);
        require(address(governanceToken).code.length);
        (bool success, bytes memory ret0) = address(governanceToken).Unresolved_782d6fe1(var_b); // staticcall
        uint256 var_h = var_h + (uint248(ret0.length + 0x1f));
        require(!(((var_h + ret0.length) - var_h) < 0x20), "GovernorBravo::state: invalid proposal id");
        require(var_h.length < proposalThreshold, "GovernorBravo::state: invalid proposal id");
        storage_map_h[var_f] = 0x01 | (uint248(storage_map_h[var_f]));
        require(!(proposalCount < arg0), "GovernorBravo::state: invalid proposal id");
        var_f = arg0;
        require(!bytes1(storage_map_h[var_f]));
        require(block.number > (storage_map_n[var_f]));
        require(!0 > 0x07);
        require(!0 == 0x05);
        require(!0 < (storage_map_s[var_f]));
        require(0 < (storage_map_t[var_f]));
        var_f = 0x03 + keccak256(var_f);
        require(0 < (storage_map_u[var_f]));
        var_f = keccak256(var_f) + 0x06;
        var_c = address(storage_map_v[var_f]);
        require(bytes1(storage_map_v[var_f]) == 0);
        require(bytes1(storage_map_v[var_f]) == 0x01);
        var_f = keccak256(var_f) + 0;
        require(!0 < (storage_map_v[var_f] / 0x02));
        require(address(timelock).code.length);
        (bool success, bytes memory ret0) = address(timelock).{ value: 0 ether }Unresolved_5c8bb90a(var_c); // call
        require(address(timelock).code.length);
        emit ProposalCanceled(arg0);
        emit ProposalCanceled(arg0);
        if (block.number > (storage_map_o[var_f])) {
            if (!(storage_map_l[var_f]) > (storage_map_p[var_f])) {
                require(block.number > (storage_map_o[var_f]), "GovernorBravo::cancel: proposer above threshold");
                require(!(storage_map_l[var_f] > (storage_map_p[var_f])), "GovernorBravo::cancel: proposer above threshold");
                require(!(storage_map_l[var_f] < quorumVotes), "GovernorBravo::cancel: proposer above threshold");
            }
            require(storage_map_q[var_f], "GovernorBravo::cancel: proposer above threshold");
        }
        require(msg.sender == (address(storage_map_an[var_f])), "GovernorBravo::cancel: proposer above threshold");
    }
}

ABI

[
  {
    "type": "function",
    "name": "BALLOT_TYPEHASH",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "DOMAIN_TYPEHASH",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "MAX_PROPOSAL_THRESHOLD",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "MAX_QUORUM_VOTES",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "MAX_VOTING_DELAY",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "MAX_VOTING_PERIOD",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "MIN_PROPOSAL_THRESHOLD",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "MIN_QUORUM_VOTES",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "MIN_VOTING_DELAY",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "MIN_VOTING_PERIOD",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "Unresolved_06fdde03",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "string"
      }
    ],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "Unresolved_3bccf4fd",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      },
      {
        "name": "arg1",
        "type": "bool"
      }
    ],
    "outputs": [],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "Unresolved_7b3c71d3",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      },
      {
        "name": "arg1",
        "type": "bool"
      },
      {
        "name": "arg2",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "Unresolved_da95691a",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      },
      {
        "name": "arg1",
        "type": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "_acceptAdmin",
    "inputs": [],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "_setPendingAdmin",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "_setProposalThreshold",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "_setQuorumVotes",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "_setTimelock",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "_setVotingDelay",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "_setVotingPeriod",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "admin",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "cancel",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "castVote",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      },
      {
        "name": "arg1",
        "type": "uint8"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "execute",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "getActions",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getReceipt",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      },
      {
        "name": "arg1",
        "type": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "governanceToken",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "latestProposalIds",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "pendingAdmin",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "proposalCount",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "proposalMaxOperations",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "proposalThreshold",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "proposals",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "queue",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "quorumVotes",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "state",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "timelock",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "votingDelay",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "votingPeriod",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "event",
    "name": "NewAdmin",
    "inputs": [
      {
        "name": "arg0",
        "type": "address",
        "indexed": false
      },
      {
        "name": "arg1",
        "type": "address",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "NewPendingAdmin",
    "inputs": [
      {
        "name": "arg0",
        "type": "address",
        "indexed": false
      },
      {
        "name": "arg1",
        "type": "address",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "NewTimelock",
    "inputs": [
      {
        "name": "arg0",
        "type": "address",
        "indexed": false
      },
      {
        "name": "arg1",
        "type": "address",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "ProposalCanceled",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "ProposalExecuted",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "ProposalQueued",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256",
        "indexed": false
      },
      {
        "name": "arg1",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "ProposalThresholdSet",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256",
        "indexed": false
      },
      {
        "name": "arg1",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "QuorumVotesSet",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256",
        "indexed": false
      },
      {
        "name": "arg1",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "VoteCast",
    "inputs": [
      {
        "name": "arg0",
        "type": "address",
        "indexed": false
      },
      {
        "name": "arg1",
        "type": "uint256",
        "indexed": false
      },
      {
        "name": "arg2",
        "type": "uint8",
        "indexed": false
      },
      {
        "name": "arg3",
        "type": "uint256",
        "indexed": false
      },
      {
        "name": "arg4",
        "type": "string",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "VotingDelaySet",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256",
        "indexed": false
      },
      {
        "name": "arg1",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "VotingPeriodSet",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256",
        "indexed": false
      },
      {
        "name": "arg1",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false
  }
]

UNKNOWN SELECTORS (3)

0x19591959unknown
0x0d48571funknown
0x0c2e8c6dunknown
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)