ETH Price: $3,294.76 (-2.40%)

Contract

0x0bB1810061C2f5b2088054eE184E6C79e1591101
 
Transaction Hash
Method
Block
From
To
Cast Vote201054062024-06-16 15:59:47219 days ago1718553587IN
0x0bB18100...9e1591101
0 ETH0.00051245.63358944
Cast Vote200927662024-06-14 21:34:59220 days ago1718400899IN
0x0bB18100...9e1591101
0 ETH0.0011579411.44382292
Cast Vote200903012024-06-14 13:19:35221 days ago1718371175IN
0x0bB18100...9e1591101
0 ETH0.000867768.57604841
Cast Vote200897722024-06-14 11:33:35221 days ago1718364815IN
0x0bB18100...9e1591101
0 ETH0.000634536.97635992
Cast Vote200896142024-06-14 11:01:59221 days ago1718362919IN
0x0bB18100...9e1591101
0 ETH0.000593125.86177797
Cast Vote200891262024-06-14 9:24:11221 days ago1718357051IN
0x0bB18100...9e1591101
0 ETH0.000808746.83722303
Propose200188102024-06-04 13:39:23231 days ago1717508363IN
0x0bB18100...9e1591101
0 ETH0.0018677111.05213077
Cast Vote200093592024-06-03 5:58:47232 days ago1717394327IN
0x0bB18100...9e1591101
0 ETH0.000720797.12353879
Cast Vote199977262024-06-01 15:00:23234 days ago1717254023IN
0x0bB18100...9e1591101
0 ETH0.000855518.45493954
Cast Vote199917302024-05-31 18:53:59234 days ago1717181639IN
0x0bB18100...9e1591101
0 ETH0.0010191610.07225328
Cast Vote199890142024-05-31 9:47:11235 days ago1717148831IN
0x0bB18100...9e1591101
0 ETH0.0012781510.8057059
Propose198980032024-05-18 16:25:11247 days ago1716049511IN
0x0bB18100...9e1591101
0 ETH0.000557373.29870496
Cast Vote195083232024-03-25 1:43:23302 days ago1711331003IN
0x0bB18100...9e1591101
0 ETH0.0012144513.35224746
Cast Vote195077782024-03-24 23:52:35302 days ago1711324355IN
0x0bB18100...9e1591101
0 ETH0.0020010122
Cast Vote195036442024-03-24 9:54:23303 days ago1711274063IN
0x0bB18100...9e1591101
0 ETH0.0014949316.43595036
Cast Vote194995172024-03-23 19:56:35303 days ago1711223795IN
0x0bB18100...9e1591101
0 ETH0.0018758518.53883121
Cast Vote194973252024-03-23 12:33:47304 days ago1711197227IN
0x0bB18100...9e1591101
0 ETH0.0022826819.29814182
Propose194146162024-03-11 21:45:11315 days ago1710193511IN
0x0bB18100...9e1591101
0 ETH0.0105946463.3044998
Execute188556022023-12-24 12:23:59394 days ago1703420639IN
0x0bB18100...9e1591101
0 ETH0.002084119.34817843
Cast Vote188429992023-12-22 17:54:35395 days ago1703267675IN
0x0bB18100...9e1591101
0 ETH0.0036576340.21369281
Cast Vote188392862023-12-22 5:24:47396 days ago1703222687IN
0x0bB18100...9e1591101
0 ETH0.0023175925.48064087
Cast Vote188372562023-12-21 22:35:23396 days ago1703198123IN
0x0bB18100...9e1591101
0 ETH0.0030432630.07623948
Cast Vote188368302023-12-21 21:09:35396 days ago1703192975IN
0x0bB18100...9e1591101
0 ETH0.0037244136.80799192
Cast Vote188346212023-12-21 13:44:59397 days ago1703166299IN
0x0bB18100...9e1591101
0 ETH0.0039609636.65697712
Propose187636422023-12-11 14:44:59407 days ago1702305899IN
0x0bB18100...9e1591101
0 ETH0.0068891641.12542332
View all transactions

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block
From
To
186829142023-11-30 7:23:59418 days ago1701329039
0x0bB18100...9e1591101
0.001 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ZrxTreasury

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 1000000 runs

Other Settings:
istanbul EvmVersion, Apache-2.0 license
File 1 of 13 : ZrxTreasury.sol
// SPDX-License-Identifier: Apache-2.0
/*

  Copyright 2021 ZeroEx Intl.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

*/

pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;

import "@0x/contracts-utils/contracts/src/v06/LibBytesV06.sol";
import "@0x/contracts-utils/contracts/src/v06/LibSafeMathV06.sol";
import "@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol";
import "@0x/contracts-zero-ex/contracts/src/features/libs/LibSignature.sol";
import "./IZrxTreasury.sol";


contract ZrxTreasury is
    IZrxTreasury
{
    using LibSafeMathV06 for uint256;
    using LibRichErrorsV06 for bytes;
    using LibBytesV06 for bytes;

    // Immutables
    IStaking public immutable override stakingProxy;
    DefaultPoolOperator public immutable override defaultPoolOperator;
    bytes32 public immutable override defaultPoolId;
    uint256 public immutable override votingPeriod;
    uint256 public override proposalThreshold;
    uint256 public override quorumThreshold;

    // Storage
    Proposal[] public proposals;
    mapping (uint256 => mapping (address => bool)) public hasVoted;

    /// @dev Initializes the ZRX treasury and creates the default
    ///      staking pool.
    /// @param stakingProxy_ The 0x staking proxy contract.
    /// @param params Immutable treasury parameters.
    constructor(
        IStaking stakingProxy_,
        TreasuryParameters memory params
    )
        public
    {
        require(
            params.votingPeriod < stakingProxy_.epochDurationInSeconds(),
            "VOTING_PERIOD_TOO_LONG"
        );
        stakingProxy = stakingProxy_;
        votingPeriod = params.votingPeriod;
        proposalThreshold = params.proposalThreshold;
        quorumThreshold = params.quorumThreshold;
        defaultPoolId = params.defaultPoolId;
        IStaking.Pool memory defaultPool = stakingProxy_.getStakingPool(params.defaultPoolId);
        defaultPoolOperator = DefaultPoolOperator(defaultPool.operator);
    }

    // solhint-disable
    /// @dev Allows this contract to receive ether.
    receive() external payable {}
    // solhint-enable

    /// @dev Updates the proposal and quorum thresholds to the given
    ///      values. Note that this function is only callable by the
    ///      treasury contract itself, so the threshold can only be
    ///      updated via a successful treasury proposal.
    /// @param newProposalThreshold The new value for the proposal threshold.
    /// @param newQuorumThreshold The new value for the quorum threshold.
    function updateThresholds(
        uint256 newProposalThreshold,
        uint256 newQuorumThreshold
    )
        external
        override
    {
        require(msg.sender == address(this), "updateThresholds/ONLY_SELF");
        proposalThreshold = newProposalThreshold;
        quorumThreshold = newQuorumThreshold;
    }

    /// @dev Creates a proposal to send ZRX from this treasury on the
    ///      the given actions. Must have at least `proposalThreshold`
    ///      of voting power to call this function. See `getVotingPower`
    ///      for how voting power is computed. If a proposal is successfully
    ///      created, voting starts at the epoch after next (currentEpoch + 2).
    ///      If the vote passes, the proposal is executable during the
    ///      `executionEpoch`. See `hasProposalPassed` for the passing criteria.
    /// @param actions The proposed ZRX actions. An action specifies a
    ///        contract call.
    /// @param executionEpoch The epoch during which the proposal is to
    ///        be executed if it passes. Must be at least two epochs
    ///        from the current epoch.
    /// @param description A text description for the proposal.
    /// @param operatedPoolIds The pools operated by `msg.sender`. The
    ///        ZRX currently delegated to those pools will be accounted
    ///        for in the voting power.
    /// @return proposalId The ID of the newly created proposal.
    function propose(
        ProposedAction[] memory actions,
        uint256 executionEpoch,
        string memory description,
        bytes32[] memory operatedPoolIds
    )
        public
        override
        returns (uint256 proposalId)
    {
        require(
            getVotingPower(msg.sender, operatedPoolIds) >= proposalThreshold,
            "propose/INSUFFICIENT_VOTING_POWER"
        );
        require(
            actions.length > 0,
            "propose/NO_ACTIONS_PROPOSED"
        );
        uint256 currentEpoch = stakingProxy.currentEpoch();
        require(
            executionEpoch >= currentEpoch + 2,
            "propose/INVALID_EXECUTION_EPOCH"
        );

        proposalId = proposalCount();
        Proposal storage newProposal = proposals.push();
        newProposal.actionsHash = keccak256(abi.encode(actions));
        newProposal.executionEpoch = executionEpoch;
        newProposal.voteEpoch = currentEpoch + 2;

        emit ProposalCreated(
            msg.sender,
            operatedPoolIds,
            proposalId,
            actions,
            executionEpoch,
            description
        );
    }

    /// @dev Casts a vote for the given proposal. Only callable
    ///      during the voting period for that proposal. See
    ///      `getVotingPower` for how voting power is computed.
    /// @param proposalId The ID of the proposal to vote on.
    /// @param support Whether to support the proposal or not.
    /// @param operatedPoolIds The pools operated by `msg.sender`. The
    ///        ZRX currently delegated to those pools will be accounted
    ///        for in the voting power.
    function castVote(
        uint256 proposalId,
        bool support,
        bytes32[] memory operatedPoolIds
    )
        public
        override
    {
        if (proposalId >= proposalCount()) {
            revert("castVote/INVALID_PROPOSAL_ID");
        }
        if (hasVoted[proposalId][msg.sender]) {
            revert("castVote/ALREADY_VOTED");
        }

        Proposal memory proposal = proposals[proposalId];
        if (
            proposal.voteEpoch != stakingProxy.currentEpoch() ||
            _hasVoteEnded(proposal.voteEpoch)
        ) {
            revert("castVote/VOTING_IS_CLOSED");
        }

        uint256 votingPower = getVotingPower(msg.sender, operatedPoolIds);
        if (votingPower == 0) {
            revert("castVote/NO_VOTING_POWER");
        }

        if (support) {
            proposals[proposalId].votesFor = proposals[proposalId].votesFor
                .safeAdd(votingPower);
            hasVoted[proposalId][msg.sender] = true;
        } else {
            proposals[proposalId].votesAgainst = proposals[proposalId].votesAgainst
                .safeAdd(votingPower);
            hasVoted[proposalId][msg.sender] = true;
        }

        emit VoteCast(
            msg.sender,
            operatedPoolIds,
            proposalId,
            support,
            votingPower
        );
    }

    /// @dev Executes a proposal that has passed and is
    ///      currently executable.
    /// @param proposalId The ID of the proposal to execute.
    /// @param actions Actions associated with the proposal to execute.
    function execute(uint256 proposalId, ProposedAction[] memory actions)
        public
        payable
        override
    {
        if (proposalId >= proposalCount()) {
            revert("execute/INVALID_PROPOSAL_ID");
        }
        Proposal memory proposal = proposals[proposalId];
        _assertProposalExecutable(proposal, actions);

        proposals[proposalId].executed = true;

        for (uint256 i = 0; i != actions.length; i++) {
            ProposedAction memory action = actions[i];
            (bool didSucceed, ) = action.target.call{value: action.value}(action.data);
            require(
                didSucceed,
                "execute/ACTION_EXECUTION_FAILED"
            );
        }

        emit ProposalExecuted(proposalId);
    }

    /// @dev Returns the total number of proposals.
    /// @return count The number of proposals.
    function proposalCount()
        public
        override
        view
        returns (uint256 count)
    {
        return proposals.length;
    }

    /// @dev Computes the current voting power of the given account.
    ///      Voting power is equal to:
    ///      (ZRX delegated to the default pool) +
    ///      0.5 * (ZRX delegated to other pools) +
    ///      0.5 * (ZRX delegated to pools operated by account)
    /// @param account The address of the account.
    /// @param operatedPoolIds The pools operated by `account`. The
    ///        ZRX currently delegated to those pools will be accounted
    ///        for in the voting power.
    /// @return votingPower The current voting power of the given account.
    function getVotingPower(address account, bytes32[] memory operatedPoolIds)
        public
        override
        view
        returns (uint256 votingPower)
    {
        uint256 delegatedBalance = stakingProxy.getOwnerStakeByStatus(
            account,
            IStaking.StakeStatus.DELEGATED
        ).currentEpochBalance;
        uint256 balanceDelegatedToDefaultPool = stakingProxy.getStakeDelegatedToPoolByOwner(
            account,
            defaultPoolId
        ).currentEpochBalance;

        // Voting power for ZRX delegated to the default pool is not diluted,
        // so we double-count the balance delegated to the default pool before
        // dividing by 2.
        votingPower = delegatedBalance
            .safeAdd(balanceDelegatedToDefaultPool)
            .safeDiv(2);

        // Add voting power for operated staking pools.
        for (uint256 i = 0; i != operatedPoolIds.length; i++) {
            for (uint256 j = 0; j != i; j++) {
                require(
                    operatedPoolIds[i] != operatedPoolIds[j],
                    "getVotingPower/DUPLICATE_POOL_ID"
                );
            }
            IStaking.Pool memory pool = stakingProxy.getStakingPool(operatedPoolIds[i]);
            require(
                pool.operator == account,
                "getVotingPower/POOL_NOT_OPERATED_BY_ACCOUNT"
            );
            uint96 stakeDelegatedToPool = stakingProxy
                .getTotalStakeDelegatedToPool(operatedPoolIds[i])
                .currentEpochBalance;
            uint256 poolVotingPower = uint256(stakeDelegatedToPool).safeDiv(2);
            votingPower = votingPower.safeAdd(poolVotingPower);
        }

        return votingPower;
    }

    /// @dev Checks whether the given proposal is executable.
    ///      Reverts if not.
    /// @param proposal The proposal to check.
    function _assertProposalExecutable(
        Proposal memory proposal,
        ProposedAction[] memory actions
    )
        private
        view
    {
        require(
            keccak256(abi.encode(actions)) == proposal.actionsHash,
            "_assertProposalExecutable/INVALID_ACTIONS"
        );
        require(
            _hasProposalPassed(proposal),
            "_assertProposalExecutable/PROPOSAL_HAS_NOT_PASSED"
        );
        require(
            !proposal.executed,
            "_assertProposalExecutable/PROPOSAL_ALREADY_EXECUTED"
        );
        require(
            stakingProxy.currentEpoch() == proposal.executionEpoch,
            "_assertProposalExecutable/CANNOT_EXECUTE_THIS_EPOCH"
        );
    }

    /// @dev Checks whether the given proposal has passed or not.
    /// @param proposal The proposal to check.
    /// @return hasPassed Whether the proposal has passed.
    function _hasProposalPassed(Proposal memory proposal)
        private
        view
        returns (bool hasPassed)
    {
        // Proposal is not passed until the vote is over.
        if (!_hasVoteEnded(proposal.voteEpoch)) {
            return false;
        }
        // Must have >50% support.
        if (proposal.votesFor <= proposal.votesAgainst) {
            return false;
        }
        // Must reach quorum threshold.
        if (proposal.votesFor < quorumThreshold) {
            return false;
        }
        return true;
    }

    /// @dev Checks whether a vote starting at the given
    ///      epoch has ended or not.
    /// @param voteEpoch The epoch at which the vote started.
    /// @return hasEnded Whether the vote has ended.
    function _hasVoteEnded(uint256 voteEpoch)
        private
        view
        returns (bool hasEnded)
    {
        uint256 currentEpoch = stakingProxy.currentEpoch();
        if (currentEpoch < voteEpoch) {
            return false;
        }
        if (currentEpoch > voteEpoch) {
            return true;
        }
        // voteEpoch == currentEpoch
        // Vote ends at currentEpochStartTime + votingPeriod
        uint256 voteEndTime = stakingProxy
            .currentEpochStartTimeInSeconds()
            .safeAdd(votingPeriod);
        return block.timestamp > voteEndTime;
    }
}

