Contract 0xB1bfC2f6CF568bE05677607DA9ffb99b54E994d2

 
Txn Hash
Block
From
To
Value [Txn Fee]
0x86819fce2e20f8f20aad031d3bef3dc34b3ea8ebf8dd36f325df3e9f55bf04ac2211142021-08-20 7:29:5428 days 12 hrs ago0x904b5993fc92979eeedc19ccc58bed6b7216667c IN  Contract Creation0 ETH0.045862796505 ETH
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
GovernorAlpha

Compiler Version
v0.7.4+commit.3f05b770

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 7 : GovernorAlpha.sol
// SPDX-License-Identifier: GPL
//
// The 3-Clause BSD License
// Copyright 2020 Compound Labs, Inc.
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
pragma solidity 0.7.4;
pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol";

import { IMCB } from "./interfaces/IMCB.sol";
import { IComp } from "./interfaces/IComp.sol";
import { ITimelock } from "./interfaces/ITimelock.sol";

contract GovernorAlpha is Initializable {
    /// @notice The name of this contract
    string public constant name = "MCDEX DAO Governor";

    // 10,000,000;

    /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed
    function quorumVotes() public view returns (uint256) {
        return _getMCBTotalSupply() / 20;
    } // 5% of mcb (current totalSupply)

    /// @notice The number of votes required in order for a voter to become a proposer
    function proposalThreshold() public view returns (uint256) {
        return _getMCBTotalSupply() / 100;
    } // 100,000 = 1% of mcb (current totalSupply)

    /// @notice The maximum number of actions that can be included in a proposal
    function proposalMaxOperations() public pure returns (uint256) {
        return 10;
    } // 10 actions

    /// @notice The delay before voting on a proposal may take place, once proposed
    function votingDelay() public pure virtual returns (uint256) {
        return 1;
    } // 1 block

    /// @notice The duration of voting on a proposal, in blocks
    function votingPeriod() public pure virtual returns (uint256) {
        return 17280;
    } // ~3 days in blocks (assuming 15s blocks)

    /// @notice The address of the Compound Protocol Timelock
    ITimelock public timelock;

    /// @notice The address of the Compound governance token
    IComp public comp;

    /// @notice The address of L2 MCB Token.
    IMCB public mcbToken;

    /// @notice The address of the Governor Guardian
    address public guardian;

    struct Proposal {
        // Unique id for looking up a proposal
        uint256 id;
        // Creator of the proposal
        address proposer;
        // The timestamp that the proposal will be available for execution, set once the vote succeeds
        uint256 eta;
        // the ordered list of target addresses for calls to be made
        address[] targets;
        // The ordered list of values (i.e. msg.value) to be passed to the calls to be made
        uint256[] values;
        // The ordered list of function signatures to be called
        string[] signatures;
        // The ordered list of calldata to be passed to each call
        bytes[] calldatas;
        // The block at which voting begins: holders must delegate their votes prior to this block
        uint256 startBlock;
        // The block at which voting ends: votes must be cast prior to this block
        uint256 endBlock;
        // Current number of votes in favor of this proposal
        uint256 forVotes;
        // Current number of votes in opposition to this proposal
        uint256 againstVotes;
        // Quorum number of votes when proposal created
        uint256 quorumVotes;
        // Flag marking whether the proposal has been canceled
        bool canceled;
        // Flag marking whether the proposal has been executed
        bool executed;
        // Receipts of ballots for the entire set of voters
        mapping(address => Receipt) receipts;
    }

    // Ballot receipt record for a voter
    struct Receipt {
        // Whether or not a vote has been cast
        bool hasVoted;
        // Whether or not the voter supports the proposal
        bool support;
        // The number of votes the voter had, which were cast
        uint96 votes;
    }

    /// @notice Possible states that a proposal may be in
    enum ProposalState {
        Pending,
        Active,
        Canceled,
        Defeated,
        Succeeded,
        Queued,
        Expired,
        Executed
    }

    /// @notice The official record of all proposals ever proposed
    mapping(uint256 => Proposal) public proposals;

    /// @notice The latest proposal for each proposer
    mapping(address => uint256) public latestProposalIds;

    /// @notice The EIP-712 typehash for the contract's domain
    bytes32 public constant DOMAIN_TYPEHASH =
        keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)");

    /// @notice The EIP-712 typehash for the ballot struct used by the contract
    bytes32 public constant BALLOT_TYPEHASH = keccak256("Ballot(uint256 proposalId,bool support)");

    /// @notice The initial id of proposal
    uint256 public initialProposalId;

    /// @notice The total number of proposals
    uint256 public proposalCount;

    /// @notice An event emitted when a new proposal is created
    event ProposalCreated(
        uint256 id,
        address proposer,
        address[] targets,
        uint256[] values,
        string[] signatures,
        bytes[] calldatas,
        uint256 startBlock,
        uint256 endBlock,
        uint256 quorumVotes,
        string description
    );

    /// @notice An event emitted when a vote has been cast on a proposal
    event VoteCast(address voter, uint256 proposalId, bool support, uint256 votes);

    /// @notice An event emitted when a proposal has been canceled
    event ProposalCanceled(uint256 id);

    /// @notice An event emitted when a proposal has been queued in the Timelock
    event ProposalQueued(uint256 id, uint256 eta);

    /// @notice An event emitted when a proposal has been executed in the Timelock
    event ProposalExecuted(uint256 id);

    function initialize(
        address mcbToken_,
        address timelock_,
        address comp_,
        address guardian_,
        uint256 initialProposalId_
    ) external initializer {
        mcbToken = IMCB(mcbToken_);
        timelock = ITimelock(timelock_);
        comp = IComp(comp_);
        guardian = guardian_;
        initialProposalId = initialProposalId_;
    }

    function propose(
        address[] memory targets,
        uint256[] memory values,
        string[] memory signatures,
        bytes[] memory calldatas,
        string memory description
    ) public returns (uint256) {
        require(
            comp.getPriorVotes(msg.sender, _sub256(_getBlockNumber(), 1)) > proposalThreshold(),
            "GovernorAlpha::propose: proposer votes below proposal threshold"
        );
        require(
            targets.length == values.length &&
                targets.length == signatures.length &&
                targets.length == calldatas.length,
            "GovernorAlpha::propose: proposal function information arity mismatch"
        );
        require(targets.length != 0, "GovernorAlpha::propose: must provide actions");
        require(
            targets.length <= proposalMaxOperations(),
            "GovernorAlpha::propose: too many actions"
        );

        uint256 latestProposalId = latestProposalIds[msg.sender];
        if (latestProposalId != 0) {
            ProposalState proposersLatestProposalState = state(latestProposalId);
            require(
                proposersLatestProposalState != ProposalState.Active,
                "GovernorAlpha::propose: one live proposal per proposer, found an already active proposal"
            );
            require(
                proposersLatestProposalState != ProposalState.Pending,
                "GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal"
            );
        }

        uint256 startBlock = _add256(_getBlockNumber(), votingDelay());
        uint256 endBlock = _add256(startBlock, votingPeriod());

        uint256 proposalId = proposalCount + initialProposalId;
        proposalCount++;

        proposals[proposalId].id = proposalId;
        proposals[proposalId].proposer = msg.sender;
        proposals[proposalId].targets = targets;
        proposals[proposalId].values = values;
        proposals[proposalId].signatures = signatures;
        proposals[proposalId].calldatas = calldatas;
        proposals[proposalId].startBlock = startBlock;
        proposals[proposalId].endBlock = endBlock;
        proposals[proposalId].quorumVotes = quorumVotes();

        latestProposalIds[msg.sender] = proposalId;

        emit ProposalCreated(
            proposalId,
            msg.sender,
            targets,
            values,
            signatures,
            calldatas,
            startBlock,
            endBlock,
            proposals[proposalId].quorumVotes,
            description
        );
        return proposalId;
    }

    function queue(uint256 proposalId) public {
        require(
            state(proposalId) == ProposalState.Succeeded,
            "GovernorAlpha::queue: proposal can only be queued if it is succeeded"
        );
        Proposal storage proposal = proposals[proposalId];
        uint256 eta = _add256(_getBlockTimestamp(), timelock.delay());
        for (uint256 i = 0; i < proposal.targets.length; i++) {
            _queueOrRevert(
                proposal.targets[i],
                proposal.values[i],
                proposal.signatures[i],
                proposal.calldatas[i],
                eta
            );
        }
        proposal.eta = eta;
        emit ProposalQueued(proposalId, eta);
    }

    function _queueOrRevert(
        address target,
        uint256 value,
        string memory signature,
        bytes memory data,
        uint256 eta
    ) internal {
        require(
            !timelock.queuedTransactions(
                keccak256(abi.encode(target, value, signature, data, eta))
            ),
            "GovernorAlpha::_queueOrRevert: proposal action already queued at eta"
        );
        timelock.queueTransaction(target, value, signature, data, eta);
    }

    function execute(uint256 proposalId) public payable {
        require(
            state(proposalId) == ProposalState.Queued,
            "GovernorAlpha::execute: proposal can only be executed if it is queued"
        );
        Proposal storage proposal = proposals[proposalId];
        proposal.executed = true;
        for (uint256 i = 0; i < proposal.targets.length; i++) {
            timelock.executeTransaction{ value: proposal.values[i] }(
                proposal.targets[i],
                proposal.values[i],
                proposal.signatures[i],
                proposal.calldatas[i],
                proposal.eta
            );
        }
        emit ProposalExecuted(proposalId);
    }

    function cancel(uint256 proposalId) public {
        require(
            state(proposalId) != ProposalState.Executed,
            "GovernorAlpha::cancel: cannot cancel executed proposal"
        );

        Proposal storage proposal = proposals[proposalId];
        require(
            msg.sender == guardian ||
                comp.getPriorVotes(proposal.proposer, _sub256(_getBlockNumber(), 1)) <
                proposalThreshold(),
            "GovernorAlpha::cancel: proposer above threshold"
        );

        proposal.canceled = true;
        for (uint256 i = 0; i < proposal.targets.length; i++) {
            timelock.cancelTransaction(
                proposal.targets[i],
                proposal.values[i],
                proposal.signatures[i],
                proposal.calldatas[i],
                proposal.eta
            );
        }

        emit ProposalCanceled(proposalId);
    }

    function getActions(uint256 proposalId)
        public
        view
        returns (
            address[] memory targets,
            uint256[] memory values,
            string[] memory signatures,
            bytes[] memory calldatas
        )
    {
        Proposal storage p = proposals[proposalId];
        return (p.targets, p.values, p.signatures, p.calldatas);
    }

    function getReceipt(uint256 proposalId, address voter) public view returns (Receipt memory) {
        return proposals[proposalId].receipts[voter];
    }

    function state(uint256 proposalId) public view returns (ProposalState) {
        require(
            proposalId < proposalCount + initialProposalId && proposalId >= initialProposalId,
            "GovernorAlpha::state: invalid proposal id"
        );
        Proposal storage proposal = proposals[proposalId];
        if (proposal.canceled) {
            return ProposalState.Canceled;
        } else if (_getBlockNumber() <= proposal.startBlock) {
            return ProposalState.Pending;
        } else if (_getBlockNumber() <= proposal.endBlock) {
            return ProposalState.Active;
        } else if (
            proposal.forVotes <= proposal.againstVotes || proposal.forVotes < proposal.quorumVotes
        ) {
            return ProposalState.Defeated;
        } else if (proposal.eta == 0) {
            return ProposalState.Succeeded;
        } else if (proposal.executed) {
            return ProposalState.Executed;
        } else if (_getBlockTimestamp() >= _add256(proposal.eta, timelock.GRACE_PERIOD())) {
            return ProposalState.Expired;
        } else {
            return ProposalState.Queued;
        }
    }

    function castVote(uint256 proposalId, bool support) public {
        return _castVote(msg.sender, proposalId, support);
    }

    function castVoteBySig(
        uint256 proposalId,
        bool support,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public {
        bytes32 domainSeparator = keccak256(
            abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), _getChainId(), address(this))
        );
        bytes32 structHash = keccak256(abi.encode(BALLOT_TYPEHASH, proposalId, support));
        bytes32 digest = keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
        address signatory = ecrecover(digest, v, r, s);
        require(signatory != address(0), "GovernorAlpha::castVoteBySig: invalid signature");
        return _castVote(signatory, proposalId, support);
    }

    function _castVote(
        address voter,
        uint256 proposalId,
        bool support
    ) internal {
        require(
            state(proposalId) == ProposalState.Active,
            "GovernorAlpha::_castVote: voting is closed"
        );
        Proposal storage proposal = proposals[proposalId];
        Receipt storage receipt = proposal.receipts[voter];
        require(receipt.hasVoted == false, "GovernorAlpha::_castVote: voter already voted");
        uint96 votes = comp.getPriorVotes(voter, proposal.startBlock);

        if (support) {
            proposal.forVotes = _add256(proposal.forVotes, votes);
        } else {
            proposal.againstVotes = _add256(proposal.againstVotes, votes);
        }

        receipt.hasVoted = true;
        receipt.support = support;
        receipt.votes = votes;

        emit VoteCast(voter, proposalId, support, votes);
    }

    function __acceptAdmin() public {
        require(
            msg.sender == guardian,
            "GovernorAlpha::__acceptAdmin: sender must be gov guardian"
        );
        timelock.acceptAdmin();
    }

    function __transferGuardian(address newGuardian) public {
        require(
            msg.sender == guardian,
            "GovernorAlpha::__acceptAdmin: sender must be gov guardian"
        );
        guardian = newGuardian;
    }

    function __abdicate() public {
        require(msg.sender == guardian, "GovernorAlpha::__abdicate: sender must be gov guardian");
        guardian = address(0);
    }

    function __queueSetTimelockPendingAdmin(address newPendingAdmin, uint256 eta) public {
        require(
            msg.sender == guardian,
            "GovernorAlpha::__queueSetTimelockPendingAdmin: sender must be gov guardian"
        );
        timelock.queueTransaction(
            address(timelock),
            0,
            "setPendingAdmin(address)",
            abi.encode(newPendingAdmin),
            eta
        );
    }

    function __executeSetTimelockPendingAdmin(address newPendingAdmin, uint256 eta) public {
        require(
            msg.sender == guardian,
            "GovernorAlpha::__executeSetTimelockPendingAdmin: sender must be gov guardian"
        );
        timelock.executeTransaction(
            address(timelock),
            0,
            "setPendingAdmin(address)",
            abi.encode(newPendingAdmin),
            eta
        );
    }

    function _add256(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "addition overflow");
        return c;
    }

    function _sub256(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "subtraction underflow");
        return a - b;
    }

    function _getChainId() internal pure returns (uint256) {
        uint256 chainId;
        assembly {
            chainId := chainid()
        }
        return chainId;
    }

    function _getBlockNumber() internal view virtual returns (uint256) {
        return block.number;
    }

    function _getBlockTimestamp() internal view virtual returns (uint256) {
        return block.timestamp;
    }

    function _getMCBTotalSupply() internal view virtual returns (uint256) {
        return _add256(mcbToken.totalSupply(), mcbToken.tokenSupplyOnL1());
    }

    bytes32[50] private __gap;
}