File 2 of 13 : LibBytesV06.sol
// SPDX-License-Identifier: Apache-2.0
/*

  Copyright 2020 ZeroEx Intl.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

*/

pragma solidity ^0.6.5;

import "./errors/LibBytesRichErrorsV06.sol";
import "./errors/LibRichErrorsV06.sol";


library LibBytesV06 {

    using LibBytesV06 for bytes;

    /// @dev Gets the memory address for a byte array.
    /// @param input Byte array to lookup.
    /// @return memoryAddress Memory address of byte array. This
    ///         points to the header of the byte array which contains
    ///         the length.
    function rawAddress(bytes memory input)
        internal
        pure
        returns (uint256 memoryAddress)
    {
        assembly {
            memoryAddress := input
        }
        return memoryAddress;
    }

    /// @dev Gets the memory address for the contents of a byte array.
    /// @param input Byte array to lookup.
    /// @return memoryAddress Memory address of the contents of the byte array.
    function contentAddress(bytes memory input)
        internal
        pure
        returns (uint256 memoryAddress)
    {
        assembly {
            memoryAddress := add(input, 32)
        }
        return memoryAddress;
    }

    /// @dev Copies `length` bytes from memory location `source` to `dest`.
    /// @param dest memory address to copy bytes to.
    /// @param source memory address to copy bytes from.
    /// @param length number of bytes to copy.
    function memCopy(
        uint256 dest,
        uint256 source,
        uint256 length
    )
        internal
        pure
    {
        if (length < 32) {
            // Handle a partial word by reading destination and masking
            // off the bits we are interested in.
            // This correctly handles overlap, zero lengths and source == dest
            assembly {
                let mask := sub(exp(256, sub(32, length)), 1)
                let s := and(mload(source), not(mask))
                let d := and(mload(dest), mask)
                mstore(dest, or(s, d))
            }
        } else {
            // Skip the O(length) loop when source == dest.
            if (source == dest) {
                return;
            }

            // For large copies we copy whole words at a time. The final
            // word is aligned to the end of the range (instead of after the
            // previous) to handle partial words. So a copy will look like this:
            //
            //  ####
            //      ####
            //          ####
            //            ####
            //
            // We handle overlap in the source and destination range by
            // changing the copying direction. This prevents us from
            // overwriting parts of source that we still need to copy.
            //
            // This correctly handles source == dest
            //
            if (source > dest) {
                assembly {
                    // We subtract 32 from `sEnd` and `dEnd` because it
                    // is easier to compare with in the loop, and these
                    // are also the addresses we need for copying the
                    // last bytes.
                    length := sub(length, 32)
                    let sEnd := add(source, length)
                    let dEnd := add(dest, length)

                    // Remember the last 32 bytes of source
                    // This needs to be done here and not after the loop
                    // because we may have overwritten the last bytes in
                    // source already due to overlap.
                    let last := mload(sEnd)

                    // Copy whole words front to back
                    // Note: the first check is always true,
                    // this could have been a do-while loop.
                    // solhint-disable-next-line no-empty-blocks
                    for {} lt(source, sEnd) {} {
                        mstore(dest, mload(source))
                        source := add(source, 32)
                        dest := add(dest, 32)
                    }

                    // Write the last 32 bytes
                    mstore(dEnd, last)
                }
            } else {
                assembly {
                    // We subtract 32 from `sEnd` and `dEnd` because those
                    // are the starting points when copying a word at the end.
                    length := sub(length, 32)
                    let sEnd := add(source, length)
                    let dEnd := add(dest, length)

                    // Remember the first 32 bytes of source
                    // This needs to be done here and not after the loop
                    // because we may have overwritten the first bytes in
                    // source already due to overlap.
                    let first := mload(source)

                    // Copy whole words back to front
                    // We use a signed comparisson here to allow dEnd to become
                    // negative (happens when source and dest < 32). Valid
                    // addresses in local memory will never be larger than
                    // 2**255, so they can be safely re-interpreted as signed.
                    // Note: the first check is always true,
                    // this could have been a do-while loop.
                    // solhint-disable-next-line no-empty-blocks
                    for {} slt(dest, dEnd) {} {
                        mstore(dEnd, mload(sEnd))
                        sEnd := sub(sEnd, 32)
                        dEnd := sub(dEnd, 32)
                    }

                    // Write the first 32 bytes
                    mstore(dest, first)
                }
            }
        }
    }

    /// @dev Returns a slices from a byte array.
    /// @param b The byte array to take a slice from.
    /// @param from The starting index for the slice (inclusive).
    /// @param to The final index for the slice (exclusive).
    /// @return result The slice containing bytes at indices [from, to)
    function slice(
        bytes memory b,
        uint256 from,
        uint256 to
    )
        internal
        pure
        returns (bytes memory result)
    {
        // Ensure that the from and to positions are valid positions for a slice within
        // the byte array that is being used.
        if (from > to) {
            LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(
                LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.FromLessThanOrEqualsToRequired,
                from,
                to
            ));
        }
        if (to > b.length) {
            LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(
                LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.ToLessThanOrEqualsLengthRequired,
                to,
                b.length
            ));
        }

        // Create a new bytes structure and copy contents
        result = new bytes(to - from);
        memCopy(
            result.contentAddress(),
            b.contentAddress() + from,
            result.length
        );
        return result;
    }

    /// @dev Returns a slice from a byte array without preserving the input.
    ///      When `from == 0`, the original array will match the slice.
    ///      In other cases its state will be corrupted.
    /// @param b The byte array to take a slice from. Will be destroyed in the process.
    /// @param from The starting index for the slice (inclusive).
    /// @param to The final index for the slice (exclusive).
    /// @return result The slice containing bytes at indices [from, to)
    function sliceDestructive(
        bytes memory b,
        uint256 from,
        uint256 to
    )
        internal
        pure
        returns (bytes memory result)
    {
        // Ensure that the from and to positions are valid positions for a slice within
        // the byte array that is being used.
        if (from > to) {
            LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(
                LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.FromLessThanOrEqualsToRequired,
                from,
                to
            ));
        }
        if (to > b.length) {
            LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(
                LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.ToLessThanOrEqualsLengthRequired,
                to,
                b.length
            ));
        }

        // Create a new bytes structure around [from, to) in-place.
        assembly {
            result := add(b, from)
            mstore(result, sub(to, from))
        }
        return result;
    }

    /// @dev Pops the last byte off of a byte array by modifying its length.
    /// @param b Byte array that will be modified.
    /// @return result The byte that was popped off.
    function popLastByte(bytes memory b)
        internal
        pure
        returns (bytes1 result)
    {
        if (b.length == 0) {
            LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(
                LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanZeroRequired,
                b.length,
                0
            ));
        }

        // Store last byte.
        result = b[b.length - 1];

        assembly {
            // Decrement length of byte array.
            let newLen := sub(mload(b), 1)
            mstore(b, newLen)
        }
        return result;
    }

    /// @dev Tests equality of two byte arrays.
    /// @param lhs First byte array to compare.
    /// @param rhs Second byte array to compare.
    /// @return equal True if arrays are the same. False otherwise.
    function equals(
        bytes memory lhs,
        bytes memory rhs
    )
        internal
        pure
        returns (bool equal)
    {
        // Keccak gas cost is 30 + numWords * 6. This is a cheap way to compare.
        // We early exit on unequal lengths, but keccak would also correctly
        // handle this.
        return lhs.length == rhs.length && keccak256(lhs) == keccak256(rhs);
    }

    /// @dev Reads an address from a position in a byte array.
    /// @param b Byte array containing an address.
    /// @param index Index in byte array of address.
    /// @return result address from byte array.
    function readAddress(
        bytes memory b,
        uint256 index
    )
        internal
        pure
        returns (address result)
    {
        if (b.length < index + 20) {
            LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(
                LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanOrEqualsTwentyRequired,
                b.length,
                index + 20 // 20 is length of address
            ));
        }

        // Add offset to index:
        // 1. Arrays are prefixed by 32-byte length parameter (add 32 to index)
        // 2. Account for size difference between address length and 32-byte storage word (subtract 12 from index)
        index += 20;

        // Read address from array memory
        assembly {
            // 1. Add index to address of bytes array
            // 2. Load 32-byte word from memory
            // 3. Apply 20-byte mask to obtain address
            result := and(mload(add(b, index)), 0xffffffffffffffffffffffffffffffffffffffff)
        }
        return result;
    }

    /// @dev Writes an address into a specific position in a byte array.
    /// @param b Byte array to insert address into.
    /// @param index Index in byte array of address.
    /// @param input Address to put into byte array.
    function writeAddress(
        bytes memory b,
        uint256 index,
        address input
    )
        internal
        pure
    {
        if (b.length < index + 20) {
            LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(
                LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanOrEqualsTwentyRequired,
                b.length,
                index + 20 // 20 is length of address
            ));
        }

        // Add offset to index:
        // 1. Arrays are prefixed by 32-byte length parameter (add 32 to index)
        // 2. Account for size difference between address length and 32-byte storage word (subtract 12 from index)
        index += 20;

        // Store address into array memory
        assembly {
            // The address occupies 20 bytes and mstore stores 32 bytes.
            // First fetch the 32-byte word where we'll be storing the address, then
            // apply a mask so we have only the bytes in the word that the address will not occupy.
            // Then combine these bytes with the address and store the 32 bytes back to memory with mstore.

            // 1. Add index to address of bytes array
            // 2. Load 32-byte word from memory
            // 3. Apply 12-byte mask to obtain extra bytes occupying word of memory where we'll store the address
            let neighbors := and(
                mload(add(b, index)),
                0xffffffffffffffffffffffff0000000000000000000000000000000000000000
            )

            // Make sure input address is clean.
            // (Solidity does not guarantee this)
            input := and(input, 0xffffffffffffffffffffffffffffffffffffffff)

            // Store the neighbors and address into memory
            mstore(add(b, index), xor(input, neighbors))
        }
    }

    /// @dev Reads a bytes32 value from a position in a byte array.
    /// @param b Byte array containing a bytes32 value.
    /// @param index Index in byte array of bytes32 value.
    /// @return result bytes32 value from byte array.
    function readBytes32(
        bytes memory b,
        uint256 index
    )
        internal
        pure
        returns (bytes32 result)
    {
        if (b.length < index + 32) {
            LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(
                LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanOrEqualsThirtyTwoRequired,
                b.length,
                index + 32
            ));
        }

        // Arrays are prefixed by a 256 bit length parameter
        index += 32;

        // Read the bytes32 from array memory
        assembly {
            result := mload(add(b, index))
        }
        return result;
    }

    /// @dev Writes a bytes32 into a specific position in a byte array.
    /// @param b Byte array to insert <input> into.
    /// @param index Index in byte array of <input>.
    /// @param input bytes32 to put into byte array.
    function writeBytes32(
        bytes memory b,
        uint256 index,
        bytes32 input
    )
        internal
        pure
    {
        if (b.length < index + 32) {
            LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(
                LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanOrEqualsThirtyTwoRequired,
                b.length,
                index + 32
            ));
        }

        // Arrays are prefixed by a 256 bit length parameter
        index += 32;

        // Read the bytes32 from array memory
        assembly {
            mstore(add(b, index), input)
        }
    }

    /// @dev Reads a uint256 value from a position in a byte array.
    /// @param b Byte array containing a uint256 value.
    /// @param index Index in byte array of uint256 value.
    /// @return result uint256 value from byte array.
    function readUint256(
        bytes memory b,
        uint256 index
    )
        internal
        pure
        returns (uint256 result)
    {
        result = uint256(readBytes32(b, index));
        return result;
    }

    /// @dev Writes a uint256 into a specific position in a byte array.
    /// @param b Byte array to insert <input> into.
    /// @param index Index in byte array of <input>.
    /// @param input uint256 to put into byte array.
    function writeUint256(
        bytes memory b,
        uint256 index,
        uint256 input
    )
        internal
        pure
    {
        writeBytes32(b, index, bytes32(input));
    }

    /// @dev Reads an unpadded bytes4 value from a position in a byte array.
    /// @param b Byte array containing a bytes4 value.
    /// @param index Index in byte array of bytes4 value.
    /// @return result bytes4 value from byte array.
    function readBytes4(
        bytes memory b,
        uint256 index
    )
        internal
        pure
        returns (bytes4 result)
    {
        if (b.length < index + 4) {
            LibRichErrorsV06.rrevert(LibBytesRichErrorsV06.InvalidByteOperationError(
                LibBytesRichErrorsV06.InvalidByteOperationErrorCodes.LengthGreaterThanOrEqualsFourRequired,
                b.length,
                index + 4
            ));
        }

        // Arrays are prefixed by a 32 byte length field
        index += 32;

        // Read the bytes4 from array memory
        assembly {
            result := mload(add(b, index))
            // Solidity does not require us to clean the trailing bytes.
            // We do it anyway
            result := and(result, 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000)
        }
        return result;
    }

    /// @dev Writes a new length to a byte array.
    ///      Decreasing length will lead to removing the corresponding lower order bytes from the byte array.
    ///      Increasing length may lead to appending adjacent in-memory bytes to the end of the byte array.
    /// @param b Bytes array to write new length to.
    /// @param length New length of byte array.
    function writeLength(bytes memory b, uint256 length)
        internal
        pure
    {
        assembly {
            mstore(b, length)
        }
    }
}

File 3 of 13 : LibBytesRichErrorsV06.sol
// SPDX-License-Identifier: Apache-2.0
/*

  Copyright 2020 ZeroEx Intl.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

*/

pragma solidity ^0.6.5;


library LibBytesRichErrorsV06 {

    enum InvalidByteOperationErrorCodes {
        FromLessThanOrEqualsToRequired,
        ToLessThanOrEqualsLengthRequired,
        LengthGreaterThanZeroRequired,
        LengthGreaterThanOrEqualsFourRequired,
        LengthGreaterThanOrEqualsTwentyRequired,
        LengthGreaterThanOrEqualsThirtyTwoRequired,
        LengthGreaterThanOrEqualsNestedBytesLengthRequired,
        DestinationLengthGreaterThanOrEqualSourceLengthRequired
    }

    // bytes4(keccak256("InvalidByteOperationError(uint8,uint256,uint256)"))
    bytes4 internal constant INVALID_BYTE_OPERATION_ERROR_SELECTOR =
        0x28006595;

    // solhint-disable func-name-mixedcase
    function InvalidByteOperationError(
        InvalidByteOperationErrorCodes errorCode,
        uint256 offset,
        uint256 required
    )
        internal
        pure
        returns (bytes memory)
    {
        return abi.encodeWithSelector(
            INVALID_BYTE_OPERATION_ERROR_SELECTOR,
            errorCode,
            offset,
            required
        );
    }
}

File 4 of 13 : LibRichErrorsV06.sol
// SPDX-License-Identifier: Apache-2.0
/*

  Copyright 2020 ZeroEx Intl.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

*/

pragma solidity ^0.6.5;


library LibRichErrorsV06 {

    // bytes4(keccak256("Error(string)"))
    bytes4 internal constant STANDARD_ERROR_SELECTOR = 0x08c379a0;

    // solhint-disable func-name-mixedcase
    /// @dev ABI encode a standard, string revert error payload.
    ///      This is the same payload that would be included by a `revert(string)`
    ///      solidity statement. It has the function signature `Error(string)`.
    /// @param message The error string.
    /// @return The ABI encoded error.
    function StandardError(string memory message)
        internal
        pure
        returns (bytes memory)
    {
        return abi.encodeWithSelector(
            STANDARD_ERROR_SELECTOR,
            bytes(message)
        );
    }
    // solhint-enable func-name-mixedcase

    /// @dev Reverts an encoded rich revert reason `errorData`.
    /// @param errorData ABI encoded error data.
    function rrevert(bytes memory errorData)
        internal
        pure
    {
        assembly {
            revert(add(errorData, 0x20), mload(errorData))
        }
    }
}

File 5 of 13 : LibSafeMathV06.sol
// SPDX-License-Identifier: Apache-2.0
/*

  Copyright 2020 ZeroEx Intl.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

*/

pragma solidity ^0.6.5;

import "./errors/LibRichErrorsV06.sol";
import "./errors/LibSafeMathRichErrorsV06.sol";


library LibSafeMathV06 {

    function safeMul(uint256 a, uint256 b)
        internal
        pure
        returns (uint256)
    {
        if (a == 0) {
            return 0;
        }
        uint256 c = a * b;
        if (c / a != b) {
            LibRichErrorsV06.rrevert(LibSafeMathRichErrorsV06.Uint256BinOpError(
                LibSafeMathRichErrorsV06.BinOpErrorCodes.MULTIPLICATION_OVERFLOW,
                a,
                b
            ));
        }
        return c;
    }

    function safeDiv(uint256 a, uint256 b)
        internal
        pure
        returns (uint256)
    {
        if (b == 0) {
            LibRichErrorsV06.rrevert(LibSafeMathRichErrorsV06.Uint256BinOpError(
                LibSafeMathRichErrorsV06.BinOpErrorCodes.DIVISION_BY_ZERO,
                a,
                b
            ));
        }
        uint256 c = a / b;
        return c;
    }

    function safeSub(uint256 a, uint256 b)
        internal
        pure
        returns (uint256)
    {
        if (b > a) {
            LibRichErrorsV06.rrevert(LibSafeMathRichErrorsV06.Uint256BinOpError(
                LibSafeMathRichErrorsV06.BinOpErrorCodes.SUBTRACTION_UNDERFLOW,
                a,
                b
            ));
        }
        return a - b;
    }

    function safeAdd(uint256 a, uint256 b)
        internal
        pure
        returns (uint256)
    {
        uint256 c = a + b;
        if (c < a) {
            LibRichErrorsV06.rrevert(LibSafeMathRichErrorsV06.Uint256BinOpError(
                LibSafeMathRichErrorsV06.BinOpErrorCodes.ADDITION_OVERFLOW,
                a,
                b
            ));
        }
        return c;
    }

    function max256(uint256 a, uint256 b)
        internal
        pure
        returns (uint256)
    {
        return a >= b ? a : b;
    }

    function min256(uint256 a, uint256 b)
        internal
        pure
        returns (uint256)
    {
        return a < b ? a : b;
    }

    function safeMul128(uint128 a, uint128 b)
        internal
        pure
        returns (uint128)
    {
        if (a == 0) {
            return 0;
        }
        uint128 c = a * b;
        if (c / a != b) {
            LibRichErrorsV06.rrevert(LibSafeMathRichErrorsV06.Uint256BinOpError(
                LibSafeMathRichErrorsV06.BinOpErrorCodes.MULTIPLICATION_OVERFLOW,
                a,
                b
            ));
        }
        return c;
    }

    function safeDiv128(uint128 a, uint128 b)
        internal
        pure
        returns (uint128)
    {
        if (b == 0) {
            LibRichErrorsV06.rrevert(LibSafeMathRichErrorsV06.Uint256BinOpError(
                LibSafeMathRichErrorsV06.BinOpErrorCodes.DIVISION_BY_ZERO,
                a,
                b
            ));
        }
        uint128 c = a / b;
        return c;
    }

    function safeSub128(uint128 a, uint128 b)
        internal
        pure
        returns (uint128)
    {
        if (b > a) {
            LibRichErrorsV06.rrevert(LibSafeMathRichErrorsV06.Uint256BinOpError(
                LibSafeMathRichErrorsV06.BinOpErrorCodes.SUBTRACTION_UNDERFLOW,
                a,
                b
            ));
        }
        return a - b;
    }

    function safeAdd128(uint128 a, uint128 b)
        internal
        pure
        returns (uint128)
    {
        uint128 c = a + b;
        if (c < a) {
            LibRichErrorsV06.rrevert(LibSafeMathRichErrorsV06.Uint256BinOpError(
                LibSafeMathRichErrorsV06.BinOpErrorCodes.ADDITION_OVERFLOW,
                a,
                b
            ));
        }
        return c;
    }

    function max128(uint128 a, uint128 b)
        internal
        pure
        returns (uint128)
    {
        return a >= b ? a : b;
    }

    function min128(uint128 a, uint128 b)
        internal
        pure
        returns (uint128)
    {
        return a < b ? a : b;
    }

    function safeDowncastToUint128(uint256 a)
        internal
        pure
        returns (uint128)
    {
        if (a > type(uint128).max) {
            LibRichErrorsV06.rrevert(LibSafeMathRichErrorsV06.Uint256DowncastError(
                LibSafeMathRichErrorsV06.DowncastErrorCodes.VALUE_TOO_LARGE_TO_DOWNCAST_TO_UINT128,
                a
            ));
        }
        return uint128(a);
    }
}

File 6 of 13 : LibSafeMathRichErrorsV06.sol
// SPDX-License-Identifier: Apache-2.0
/*

  Copyright 2020 ZeroEx Intl.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

*/

pragma solidity ^0.6.5;


library LibSafeMathRichErrorsV06 {

    // bytes4(keccak256("Uint256BinOpError(uint8,uint256,uint256)"))
    bytes4 internal constant UINT256_BINOP_ERROR_SELECTOR =
        0xe946c1bb;

    // bytes4(keccak256("Uint256DowncastError(uint8,uint256)"))
    bytes4 internal constant UINT256_DOWNCAST_ERROR_SELECTOR =
        0xc996af7b;

    enum BinOpErrorCodes {
        ADDITION_OVERFLOW,
        MULTIPLICATION_OVERFLOW,
        SUBTRACTION_UNDERFLOW,
        DIVISION_BY_ZERO
    }

    enum DowncastErrorCodes {
        VALUE_TOO_LARGE_TO_DOWNCAST_TO_UINT32,
        VALUE_TOO_LARGE_TO_DOWNCAST_TO_UINT64,
        VALUE_TOO_LARGE_TO_DOWNCAST_TO_UINT96,
        VALUE_TOO_LARGE_TO_DOWNCAST_TO_UINT128
    }

    // solhint-disable func-name-mixedcase
    function Uint256BinOpError(
        BinOpErrorCodes errorCode,
        uint256 a,
        uint256 b
    )
        internal
        pure
        returns (bytes memory)
    {
        return abi.encodeWithSelector(
            UINT256_BINOP_ERROR_SELECTOR,
            errorCode,
            a,
            b
        );
    }

    function Uint256DowncastError(
        DowncastErrorCodes errorCode,
        uint256 a
    )
        internal
        pure
        returns (bytes memory)
    {
        return abi.encodeWithSelector(
            UINT256_DOWNCAST_ERROR_SELECTOR,
            errorCode,
            a
        );
    }
}

File 7 of 13 : LibSignature.sol
// SPDX-License-Identifier: Apache-2.0
/*

  Copyright 2020 ZeroEx Intl.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

*/

pragma solidity ^0.6.5;
pragma experimental ABIEncoderV2;

import "@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol";
import "../../errors/LibSignatureRichErrors.sol";


/// @dev A library for validating signatures.
library LibSignature {
    using LibRichErrorsV06 for bytes;

    // '\x19Ethereum Signed Message:\n32\x00\x00\x00\x00' in a word.
    uint256 private constant ETH_SIGN_HASH_PREFIX =
        0x19457468657265756d205369676e6564204d6573736167653a0a333200000000;
    /// @dev Exclusive upper limit on ECDSA signatures 'R' values.
    ///      The valid range is given by fig (282) of the yellow paper.
    uint256 private constant ECDSA_SIGNATURE_R_LIMIT =
        uint256(0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141);
    /// @dev Exclusive upper limit on ECDSA signatures 'S' values.
    ///      The valid range is given by fig (283) of the yellow paper.
    uint256 private constant ECDSA_SIGNATURE_S_LIMIT = ECDSA_SIGNATURE_R_LIMIT / 2 + 1;

    /// @dev Allowed signature types.
    enum SignatureType {
        ILLEGAL,
        INVALID,
        EIP712,
        ETHSIGN
    }

    /// @dev Encoded EC signature.
    struct Signature {
        // How to validate the signature.
        SignatureType signatureType;
        // EC Signature data.
        uint8 v;
        // EC Signature data.
        bytes32 r;
        // EC Signature data.
        bytes32 s;
    }

    /// @dev Retrieve the signer of a signature.
    ///      Throws if the signature can't be validated.
    /// @param hash The hash that was signed.
    /// @param signature The signature.
    /// @return recovered The recovered signer address.
    function getSignerOfHash(
        bytes32 hash,
        Signature memory signature
    )
        internal
        pure
        returns (address recovered)
    {
        // Ensure this is a signature type that can be validated against a hash.
        _validateHashCompatibleSignature(hash, signature);

        if (signature.signatureType == SignatureType.EIP712) {
            // Signed using EIP712
            recovered = ecrecover(
                hash,
                signature.v,
                signature.r,
                signature.s
            );
        } else if (signature.signatureType == SignatureType.ETHSIGN) {
            // Signed using `eth_sign`
            // Need to hash `hash` with "\x19Ethereum Signed Message:\n32" prefix
            // in packed encoding.
            bytes32 ethSignHash;
            assembly {
                // Use scratch space
                mstore(0, ETH_SIGN_HASH_PREFIX) // length of 28 bytes
                mstore(28, hash) // length of 32 bytes
                ethSignHash := keccak256(0, 60)
            }
            recovered = ecrecover(
                ethSignHash,
                signature.v,
                signature.r,
                signature.s
            );
        }
        // `recovered` can be null if the signature values are out of range.
        if (recovered == address(0)) {
            LibSignatureRichErrors.SignatureValidationError(
                LibSignatureRichErrors.SignatureValidationErrorCodes.BAD_SIGNATURE_DATA,
                hash
            ).rrevert();
        }
    }

    /// @dev Validates that a signature is compatible with a hash signee.
    /// @param hash The hash that was signed.
    /// @param signature The signature.
    function _validateHashCompatibleSignature(
        bytes32 hash,
        Signature memory signature
    )
        private
        pure
    {
        // Ensure the r and s are within malleability limits.
        if (uint256(signature.r) >= ECDSA_SIGNATURE_R_LIMIT ||
            uint256(signature.s) >= ECDSA_SIGNATURE_S_LIMIT)
        {
            LibSignatureRichErrors.SignatureValidationError(
                LibSignatureRichErrors.SignatureValidationErrorCodes.BAD_SIGNATURE_DATA,
                hash
            ).rrevert();
        }

        // Always illegal signature.
        if (signature.signatureType == SignatureType.ILLEGAL) {
            LibSignatureRichErrors.SignatureValidationError(
                LibSignatureRichErrors.SignatureValidationErrorCodes.ILLEGAL,
                hash
            ).rrevert();
        }

        // Always invalid.
        if (signature.signatureType == SignatureType.INVALID) {
            LibSignatureRichErrors.SignatureValidationError(
                LibSignatureRichErrors.SignatureValidationErrorCodes.ALWAYS_INVALID,
                hash
            ).rrevert();
        }

        // Solidity should check that the signature type is within enum range for us
        // when abi-decoding.
    }
}

File 8 of 13 : LibSignatureRichErrors.sol
// SPDX-License-Identifier: Apache-2.0
/*

  Copyright 2020 ZeroEx Intl.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

*/

pragma solidity ^0.6.5;


library LibSignatureRichErrors {

    enum SignatureValidationErrorCodes {
        ALWAYS_INVALID,
        INVALID_LENGTH,
        UNSUPPORTED,
        ILLEGAL,
        WRONG_SIGNER,
        BAD_SIGNATURE_DATA
    }

    // solhint-disable func-name-mixedcase

    function SignatureValidationError(
        SignatureValidationErrorCodes code,
        bytes32 hash,
        address signerAddress,
        bytes memory signature
    )
        internal
        pure
        returns (bytes memory)
    {
        return abi.encodeWithSelector(
            bytes4(keccak256("SignatureValidationError(uint8,bytes32,address,bytes)")),
            code,
            hash,
            signerAddress,
            signature
        );
    }

    function SignatureValidationError(
        SignatureValidationErrorCodes code,
        bytes32 hash
    )
        internal
        pure
        returns (bytes memory)
    {
        return abi.encodeWithSelector(
            bytes4(keccak256("SignatureValidationError(uint8,bytes32)")),
            code,
            hash
        );
    }
}

File 9 of 13 : IZrxTreasury.sol
// SPDX-License-Identifier: Apache-2.0
/*

  Copyright 2021 ZeroEx Intl.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

*/

pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;

import "./DefaultPoolOperator.sol";
import "./IStaking.sol";


interface IZrxTreasury {

    struct TreasuryParameters {
        uint256 votingPeriod;
        uint256 proposalThreshold;
        uint256 quorumThreshold;
        bytes32 defaultPoolId;
    }

    struct ProposedAction {
        address target;
        bytes data;
        uint256 value;
    }

    struct Proposal {
        bytes32 actionsHash;
        uint256 executionEpoch;
        uint256 voteEpoch;
        uint256 votesFor;
        uint256 votesAgainst;
        bool executed;
    }

    event ProposalCreated(
        address proposer,
        bytes32[] operatedPoolIds,
        uint256 proposalId,
        ProposedAction[] actions,
        uint256 executionEpoch,
        string description
    );

    event VoteCast(
        address voter,
        bytes32[] operatedPoolIds,
        uint256 proposalId,
        bool support,
        uint256 votingPower
    );

    event ProposalExecuted(uint256 proposalId);

    function stakingProxy()
        external
        view
        returns (IStaking);

    function defaultPoolOperator()
        external
        view
        returns (DefaultPoolOperator);

    function defaultPoolId()
        external
        view
        returns (bytes32);

    function votingPeriod()
        external
        view
        returns (uint256);

    function proposalThreshold()
        external
        view
        returns (uint256);

    function quorumThreshold()
        external
        view
        returns (uint256);

    /// @dev Updates the proposal and quorum thresholds to the given
    ///      values. Note that this function is only callable by the
    ///      treasury contract itself, so the threshold can only be
    ///      updated via a successful treasury proposal.
    /// @param newProposalThreshold The new value for the proposal threshold.
    /// @param newQuorumThreshold The new value for the quorum threshold.
    function updateThresholds(
        uint256 newProposalThreshold,
        uint256 newQuorumThreshold
    )
        external;