File 2 of 7 : Initializable.sol
// SPDX-License-Identifier: MIT

// solhint-disable-next-line compiler-version
pragma solidity >=0.4.24 <0.8.0;

import "../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 */
abstract contract Initializable {

    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        require(_initializing || _isConstructor() || !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

    /// @dev Returns true if and only if the function is running in the constructor
    function _isConstructor() private view returns (bool) {
        return !AddressUpgradeable.isContract(address(this));
    }
}

File 3 of 7 : IMCB.sol
// SPDX-License-Identifier: GPL
pragma solidity 0.7.4;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IMCB is IERC20 {
    function name() external view returns (string memory);

    function symbol() external view returns (string memory);

    function decimals() external view returns (uint8);

    function tokenSupplyOnL1() external view returns (uint256);

    function mint(address account, uint256 amount) external;
}

File 4 of 7 : IComp.sol
// SPDX-License-Identifier: GPL
//
// The 3-Clause BSD License
// Copyright 2020 Compound Labs, Inc.
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
pragma solidity 0.7.4;

interface IComp {
    /**
     * @notice Determine the prior number of votes for an account as of a block number
     * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.
     * @param account The address of the account to check
     * @param blockNumber The block number to get the vote balance at
     * @return The number of votes the account had as of the given block
     */
    function getPriorVotes(address account, uint256 blockNumber) external view returns (uint96);
}

File 5 of 7 : ITimelock.sol
// SPDX-License-Identifier: GPL
//
// The 3-Clause BSD License
// Copyright 2020 Compound Labs, Inc.
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
// 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
pragma solidity 0.7.4;

interface ITimelock {
    function delay() external view returns (uint256);

    function GRACE_PERIOD() external view returns (uint256);

    function acceptAdmin() external;

    function queuedTransactions(bytes32 hash) external view returns (bool);

    function queueTransaction(
        address target,
        uint256 value,
        string calldata signature,
        bytes calldata data,
        uint256 eta
    ) external returns (bytes32);

    function cancelTransaction(
        address target,
        uint256 value,
        string calldata signature,
        bytes calldata data,
        uint256 eta
    ) external;

    function executeTransaction(
        address target,
        uint256 value,
        string calldata signature,
        bytes calldata data,
        uint256 eta
    ) external payable returns (bytes memory);
}

File 6 of 7 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 7 of 7 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"}],"name":"ProposalCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"address","name":"proposer","type":"address"},{"indexed":false,"internalType":"address[]","name":"targets","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"},{"indexed":false,"internalType":"string[]","name":"signatures","type":"string[]"},{"indexed":false,"internalType":"bytes[]","name":"calldatas","type":"bytes[]"},{"indexed":false,"internalType":"uint256","name":"startBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"quorumVotes","type":"uint256"},{"indexed":false,"internalType":"string","name":"description","type":"string"}],"name":"ProposalCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"}],"name":"ProposalExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"eta","type":"uint256"}],"name":"ProposalQueued","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"voter","type":"address"},{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"bool","name":"support","type":"bool"},{"indexed":false,"internalType":"uint256","name":"votes","type":"uint256"}],"name":"VoteCast","type":"event"},{"inputs":[],"name":"BALLOT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"__abdicate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"__acceptAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newPendingAdmin","type":"address"},{"internalType":"uint256","name":"eta","type":"uint256"}],"name":"__executeSetTimelockPendingAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newPendingAdmin","type":"address"},{"internalType":"uint256","name":"eta","type":"uint256"}],"name":"__queueSetTimelockPendingAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newGuardian","type":"address"}],"name":"__transferGuardian","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"cancel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"bool","name":"support","type":"bool"}],"name":"castVote","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"bool","name":"support","type":"bool"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"castVoteBySig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"comp","outputs":[{"internalType":"contract IComp","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"execute","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"getActions","outputs":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"string[]","name":"signatures","type":"string[]"},{"internalType":"bytes[]","name":"calldatas","type":"bytes[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"address","name":"voter","type":"address"}],"name":"getReceipt","outputs":[{"components":[{"internalType":"bool","name":"hasVoted","type":"bool"},{"internalType":"bool","name":"support","type":"bool"},{"internalType":"uint96","name":"votes","type":"uint96"}],"internalType":"struct GovernorAlpha.Receipt","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"guardian","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialProposalId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"mcbToken_","type":"address"},{"internalType":"address","name":"timelock_","type":"address"},{"internalType":"address","name":"comp_","type":"address"},{"internalType":"address","name":"guardian_","type":"address"},{"internalType":"uint256","name":"initialProposalId_","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"latestProposalIds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mcbToken","outputs":[{"internalType":"contract IMCB","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proposalCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proposalMaxOperations","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"proposalThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"proposals","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"proposer","type":"address"},{"internalType":"uint256","name":"eta","type":"uint256"},{"internalType":"uint256","name":"startBlock","type":"uint256"},{"internalType":"uint256","name":"endBlock","type":"uint256"},{"internalType":"uint256","name":"forVotes","type":"uint256"},{"internalType":"uint256","name":"againstVotes","type":"uint256"},{"internalType":"uint256","name":"quorumVotes","type":"uint256"},{"internalType":"bool","name":"canceled","type":"bool"},{"internalType":"bool","name":"executed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"string[]","name":"signatures","type":"string[]"},{"internalType":"bytes[]","name":"calldatas","type":"bytes[]"},{"internalType":"string","name":"description","type":"string"}],"name":"propose","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"queue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"quorumVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"state","outputs":[{"internalType":"enum GovernorAlpha.ProposalState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timelock","outputs":[{"internalType":"contract ITimelock","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"votingDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"votingPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"}]

608060405234801561001057600080fd5b506134aa806100206000396000f3fe6080604052600436106101d85760003560e01c80634634c61f11610102578063da35c66411610095578063e23a9a5211610064578063e23a9a52146104fd578063f7013ef61461052a578063fc4eee421461054a578063fe0d94c11461055f576101d8565b8063da35c66414610493578063da95691a146104a8578063ddf0b009146104c8578063deaaa7cc146104e8576101d8565b806391500671116100d15780639150067114610434578063b58131b014610454578063b9a6196114610469578063d33219b41461047e576101d8565b80634634c61f146103d557806360ecce55146103f5578063760fbc131461040a5780637bdbe4d01461041f576101d8565b806320606b701161017a5780633932abb1116101495780633932abb11461035e5780633e4f49e61461037357806340e58ee5146103a0578063452a9320146103c0576101d8565b806320606b70146102e457806321f43e42146102f957806324bc1a6414610319578063328dd9821461032e576101d8565b8063109d0af8116101b6578063109d0af81461026057806315373e3d1461028257806317977c61146102a45780631afef6e4146102c4576101d8565b8063013cf08b146101dd57806302a251a31461021c57806306fdde031461023e575b600080fd5b3480156101e957600080fd5b506101fd6101f836600461265c565b610572565b6040516102139a9998979695949392919061333c565b60405180910390f35b34801561022857600080fd5b506102316105d3565b6040516102139190612a81565b34801561024a57600080fd5b506102536105d9565b6040516102139190612af8565b34801561026c57600080fd5b50610275610607565b60405161021391906128da565b34801561028e57600080fd5b506102a261029d36600461269f565b610616565b005b3480156102b057600080fd5b506102316102bf36600461244b565b610625565b3480156102d057600080fd5b506102a26102df36600461244b565b610637565b3480156102f057600080fd5b5061023161068c565b34801561030557600080fd5b506102a26103143660046124c0565b6106b0565b34801561032557600080fd5b50610231610793565b34801561033a57600080fd5b5061034e61034936600461265c565b6107ac565b6040516102139493929190612a29565b34801561036a57600080fd5b50610231610a3b565b34801561037f57600080fd5b5061039361038e36600461265c565b610a40565b6040516102139190612ae4565b3480156103ac57600080fd5b506102a26103bb36600461265c565b610be3565b3480156103cc57600080fd5b50610275610e57565b3480156103e157600080fd5b506102a26103f03660046126ce565b610e66565b34801561040157600080fd5b50610275611014565b34801561041657600080fd5b506102a2611023565b34801561042b57600080fd5b5061023161105f565b34801561044057600080fd5b506102a261044f3660046124c0565b611064565b34801561046057600080fd5b5061023161113e565b34801561047557600080fd5b506102a261114a565b34801561048a57600080fd5b506102756111de565b34801561049f57600080fd5b506102316111f3565b3480156104b457600080fd5b506102316104c33660046124e9565b6111f9565b3480156104d457600080fd5b506102a26104e336600461265c565b61156c565b3480156104f457600080fd5b506102316117f6565b34801561050957600080fd5b5061051d610518366004612674565b61181a565b604051610213919061326e565b34801561053657600080fd5b506102a2610545366004612465565b611886565b34801561055657600080fd5b5061023161198b565b6102a261056d36600461265c565b611991565b6004602052600090815260409020805460018201546002830154600784015460088501546009860154600a870154600b880154600c9098015496976001600160a01b0390961696949593949293919290919060ff808216916101009004168a565b61438090565b6040518060400160405280601281526020017126a1a222ac102220a79023b7bb32b93737b960711b81525081565b6001546001600160a01b031681565b610621338383611b57565b5050565b60056020526000908152604090205481565b6003546001600160a01b0316331461066a5760405162461bcd60e51b815260040161066190612b0b565b60405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6003546001600160a01b031633146106da5760405162461bcd60e51b815260040161066190612c3d565b60008054604051620100009091046001600160a01b031691630825f38f918391906107099087906020016128da565b604051602081830303815290604052856040518563ffffffff1660e01b81526004016107389493929190612907565b600060405180830381600087803b15801561075257600080fd5b505af1158015610766573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261078e91908101906125e9565b505050565b6000601461079f611d20565b816107a657fe5b04905090565b6060806060806000600460008781526020019081526020016000209050806003018160040182600501836006018380548060200260200160405190810160405280929190818152602001828054801561082e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610810575b505050505093508280548060200260200160405190810160405280929190818152602001828054801561088057602002820191906000526020600020905b81548152602001906001019080831161086c575b5050505050925081805480602002602001604051908101604052809291908181526020016000905b828210156109535760008481526020908190208301805460408051601f600260001961010060018716150201909416939093049283018590048502810185019091528181529283018282801561093f5780601f106109145761010080835404028352916020019161093f565b820191906000526020600020905b81548152906001019060200180831161092257829003601f168201915b5050505050815260200190600101906108a8565b50505050915080805480602002602001604051908101604052809291908181526020016000905b82821015610a255760008481526020908190208301805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815292830182828015610a115780601f106109e657610100808354040283529160200191610a11565b820191906000526020600020905b8154815290600101906020018083116109f457829003601f168201915b50505050508152602001906001019061097a565b5050505090509450945094509450509193509193565b600190565b60006006546007540182108015610a5957506006548210155b610a755760405162461bcd60e51b815260040161066190612caf565b6000828152600460205260409020600c81015460ff1615610a9a576002915050610bde565b8060070154610aa7611dfe565b11610ab6576000915050610bde565b8060080154610ac3611dfe565b11610ad2576001915050610bde565b80600a01548160090154111580610af0575080600b01548160090154105b15610aff576003915050610bde565b6002810154610b12576004915050610bde565b600c810154610100900460ff1615610b2e576007915050610bde565b610bc18160020154600060029054906101000a90046001600160a01b03166001600160a01b031663c1a287e26040518163ffffffff1660e01b815260040160206040518083038186803b158015610b8457600080fd5b505afa158015610b98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bbc91906125d1565b611e02565b610bc9611e2e565b10610bd8576006915050610bde565b60059150505b919050565b6007610bee82610a40565b6007811115610bf957fe5b1415610c175760405162461bcd60e51b815260040161066190613149565b60008181526004602052604090206003546001600160a01b0316331480610ce65750610c4161113e565b60018054908301546001600160a01b039182169163782d6fe19116610c6e610c67611dfe565b6001611e32565b6040518363ffffffff1660e01b8152600401610c8b9291906128ee565b60206040518083038186803b158015610ca357600080fd5b505afa158015610cb7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cdb9190612724565b6001600160601b0316105b610d025760405162461bcd60e51b815260040161066190612f15565b600c8101805460ff1916600117905560005b6003820154811015610e1b57600060029054906101000a90046001600160a01b03166001600160a01b031663591fcdfe836003018381548110610d5357fe5b6000918252602090912001546004850180546001600160a01b039092169185908110610d7b57fe5b9060005260206000200154856005018581548110610d9557fe5b90600052602060002001866006018681548110610dae57fe5b9060005260206000200187600201546040518663ffffffff1660e01b8152600401610ddd9594939291906129f0565b600060405180830381600087803b158015610df757600080fd5b505af1158015610e0b573d6000803e3d6000fd5b505060019092019150610d149050565b507f789cf55be980739dad1d0699b93b58e806b51c9d96619bfa8fe0a28abaa7b30c82604051610e4b9190612a81565b60405180910390a15050565b6003546001600160a01b031681565b60408051808201909152601281527126a1a222ac102220a79023b7bb32b93737b960711b60209091015260007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8667f8926f593d6c0f07a7e45b772b848375430d6eb3c2345ba670f21e7d33169028a610edc611e5a565b30604051602001610ef09493929190612a8a565b60405160208183030381529060405280519060200120905060007f8e25870c07e0b0b3884c78da52790939a455c275406c44ae8b434b692fb916ee8787604051602001610f3f93929190612aae565b60405160208183030381529060405280519060200120905060008282604051602001610f6c9291906128bf565b604051602081830303815290604052805190602001209050600060018288888860405160008152602001604052604051610fa99493929190612ac6565b6020604051602081039080840390855afa158015610fcb573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610ffe5760405162461bcd60e51b815260040161066190613077565b611009818a8a611b57565b505050505050505050565b6002546001600160a01b031681565b6003546001600160a01b0316331461104d5760405162461bcd60e51b815260040161066190613218565b600380546001600160a01b0319169055565b600a90565b6003546001600160a01b0316331461108e5760405162461bcd60e51b815260040161066190612dc8565b60008054604051620100009091046001600160a01b031691633a66f901918391906110bd9087906020016128da565b604051602081830303815290604052856040518563ffffffff1660e01b81526004016110ec9493929190612907565b602060405180830381600087803b15801561110657600080fd5b505af115801561111a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061078e91906125d1565b6000606461079f611d20565b6003546001600160a01b031633146111745760405162461bcd60e51b815260040161066190612b0b565b600060029054906101000a90046001600160a01b03166001600160a01b0316630e18b6816040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156111c457600080fd5b505af11580156111d8573d6000803e3d6000fd5b50505050565b6000546201000090046001600160a01b031681565b60075481565b600061120361113e565b6001546001600160a01b031663782d6fe133611220610c67611dfe565b6040518363ffffffff1660e01b815260040161123d9291906128ee565b60206040518083038186803b15801561125557600080fd5b505afa158015611269573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061128d9190612724565b6001600160601b0316116112b35760405162461bcd60e51b81526004016106619061301a565b845186511480156112c5575083518651145b80156112d2575082518651145b6112ee5760405162461bcd60e51b815260040161066190612eab565b855161130c5760405162461bcd60e51b815260040161066190612fce565b61131461105f565b865111156113345760405162461bcd60e51b815260040161066190612e38565b3360009081526005602052604090205480156113b157600061135582610a40565b9050600181600781111561136557fe5b14156113835760405162461bcd60e51b8152600401610661906130c6565b600081600781111561139157fe5b14156113af5760405162461bcd60e51b815260040161066190612d45565b505b60006113c66113be611dfe565b610bbc610a3b565b905060006113d682610bbc6105d3565b600654600780546001808201909255909101600081815260046020908152604090912082815592830180546001600160a01b031916331790558c51939450909261142692600301918d0190611fe0565b5060008181526004602081815260409092208b5161144c939190920191908c0190612045565b5060008181526004602090815260409091208951611472926005909201918b0190612080565b5060008181526004602090815260409091208851611498926006909201918a01906120d9565b506000818152600460205260409020600781018490556008018290556114bc610793565b60046000838152602001908152602001600020600b01819055508060056000336001600160a01b03166001600160a01b03168152602001908152602001600020819055507f5f3f8da802ee6afde8d4395e43c640a216eed19aa3e90c7eda8ce88cb2954c4d81338c8c8c8c8989600460008b8152602001908152602001600020600b01548f6040516115579a9998979695949392919061329c565b60405180910390a19998505050505050505050565b600461157782610a40565b600781111561158257fe5b1461159f5760405162461bcd60e51b815260040161066190612b68565b6000818152600460205260408120906116076115b9611e2e565b600060029054906101000a90046001600160a01b03166001600160a01b0316636a42b8f86040518163ffffffff1660e01b815260040160206040518083038186803b158015610b8457600080fd5b905060005b60038301548110156117af576117a783600301828154811061162a57fe5b6000918252602090912001546004850180546001600160a01b03909216918490811061165257fe5b906000526020600020015485600501848154811061166c57fe5b600091825260209182902001805460408051601f60026000196101006001871615020190941693909304928301859004850281018501909152818152928301828280156116fa5780601f106116cf576101008083540402835291602001916116fa565b820191906000526020600020905b8154815290600101906020018083116116dd57829003601f168201915b505050505086600601858154811061170e57fe5b600091825260209182902001805460408051601f600260001961010060018716150201909416939093049283018590048502810185019091528181529283018282801561179c5780601f106117715761010080835404028352916020019161179c565b820191906000526020600020905b81548152906001019060200180831161177f57829003601f168201915b505050505086611e5e565b60010161160c565b50600282018190556040517f9a2e42fd6722813d69113e7d0079d3d940171428df7373df9c7f7617cfda2892906117e9908590849061338e565b60405180910390a1505050565b7f8e25870c07e0b0b3884c78da52790939a455c275406c44ae8b434b692fb916ee81565b611822612132565b5060009182526004602090815260408084206001600160a01b03939093168452600d9092018152918190208151606081018352905460ff80821615158352610100820416151593820193909352620100009092046001600160601b03169082015290565b600054610100900460ff168061189f575061189f611fc9565b806118ad575060005460ff16155b6118e85760405162461bcd60e51b815260040180806020018281038252602e815260200180613447602e913960400191505060405180910390fd5b600054610100900460ff16158015611913576000805460ff1961ff0019909116610100171660011790555b600280546001600160a01b03199081166001600160a01b03898116919091179092556000805462010000600160b01b03191662010000898516021790556001805482168784161790556003805490911691851691909117905560068290558015611983576000805461ff00191690555b505050505050565b60065481565b600561199c82610a40565b60078111156119a757fe5b146119c45760405162461bcd60e51b815260040161066190612bd2565b6000818152600460205260408120600c8101805461ff001916610100179055905b6003820154811015611b2757600060029054906101000a90046001600160a01b03166001600160a01b0316630825f38f836004018381548110611a2457fe5b9060005260206000200154846003018481548110611a3e57fe5b6000918252602090912001546004860180546001600160a01b039092169186908110611a6657fe5b9060005260206000200154866005018681548110611a8057fe5b90600052602060002001876006018781548110611a9957fe5b9060005260206000200188600201546040518763ffffffff1660e01b8152600401611ac89594939291906129f0565b6000604051808303818588803b158015611ae157600080fd5b505af1158015611af5573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f19168201604052611b1e91908101906125e9565b506001016119e5565b507f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f82604051610e4b9190612a81565b6001611b6283610a40565b6007811115611b6d57fe5b14611b8a5760405162461bcd60e51b81526004016106619061319f565b60008281526004602090815260408083206001600160a01b0387168452600d8101909252909120805460ff1615611bd35760405162461bcd60e51b815260040161066190612cf8565b600154600783015460405163782d6fe160e01b81526000926001600160a01b03169163782d6fe191611c09918a916004016128ee565b60206040518083038186803b158015611c2157600080fd5b505afa158015611c35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c599190612724565b90508315611c8257611c788360090154826001600160601b0316611e02565b6009840155611c9f565b611c9983600a0154826001600160601b0316611e02565b600a8401555b8154600160ff199091161761ff00191661010085151502176dffffffffffffffffffffffff00001916620100006001600160601b038316021782556040517f877856338e13f63d0c36822ff0ef736b80934cd90574a3a5bc9262c39d217c4690611d10908890889088908690612973565b60405180910390a1505050505050565b6000611df9600260009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d7357600080fd5b505afa158015611d87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dab91906125d1565b600260009054906101000a90046001600160a01b03166001600160a01b0316631b9e714a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b8457600080fd5b905090565b4390565b600082820183811015611e275760405162461bcd60e51b815260040161066190612e80565b9392505050565b4290565b600082821115611e545760405162461bcd60e51b8152600401610661906131e9565b50900390565b4690565b600060029054906101000a90046001600160a01b03166001600160a01b031663f2b065378686868686604051602001611e9b9594939291906129a4565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401611ecd9190612a81565b60206040518083038186803b158015611ee557600080fd5b505afa158015611ef9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f1d91906125b5565b15611f3a5760405162461bcd60e51b815260040161066190612f64565b600054604051633a66f90160e01b8152620100009091046001600160a01b031690633a66f90190611f7790889088908890889088906004016129a4565b602060405180830381600087803b158015611f9157600080fd5b505af1158015611fa5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061198391906125d1565b6000611fd430611fda565b15905090565b3b151590565b828054828255906000526020600020908101928215612035579160200282015b8281111561203557825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612000565b50612041929150612152565b5090565b828054828255906000526020600020908101928215612035579160200282015b82811115612035578251825591602001919060010190612065565b8280548282559060005260206000209081019282156120cd579160200282015b828111156120cd57825180516120bd918491602090910190612167565b50916020019190600101906120a0565b506120419291506121e2565b828054828255906000526020600020908101928215612126579160200282015b828111156121265782518051612116918491602090910190612167565b50916020019190600101906120f9565b506120419291506121ff565b604080516060810182526000808252602082018190529181019190915290565b5b808211156120415760008155600101612153565b828054600181600116156101000203166002900490600052602060002090601f01602090048101928261219d5760008555612035565b82601f106121b657805160ff1916838001178555612035565b828001600101855582156120355791820182811115612035578251825591602001919060010190612065565b808211156120415760006121f6828261221c565b506001016121e2565b80821115612041576000612213828261221c565b506001016121ff565b50805460018160011615610100020316600290046000825580601f106122425750612260565b601f0160209004906000526020600020908101906122609190612152565b50565b80356001600160a01b0381168114610bde57600080fd5b600082601f83011261228a578081fd5b813561229d612298826133c0565b61339c565b8181529150602080830190848101818402860182018710156122be57600080fd5b60005b848110156122e4576122d282612263565b845292820192908201906001016122c1565b505050505092915050565b600082601f8301126122ff578081fd5b813561230d612298826133c0565b818152915060208083019084810160005b848110156122e457612335888484358a01016123fd565b8452928201929082019060010161231e565b600082601f830112612357578081fd5b8135612365612298826133c0565b818152915060208083019084810160005b848110156122e45761238d888484358a01016123fd565b84529282019290820190600101612376565b600082601f8301126123af578081fd5b81356123bd612298826133c0565b8181529150602080830190848101818402860182018710156123de57600080fd5b60005b848110156122e4578135845292820192908201906001016123e1565b600082601f83011261240d578081fd5b813561241b612298826133de565b915080825283602082850101111561243257600080fd5b8060208401602084013760009082016020015292915050565b60006020828403121561245c578081fd5b611e2782612263565b600080600080600060a0868803121561247c578081fd5b61248586612263565b945061249360208701612263565b93506124a160408701612263565b92506124af60608701612263565b949793965091946080013592915050565b600080604083850312156124d2578182fd5b6124db83612263565b946020939093013593505050565b600080600080600060a08688031215612500578081fd5b853567ffffffffffffffff80821115612517578283fd5b61252389838a0161227a565b96506020880135915080821115612538578283fd5b61254489838a0161239f565b95506040880135915080821115612559578283fd5b61256589838a01612347565b9450606088013591508082111561257a578283fd5b61258689838a016122ef565b9350608088013591508082111561259b578283fd5b506125a8888289016123fd565b9150509295509295909350565b6000602082840312156125c6578081fd5b8151611e2781613438565b6000602082840312156125e2578081fd5b5051919050565b6000602082840312156125fa578081fd5b815167ffffffffffffffff811115612610578182fd5b8201601f81018413612620578182fd5b805161262e612298826133de565b818152856020838501011115612642578384fd5b61265382602083016020860161340c565b95945050505050565b60006020828403121561266d578081fd5b5035919050565b60008060408385031215612686578182fd5b8235915061269660208401612263565b90509250929050565b600080604083850312156126b1578182fd5b8235915060208301356126c381613438565b809150509250929050565b600080600080600060a086880312156126e5578283fd5b8535945060208601356126f781613438565b9350604086013560ff8116811461270c578384fd5b94979396509394606081013594506080013592915050565b600060208284031215612735578081fd5b81516001600160601b0381168114611e27578182fd5b6000815180845260208085019450808401835b838110156127835781516001600160a01b03168752958201959082019060010161275e565b509495945050505050565b6000815180845260208085018081965082840281019150828601855b858110156127d45782840389526127c2848351612810565b988501989350908401906001016127aa565b5091979650505050505050565b6000815180845260208085019450808401835b83811015612783578151875295820195908201906001016127f4565b6000815180845261282881602086016020860161340c565b601f01601f19169290920160200192915050565b6000815460018082166000811461285a5760018114612878576128b6565b60028304607f16865260ff19831660208701526040860193506128b6565b6002830480875261288886613400565b60005b828110156128ac5781546020828b010152848201915060208101905061288b565b8801602001955050505b50505092915050565b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b600060018060a01b038616825284602083015260a06040830152601860a08301527f73657450656e64696e6741646d696e286164647265737329000000000000000060c083015260e0606083015261296260e0830185612810565b905082608083015295945050505050565b6001600160a01b039490941684526020840192909252151560408301526001600160601b0316606082015260800190565b600060018060a01b038716825285602083015260a060408301526129cb60a0830186612810565b82810360608401526129dd8186612810565b9150508260808301529695505050505050565b600060018060a01b038716825285602083015260a06040830152612a1760a083018661283c565b82810360608401526129dd818661283c565b600060808252612a3c608083018761274b565b8281036020840152612a4e81876127e1565b90508281036040840152612a62818661278e565b90508281036060840152612a76818561278e565b979650505050505050565b90815260200190565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091521515604082015260600190565b93845260ff9290921660208401526040830152606082015260800190565b6020810160088310612af257fe5b91905290565b600060208252611e276020830184612810565b60208082526039908201527f476f7665726e6f72416c7068613a3a5f5f61636365707441646d696e3a20736560408201527f6e646572206d75737420626520676f7620677561726469616e00000000000000606082015260800190565b60208082526044908201527f476f7665726e6f72416c7068613a3a71756575653a2070726f706f73616c206360408201527f616e206f6e6c79206265207175657565642069662069742069732073756363656060820152631959195960e21b608082015260a00190565b60208082526045908201527f476f7665726e6f72416c7068613a3a657865637574653a2070726f706f73616c60408201527f2063616e206f6e6c7920626520657865637574656420696620697420697320716060820152641d595d595960da1b608082015260a00190565b6020808252604c908201527f476f7665726e6f72416c7068613a3a5f5f6578656375746553657454696d656c60408201527f6f636b50656e64696e6741646d696e3a2073656e646572206d7573742062652060608201526b33b7bb1033bab0b93234b0b760a11b608082015260a00190565b60208082526029908201527f476f7665726e6f72416c7068613a3a73746174653a20696e76616c69642070726040820152681bdc1bdcd85b081a5960ba1b606082015260800190565b6020808252602d908201527f476f7665726e6f72416c7068613a3a5f63617374566f74653a20766f7465722060408201526c185b1c9958591e481d9bdd1959609a1b606082015260800190565b60208082526059908201527f476f7665726e6f72416c7068613a3a70726f706f73653a206f6e65206c69766560408201527f2070726f706f73616c207065722070726f706f7365722c20666f756e6420616e60608201527f20616c72656164792070656e64696e672070726f706f73616c00000000000000608082015260a00190565b6020808252604a908201527f476f7665726e6f72416c7068613a3a5f5f717565756553657454696d656c6f6360408201527f6b50656e64696e6741646d696e3a2073656e646572206d75737420626520676f6060820152693b1033bab0b93234b0b760b11b608082015260a00190565b60208082526028908201527f476f7665726e6f72416c7068613a3a70726f706f73653a20746f6f206d616e7960408201526720616374696f6e7360c01b606082015260800190565b6020808252601190820152706164646974696f6e206f766572666c6f7760781b604082015260600190565b60208082526044908201527f476f7665726e6f72416c7068613a3a70726f706f73653a2070726f706f73616c60408201527f2066756e6374696f6e20696e666f726d6174696f6e206172697479206d69736d6060820152630c2e8c6d60e31b608082015260a00190565b6020808252602f908201527f476f7665726e6f72416c7068613a3a63616e63656c3a2070726f706f7365722060408201526e18589bdd99481d1a1c995cda1bdb19608a1b606082015260800190565b60208082526044908201527f476f7665726e6f72416c7068613a3a5f71756575654f725265766572743a207060408201527f726f706f73616c20616374696f6e20616c7265616479207175657565642061746060820152632065746160e01b608082015260a00190565b6020808252602c908201527f476f7665726e6f72416c7068613a3a70726f706f73653a206d7573742070726f60408201526b7669646520616374696f6e7360a01b606082015260800190565b6020808252603f908201527f476f7665726e6f72416c7068613a3a70726f706f73653a2070726f706f73657260408201527f20766f7465732062656c6f772070726f706f73616c207468726573686f6c6400606082015260800190565b6020808252602f908201527f476f7665726e6f72416c7068613a3a63617374566f746542795369673a20696e60408201526e76616c6964207369676e617475726560881b606082015260800190565b60208082526058908201527f476f7665726e6f72416c7068613a3a70726f706f73653a206f6e65206c69766560408201527f2070726f706f73616c207065722070726f706f7365722c20666f756e6420616e60608201527f20616c7265616479206163746976652070726f706f73616c0000000000000000608082015260a00190565b60208082526036908201527f476f7665726e6f72416c7068613a3a63616e63656c3a2063616e6e6f742063616040820152751b98d95b08195e1958dd5d1959081c1c9bdc1bdcd85b60521b606082015260800190565b6020808252602a908201527f476f7665726e6f72416c7068613a3a5f63617374566f74653a20766f74696e67604082015269081a5cc818db1bdcd95960b21b606082015260800190565b6020808252601590820152747375627472616374696f6e20756e646572666c6f7760581b604082015260600190565b60208082526036908201527f476f7665726e6f72416c7068613a3a5f5f61626469636174653a2073656e6465604082015275391036bab9ba1031329033b7bb1033bab0b93234b0b760511b606082015260800190565b8151151581526020808301511515908201526040918201516001600160601b03169181019190915260600190565b8a81526001600160a01b038a166020820152610140604082018190526000906132c78382018c61274b565b905082810360608401526132db818b6127e1565b905082810360808401526132ef818a61278e565b905082810360a0840152613303818961278e565b90508660c08401528560e08401528461010084015282810361012084015261332b8185612810565b9d9c50505050505050505050505050565b998a526001600160a01b039890981660208a015260408901969096526060880194909452608087019290925260a086015260c085015260e0840152151561010083015215156101208201526101400190565b918252602082015260400190565b60405181810167ffffffffffffffff811182821017156133b857fe5b604052919050565b600067ffffffffffffffff8211156133d457fe5b5060209081020190565b600067ffffffffffffffff8211156133f257fe5b50601f01601f191660200190565b60009081526020902090565b60005b8381101561342757818101518382015260200161340f565b838111156111d85750506000910152565b801515811461226057600080fdfe496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a6564a2646970667358221220b86266dc9f62d8ec93bf6e16fb7e5f40aa49a4770d8b1d4cb9fc284ac69d3b8764736f6c63430007040033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.