    /// @dev Creates a proposal to send ZRX from this treasury on the
    ///      the given actions. Must have at least `proposalThreshold`
    ///      of voting power to call this function. See `getVotingPower`
    ///      for how voting power is computed. If a proposal is successfully
    ///      created, voting starts at the epoch after next (currentEpoch + 2).
    ///      If the vote passes, the proposal is executable during the
    ///      `executionEpoch`. See `hasProposalPassed` for the passing criteria.
    /// @param actions The proposed ZRX actions. An action specifies a
    ///        contract call.
    /// @param executionEpoch The epoch during which the proposal is to
    ///        be executed if it passes. Must be at least two epochs
    ///        from the current epoch.
    /// @param description A text description for the proposal.
    /// @param operatedPoolIds The pools operated by `msg.sender`. The
    ///        ZRX currently delegated to those pools will be accounted
    ///        for in the voting power.
    /// @return proposalId The ID of the newly created proposal.
    function propose(
        ProposedAction[] calldata actions,
        uint256 executionEpoch,
        string calldata description,
        bytes32[] calldata operatedPoolIds
    )
        external
        returns (uint256 proposalId);

    /// @dev Casts a vote for the given proposal. Only callable
    ///      during the voting period for that proposal. See
    ///      `getVotingPower` for how voting power is computed.
    /// @param proposalId The ID of the proposal to vote on.
    /// @param support Whether to support the proposal or not.
    /// @param operatedPoolIds The pools operated by `msg.sender`. The
    ///        ZRX currently delegated to those pools will be accounted
    ///        for in the voting power.
    function castVote(
        uint256 proposalId,
        bool support,
        bytes32[] calldata operatedPoolIds
    )
        external;

    /// @dev Executes a proposal that has passed and is
    ///      currently executable.
    /// @param proposalId The ID of the proposal to execute.
    /// @param actions Actions associated with the proposal to execute.
    function execute(uint256 proposalId, ProposedAction[] memory actions)
        external
        payable;

    /// @dev Returns the total number of proposals.
    /// @return count The number of proposals.
    function proposalCount()
        external
        view
        returns (uint256 count);

    /// @dev Computes the current voting power of the given account.
    ///      Voting power is equal to:
    ///      (ZRX delegated to the default pool) +
    ///      0.5 * (ZRX delegated to other pools) +
    ///      0.5 * (ZRX delegated to pools operated by account)
    /// @param account The address of the account.
    /// @param operatedPoolIds The pools operated by `account`. The
    ///        ZRX currently delegated to those pools will be accounted
    ///        for in the voting power.
    /// @return votingPower The current voting power of the given account.
    function getVotingPower(address account, bytes32[] calldata operatedPoolIds)
        external
        view
        returns (uint256 votingPower);
}

File 10 of 13 : DefaultPoolOperator.sol
// SPDX-License-Identifier: Apache-2.0
/*

  Copyright 2021 ZeroEx Intl.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

*/

pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;

import "@0x/contracts-erc20/contracts/src/v06/IERC20TokenV06.sol";
import "@0x/contracts-erc20/contracts/src/v06/LibERC20TokenV06.sol";
import "./IStaking.sol";


contract DefaultPoolOperator {
    using LibERC20TokenV06 for IERC20TokenV06;

    // Immutables
    IStaking public immutable stakingProxy;
    IERC20TokenV06 public immutable weth;
    bytes32 public immutable poolId;

    /// @dev Initializes this contract and creates a staking pool.
    /// @param stakingProxy_ The 0x staking proxy contract.
    /// @param weth_ The WETH token contract.
    constructor(
        IStaking stakingProxy_,
        IERC20TokenV06 weth_
    )
        public
    {
        stakingProxy = stakingProxy_;
        weth = weth_;
        // operator share = 100%
        poolId = stakingProxy_.createStakingPool(10 ** 6, false);
    }

    /// @dev Sends this contract's entire WETH balance to the
    ///      staking proxy contract. This function exists in case
    ///      someone joins the default staking pool and starts
    ///      market making for some reason, thus earning this contract
    ///      some staking rewards. Note that anyone can call this
    ///      function at any time.
    function returnStakingRewards()
        external
    {
        uint256 wethBalance = weth.compatBalanceOf(address(this));
        weth.compatTransfer(address(stakingProxy), wethBalance);
    }
}

File 11 of 13 : IERC20TokenV06.sol
// SPDX-License-Identifier: Apache-2.0
/*

  Copyright 2020 ZeroEx Intl.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

*/

pragma solidity ^0.6.5;


interface IERC20TokenV06 {

    // solhint-disable no-simple-event-func-name
    event Transfer(
        address indexed from,
        address indexed to,
        uint256 value
    );

    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );

    /// @dev send `value` token to `to` from `msg.sender`
    /// @param to The address of the recipient
    /// @param value The amount of token to be transferred
    /// @return True if transfer was successful
    function transfer(address to, uint256 value)
        external
        returns (bool);

    /// @dev send `value` token to `to` from `from` on the condition it is approved by `from`
    /// @param from The address of the sender
    /// @param to The address of the recipient
    /// @param value The amount of token to be transferred
    /// @return True if transfer was successful
    function transferFrom(
        address from,
        address to,
        uint256 value
    )
        external
        returns (bool);

    /// @dev `msg.sender` approves `spender` to spend `value` tokens
    /// @param spender The address of the account able to transfer the tokens
    /// @param value The amount of wei to be approved for transfer
    /// @return Always true if the call has enough gas to complete execution
    function approve(address spender, uint256 value)
        external
        returns (bool);

    /// @dev Query total supply of token
    /// @return Total supply of token
    function totalSupply()
        external
        view
        returns (uint256);

    /// @dev Get the balance of `owner`.
    /// @param owner The address from which the balance will be retrieved
    /// @return Balance of owner
    function balanceOf(address owner)
        external
        view
        returns (uint256);

    /// @dev Get the allowance for `spender` to spend from `owner`.
    /// @param owner The address of the account owning tokens
    /// @param spender The address of the account able to transfer the tokens
    /// @return Amount of remaining tokens allowed to spent
    function allowance(address owner, address spender)
        external
        view
        returns (uint256);

    /// @dev Get the number of decimals this token has.
    function decimals()
        external
        view
        returns (uint8);
}

File 12 of 13 : LibERC20TokenV06.sol
// SPDX-License-Identifier: Apache-2.0
/*

  Copyright 2020 ZeroEx Intl.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

*/

pragma solidity ^0.6.5;

import "@0x/contracts-utils/contracts/src/v06/errors/LibRichErrorsV06.sol";
import "@0x/contracts-utils/contracts/src/v06/LibBytesV06.sol";
import "./IERC20TokenV06.sol";


library LibERC20TokenV06 {
    bytes constant private DECIMALS_CALL_DATA = hex"313ce567";

    /// @dev Calls `IERC20TokenV06(token).approve()`.
    ///      Reverts if the result fails `isSuccessfulResult()` or the call reverts.
    /// @param token The address of the token contract.
    /// @param spender The address that receives an allowance.
    /// @param allowance The allowance to set.
    function compatApprove(
        IERC20TokenV06 token,
        address spender,
        uint256 allowance
    )
        internal
    {
        bytes memory callData = abi.encodeWithSelector(
            token.approve.selector,
            spender,
            allowance
        );
        _callWithOptionalBooleanResult(address(token), callData);
    }

    /// @dev Calls `IERC20TokenV06(token).approve()` and sets the allowance to the
    ///      maximum if the current approval is not already >= an amount.
    ///      Reverts if the result fails `isSuccessfulResult()` or the call reverts.
    /// @param token The address of the token contract.
    /// @param spender The address that receives an allowance.
    /// @param amount The minimum allowance needed.
    function approveIfBelow(
        IERC20TokenV06 token,
        address spender,
        uint256 amount
    )
        internal
    {
        if (token.allowance(address(this), spender) < amount) {
            compatApprove(token, spender, uint256(-1));
        }
    }

    /// @dev Calls `IERC20TokenV06(token).transfer()`.
    ///      Reverts if the result fails `isSuccessfulResult()` or the call reverts.
    /// @param token The address of the token contract.
    /// @param to The address that receives the tokens
    /// @param amount Number of tokens to transfer.
    function compatTransfer(
        IERC20TokenV06 token,
        address to,
        uint256 amount
    )
        internal
    {
        bytes memory callData = abi.encodeWithSelector(
            token.transfer.selector,
            to,
            amount
        );
        _callWithOptionalBooleanResult(address(token), callData);
    }

    /// @dev Calls `IERC20TokenV06(token).transferFrom()`.
    ///      Reverts if the result fails `isSuccessfulResult()` or the call reverts.
    /// @param token The address of the token contract.
    /// @param from The owner of the tokens.
    /// @param to The address that receives the tokens
    /// @param amount Number of tokens to transfer.
    function compatTransferFrom(
        IERC20TokenV06 token,
        address from,
        address to,
        uint256 amount
    )
        internal
    {
        bytes memory callData = abi.encodeWithSelector(
            token.transferFrom.selector,
            from,
            to,
            amount
        );
        _callWithOptionalBooleanResult(address(token), callData);
    }

    /// @dev Retrieves the number of decimals for a token.
    ///      Returns `18` if the call reverts.
    /// @param token The address of the token contract.
    /// @return tokenDecimals The number of decimals places for the token.
    function compatDecimals(IERC20TokenV06 token)
        internal
        view
        returns (uint8 tokenDecimals)
    {
        tokenDecimals = 18;
        (bool didSucceed, bytes memory resultData) = address(token).staticcall(DECIMALS_CALL_DATA);
        if (didSucceed && resultData.length >= 32) {
            tokenDecimals = uint8(LibBytesV06.readUint256(resultData, 0));
        }
    }

    /// @dev Retrieves the allowance for a token, owner, and spender.
    ///      Returns `0` if the call reverts.
    /// @param token The address of the token contract.
    /// @param owner The owner of the tokens.
    /// @param spender The address the spender.
    /// @return allowance_ The allowance for a token, owner, and spender.
    function compatAllowance(IERC20TokenV06 token, address owner, address spender)
        internal
        view
        returns (uint256 allowance_)
    {
        (bool didSucceed, bytes memory resultData) = address(token).staticcall(
            abi.encodeWithSelector(
                token.allowance.selector,
                owner,
                spender
            )
        );
        if (didSucceed && resultData.length >= 32) {
            allowance_ = LibBytesV06.readUint256(resultData, 0);
        }
    }

    /// @dev Retrieves the balance for a token owner.
    ///      Returns `0` if the call reverts.
    /// @param token The address of the token contract.
    /// @param owner The owner of the tokens.
    /// @return balance The token balance of an owner.
    function compatBalanceOf(IERC20TokenV06 token, address owner)
        internal
        view
        returns (uint256 balance)
    {
        (bool didSucceed, bytes memory resultData) = address(token).staticcall(
            abi.encodeWithSelector(
                token.balanceOf.selector,
                owner
            )
        );
        if (didSucceed && resultData.length >= 32) {
            balance = LibBytesV06.readUint256(resultData, 0);
        }
    }

    /// @dev Check if the data returned by a non-static call to an ERC20 token
    ///      is a successful result. Supported functions are `transfer()`,
    ///      `transferFrom()`, and `approve()`.
    /// @param resultData The raw data returned by a non-static call to the ERC20 token.
    /// @return isSuccessful Whether the result data indicates success.
    function isSuccessfulResult(bytes memory resultData)
        internal
        pure
        returns (bool isSuccessful)
    {
        if (resultData.length == 0) {
            return true;
        }
        if (resultData.length >= 32) {
            uint256 result = LibBytesV06.readUint256(resultData, 0);
            if (result == 1) {
                return true;
            }
        }
    }

    /// @dev Executes a call on address `target` with calldata `callData`
    ///      and asserts that either nothing was returned or a single boolean
    ///      was returned equal to `true`.
    /// @param target The call target.
    /// @param callData The abi-encoded call data.
    function _callWithOptionalBooleanResult(
        address target,
        bytes memory callData
    )
        private
    {
        (bool didSucceed, bytes memory resultData) = target.call(callData);
        if (didSucceed && isSuccessfulResult(resultData)) {
            return;
        }
        LibRichErrorsV06.rrevert(resultData);
    }
}

File 13 of 13 : IStaking.sol
// SPDX-License-Identifier: Apache-2.0
/*

  Copyright 2021 ZeroEx Intl.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

*/

pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;


interface IStaking {
    /// @dev Statuses that stake can exist in.
    ///      Any stake can be (re)delegated effective at the next epoch
    ///      Undelegated stake can be withdrawn if it is available in both the current and next epoch
    enum StakeStatus {
        UNDELEGATED,
        DELEGATED
    }

    /// @dev Encapsulates a balance for the current and next epochs.
    /// Note that these balances may be stale if the current epoch
    /// is greater than `currentEpoch`.
    /// @param currentEpoch The current epoch
    /// @param currentEpochBalance Balance in the current epoch.
    /// @param nextEpochBalance Balance in `currentEpoch+1`.
    struct StoredBalance {
        uint64 currentEpoch;
        uint96 currentEpochBalance;
        uint96 nextEpochBalance;
    }

    /// @dev Holds the metadata for a staking pool.
    /// @param operator Operator of the pool.
    /// @param operatorShare Fraction of the total balance owned by the operator, in ppm.
    struct Pool {
        address operator;
        uint32 operatorShare;
    }

    /// @dev Create a new staking pool. The sender will be the operator of this pool.
    /// Note that an operator must be payable.
    /// @param operatorShare Portion of rewards owned by the operator, in ppm.
    /// @param addOperatorAsMaker Adds operator to the created pool as a maker for convenience iff true.
    /// @return poolId The unique pool id generated for this pool.
    function createStakingPool(uint32 operatorShare, bool addOperatorAsMaker)
        external
        returns (bytes32 poolId);

    /// @dev Returns the current staking epoch number.
    /// @return epoch The current epoch.
    function currentEpoch()
        external
        view
        returns (uint256 epoch);

    /// @dev Returns the time (in seconds) at which the current staking epoch started.
    /// @return startTime The start time of the current epoch, in seconds.
    function currentEpochStartTimeInSeconds()
        external
        view
        returns (uint256 startTime);

    /// @dev Returns the duration of an epoch in seconds. This value can be updated.
    /// @return duration The duration of an epoch, in seconds.
    function epochDurationInSeconds()
        external
        view
        returns (uint256 duration);

    /// @dev Returns a staking pool
    /// @param poolId Unique id of pool.
    function getStakingPool(bytes32 poolId)
        external
        view
        returns (Pool memory);

    /// @dev Gets global stake for a given status.
    /// @param stakeStatus UNDELEGATED or DELEGATED
    /// @return balance Global stake for given status.
    function getGlobalStakeByStatus(StakeStatus stakeStatus)
        external
        view
        returns (StoredBalance memory balance);

    /// @dev Gets an owner's stake balances by status.
    /// @param staker Owner of stake.
    /// @param stakeStatus UNDELEGATED or DELEGATED
    /// @return balance Owner's stake balances for given status.
    function getOwnerStakeByStatus(
        address staker,
        StakeStatus stakeStatus
    )
        external
        view
        returns (StoredBalance memory balance);

    /// @dev Returns the total stake delegated to a specific staking pool,
    ///      across all members.
    /// @param poolId Unique Id of pool.
    /// @return balance Total stake delegated to pool.
    function getTotalStakeDelegatedToPool(bytes32 poolId)
        external
        view
        returns (StoredBalance memory balance);

    /// @dev Returns the stake delegated to a specific staking pool, by a given staker.
    /// @param staker of stake.
    /// @param poolId Unique Id of pool.
    /// @return balance Stake delegated to pool by staker.
    function getStakeDelegatedToPoolByOwner(address staker, bytes32 poolId)
        external
        view
        returns (StoredBalance memory balance);
}

Settings
{
  "remappings": [
    "@0x/contracts-utils=/Users/michaelzhu/protocol/node_modules/@0x/contracts-utils",
    "@0x/contracts-zero-ex=/Users/michaelzhu/protocol/node_modules/@0x/contracts-zero-ex",
    "@0x/contracts-erc20=/Users/michaelzhu/protocol/contracts/treasury/node_modules/@0x/contracts-erc20"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 1000000,
    "details": {
      "yul": true,
      "deduplicate": true,
      "cse": true,
      "constantOptimizer": true
    }
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "evmVersion": "istanbul"
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IStaking","name":"stakingProxy_","type":"address"},{"components":[{"internalType":"uint256","name":"votingPeriod","type":"uint256"},{"internalType":"uint256","name":"proposalThreshold","type":"uint256"},{"internalType":"uint256","name":"quorumThreshold","type":"uint256"},{"internalType":"bytes32","name":"defaultPoolId","type":"bytes32"}],"internalType":"struct IZrxTreasury.TreasuryParameters","name":"params","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"proposer","type":"address"},{"indexed":false,"internalType":"bytes32[]","name":"operatedPoolIds","type":"bytes32[]"},{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"},{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"value","type":"uint256"}],"indexed":false,"internalType":"struct IZrxTreasury.ProposedAction[]","name":"actions","type":"tuple[]"},{"indexed":false,"internalType":"uint256","name":"executionEpoch","type":"uint256"},{"indexed":false,"internalType":"string","name":"description","type":"string"}],"name":"ProposalCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"ProposalExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"voter","type":"address"},{"indexed":false,"internalType":"bytes32[]","name":"operatedPoolIds","type":"bytes32[]"},{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"bool","name":"support","type":"bool"},{"indexed":false,"internalType":"uint256","name":"votingPower","type":"uint256"}],"name":"VoteCast","type":"event"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"bool","name":"support","type":"bool"},{"internalType":"bytes32[]","name":"operatedPoolIds","type":"bytes32[]"}],"name":"castVote","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"defaultPoolId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultPoolOperator","outputs":[{"internalType":"contract DefaultPoolOperator","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct IZrxTreasury.ProposedAction[]","name":"actions","type":"tuple[]"}],"name":"execute","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32[]","name":"operatedPoolIds","type":"bytes32[]"}],"name":"getVotingPower","outputs":[{"internalType":"uint256","name":"votingPower","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"hasVoted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proposalCount","outputs":[{"internalType":"uint256","name":"count","type":"uint256"}],"stateMutability":"view","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":"bytes32","name":"actionsHash","type":"bytes32"},{"internalType":"uint256","name":"executionEpoch","type":"uint256"},{"internalType":"uint256","name":"voteEpoch","type":"uint256"},{"internalType":"uint256","name":"votesFor","type":"uint256"},{"internalType":"uint256","name":"votesAgainst","type":"uint256"},{"internalType":"bool","name":"executed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct IZrxTreasury.ProposedAction[]","name":"actions","type":"tuple[]"},{"internalType":"uint256","name":"executionEpoch","type":"uint256"},{"internalType":"string","name":"description","type":"string"},{"internalType":"bytes32[]","name":"operatedPoolIds","type":"bytes32[]"}],"name":"propose","outputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"quorumThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingProxy","outputs":[{"internalType":"contract IStaking","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"newProposalThreshold","type":"uint256"},{"internalType":"uint256","name":"newQuorumThreshold","type":"uint256"}],"name":"updateThresholds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"votingPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

6101006040523480156200001257600080fd5b50604051620025ca380380620025ca8339810160408190526200003591620001c3565b816001600160a01b031663634038016040518163ffffffff1660e01b815260040160206040518083038186803b1580156200006f57600080fd5b505afa15801562000084573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000aa919062000285565b815110620000d55760405162461bcd60e51b8152600401620000cc90620002a7565b60405180910390fd5b606082811b6001600160601b031916608052815160e0526020820151600055604082015160015581015160c0526200010c620001ac565b6060820151604051634bcc3f6760e01b81526001600160a01b03851691634bcc3f67916200013e91906004016200029e565b604080518083038186803b1580156200015657600080fd5b505afa1580156200016b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000191919062000235565b5160601b6001600160601b03191660a052506200031e915050565b604080518082019091526000808252602082015290565b60008082840360a0811215620001d7578283fd5b8351620001e48162000305565b92506080601f1982011215620001f8578182fd5b50620002056080620002de565b60208401518152604084015160208201526060840151604082015260808401516060820152809150509250929050565b60006040828403121562000247578081fd5b620002536040620002de565b8251620002608162000305565b8152602083015163ffffffff8116811462000279578283fd5b60208201529392505050565b60006020828403121562000297578081fd5b5051919050565b90815260200190565b60208082526016908201527f564f54494e475f504552494f445f544f4f5f4c4f4e4700000000000000000000604082015260600190565b6040518181016001600160401b0381118282101715620002fd57600080fd5b604052919050565b6001600160a01b03811681146200031b57600080fd5b50565b60805160601c60a05160601c60c05160e05161223962000391600039806102df52806113695250806106825280610a115250806109ed5250806103035280610583528061064552806107c152806108e95280610b025280610e09528061117252806112a0528061138a52506122396000f3fe6080604052600436106100e15760003560e01c80639de38af21161007f578063c14b8e9c11610059578063c14b8e9c14610222578063d73ceb3a14610242578063da35c66414610262578063dfe1e6b214610277576100e8565b80639de38af2146101e3578063a0edbcbb146101f8578063b58131b01461020d576100e8565b806343859632116100bb578063438596321461016c578063662bede3146101995780637b7a91dd146101ae5780637c29cb1a146101c3576100e8565b8063013cf08b146100ed57806302a251a31461012857806322f80d111461014a576100e8565b366100e857005b600080fd5b3480156100f957600080fd5b5061010d61010836600461192d565b610297565b60405161011f96959493929190611ca8565b60405180910390f35b34801561013457600080fd5b5061013d6102dd565b60405161011f9190611c9f565b34801561015657600080fd5b5061015f610301565b60405161011f9190611cd2565b34801561017857600080fd5b5061018c61018736600461195d565b610325565b60405161011f9190611c94565b6101ac6101a736600461198c565b610345565b005b3480156101ba57600080fd5b5061013d610578565b3480156101cf57600080fd5b5061013d6101de3660046117a8565b61057e565b3480156101ef57600080fd5b5061015f6109eb565b34801561020457600080fd5b5061013d610a0f565b34801561021957600080fd5b5061013d610a33565b34801561022e57600080fd5b506101ac61023d366004611a22565b610a39565b34801561024e57600080fd5b5061013d61025d3660046117f6565b610a7d565b34801561026e57600080fd5b5061013d610cc1565b34801561028357600080fd5b506101ac6102923660046119c7565b610cc7565b600281815481106102a457fe5b60009182526020909120600690910201805460018201546002830154600384015460048501546005909501549395509193909260ff1686565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600360209081526000928352604080842090915290825290205460ff1681565b61034d610cc1565b821061038e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038590611ebc565b60405180910390fd5b610396611535565b600283815481106103a357fe5b60009182526020918290206040805160c081018252600690930290910180548352600181015493830193909352600283015490820152600382015460608201526004820154608082015260059091015460ff16151560a082015290506104098183611090565b60016002848154811061041857fe5b6000918252602082206006919091020160050180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016921515929092179091555b8251811461053b5761046a611570565b83828151811061047657fe5b602002602001015190506000816000015173ffffffffffffffffffffffffffffffffffffffff16826040015183602001516040516104b49190611b51565b60006040518083038185875af1925050503d80600081146104f1576040519150601f19603f3d011682016040523d82523d6000602084013e6104f6565b606091505b5050905080610531576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038590611d15565b505060010161045a565b507f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f8360405161056b9190611c9f565b60405180910390a1505050565b60015481565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166344a6958b8560016040518363ffffffff1660e01b81526004016105dd929190611c4d565b60606040518083038186803b1580156105f557600080fd5b505afa158015610609573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062d91906118ce565b602001516bffffffffffffffffffffffff16905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663f252b7a1867f00000000000000000000000000000000000000000000000000000000000000006040518363ffffffff1660e01b81526004016106be929190611c27565b60606040518083038186803b1580156106d657600080fd5b505afa1580156106ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061070e91906118ce565b602001516bffffffffffffffffffffffff16905061073760026107318484611249565b90611271565b925060005b845181146109e15760005b8181146107b65785818151811061075a57fe5b602002602001015186838151811061076e57fe5b602002602001015114156107ae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038590611ef3565b600101610747565b506107bf6115a7565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16634bcc3f6787848151811061080757fe5b60200260200101516040518263ffffffff1660e01b815260040161082b9190611c9f565b604080518083038186803b15801561084257600080fd5b505afa158015610856573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061087a9190611884565b90508673ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff16146108e5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038590611fbc565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633e4ad73288858151811061092f57fe5b60200260200101516040518263ffffffff1660e01b81526004016109539190611c9f565b60606040518083038186803b15801561096b57600080fd5b505afa15801561097f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a391906118ce565b60200151905060006109c46bffffffffffffffffffffffff83166002611271565b90506109d08782611249565b9650506001909201915061073c9050565b5050505b92915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60005481565b333014610a72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038590611de0565b600091909155600155565b60008054610a8b338461057e565b1015610ac3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103859061210a565b6000855111610afe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038590611d4c565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663766718086040518163ffffffff1660e01b815260040160206040518083038186803b158015610b6657600080fd5b505afa158015610b7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b9e9190611945565b905080600201851015610bdd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038590611f85565b610be5610cc1565b600280546001810182556000919091526040519193506006027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0190610c2f908890602001611c81565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905280516020909101208255600182018790556002808401908301557f7e5c3a7773c4f27d279f6b711be3046cadedc9b136ca15d4d06e3aa7ec95340a90610caf903390879087908c908c908c90611b6d565b60405180910390a15050949350505050565b60025490565b610ccf610cc1565b8310610d07576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038590611e4e565b600083815260036020908152604080832033845290915290205460ff1615610d5b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038590611e17565b610d63611535565b60028481548110610d7057fe5b60009182526020918290206040805160c08101825260069093029091018054835260018101548385015260028101548383015260038101546060840152600480820154608085015260059091015460ff16151560a084015281517f76671808000000000000000000000000000000000000000000000000000000008152915192945073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016936376671808938383019391929091829003018186803b158015610e4c57600080fd5b505afa158015610e60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e849190611945565b8160400151141580610e9e5750610e9e816040015161129b565b15610ed5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610385906120d3565b6000610ee1338461057e565b905080610f1a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038590611e85565b8315610fb557610f518160028781548110610f3157fe5b90600052602060002090600602016003015461124990919063ffffffff16565b60028681548110610f5e57fe5b600091825260208083206003600690930201820193909355878252825260408082203383529092522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561104a565b610fe68160028781548110610fc657fe5b90600052602060002090600602016004015461124990919063ffffffff16565b60028681548110610ff357fe5b60009182526020808320600460069093020191909101929092558681526003825260408082203383529092522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b7f42beae5df566d9e7bf8de84274b353b28960a4fa51cbd2eec30cd42cbb4cf1043384878785604051611081959493929190611bdb565b60405180910390a15050505050565b81516040516110a3908390602001611c81565b60405160208183030381529060405280519060200120146110f0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038590612019565b6110f982611438565b61112f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038590611f28565b8160a001511561116b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038590611d83565b81602001517f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663766718086040518163ffffffff1660e01b815260040160206040518083038186803b1580156111d657600080fd5b505afa1580156111ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061120e9190611945565b14611245576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038590612076565b5050565b60008282018381101561126a5761126a61126560008686611488565b61152d565b9392505050565b6000816112875761128761126560038585611488565b600082848161129257fe5b04949350505050565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663766718086040518163ffffffff1660e01b815260040160206040518083038186803b15801561130457600080fd5b505afa158015611318573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133c9190611945565b905082811015611350576000915050611433565b82811115611362576001915050611433565b600061142c7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663587da0236040518163ffffffff1660e01b815260040160206040518083038186803b1580156113ee57600080fd5b505afa158015611402573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114269190611945565b90611249565b4211925050505b919050565b6000611447826040015161129b565b61145357506000611433565b816080015182606001511161146a57506000611433565b6001548260600151101561148057506000611433565b506001919050565b606063e946c1bb60e01b8484846040516024016114a793929190611cf3565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915290509392505050565b805160208201fd5b6040518060c0016040528060008019168152602001600081526020016000815260200160008152602001600081526020016000151581525090565b6040518060600160405280600073ffffffffffffffffffffffffffffffffffffffff16815260200160608152602001600081525090565b604080518082019091526000808252602082015290565b80356109e5816121de565b600082601f8301126115d9578081fd5b81356115ec6115e78261218e565b612167565b81815291506020808301908481018184028601820187101561160d57600080fd5b60005b8481101561162c57813584529282019290820190600101611610565b505050505092915050565b600082601f830112611647578081fd5b81356116556115e78261218e565b818152915060208083019084810160005b8481101561162c57813587016060807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0838c030112156116a557600080fd5b6116ae81612167565b6116ba8b8785016115be565b815260408084013567ffffffffffffffff8111156116d757600080fd5b6116e58d8983880101611705565b888401525091909201359082015284529282019290820190600101611666565b600082601f830112611715578081fd5b813567ffffffffffffffff81111561172b578182fd5b61175c60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601612167565b915080825283602082850101111561177357600080fd5b8060208401602084013760009082016020015292915050565b80516bffffffffffffffffffffffff811681146109e557600080fd5b600080604083850312156117ba578182fd5b82356117c5816121de565b9150602083013567ffffffffffffffff8111156117e0578182fd5b6117ec858286016115c9565b9150509250929050565b6000806000806080858703121561180b578182fd5b843567ffffffffffffffff80821115611822578384fd5b61182e88838901611637565b955060208701359450604087013591508082111561184a578384fd5b61185688838901611705565b9350606087013591508082111561186b578283fd5b50611878878288016115c9565b91505092959194509250565b600060408284031215611895578081fd5b61189f6040612167565b82516118aa816121de565b8152602083015163ffffffff811681146118c2578283fd5b60208201529392505050565b6000606082840312156118df578081fd5b6118e96060612167565b825167ffffffffffffffff81168114611900578283fd5b815261190f846020850161178c565b6020820152611921846040850161178c565b60408201529392505050565b60006020828403121561193e578081fd5b5035919050565b600060208284031215611956578081fd5b5051919050565b6000806040838503121561196f578182fd5b823591506020830135611981816121de565b809150509250929050565b6000806040838503121561199e578182fd5b82359150602083013567ffffffffffffffff8111156119bb578182fd5b6117ec85828601611637565b6000806000606084860312156119db578081fd5b83359250602084013580151581146119f1578182fd5b9150604084013567ffffffffffffffff811115611a0c578182fd5b611a18868287016115c9565b9150509250925092565b60008060408385031215611a34578182fd5b50508035926020909101359150565b6000815180845260208085019450808401835b83811015611a7257815187529582019590820190600101611a56565b509495945050505050565b6000815180845260208085018081965082840281019150828601855b85811015611afa5782840389528151606073ffffffffffffffffffffffffffffffffffffffff8251168652868201518188880152611ad982880182611b07565b60409384015197909301969096525098850198935090840190600101611a99565b5091979650505050505050565b60008151808452611b1f8160208601602086016121ae565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008251611b638184602087016121ae565b9190910192915050565b600073ffffffffffffffffffffffffffffffffffffffff8816825260c06020830152611b9c60c0830188611a43565b8660408401528281036060840152611bb48187611a7d565b905084608084015282810360a0840152611bce8185611b07565b9998505050505050505050565b600073ffffffffffffffffffffffffffffffffffffffff8716825260a06020830152611c0a60a0830187611a43565b604083019590955250911515606083015260809091015292915050565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff831681526040810160028310611c7457fe5b8260208301529392505050565b60006020825261126a6020830184611a7d565b901515815260200190565b90815260200190565b9586526020860194909452604085019290925260608401526080830152151560a082015260c00190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b6060810160048510611d0157fe5b938152602081019290925260409091015290565b6020808252601f908201527f657865637574652f414354494f4e5f455845435554494f4e5f4641494c454400604082015260600190565b6020808252601b908201527f70726f706f73652f4e4f5f414354494f4e535f50524f504f5345440000000000604082015260600190565b60208082526033908201527f5f61737365727450726f706f73616c45786563757461626c652f50524f504f5360408201527f414c5f414c52454144595f455845435554454400000000000000000000000000606082015260800190565b6020808252601a908201527f7570646174655468726573686f6c64732f4f4e4c595f53454c46000000000000604082015260600190565b60208082526016908201527f63617374566f74652f414c52454144595f564f54454400000000000000000000604082015260600190565b6020808252601c908201527f63617374566f74652f494e56414c49445f50524f504f53414c5f494400000000604082015260600190565b60208082526018908201527f63617374566f74652f4e4f5f564f54494e475f504f5745520000000000000000604082015260600190565b6020808252601b908201527f657865637574652f494e56414c49445f50524f504f53414c5f49440000000000604082015260600190565b6020808252818101527f676574566f74696e67506f7765722f4455504c49434154455f504f4f4c5f4944604082015260600190565b60208082526031908201527f5f61737365727450726f706f73616c45786563757461626c652f50524f504f5360408201527f414c5f4841535f4e4f545f504153534544000000000000000000000000000000606082015260800190565b6020808252601f908201527f70726f706f73652f494e56414c49445f455845435554494f4e5f45504f434800604082015260600190565b6020808252602b908201527f676574566f74696e67506f7765722f504f4f4c5f4e4f545f4f5045524154454460408201527f5f42595f4143434f554e54000000000000000000000000000000000000000000606082015260800190565b60208082526029908201527f5f61737365727450726f706f73616c45786563757461626c652f494e56414c4960408201527f445f414354494f4e530000000000000000000000000000000000000000000000606082015260800190565b60208082526033908201527f5f61737365727450726f706f73616c45786563757461626c652f43414e4e4f5460408201527f5f455845435554455f544849535f45504f434800000000000000000000000000606082015260800190565b60208082526019908201527f63617374566f74652f564f54494e475f49535f434c4f53454400000000000000604082015260600190565b60208082526021908201527f70726f706f73652f494e53554646494349454e545f564f54494e475f504f574560408201527f5200000000000000000000000000000000000000000000000000000000000000606082015260800190565b60405181810167ffffffffffffffff8111828210171561218657600080fd5b604052919050565b600067ffffffffffffffff8211156121a4578081fd5b5060209081020190565b60005b838110156121c95781810151838201526020016121b1565b838111156121d8576000848401525b50505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461220057600080fd5b5056fea2646970667358221220beb7bd791ce46663bffce41721f73b04087ddb2d67bcafb921eec826286badd064736f6c634300060c0033000000000000000000000000a26e80e7dea86279c6d778d702cc413e6cffa777000000000000000000000000000000000000000000000000000000000003f48000000000000000000000000000000000000000000000152d02c7e14af6800000000000000000000000000000000000000000000000084595161401484a0000000000000000000000000000000000000000000000000000000000000000000033

Deployed Bytecode

0x6080604052600436106100e15760003560e01c80639de38af21161007f578063c14b8e9c11610059578063c14b8e9c14610222578063d73ceb3a14610242578063da35c66414610262578063dfe1e6b214610277576100e8565b80639de38af2146101e3578063a0edbcbb146101f8578063b58131b01461020d576100e8565b806343859632116100bb578063438596321461016c578063662bede3146101995780637b7a91dd146101ae5780637c29cb1a146101c3576100e8565b8063013cf08b146100ed57806302a251a31461012857806322f80d111461014a576100e8565b366100e857005b600080fd5b3480156100f957600080fd5b5061010d61010836600461192d565b610297565b60405161011f96959493929190611ca8565b60405180910390f35b34801561013457600080fd5b5061013d6102dd565b60405161011f9190611c9f565b34801561015657600080fd5b5061015f610301565b60405161011f9190611cd2565b34801561017857600080fd5b5061018c61018736600461195d565b610325565b60405161011f9190611c94565b6101ac6101a736600461198c565b610345565b005b3480156101ba57600080fd5b5061013d610578565b3480156101cf57600080fd5b5061013d6101de3660046117a8565b61057e565b3480156101ef57600080fd5b5061015f6109eb565b34801561020457600080fd5b5061013d610a0f565b34801561021957600080fd5b5061013d610a33565b34801561022e57600080fd5b506101ac61023d366004611a22565b610a39565b34801561024e57600080fd5b5061013d61025d3660046117f6565b610a7d565b34801561026e57600080fd5b5061013d610cc1565b34801561028357600080fd5b506101ac6102923660046119c7565b610cc7565b600281815481106102a457fe5b60009182526020909120600690910201805460018201546002830154600384015460048501546005909501549395509193909260ff1686565b7f000000000000000000000000000000000000000000000000000000000003f48081565b7f000000000000000000000000a26e80e7dea86279c6d778d702cc413e6cffa77781565b600360209081526000928352604080842090915290825290205460ff1681565b61034d610cc1565b821061038e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038590611ebc565b60405180910390fd5b610396611535565b600283815481106103a357fe5b60009182526020918290206040805160c081018252600690930290910180548352600181015493830193909352600283015490820152600382015460608201526004820154608082015260059091015460ff16151560a082015290506104098183611090565b60016002848154811061041857fe5b6000918252602082206006919091020160050180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016921515929092179091555b8251811461053b5761046a611570565b83828151811061047657fe5b602002602001015190506000816000015173ffffffffffffffffffffffffffffffffffffffff16826040015183602001516040516104b49190611b51565b60006040518083038185875af1925050503d80600081146104f1576040519150601f19603f3d011682016040523d82523d6000602084013e6104f6565b606091505b5050905080610531576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038590611d15565b505060010161045a565b507f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f8360405161056b9190611c9f565b60405180910390a1505050565b60015481565b6000807f000000000000000000000000a26e80e7dea86279c6d778d702cc413e6cffa77773ffffffffffffffffffffffffffffffffffffffff166344a6958b8560016040518363ffffffff1660e01b81526004016105dd929190611c4d565b60606040518083038186803b1580156105f557600080fd5b505afa158015610609573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062d91906118ce565b602001516bffffffffffffffffffffffff16905060007f000000000000000000000000a26e80e7dea86279c6d778d702cc413e6cffa77773ffffffffffffffffffffffffffffffffffffffff1663f252b7a1867f00000000000000000000000000000000000000000000000000000000000000336040518363ffffffff1660e01b81526004016106be929190611c27565b60606040518083038186803b1580156106d657600080fd5b505afa1580156106ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061070e91906118ce565b602001516bffffffffffffffffffffffff16905061073760026107318484611249565b90611271565b925060005b845181146109e15760005b8181146107b65785818151811061075a57fe5b602002602001015186838151811061076e57fe5b602002602001015114156107ae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038590611ef3565b600101610747565b506107bf6115a7565b7f000000000000000000000000a26e80e7dea86279c6d778d702cc413e6cffa77773ffffffffffffffffffffffffffffffffffffffff16634bcc3f6787848151811061080757fe5b60200260200101516040518263ffffffff1660e01b815260040161082b9190611c9f565b604080518083038186803b15801561084257600080fd5b505afa158015610856573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061087a9190611884565b90508673ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff16146108e5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038590611fbc565b60007f000000000000000000000000a26e80e7dea86279c6d778d702cc413e6cffa77773ffffffffffffffffffffffffffffffffffffffff16633e4ad73288858151811061092f57fe5b60200260200101516040518263ffffffff1660e01b81526004016109539190611c9f565b60606040518083038186803b15801561096b57600080fd5b505afa15801561097f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a391906118ce565b60200151905060006109c46bffffffffffffffffffffffff83166002611271565b90506109d08782611249565b9650506001909201915061073c9050565b5050505b92915050565b7f0000000000000000000000006bf18019d3b286c7f9fd675de7ef1d89fd98510481565b7f000000000000000000000000000000000000000000000000000000000000003381565b60005481565b333014610a72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038590611de0565b600091909155600155565b60008054610a8b338461057e565b1015610ac3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103859061210a565b6000855111610afe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038590611d4c565b60007f000000000000000000000000a26e80e7dea86279c6d778d702cc413e6cffa77773ffffffffffffffffffffffffffffffffffffffff1663766718086040518163ffffffff1660e01b815260040160206040518083038186803b158015610b6657600080fd5b505afa158015610b7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b9e9190611945565b905080600201851015610bdd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038590611f85565b610be5610cc1565b600280546001810182556000919091526040519193506006027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0190610c2f908890602001611c81565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905280516020909101208255600182018790556002808401908301557f7e5c3a7773c4f27d279f6b711be3046cadedc9b136ca15d4d06e3aa7ec95340a90610caf903390879087908c908c908c90611b6d565b60405180910390a15050949350505050565b60025490565b610ccf610cc1565b8310610d07576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038590611e4e565b600083815260036020908152604080832033845290915290205460ff1615610d5b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038590611e17565b610d63611535565b60028481548110610d7057fe5b60009182526020918290206040805160c08101825260069093029091018054835260018101548385015260028101548383015260038101546060840152600480820154608085015260059091015460ff16151560a084015281517f76671808000000000000000000000000000000000000000000000000000000008152915192945073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000a26e80e7dea86279c6d778d702cc413e6cffa77716936376671808938383019391929091829003018186803b158015610e4c57600080fd5b505afa158015610e60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e849190611945565b8160400151141580610e9e5750610e9e816040015161129b565b15610ed5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610385906120d3565b6000610ee1338461057e565b905080610f1a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038590611e85565b8315610fb557610f518160028781548110610f3157fe5b90600052602060002090600602016003015461124990919063ffffffff16565b60028681548110610f5e57fe5b600091825260208083206003600690930201820193909355878252825260408082203383529092522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561104a565b610fe68160028781548110610fc657fe5b90600052602060002090600602016004015461124990919063ffffffff16565b60028681548110610ff357fe5b60009182526020808320600460069093020191909101929092558681526003825260408082203383529092522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b7f42beae5df566d9e7bf8de84274b353b28960a4fa51cbd2eec30cd42cbb4cf1043384878785604051611081959493929190611bdb565b60405180910390a15050505050565b81516040516110a3908390602001611c81565b60405160208183030381529060405280519060200120146110f0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038590612019565b6110f982611438565b61112f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038590611f28565b8160a001511561116b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038590611d83565b81602001517f000000000000000000000000a26e80e7dea86279c6d778d702cc413e6cffa77773ffffffffffffffffffffffffffffffffffffffff1663766718086040518163ffffffff1660e01b815260040160206040518083038186803b1580156111d657600080fd5b505afa1580156111ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061120e9190611945565b14611245576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038590612076565b5050565b60008282018381101561126a5761126a61126560008686611488565b61152d565b9392505050565b6000816112875761128761126560038585611488565b600082848161129257fe5b04949350505050565b6000807f000000000000000000000000a26e80e7dea86279c6d778d702cc413e6cffa77773ffffffffffffffffffffffffffffffffffffffff1663766718086040518163ffffffff1660e01b815260040160206040518083038186803b15801561130457600080fd5b505afa158015611318573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133c9190611945565b905082811015611350576000915050611433565b82811115611362576001915050611433565b600061142c7f000000000000000000000000000000000000000000000000000000000003f4807f000000000000000000000000a26e80e7dea86279c6d778d702cc413e6cffa77773ffffffffffffffffffffffffffffffffffffffff1663587da0236040518163ffffffff1660e01b815260040160206040518083038186803b1580156113ee57600080fd5b505afa158015611402573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114269190611945565b90611249565b4211925050505b919050565b6000611447826040015161129b565b61145357506000611433565b816080015182606001511161146a57506000611433565b6001548260600151101561148057506000611433565b506001919050565b606063e946c1bb60e01b8484846040516024016114a793929190611cf3565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915290509392505050565b805160208201fd5b6040518060c0016040528060008019168152602001600081526020016000815260200160008152602001600081526020016000151581525090565b6040518060600160405280600073ffffffffffffffffffffffffffffffffffffffff16815260200160608152602001600081525090565b604080518082019091526000808252602082015290565b80356109e5816121de565b600082601f8301126115d9578081fd5b81356115ec6115e78261218e565b612167565b81815291506020808301908481018184028601820187101561160d57600080fd5b60005b8481101561162c57813584529282019290820190600101611610565b505050505092915050565b600082601f830112611647578081fd5b81356116556115e78261218e565b818152915060208083019084810160005b8481101561162c57813587016060807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0838c030112156116a557600080fd5b6116ae81612167565b6116ba8b8785016115be565b815260408084013567ffffffffffffffff8111156116d757600080fd5b6116e58d8983880101611705565b888401525091909201359082015284529282019290820190600101611666565b600082601f830112611715578081fd5b813567ffffffffffffffff81111561172b578182fd5b61175c60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601612167565b915080825283602082850101111561177357600080fd5b8060208401602084013760009082016020015292915050565b80516bffffffffffffffffffffffff811681146109e557600080fd5b600080604083850312156117ba578182fd5b82356117c5816121de565b9150602083013567ffffffffffffffff8111156117e0578182fd5b6117ec858286016115c9565b9150509250929050565b6000806000806080858703121561180b578182fd5b843567ffffffffffffffff80821115611822578384fd5b61182e88838901611637565b955060208701359450604087013591508082111561184a578384fd5b61185688838901611705565b9350606087013591508082111561186b578283fd5b50611878878288016115c9565b91505092959194509250565b600060408284031215611895578081fd5b61189f6040612167565b82516118aa816121de565b8152602083015163ffffffff811681146118c2578283fd5b60208201529392505050565b6000606082840312156118df578081fd5b6118e96060612167565b825167ffffffffffffffff81168114611900578283fd5b815261190f846020850161178c565b6020820152611921846040850161178c565b60408201529392505050565b60006020828403121561193e578081fd5b5035919050565b600060208284031215611956578081fd5b5051919050565b6000806040838503121561196f578182fd5b823591506020830135611981816121de565b809150509250929050565b6000806040838503121561199e578182fd5b82359150602083013567ffffffffffffffff8111156119bb578182fd5b6117ec85828601611637565b6000806000606084860312156119db578081fd5b83359250602084013580151581146119f1578182fd5b9150604084013567ffffffffffffffff811115611a0c578182fd5b611a18868287016115c9565b9150509250925092565b60008060408385031215611a34578182fd5b50508035926020909101359150565b6000815180845260208085019450808401835b83811015611a7257815187529582019590820190600101611a56565b509495945050505050565b6000815180845260208085018081965082840281019150828601855b85811015611afa5782840389528151606073ffffffffffffffffffffffffffffffffffffffff8251168652868201518188880152611ad982880182611b07565b60409384015197909301969096525098850198935090840190600101611a99565b5091979650505050505050565b60008151808452611b1f8160208601602086016121ae565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60008251611b638184602087016121ae565b9190910192915050565b600073ffffffffffffffffffffffffffffffffffffffff8816825260c06020830152611b9c60c0830188611a43565b8660408401528281036060840152611bb48187611a7d565b905084608084015282810360a0840152611bce8185611b07565b9998505050505050505050565b600073ffffffffffffffffffffffffffffffffffffffff8716825260a06020830152611c0a60a0830187611a43565b604083019590955250911515606083015260809091015292915050565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff831681526040810160028310611c7457fe5b8260208301529392505050565b60006020825261126a6020830184611a7d565b901515815260200190565b90815260200190565b9586526020860194909452604085019290925260608401526080830152151560a082015260c00190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b6060810160048510611d0157fe5b938152602081019290925260409091015290565b6020808252601f908201527f657865637574652f414354494f4e5f455845435554494f4e5f4641494c454400604082015260600190565b6020808252601b908201527f70726f706f73652f4e4f5f414354494f4e535f50524f504f5345440000000000604082015260600190565b60208082526033908201527f5f61737365727450726f706f73616c45786563757461626c652f50524f504f5360408201527f414c5f414c52454144595f455845435554454400000000000000000000000000606082015260800190565b6020808252601a908201527f7570646174655468726573686f6c64732f4f4e4c595f53454c46000000000000604082015260600190565b60208082526016908201527f63617374566f74652f414c52454144595f564f54454400000000000000000000604082015260600190565b6020808252601c908201527f63617374566f74652f494e56414c49445f50524f504f53414c5f494400000000604082015260600190565b60208082526018908201527f63617374566f74652f4e4f5f564f54494e475f504f5745520000000000000000604082015260600190565b6020808252601b908201527f657865637574652f494e56414c49445f50524f504f53414c5f49440000000000604082015260600190565b6020808252818101527f676574566f74696e67506f7765722f4455504c49434154455f504f4f4c5f4944604082015260600190565b60208082526031908201527f5f61737365727450726f706f73616c45786563757461626c652f50524f504f5360408201527f414c5f4841535f4e4f545f504153534544000000000000000000000000000000606082015260800190565b6020808252601f908201527f70726f706f73652f494e56414c49445f455845435554494f4e5f45504f434800604082015260600190565b6020808252602b908201527f676574566f74696e67506f7765722f504f4f4c5f4e4f545f4f5045524154454460408201527f5f42595f4143434f554e54000000000000000000000000000000000000000000606082015260800190565b60208082526029908201527f5f61737365727450726f706f73616c45786563757461626c652f494e56414c4960408201527f445f414354494f4e530000000000000000000000000000000000000000000000606082015260800190565b60208082526033908201527f5f61737365727450726f706f73616c45786563757461626c652f43414e4e4f5460408201527f5f455845435554455f544849535f45504f434800000000000000000000000000606082015260800190565b60208082526019908201527f63617374566f74652f564f54494e475f49535f434c4f53454400000000000000604082015260600190565b60208082526021908201527f70726f706f73652f494e53554646494349454e545f564f54494e475f504f574560408201527f5200000000000000000000000000000000000000000000000000000000000000606082015260800190565b60405181810167ffffffffffffffff8111828210171561218657600080fd5b604052919050565b600067ffffffffffffffff8211156121a4578081fd5b5060209081020190565b60005b838110156121c95781810151838201526020016121b1565b838111156121d8576000848401525b50505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461220057600080fd5b5056fea2646970667358221220beb7bd791ce46663bffce41721f73b04087ddb2d67bcafb921eec826286badd064736f6c634300060c0033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000a26e80e7dea86279c6d778d702cc413e6cffa777000000000000000000000000000000000000000000000000000000000003f48000000000000000000000000000000000000000000000152d02c7e14af6800000000000000000000000000000000000000000000000084595161401484a0000000000000000000000000000000000000000000000000000000000000000000033

-----Decoded View---------------
Arg [0] : stakingProxy_ (address): 0xa26e80e7Dea86279c6d778D702Cc413E6CFfA777
Arg [1] : params (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000a26e80e7dea86279c6d778d702cc413e6cffa777
Arg [1] : 000000000000000000000000000000000000000000000000000000000003f480
Arg [2] : 00000000000000000000000000000000000000000000152d02c7e14af6800000
Arg [3] : 000000000000000000000000000000000000000000084595161401484a000000
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000033


Deployed Bytecode Sourcemap

994:12429:3:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1506:27;;;;;;;;;;-1:-1:-1;1506:27:3;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;;;:::i;:::-;;;;;;;;1346:46;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;1169:47::-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;1539:62::-;;;;;;;;;;-1:-1:-1;1539:62:3;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;7691:763::-;;;;;;:::i;:::-;;:::i;:::-;;1445:39;;;;;;;;;;;;;:::i;9292:1720::-;;;;;;;;;;-1:-1:-1;9292:1720:3;;;;;:::i;:::-;;:::i;1222:65::-;;;;;;;;;;;;;:::i;1293:47::-;;;;;;;;;;;;;:::i;1398:41::-;;;;;;;;;;;;;:::i;3024:323::-;;;;;;;;;;-1:-1:-1;3024:323:3;;;;;:::i;:::-;;:::i;4469:1148::-;;;;;;;;;;-1:-1:-1;4469:1148:3;;;;;:::i;:::-;;:::i;8559:146::-;;;;;;;;;;;;;:::i;6119:1342::-;;;;;;;;;;-1:-1:-1;6119:1342:3;;;;;:::i;:::-;;:::i;1506:27::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1506:27:3;;;;;;;:::o;1346:46::-;;;:::o;1169:47::-;;;:::o;1539:62::-;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;7691:763::-;7841:15;:13;:15::i;:::-;7827:10;:29;7823:97;;7872:37;;;;;;;;;;:::i;:::-;;;;;;;;7823:97;7929:24;;:::i;:::-;7956:9;7966:10;7956:21;;;;;;;;;;;;;;;;;7929:48;;;;;;;;7956:21;;;;;;;7929:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7987:44:3;7929:48;8023:7;7987:25;:44::i;:::-;8075:4;8042:9;8052:10;8042:21;;;;;;;;;;;;;;;;;;;;;:30;;:37;;;;;;;;;;;;;;8090:314;8115:7;:14;8110:1;:19;8090:314;;8150:28;;:::i;:::-;8181:7;8189:1;8181:10;;;;;;;;;;;;;;8150:41;;8206:15;8227:6;:13;;;:18;;8253:6;:12;;;8267:6;:11;;;8227:52;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8205:74;;;8318:10;8293:100;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;8131:3:3;;8090:314;;;;8419:28;8436:10;8419:28;;;;;;:::i;:::-;;;;;;;;7691:763;;;:::o;1445:39::-;;;;:::o;9292:1720::-;9429:19;9464:24;9491:12;:34;;;9539:7;9560:30;9491:109;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:129;;;9464:156;;;;9630:37;9670:12;:43;;;9727:7;9748:13;9670:101;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:121;;;9630:161;;;-1:-1:-1;9999:92:3;10089:1;9999:68;:16;9630:161;9999:37;:68::i;:::-;:89;;:92::i;:::-;9985:106;;10163:9;10158:819;10183:15;:22;10178:1;:27;10158:819;;10231:9;10226:209;10251:1;10246;:6;10226:209;;10328:15;10344:1;10328:18;;;;;;;;;;;;;;10306:15;10322:1;10306:18;;;;;;;;;;;;;;:40;;10277:143;;;;;;;;;;;;:::i;:::-;10254:3;;10226:209;;;;10448:25;;:::i;:::-;10476:12;:27;;;10504:15;10520:1;10504:18;;;;;;;;;;;;;;10476:47;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;10448:75;;10579:7;10562:24;;:4;:13;;;:24;;;10537:126;;;;;;;;;;;;:::i;:::-;10677:27;10707:12;:58;;;10766:15;10782:1;10766:18;;;;;;;;;;;;;;10707:78;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:115;;;;-1:-1:-1;10836:23:3;10862:40;:29;;;10900:1;10862:37;:40::i;:::-;10836:66;-1:-1:-1;10930:36:3;:11;10836:66;10930:19;:36::i;:::-;10916:50;-1:-1:-1;;10207:3:3;;;;;-1:-1:-1;10158:819:3;;-1:-1:-1;10158:819:3;;;10987:18;;9292:1720;;;;;:::o;1222:65::-;;;:::o;1293:47::-;;;:::o;1398:41::-;;;;:::o;3024:323::-;3186:10;3208:4;3186:27;3178:66;;;;;;;;;;;;:::i;:::-;3254:17;:40;;;;3304:15;:36;3024:323::o;4469:1148::-;4691:18;4793:17;;4746:43;4761:10;4773:15;4746:14;:43::i;:::-;:64;;4725:144;;;;;;;;;;;;:::i;:::-;4917:1;4900:7;:14;:18;4879:92;;;;;;;;;;;;:::i;:::-;4981:20;5004:12;:25;;;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4981:50;;5080:12;5095:1;5080:16;5062:14;:34;;5041:112;;;;;;;;;;;;:::i;:::-;5177:15;:13;:15::i;:::-;5233:9;:16;;;;;;;5202:28;5233:16;;;;5295:19;;5164:28;;-1:-1:-1;5233:16:3;;;;;5295:19;;5306:7;;5233:16;5295:19;;:::i;:::-;;;;;;;;;;;;;;;5285:30;;5295:19;5285:30;;;;5259:56;;5325:26;;;:43;;;5417:1;5402:16;;;5378:21;;;:40;5434:176;;;;5463:10;;5487:15;;5516:10;;5540:7;;5354:14;;5589:11;;5434:176;:::i;:::-;;;;;;;;4469:1148;;;;;;;;:::o;8559:146::-;8682:9;:16;8559:146;:::o;6119:1342::-;6299:15;:13;:15::i;:::-;6285:10;:29;6281:98;;6330:38;;;;;;;;;;:::i;6281:98::-;6392:20;;;;:8;:20;;;;;;;;6413:10;6392:32;;;;;;;;;;6388:95;;;6440:32;;;;;;;;;;:::i;6388:95::-;6493:24;;:::i;:::-;6520:9;6530:10;6520:21;;;;;;;;;;;;;;;;;6493:48;;;;;;;;6520:21;;;;;;;6493:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6590:27;;;;;;;6493:48;;-1:-1:-1;6590:25:3;:12;:25;;;;:27;;;;6520:21;;6590:27;;;;;;;:25;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6568:8;:18;;;:49;;:98;;;;6633:33;6647:8;:18;;;6633:13;:33::i;:::-;6551:186;;;6691:35;;;;;;;;;;:::i;6551:186::-;6747:19;6769:43;6784:10;6796:15;6769:14;:43::i;:::-;6747:65;-1:-1:-1;6826:16:3;6822:81;;6858:34;;;;;;;;;;:::i;6822:81::-;6917:7;6913:385;;;6973:68;7029:11;6973:9;6983:10;6973:21;;;;;;;;;;;;;;;;;;:30;;;:55;;:68;;;;:::i;:::-;6940:9;6950:10;6940:21;;;;;;;;;;;;;;;;:30;:21;;;;;:30;;:101;;;;7055:20;;;;;;;;;7076:10;7055:32;;;;;;:39;;;;7090:4;7055:39;;;6913:385;;;7162:72;7222:11;7162:9;7172:10;7162:21;;;;;;;;;;;;;;;;;;:34;;;:59;;:72;;;;:::i;:::-;7125:9;7135:10;7125:21;;;;;;;;;;;;;;;;:34;:21;;;;;:34;;;;:109;;;;7248:20;;;:8;:20;;;;;;7269:10;7248:32;;;;;;:39;;;;7283:4;7248:39;;;6913:385;7313:141;7335:10;7359:15;7388:10;7412:7;7433:11;7313:141;;;;;;;;;;:::i;:::-;;;;;;;;6119:1342;;;;;:::o;11156:730::-;11370:20;;11346:19;;;;11357:7;;11346:19;;;:::i;:::-;;;;;;;;;;;;;11336:30;;;;;;:54;11315:142;;;;;;;;;;;;:::i;:::-;11488:28;11507:8;11488:18;:28::i;:::-;11467:124;;;;;;;;;;;;:::i;:::-;11623:8;:17;;;11622:18;11601:116;;;;;;;;;;;;:::i;:::-;11779:8;:23;;;11748:12;:25;;;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:54;11727:152;;;;;;;;;;;;:::i;:::-;11156:730;;:::o;2004:392:7:-;2090:7;2125:5;;;2144;;;2140:232;;;2165:196;2190:170;2250:58;2326:1;2345;2190:42;:170::i;:::-;2165:24;:196::i;:::-;2388:1;2004:392;-1:-1:-1;;;2004:392:7:o;1227:::-;1313:7;1340:6;1336:232;;1362:195;1387:169;1447:57;1522:1;1541;1387:42;:169::i;1362:195::-;1577:9;1593:1;1589;:5;;;;;;;1227:392;-1:-1:-1;;;;1227:392:7:o;12827:594:3:-;12915:13;12944:20;12967:12;:25;;;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;12944:50;;13023:9;13008:12;:24;13004:67;;;13055:5;13048:12;;;;;13004:67;13099:9;13084:12;:24;13080:66;;;13131:4;13124:11;;;;;13080:66;13253:19;13275:93;13355:12;13275;:56;;;:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:79;;:93::i;:::-;13385:15;:29;;-1:-1:-1;;;12827:594:3;;;;:::o;12064:548::-;12164:14;12257:33;12271:8;:18;;;12257:13;:33::i;:::-;12252:77;;-1:-1:-1;12313:5:3;12306:12;;12252:77;12398:8;:21;;;12377:8;:17;;;:42;12373:85;;-1:-1:-1;12442:5:3;12435:12;;12373:85;12531:15;;12511:8;:17;;;:35;12507:78;;;-1:-1:-1;12569:5:3;12562:12;;12507:78;-1:-1:-1;12601:4:3;12064:548;;;:::o;1401:322:10:-;1554:12;818:10;1625:28;;1667:9;1690:1;1705;1589:127;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1401:322:10;;;;;:::o;1531:170:9:-;1674:9;1668:16;1661:4;1650:9;1646:20;1639:46;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;:::o;5:130::-;72:20;;97:33;72:20;97:33;:::i;301:707::-;;418:3;411:4;403:6;399:17;395:27;385:2;;-1:-1;;426:12;385:2;473:6;460:20;495:80;510:64;567:6;510:64;:::i;:::-;495:80;:::i;:::-;603:21;;;486:89;-1:-1;647:4;660:14;;;;635:17;;;749;;;740:27;;;;737:36;-1:-1;734:2;;;786:1;;776:12;734:2;811:1;796:206;821:6;818:1;815:13;796:206;;;2038:20;;889:50;;953:14;;;;981;;;;843:1;836:9;796:206;;;800:14;;;;;378:630;;;;:::o;1061:771::-;;1209:3;1202:4;1194:6;1190:17;1186:27;1176:2;;-1:-1;;1217:12;1176:2;1264:6;1251:20;1286:111;1301:95;1389:6;1301:95;:::i;1286:111::-;1425:21;;;1277:120;-1:-1;1469:4;1482:14;;;;1457:17;;;1577:1;1562:264;1587:6;1584:1;1581:13;1562:264;;;1670:3;1657:17;1461:6;1645:30;3710:4;;3689:19;1645:30;3693:3;3689:19;;3685:30;3682:2;;;1577:1;;3718:12;3682:2;3746:20;3710:4;3746:20;:::i;:::-;3850:49;3895:3;1469:4;1645:30;;3850:49;:::i;:::-;3832:16;3825:75;3974:18;;1645:30;3974:18;3961:32;4013:18;4005:6;4002:30;3999:2;;;1577:1;;4035:12;3999:2;4080:58;4134:3;1469:4;4125:6;1645:30;4110:22;;4080:58;:::i;:::-;4062:16;;;4055:84;-1:-1;4255:22;;;;5113:20;4216:16;;;4209:75;1682:81;;1777:14;;;;1805;;;;1609:1;1602:9;1562:264;;2109:440;;2210:3;2203:4;2195:6;2191:17;2187:27;2177:2;;-1:-1;;2218:12;2177:2;2265:6;2252:20;35922:18;35914:6;35911:30;35908:2;;;-1:-1;;35944:12;35908:2;2287:64;36085:4;36017:9;2203:4;36002:6;35998:17;35994:33;36075:15;2287:64;:::i;:::-;2278:73;;2371:6;2364:5;2357:21;2475:3;36085:4;2466:6;2399;2457:16;;2454:25;2451:2;;;2492:1;;2482:12;2451:2;40957:6;36085:4;2399:6;2395:17;36085:4;2433:5;2429:16;40934:30;41013:1;40995:16;;;36085:4;40995:16;40988:27;2433:5;2170:379;-1:-1;;2170:379::o;5602:132::-;5679:13;;39551:26;39540:38;;42433:34;;42423:2;;42481:1;;42471:12;5741:502;;;5887:2;5875:9;5866:7;5862:23;5858:32;5855:2;;;-1:-1;;5893:12;5855:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;5945:63;-1:-1;6073:2;6058:18;;6045:32;6097:18;6086:30;;6083:2;;;-1:-1;;6119:12;6083:2;6149:78;6219:7;6210:6;6199:9;6195:22;6149:78;:::i;:::-;6139:88;;;5849:394;;;;;:::o;6250:1057::-;;;;;6496:3;6484:9;6475:7;6471:23;6467:33;6464:2;;;-1:-1;;6503:12;6464:2;6561:17;6548:31;6599:18;;6591:6;6588:30;6585:2;;;-1:-1;;6621:12;6585:2;6651:109;6752:7;6743:6;6732:9;6728:22;6651:109;:::i;:::-;6641:119;;6797:2;6840:9;6836:22;5113:20;6805:63;;6933:2;6922:9;6918:18;6905:32;6891:46;;6599:18;6949:6;6946:30;6943:2;;;-1:-1;;6979:12;6943:2;7009:63;7064:7;7055:6;7044:9;7040:22;7009:63;:::i;:::-;6999:73;;7137:2;7126:9;7122:18;7109:32;7095:46;;6599:18;7153:6;7150:30;7147:2;;;-1:-1;;7183:12;7147:2;;7213:78;7283:7;7274:6;7263:9;7259:22;7213:78;:::i;:::-;7203:88;;;6458:849;;;;;;;:::o;7314:303::-;;7449:2;7437:9;7428:7;7424:23;7420:32;7417:2;;;-1:-1;;7455:12;7417:2;3191:20;7449:2;3191:20;:::i;:::-;226:6;220:13;238:33;265:5;238:33;:::i;:::-;3272:86;;3428:2;3492:22;;5401:13;39353:10;39342:22;;42189:34;;42179:2;;-1:-1;;42227:12;42179:2;3428;3443:16;;3436:85;3447:5;7411:206;-1:-1;;;7411:206::o;7624:321::-;;7768:2;7756:9;7747:7;7743:23;7739:32;7736:2;;;-1:-1;;7774:12;7736:2;4513:20;7768:2;4513:20;:::i;:::-;5546:6;5540:13;39448:18;42338:5;39437:30;42314:5;42311:34;42301:2;;-1:-1;;42349:12;42301:2;4598:85;;4792:59;4847:3;4759:2;4823:22;;4792:59;:::i;:::-;4759:2;4778:5;4774:16;4767:85;4958:59;5013:3;4925:2;4993:9;4989:22;4958:59;:::i;:::-;4925:2;4940:16;;4933:85;4944:5;7730:215;-1:-1;;;7730:215::o;7952:241::-;;8056:2;8044:9;8035:7;8031:23;8027:32;8024:2;;;-1:-1;;8062:12;8024:2;-1:-1;5113:20;;8018:175;-1:-1;8018:175::o;8200:263::-;;8315:2;8303:9;8294:7;8290:23;8286:32;8283:2;;;-1:-1;;8321:12;8283:2;-1:-1;5261:13;;8277:186;-1:-1;8277:186::o;8470:366::-;;;8591:2;8579:9;8570:7;8566:23;8562:32;8559:2;;;-1:-1;;8597:12;8559:2;5126:6;5113:20;8649:63;;8749:2;8792:9;8788:22;72:20;97:33;124:5;97:33;:::i;:::-;8757:63;;;;8553:283;;;;;:::o;8843:564::-;;;9020:2;9008:9;8999:7;8995:23;8991:32;8988:2;;;-1:-1;;9026:12;8988:2;5126:6;5113:20;9078:63;;9206:2;9195:9;9191:18;9178:32;9230:18;9222:6;9219:30;9216:2;;;-1:-1;;9252:12;9216:2;9282:109;9383:7;9374:6;9363:9;9359:22;9282:109;:::i;9414:621::-;;;;9574:2;9562:9;9553:7;9549:23;9545:32;9542:2;;;-1:-1;;9580:12;9542:2;5126:6;5113:20;9632:63;;9732:2;9772:9;9768:22;1904:20;41846:5;38675:13;38668:21;41824:5;41821:32;41811:2;;-1:-1;;41857:12;41811:2;9740:60;-1:-1;9865:2;9850:18;;9837:32;9889:18;9878:30;;9875:2;;;-1:-1;;9911:12;9875:2;9941:78;10011:7;10002:6;9991:9;9987:22;9941:78;:::i;:::-;9931:88;;;9536:499;;;;;:::o;10042:366::-;;;10163:2;10151:9;10142:7;10138:23;10134:32;10131:2;;;-1:-1;;10169:12;10131:2;-1:-1;;5113:20;;;10321:2;10360:22;;;5113:20;;-1:-1;10125:283::o;11293:690::-;;11486:5;36886:12;37751:6;37746:3;37739:19;37788:4;;37783:3;37779:14;11498:93;;37788:4;11662:5;36551:14;-1:-1;11701:260;11726:6;11723:1;11720:13;11701:260;;;11787:13;;13352:37;;10569:14;;;;37448;;;;11748:1;11741:9;11701:260;;;-1:-1;11967:10;;11417:566;-1:-1;;;;;11417:566::o;12076:1096::-;;12362:5;36886:12;37751:6;37746:3;37739:19;37788:4;;37783:3;37779:14;12374:124;;;;37788:4;12555:6;12551:17;12546:3;12542:27;12530:39;;37788:4;12671:5;36551:14;-1:-1;12710:423;12735:6;12732:1;12729:13;12710:423;;;12797:9;12791:4;12787:20;12782:3;12775:33;12842:6;12836:13;21183:4;39147:42;21257:16;21251:23;39136:54;11100:3;11093:37;37788:4;21415:5;21411:16;21405:23;21183:4;37788;21452:3;21448:14;21441:38;21494:71;21183:4;21178:3;21174:14;21546:12;21494:71;:::i;:::-;21651:4;21640:16;;;21634:23;21711:14;;;;13352:37;;;;-1:-1;13112:14;;;;21486:79;-1:-1;37448:14;;;;12757:1;12750:9;12710:423;;;-1:-1;13156:10;;12262:910;-1:-1;;;;;;;12262:910::o;13521:323::-;;13653:5;36886:12;37751:6;37746:3;37739:19;13736:52;13781:6;37788:4;37783:3;37779:14;37788:4;13762:5;13758:16;13736:52;:::i;:::-;41394:2;41374:14;41390:7;41370:28;13800:39;;;;37788:4;13800:39;;13601:243;-1:-1;;13601:243::o;21995:271::-;;14011:5;36886:12;14122:52;14167:6;14162:3;14155:4;14148:5;14144:16;14122:52;:::i;:::-;14186:16;;;;;22129:137;-1:-1;;22129:137::o;22273:1304::-;;39147:42;38591:5;39136:54;10969:3;10962:58;22730:3;22857:2;22846:9;22842:18;22835:48;22897:108;22730:3;22719:9;22715:19;22991:6;22897:108;:::i;:::-;13382:5;23084:2;23073:9;23069:18;13352:37;23136:9;23130:4;23126:20;23121:2;23110:9;23106:18;23099:48;23161:170;23326:4;23317:6;23161:170;:::i;:::-;23153:178;;13382:5;23410:3;23399:9;23395:19;13352:37;23464:9;23458:4;23454:20;23448:3;23437:9;23433:19;23426:49;23489:78;23562:4;23553:6;23489:78;:::i;:::-;23481:86;22701:876;-1:-1;;;;;;;;;22701:876::o;23584:820::-;;39147:42;38591:5;39136:54;10969:3;10962:58;23875:3;24002:2;23991:9;23987:18;23980:48;24042:108;23875:3;23864:9;23860:19;24136:6;24042:108;:::i;:::-;24229:2;24214:18;;13352:37;;;;-1:-1;38675:13;;38668:21;24306:2;24291:18;;13245:34;24389:3;24374:19;;;13352:37;24034:116;23846:558;-1:-1;;23846:558::o;24411:333::-;39147:42;39136:54;;;;11093:37;;24730:2;24715:18;;13352:37;24566:2;24551:18;;24537:207::o;24751:357::-;39147:42;39136:54;;11093:37;;24918:2;24903:18;;41612:1;41602:12;;41592:2;;41618:9;41592:2;40582:38;25094:2;25083:9;25079:18;14816:62;24889:219;;;;;:::o;25115:494::-;;25354:2;25375:17;25368:47;25429:170;25354:2;25343:9;25339:18;25585:6;25429:170;:::i;25616:210::-;38675:13;;38668:21;13245:34;;25737:2;25722:18;;25708:118::o;25833:222::-;13352:37;;;25960:2;25945:18;;25931:124::o;26062:768::-;13352:37;;;26488:2;26473:18;;13352:37;;;;26571:2;26556:18;;13352:37;;;;26654:2;26639:18;;13352:37;26737:3;26722:19;;13352:37;38675:13;38668:21;26815:3;26800:19;;13245:34;26323:3;26308:19;;26294:536::o;26837:274::-;39147:42;39136:54;;;;14311:76;;26990:2;26975:18;;26961:150::o;27379:480::-;27580:2;27565:18;;41500:1;41490:12;;41480:2;;41506:9;41480:2;14653:68;;;27762:2;27747:18;;13352:37;;;;27845:2;27830:18;;;13352:37;27551:308;:::o;27866:416::-;28066:2;28080:47;;;15469:2;28051:18;;;37739:19;15505:33;37779:14;;;15485:54;15558:12;;;28037:245::o;28289:416::-;28489:2;28503:47;;;15809:2;28474:18;;;37739:19;15845:29;37779:14;;;15825:50;15894:12;;;28460:245::o;28712:416::-;28912:2;28926:47;;;16145:2;28897:18;;;37739:19;16181:34;37779:14;;;16161:55;16250:21;16236:12;;;16229:43;16291:12;;;28883:245::o;29135:416::-;29335:2;29349:47;;;16542:2;29320:18;;;37739:19;16578:28;37779:14;;;16558:49;16626:12;;;29306:245::o;29558:416::-;29758:2;29772:47;;;16877:2;29743:18;;;37739:19;16913:24;37779:14;;;16893:45;16957:12;;;29729:245::o;29981:416::-;30181:2;30195:47;;;17208:2;30166:18;;;37739:19;17244:30;37779:14;;;17224:51;17294:12;;;30152:245::o;30404:416::-;30604:2;30618:47;;;17545:2;30589:18;;;37739:19;17581:26;37779:14;;;17561:47;17627:12;;;30575:245::o;30827:416::-;31027:2;31041:47;;;17878:2;31012:18;;;37739:19;17914:29;37779:14;;;17894:50;17963:12;;;30998:245::o;31250:416::-;31450:2;31464:47;;;31435:18;;;37739:19;18250:34;37779:14;;;18230:55;18304:12;;;31421:245::o;31673:416::-;31873:2;31887:47;;;18555:2;31858:18;;;37739:19;18591:34;37779:14;;;18571:55;18660:19;18646:12;;;18639:41;18699:12;;;31844:245::o;32096:416::-;32296:2;32310:47;;;18950:2;32281:18;;;37739:19;18986:33;37779:14;;;18966:54;19039:12;;;32267:245::o;32519:416::-;32719:2;32733:47;;;19290:2;32704:18;;;37739:19;19326:34;37779:14;;;19306:55;19395:13;19381:12;;;19374:35;19428:12;;;32690:245::o;32942:416::-;33142:2;33156:47;;;19679:2;33127:18;;;37739:19;19715:34;37779:14;;;19695:55;19784:11;19770:12;;;19763:33;19815:12;;;33113:245::o;33365:416::-;33565:2;33579:47;;;20066:2;33550:18;;;37739:19;20102:34;37779:14;;;20082:55;20171:21;20157:12;;;20150:43;20212:12;;;33536:245::o;33788:416::-;33988:2;34002:47;;;20463:2;33973:18;;;37739:19;20499:27;37779:14;;;20479:48;20546:12;;;33959:245::o;34211:416::-;34411:2;34425:47;;;20797:2;34396:18;;;37739:19;20833:34;37779:14;;;20813:55;20902:3;20888:12;;;20881:25;20925:12;;;34382:245::o;34863:256::-;34925:2;34919:9;34951:17;;;35026:18;35011:34;;35047:22;;;35008:62;35005:2;;;35083:1;;35073:12;35005:2;34925;35092:22;34903:216;;-1:-1;34903:216::o;35126:304::-;;35285:18;35277:6;35274:30;35271:2;;;-1:-1;;35307:12;35271:2;-1:-1;35352:4;35340:17;;;35405:15;;35208:222::o;41030:268::-;41095:1;41102:101;41116:6;41113:1;41110:13;41102:101;;;41183:11;;;41177:18;41164:11;;;41157:39;41138:2;41131:10;41102:101;;;41218:6;41215:1;41212:13;41209:2;;;41095:1;41274:6;41269:3;41265:16;41258:27;41209:2;;41079:219;;;:::o;41641:117::-;39147:42;41728:5;39136:54;41703:5;41700:35;41690:2;;41749:1;;41739:12;41690:2;41684:74;:::o

Swarm Source

ipfs://beb7bd791ce46663bffce41721f73b04087ddb2d67bcafb921eec826286badd0

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.