ETH Price: $3,389.36 (-1.40%)
Gas: 2 Gwei

Contract

0x65Afe015BD9850b3374aB67753E8D641d4742482
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value

There are no matching entries

Please try again later

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To Value
167147002023-02-26 20:11:35488 days ago1677442295  Contract Creation0 ETH
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x2Ba1E904...EcD6E2bcA
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
DesignatedVotingV2

Compiler Version
v0.8.16+commit.07a7930e

Optimization Enabled:
Yes with 1000000 runs

Other Settings:
default evmVersion, GNU GPLv3 license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2023-02-26
*/

// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity 0.8.16;

// File @openzeppelin/contracts/token/ERC20/[email protected]



// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)


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

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

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

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

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

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

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

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


// File @openzeppelin/contracts/token/ERC20/extensions/[email protected]


// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)



/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}


// File @openzeppelin/contracts/utils/[email protected]


// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)



/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}


// File @openzeppelin/contracts/token/ERC20/[email protected]


// OpenZeppelin Contracts v4.4.1 (token/ERC20/ERC20.sol)





/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - amount);
        }

        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(_msgSender(), spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}


// File @openzeppelin/contracts/utils/math/[email protected]


// OpenZeppelin Contracts v4.4.1 (utils/math/Math.sol)



/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a / b + (a % b == 0 ? 0 : 1);
    }
}


// File @openzeppelin/contracts/utils/[email protected]


// OpenZeppelin Contracts v4.4.1 (utils/Arrays.sol)



/**
 * @dev Collection of functions related to array types.
 */
library Arrays {
    /**
     * @dev Searches a sorted `array` and returns the first index that contains
     * a value greater or equal to `element`. If no such index exists (i.e. all
     * values in the array are strictly less than `element`), the array length is
     * returned. Time complexity O(log n).
     *
     * `array` is expected to be sorted in ascending order, and to contain no
     * repeated elements.
     */
    function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) {
        if (array.length == 0) {
            return 0;
        }

        uint256 low = 0;
        uint256 high = array.length;

        while (low < high) {
            uint256 mid = Math.average(low, high);

            // Note that mid will always be strictly less than high (i.e. it will be a valid array index)
            // because Math.average rounds down (it does integer division with truncation).
            if (array[mid] > element) {
                high = mid;
            } else {
                low = mid + 1;
            }
        }

        // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound.
        if (low > 0 && array[low - 1] == element) {
            return low - 1;
        } else {
            return low;
        }
    }
}


// File @openzeppelin/contracts/utils/[email protected]


// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)



/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}


// File @openzeppelin/contracts/token/ERC20/extensions/[email protected]


// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Snapshot.sol)





/**
 * @dev This contract extends an ERC20 token with a snapshot mechanism. When a snapshot is created, the balances and
 * total supply at the time are recorded for later access.
 *
 * This can be used to safely create mechanisms based on token balances such as trustless dividends or weighted voting.
 * In naive implementations it's possible to perform a "double spend" attack by reusing the same balance from different
 * accounts. By using snapshots to calculate dividends or voting power, those attacks no longer apply. It can also be
 * used to create an efficient ERC20 forking mechanism.
 *
 * Snapshots are created by the internal {_snapshot} function, which will emit the {Snapshot} event and return a
 * snapshot id. To get the total supply at the time of a snapshot, call the function {totalSupplyAt} with the snapshot
 * id. To get the balance of an account at the time of a snapshot, call the {balanceOfAt} function with the snapshot id
 * and the account address.
 *
 * NOTE: Snapshot policy can be customized by overriding the {_getCurrentSnapshotId} method. For example, having it
 * return `block.number` will trigger the creation of snapshot at the begining of each new block. When overridding this
 * function, be careful about the monotonicity of its result. Non-monotonic snapshot ids will break the contract.
 *
 * Implementing snapshots for every block using this method will incur significant gas costs. For a gas-efficient
 * alternative consider {ERC20Votes}.
 *
 * ==== Gas Costs
 *
 * Snapshots are efficient. Snapshot creation is _O(1)_. Retrieval of balances or total supply from a snapshot is _O(log
 * n)_ in the number of snapshots that have been created, although _n_ for a specific account will generally be much
 * smaller since identical balances in subsequent snapshots are stored as a single entry.
 *
 * There is a constant overhead for normal ERC20 transfers due to the additional snapshot bookkeeping. This overhead is
 * only significant for the first transfer that immediately follows a snapshot for a particular account. Subsequent
 * transfers will have normal cost until the next snapshot, and so on.
 */

abstract contract ERC20Snapshot is ERC20 {
    // Inspired by Jordi Baylina's MiniMeToken to record historical balances:
    // https://github.com/Giveth/minimd/blob/ea04d950eea153a04c51fa510b068b9dded390cb/contracts/MiniMeToken.sol

    using Arrays for uint256[];
    using Counters for Counters.Counter;

    // Snapshotted values have arrays of ids and the value corresponding to that id. These could be an array of a
    // Snapshot struct, but that would impede usage of functions that work on an array.
    struct Snapshots {
        uint256[] ids;
        uint256[] values;
    }

    mapping(address => Snapshots) private _accountBalanceSnapshots;
    Snapshots private _totalSupplySnapshots;

    // Snapshot ids increase monotonically, with the first value being 1. An id of 0 is invalid.
    Counters.Counter private _currentSnapshotId;

    /**
     * @dev Emitted by {_snapshot} when a snapshot identified by `id` is created.
     */
    event Snapshot(uint256 id);

    /**
     * @dev Creates a new snapshot and returns its snapshot id.
     *
     * Emits a {Snapshot} event that contains the same id.
     *
     * {_snapshot} is `internal` and you have to decide how to expose it externally. Its usage may be restricted to a
     * set of accounts, for example using {AccessControl}, or it may be open to the public.
     *
     * [WARNING]
     * ====
     * While an open way of calling {_snapshot} is required for certain trust minimization mechanisms such as forking,
     * you must consider that it can potentially be used by attackers in two ways.
     *
     * First, it can be used to increase the cost of retrieval of values from snapshots, although it will grow
     * logarithmically thus rendering this attack ineffective in the long term. Second, it can be used to target
     * specific accounts and increase the cost of ERC20 transfers for them, in the ways specified in the Gas Costs
     * section above.
     *
     * We haven't measured the actual numbers; if this is something you're interested in please reach out to us.
     * ====
     */
    function _snapshot() internal virtual returns (uint256) {
        _currentSnapshotId.increment();

        uint256 currentId = _getCurrentSnapshotId();
        emit Snapshot(currentId);
        return currentId;
    }

    /**
     * @dev Get the current snapshotId
     */
    function _getCurrentSnapshotId() internal view virtual returns (uint256) {
        return _currentSnapshotId.current();
    }

    /**
     * @dev Retrieves the balance of `account` at the time `snapshotId` was created.
     */
    function balanceOfAt(address account, uint256 snapshotId) public view virtual returns (uint256) {
        (bool snapshotted, uint256 value) = _valueAt(snapshotId, _accountBalanceSnapshots[account]);

        return snapshotted ? value : balanceOf(account);
    }

    /**
     * @dev Retrieves the total supply at the time `snapshotId` was created.
     */
    function totalSupplyAt(uint256 snapshotId) public view virtual returns (uint256) {
        (bool snapshotted, uint256 value) = _valueAt(snapshotId, _totalSupplySnapshots);

        return snapshotted ? value : totalSupply();
    }

    // Update balance and/or total supply snapshots before the values are modified. This is implemented
    // in the _beforeTokenTransfer hook, which is executed for _mint, _burn, and _transfer operations.
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, amount);

        if (from == address(0)) {
            // mint
            _updateAccountSnapshot(to);
            _updateTotalSupplySnapshot();
        } else if (to == address(0)) {
            // burn
            _updateAccountSnapshot(from);
            _updateTotalSupplySnapshot();
        } else {
            // transfer
            _updateAccountSnapshot(from);
            _updateAccountSnapshot(to);
        }
    }

    function _valueAt(uint256 snapshotId, Snapshots storage snapshots) private view returns (bool, uint256) {
        require(snapshotId > 0, "ERC20Snapshot: id is 0");
        require(snapshotId <= _getCurrentSnapshotId(), "ERC20Snapshot: nonexistent id");

        // When a valid snapshot is queried, there are three possibilities:
        //  a) The queried value was not modified after the snapshot was taken. Therefore, a snapshot entry was never
        //  created for this id, and all stored snapshot ids are smaller than the requested one. The value that corresponds
        //  to this id is the current one.
        //  b) The queried value was modified after the snapshot was taken. Therefore, there will be an entry with the
        //  requested id, and its value is the one to return.
        //  c) More snapshots were created after the requested one, and the queried value was later modified. There will be
        //  no entry for the requested id: the value that corresponds to it is that of the smallest snapshot id that is
        //  larger than the requested one.
        //
        // In summary, we need to find an element in an array, returning the index of the smallest value that is larger if
        // it is not found, unless said value doesn't exist (e.g. when all values are smaller). Arrays.findUpperBound does
        // exactly this.

        uint256 index = snapshots.ids.findUpperBound(snapshotId);

        if (index == snapshots.ids.length) {
            return (false, 0);
        } else {
            return (true, snapshots.values[index]);
        }
    }

    function _updateAccountSnapshot(address account) private {
        _updateSnapshot(_accountBalanceSnapshots[account], balanceOf(account));
    }

    function _updateTotalSupplySnapshot() private {
        _updateSnapshot(_totalSupplySnapshots, totalSupply());
    }

    function _updateSnapshot(Snapshots storage snapshots, uint256 currentValue) private {
        uint256 currentId = _getCurrentSnapshotId();
        if (_lastSnapshotId(snapshots.ids) < currentId) {
            snapshots.ids.push(currentId);
            snapshots.values.push(currentValue);
        }
    }

    function _lastSnapshotId(uint256[] storage ids) private view returns (uint256) {
        if (ids.length == 0) {
            return 0;
        } else {
            return ids[ids.length - 1];
        }
    }
}


// File @openzeppelin/contracts/utils/[email protected]


// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)



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

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

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

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

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

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

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

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

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}


// File @openzeppelin/contracts/token/ERC20/utils/[email protected]


// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)




/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}


// File contracts/common/implementation/MultiRole.sol




library Exclusive {
    struct RoleMembership {
        address member;
    }

    function isMember(RoleMembership storage roleMembership, address memberToCheck) internal view returns (bool) {
        return roleMembership.member == memberToCheck;
    }

    function resetMember(RoleMembership storage roleMembership, address newMember) internal {
        require(newMember != address(0x0), "Cannot set an exclusive role to 0x0");
        roleMembership.member = newMember;
    }

    function getMember(RoleMembership storage roleMembership) internal view returns (address) {
        return roleMembership.member;
    }

    function init(RoleMembership storage roleMembership, address initialMember) internal {
        resetMember(roleMembership, initialMember);
    }
}

library Shared {
    struct RoleMembership {
        mapping(address => bool) members;
    }

    function isMember(RoleMembership storage roleMembership, address memberToCheck) internal view returns (bool) {
        return roleMembership.members[memberToCheck];
    }

    function addMember(RoleMembership storage roleMembership, address memberToAdd) internal {
        require(memberToAdd != address(0x0), "Cannot add 0x0 to a shared role");
        roleMembership.members[memberToAdd] = true;
    }

    function removeMember(RoleMembership storage roleMembership, address memberToRemove) internal {
        roleMembership.members[memberToRemove] = false;
    }

    function init(RoleMembership storage roleMembership, address[] memory initialMembers) internal {
        for (uint256 i = 0; i < initialMembers.length; i++) {
            addMember(roleMembership, initialMembers[i]);
        }
    }
}

/**
 * @title Base class to manage permissions for the derived class.
 */
abstract contract MultiRole {
    using Exclusive for Exclusive.RoleMembership;
    using Shared for Shared.RoleMembership;

    enum RoleType { Invalid, Exclusive, Shared }

    struct Role {
        uint256 managingRole;
        RoleType roleType;
        Exclusive.RoleMembership exclusiveRoleMembership;
        Shared.RoleMembership sharedRoleMembership;
    }

    mapping(uint256 => Role) private roles;

    event ResetExclusiveMember(uint256 indexed roleId, address indexed newMember, address indexed manager);
    event AddedSharedMember(uint256 indexed roleId, address indexed newMember, address indexed manager);
    event RemovedSharedMember(uint256 indexed roleId, address indexed oldMember, address indexed manager);

    /**
     * @notice Reverts unless the caller is a member of the specified roleId.
     */
    modifier onlyRoleHolder(uint256 roleId) {
        require(holdsRole(roleId, msg.sender), "Sender does not hold required role");
        _;
    }

    /**
     * @notice Reverts unless the caller is a member of the manager role for the specified roleId.
     */
    modifier onlyRoleManager(uint256 roleId) {
        require(holdsRole(roles[roleId].managingRole, msg.sender), "Can only be called by a role manager");
        _;
    }

    /**
     * @notice Reverts unless the roleId represents an initialized, exclusive roleId.
     */
    modifier onlyExclusive(uint256 roleId) {
        require(roles[roleId].roleType == RoleType.Exclusive, "Must be called on an initialized Exclusive role");
        _;
    }

    /**
     * @notice Reverts unless the roleId represents an initialized, shared roleId.
     */
    modifier onlyShared(uint256 roleId) {
        require(roles[roleId].roleType == RoleType.Shared, "Must be called on an initialized Shared role");
        _;
    }

    /**
     * @notice Whether `memberToCheck` is a member of roleId.
     * @dev Reverts if roleId does not correspond to an initialized role.
     * @param roleId the Role to check.
     * @param memberToCheck the address to check.
     * @return True if `memberToCheck` is a member of `roleId`.
     */
    function holdsRole(uint256 roleId, address memberToCheck) public view returns (bool) {
        Role storage role = roles[roleId];
        if (role.roleType == RoleType.Exclusive) {
            return role.exclusiveRoleMembership.isMember(memberToCheck);
        } else if (role.roleType == RoleType.Shared) {
            return role.sharedRoleMembership.isMember(memberToCheck);
        }
        revert("Invalid roleId");
    }

    /**
     * @notice Changes the exclusive role holder of `roleId` to `newMember`.
     * @dev Reverts if the caller is not a member of the managing role for `roleId` or if `roleId` is not an
     * initialized, ExclusiveRole.
     * @param roleId the ExclusiveRole membership to modify.
     * @param newMember the new ExclusiveRole member.
     */
    function resetMember(uint256 roleId, address newMember) public onlyExclusive(roleId) onlyRoleManager(roleId) {
        roles[roleId].exclusiveRoleMembership.resetMember(newMember);
        emit ResetExclusiveMember(roleId, newMember, msg.sender);
    }

    /**
     * @notice Gets the current holder of the exclusive role, `roleId`.
     * @dev Reverts if `roleId` does not represent an initialized, exclusive role.
     * @param roleId the ExclusiveRole membership to check.
     * @return the address of the current ExclusiveRole member.
     */
    function getMember(uint256 roleId) public view onlyExclusive(roleId) returns (address) {
        return roles[roleId].exclusiveRoleMembership.getMember();
    }

    /**
     * @notice Adds `newMember` to the shared role, `roleId`.
     * @dev Reverts if `roleId` does not represent an initialized, SharedRole or if the caller is not a member of the
     * managing role for `roleId`.
     * @param roleId the SharedRole membership to modify.
     * @param newMember the new SharedRole member.
     */
    function addMember(uint256 roleId, address newMember) public onlyShared(roleId) onlyRoleManager(roleId) {
        roles[roleId].sharedRoleMembership.addMember(newMember);
        emit AddedSharedMember(roleId, newMember, msg.sender);
    }

    /**
     * @notice Removes `memberToRemove` from the shared role, `roleId`.
     * @dev Reverts if `roleId` does not represent an initialized, SharedRole or if the caller is not a member of the
     * managing role for `roleId`.
     * @param roleId the SharedRole membership to modify.
     * @param memberToRemove the current SharedRole member to remove.
     */
    function removeMember(uint256 roleId, address memberToRemove) public onlyShared(roleId) onlyRoleManager(roleId) {
        roles[roleId].sharedRoleMembership.removeMember(memberToRemove);
        emit RemovedSharedMember(roleId, memberToRemove, msg.sender);
    }

    /**
     * @notice Removes caller from the role, `roleId`.
     * @dev Reverts if the caller is not a member of the role for `roleId` or if `roleId` is not an
     * initialized, SharedRole.
     * @param roleId the SharedRole membership to modify.
     */
    function renounceMembership(uint256 roleId) public onlyShared(roleId) onlyRoleHolder(roleId) {
        roles[roleId].sharedRoleMembership.removeMember(msg.sender);
        emit RemovedSharedMember(roleId, msg.sender, msg.sender);
    }

    /**
     * @notice Reverts if `roleId` is not initialized.
     */
    modifier onlyValidRole(uint256 roleId) {
        require(roles[roleId].roleType != RoleType.Invalid, "Attempted to use an invalid roleId");
        _;
    }

    /**
     * @notice Reverts if `roleId` is initialized.
     */
    modifier onlyInvalidRole(uint256 roleId) {
        require(roles[roleId].roleType == RoleType.Invalid, "Cannot use a pre-existing role");
        _;
    }

    /**
     * @notice Internal method to initialize a shared role, `roleId`, which will be managed by `managingRoleId`.
     * `initialMembers` will be immediately added to the role.
     * @dev Should be called by derived contracts, usually at construction time. Will revert if the role is already
     * initialized.
     */
    function _createSharedRole(
        uint256 roleId,
        uint256 managingRoleId,
        address[] memory initialMembers
    ) internal onlyInvalidRole(roleId) {
        Role storage role = roles[roleId];
        role.roleType = RoleType.Shared;
        role.managingRole = managingRoleId;
        role.sharedRoleMembership.init(initialMembers);
        require(
            roles[managingRoleId].roleType != RoleType.Invalid,
            "Attempted to use an invalid role to manage a shared role"
        );
    }

    /**
     * @notice Internal method to initialize an exclusive role, `roleId`, which will be managed by `managingRoleId`.
     * `initialMember` will be immediately added to the role.
     * @dev Should be called by derived contracts, usually at construction time. Will revert if the role is already
     * initialized.
     */
    function _createExclusiveRole(
        uint256 roleId,
        uint256 managingRoleId,
        address initialMember
    ) internal onlyInvalidRole(roleId) {
        Role storage role = roles[roleId];
        role.roleType = RoleType.Exclusive;
        role.managingRole = managingRoleId;
        role.exclusiveRoleMembership.init(initialMember);
        require(
            roles[managingRoleId].roleType != RoleType.Invalid,
            "Attempted to use an invalid role to manage an exclusive role"
        );
    }
}


// File contracts/common/interfaces/ExpandedIERC20.sol




/**
 * @title ERC20 interface that includes burn and mint methods.
 */
abstract contract ExpandedIERC20 is IERC20 {
    /**
     * @notice Burns a specific amount of the caller's tokens.
     * @dev Only burns the caller's tokens, so it is safe to leave this method permissionless.
     */
    function burn(uint256 value) external virtual;

    /**
     * @dev Burns `value` tokens owned by `recipient`.
     * @param recipient address to burn tokens from.
     * @param value amount of tokens to burn.
     */
    function burnFrom(address recipient, uint256 value) external virtual returns (bool);

    /**
     * @notice Mints tokens and adds them to the balance of the `to` address.
     * @dev This method should be permissioned to only allow designated parties to mint tokens.
     */
    function mint(address to, uint256 value) external virtual returns (bool);

    function addMinter(address account) external virtual;

    function addBurner(address account) external virtual;

    function resetOwner(address account) external virtual;
}


// File contracts/common/implementation/ExpandedERC20.sol






/**
 * @title An ERC20 with permissioned burning and minting. The contract deployer will initially
 * be the owner who is capable of adding new roles.
 */
contract ExpandedERC20 is ExpandedIERC20, ERC20, MultiRole {
    enum Roles {
        // Can set the minter and burner.
        Owner,
        // Addresses that can mint new tokens.
        Minter,
        // Addresses that can burn tokens that address owns.
        Burner
    }

    uint8 _decimals;

    /**
     * @notice Constructs the ExpandedERC20.
     * @param _tokenName The name which describes the new token.
     * @param _tokenSymbol The ticker abbreviation of the name. Ideally < 5 chars.
     * @param _tokenDecimals The number of decimals to define token precision.
     */
    constructor(
        string memory _tokenName,
        string memory _tokenSymbol,
        uint8 _tokenDecimals
    ) ERC20(_tokenName, _tokenSymbol) {
        _decimals = _tokenDecimals;
        _createExclusiveRole(uint256(Roles.Owner), uint256(Roles.Owner), msg.sender);
        _createSharedRole(uint256(Roles.Minter), uint256(Roles.Owner), new address[](0));
        _createSharedRole(uint256(Roles.Burner), uint256(Roles.Owner), new address[](0));
    }

    function decimals() public view virtual override(ERC20) returns (uint8) {
        return _decimals;
    }

    /**
     * @dev Mints `value` tokens to `recipient`, returning true on success.
     * @param recipient address to mint to.
     * @param value amount of tokens to mint.
     * @return True if the mint succeeded, or False.
     */
    function mint(address recipient, uint256 value)
        external
        override
        onlyRoleHolder(uint256(Roles.Minter))
        returns (bool)
    {
        _mint(recipient, value);
        return true;
    }

    /**
     * @dev Burns `value` tokens owned by `msg.sender`.
     * @param value amount of tokens to burn.
     */
    function burn(uint256 value) external override onlyRoleHolder(uint256(Roles.Burner)) {
        _burn(msg.sender, value);
    }

    /**
     * @dev Burns `value` tokens owned by `recipient`.
     * @param recipient address to burn tokens from.
     * @param value amount of tokens to burn.
     * @return True if the burn succeeded, or False.
     */
    function burnFrom(address recipient, uint256 value)
        external
        override
        onlyRoleHolder(uint256(Roles.Burner))
        returns (bool)
    {
        _burn(recipient, value);
        return true;
    }

    /**
     * @notice Add Minter role to account.
     * @dev The caller must have the Owner role.
     * @param account The address to which the Minter role is added.
     */
    function addMinter(address account) external virtual override {
        addMember(uint256(Roles.Minter), account);
    }

    /**
     * @notice Add Burner role to account.
     * @dev The caller must have the Owner role.
     * @param account The address to which the Burner role is added.
     */
    function addBurner(address account) external virtual override {
        addMember(uint256(Roles.Burner), account);
    }

    /**
     * @notice Reset Owner role to account.
     * @dev The caller must have the Owner role.
     * @param account The new holder of the Owner role.
     */
    function resetOwner(address account) external virtual override {
        resetMember(uint256(Roles.Owner), account);
    }
}


// File contracts/common/implementation/Withdrawable.sol

/**
 * Withdrawable contract.
 */






/**
 * @title Base contract that allows a specific role to withdraw any ETH and/or ERC20 tokens that the contract holds.
 */
abstract contract Withdrawable is MultiRole {
    using SafeERC20 for IERC20;

    uint256 private roleId;

    /**
     * @notice Withdraws ETH from the contract.
     */
    function withdraw(uint256 amount) external onlyRoleHolder(roleId) {
        Address.sendValue(payable(msg.sender), amount);
    }

    /**
     * @notice Withdraws ERC20 tokens from the contract.
     * @param erc20Address ERC20 token to withdraw.
     * @param amount amount of tokens to withdraw.
     */
    function withdrawErc20(address erc20Address, uint256 amount) external onlyRoleHolder(roleId) {
        IERC20 erc20 = IERC20(erc20Address);
        erc20.safeTransfer(msg.sender, amount);
    }

    /**
     * @notice Internal method that allows derived contracts to create a role for withdrawal.
     * @dev Either this method or `_setWithdrawRole` must be called by the derived class for this contract to function
     * properly.
     * @param newRoleId ID corresponding to role whose members can withdraw.
     * @param managingRoleId ID corresponding to managing role who can modify the withdrawable role's membership.
     * @param withdrawerAddress new manager of withdrawable role.
     */
    function _createWithdrawRole(
        uint256 newRoleId,
        uint256 managingRoleId,
        address withdrawerAddress
    ) internal {
        roleId = newRoleId;
        _createExclusiveRole(newRoleId, managingRoleId, withdrawerAddress);
    }

    /**
     * @notice Internal method that allows derived contracts to choose the role for withdrawal.
     * @dev The role `setRoleId` must exist. Either this method or `_createWithdrawRole` must be
     * called by the derived class for this contract to function properly.
     * @param setRoleId ID corresponding to role whose members can withdraw.
     */
    function _setWithdrawRole(uint256 setRoleId) internal onlyValidRole(setRoleId) {
        roleId = setRoleId;
    }
}


// File contracts/data-verification-mechanism/implementation/VotingToken.sol





/**
 * @title Ownership of this token allows a voter to respond to price requests.
 * @dev Supports snapshotting and allows the Oracle to mint new tokens as rewards.
 */
contract VotingToken is ExpandedERC20, ERC20Snapshot {
    /**
     * @notice Constructs the VotingToken.
     */
    constructor() ExpandedERC20("UMA Voting Token v1", "UMA", 18) ERC20Snapshot() {}

    function decimals() public view virtual override(ERC20, ExpandedERC20) returns (uint8) {
        return super.decimals();
    }

    /**
     * @notice Creates a new snapshot ID.
     * @return uint256 Thew new snapshot ID.
     */
    function snapshot() external returns (uint256) {
        return _snapshot();
    }

    // _transfer, _mint and _burn are ERC20 internal methods that are overridden by ERC20Snapshot,
    // therefore the compiler will complain that VotingToken must override these methods
    // because the two base classes (ERC20 and ERC20Snapshot) both define the same functions

    function _transfer(
        address from,
        address to,
        uint256 value
    ) internal override(ERC20) {
        super._transfer(from, to, value);
    }

    function _mint(address account, uint256 value) internal virtual override(ERC20) {
        super._mint(account, value);
    }

    function _burn(address account, uint256 value) internal virtual override(ERC20) {
        super._burn(account, value);
    }

    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual override(ERC20, ERC20Snapshot) {
        super._beforeTokenTransfer(from, to, amount);
    }
}


// File contracts/data-verification-mechanism/interfaces/StakerInterface.sol





interface StakerInterface {
    function votingToken() external returns (ExpandedIERC20);

    function stake(uint128 amount) external;

    function requestUnstake(uint128 amount) external;

    function executeUnstake() external;

    function withdrawRewards() external returns (uint128);

    function withdrawAndRestake() external returns (uint128);

    function setEmissionRate(uint128 newEmissionRate) external;

    function setUnstakeCoolDown(uint64 newUnstakeCoolDown) external;

    /**
     * @notice Sets the delegate of a voter. This delegate can vote on behalf of the staker. The staker will still own
     * all staked balances, receive rewards and be slashed based on the actions of the delegate. Intended use is using a
     * low-security available wallet for voting while keeping access to staked amounts secure by a more secure wallet.
     * @param delegate the address of the delegate.
     */
    function setDelegate(address delegate) external virtual;

    /**
     * @notice Sets the delegator of a voter. Acts to accept a delegation. The delegate can only vote for the delegator
     * if the delegator also selected the delegate to do so (two-way relationship needed).
     * @param delegator the address of the delegator.
     */
    function setDelegator(address delegator) external virtual;
}


// File contracts/common/implementation/Stakeable.sol

/**
 * Stakeable contract.
 */





/**
 * @title Base contract that extends the Withdrawable contract enabling a specific role to stake ERC20 tokens against the
 * Voting contract. Voting contract is fed in as a param rather than fetched from the finder to enable upgradability.
 */
abstract contract Stakeable is Withdrawable {
    using SafeERC20 for IERC20;

    uint256 private roleId;

    /**
     * @notice Stake ERC20 tokens from this contract to the votingContract.
     * @param amount amount of tokens to stake.
     * @param votingContract Address of the voting contract to stake into.
     */
    function stake(uint128 amount, address votingContract) external onlyRoleHolder(roleId) {
        StakerInterface voting = StakerInterface(votingContract);
        IERC20 votingToken = IERC20(voting.votingToken());
        votingToken.approve(votingContract, amount);
        voting.stake(amount);
    }

    /**
     * @notice Request unstaking of ERC20 tokens from this contract to the votingContract.
     * @param amount amount of tokens to unstake.
     * @param votingContract Address of the voting contract to unstake from.
     */
    function requestUnstake(uint128 amount, address votingContract) external onlyRoleHolder(roleId) {
        StakerInterface voting = StakerInterface(votingContract);
        voting.requestUnstake(amount);
    }

    /**
     * @notice Execute an unstake request that has passed liveness on the voting contract.
     * @param votingContract Address of the voting contract to execute the unstake from.
     */
    function executeUnstake(address votingContract) external onlyRoleHolder(roleId) {
        StakerInterface voting = StakerInterface(votingContract);
        voting.executeUnstake();
    }

    /**
     * @notice Internal method that allows derived contracts to choose the role for stakeable.
     * @dev The role `setRoleId` must exist. Either this method or `_setStakeRole` must be
     * called by the derived class for this contract to function properly.
     * @param setRoleId ID corresponding to role whose members can stakeable.
     */
    function _setStakeRole(uint256 setRoleId) internal onlyValidRole(setRoleId) {
        roleId = setRoleId;
    }
}


// File contracts/common/implementation/MultiCaller.sol




// This contract is taken from Uniswap's multi call implementation (https://github.com/Uniswap/uniswap-v3-periphery/blob/main/contracts/base/Multicall.sol)
// and was modified to be solidity 0.8 compatible. Additionally, the method was restricted to only work with msg.value
// set to 0 to avoid any nasty attack vectors on function calls that use value sent with deposits.

/// @title MultiCaller
/// @notice Enables calling multiple methods in a single call to the contract
contract MultiCaller {
    function multicall(bytes[] calldata data) external returns (bytes[] memory results) {
        results = new bytes[](data.length);
        for (uint256 i = 0; i < data.length; i++) {
            (bool success, bytes memory result) = address(this).delegatecall(data[i]);

            if (!success) {
                // Next 5 lines from https://ethereum.stackexchange.com/a/83577
                if (result.length < 68) revert();
                assembly {
                    result := add(result, 0x04)
                }
                revert(abi.decode(result, (string)));
            }

            results[i] = result;
        }
    }
}


// File contracts/data-verification-mechanism/implementation/Constants.sol




/**
 * @title Stores common interface names used throughout the DVM by registration in the Finder.
 */
library OracleInterfaces {
    bytes32 public constant Oracle = "Oracle";
    bytes32 public constant IdentifierWhitelist = "IdentifierWhitelist";
    bytes32 public constant Store = "Store";
    bytes32 public constant FinancialContractsAdmin = "FinancialContractsAdmin";
    bytes32 public constant Registry = "Registry";
    bytes32 public constant CollateralWhitelist = "CollateralWhitelist";
    bytes32 public constant OptimisticOracle = "OptimisticOracle";
    bytes32 public constant OptimisticOracleV2 = "OptimisticOracleV2";
    bytes32 public constant Bridge = "Bridge";
    bytes32 public constant GenericHandler = "GenericHandler";
    bytes32 public constant SkinnyOptimisticOracle = "SkinnyOptimisticOracle";
    bytes32 public constant ChildMessenger = "ChildMessenger";
    bytes32 public constant OracleHub = "OracleHub";
    bytes32 public constant OracleSpoke = "OracleSpoke";
    bytes32 public constant OptimisticOracleV3 = "OptimisticOracleV3";
}

/**
 * @title Commonly re-used values for contracts associated with the OptimisticOracle.
 */
library OptimisticOracleConstraints {
    // Any price request submitted to the OptimisticOracle must contain ancillary data no larger than this value.
    // This value must be <= the Voting contract's `ancillaryBytesLimit` constant value otherwise it is possible
    // that a price can be requested to the OptimisticOracle successfully, but cannot be resolved by the DVM which
    // refuses to accept a price request made with ancillary data length over a certain size.
    uint256 public constant ancillaryBytesLimit = 8192;
}


// File contracts/data-verification-mechanism/interfaces/FinderInterface.sol




/**
 * @title Provides addresses of the live contracts implementing certain interfaces.
 * @dev Examples are the Oracle or Store interfaces.
 */
interface FinderInterface {
    /**
     * @notice Updates the address of the contract that implements `interfaceName`.
     * @param interfaceName bytes32 encoding of the interface name that is either changed or registered.
     * @param implementationAddress address of the deployed contract that implements the interface.
     */
    function changeImplementationAddress(bytes32 interfaceName, address implementationAddress) external;

    /**
     * @notice Gets the address of the contract that implements the given `interfaceName`.
     * @param interfaceName queried interface.
     * @return implementationAddress address of the deployed contract that implements the interface.
     */
    function getImplementationAddress(bytes32 interfaceName) external view returns (address);
}


// File contracts/data-verification-mechanism/implementation/DesignatedVotingV2.sol



/**
 * @title Proxy to allow voting from another address.
 * @dev Allows a UMA token holder to designate another address to vote on their behalf.
 * Each voter must deploy their own instance of this contract.
 */
contract DesignatedVotingV2 is Stakeable, MultiCaller {
    /****************************************
     *    INTERNAL VARIABLES AND STORAGE    *
     ****************************************/

    enum Roles {
        Owner, // Can set the Voter role.
        Voter // Can vote through this contract.
    }

    // Reference to UMA Finder contract, allowing Voting upgrades to be without requiring any calls to this contract.
    FinderInterface public immutable finder;

    /**
     * @notice Construct the DesignatedVotingV2 contract.
     * @param finderAddress keeps track of all contracts within the system based on their interfaceName.
     * @param ownerAddress address of the owner of the DesignatedVotingV2 contract.
     * @param voterAddress address to which the owner has delegated their voting power.
     */
    constructor(
        address finderAddress,
        address ownerAddress,
        address voterAddress
    ) {
        _createExclusiveRole(uint256(Roles.Owner), uint256(Roles.Owner), ownerAddress);
        _createExclusiveRole(uint256(Roles.Voter), uint256(Roles.Owner), voterAddress);
        _setWithdrawRole(uint256(Roles.Owner));
        _setStakeRole(uint256(Roles.Owner));

        finder = FinderInterface(finderAddress);
    }

    /**
     * @notice This method essentially syncs the voter role with the current voting delegate.
     * @dev Because this is essentially a state sync method, there is no reason to restrict its permissioning.
     */
    function delegateToVoter() public {
        address voter = getMember(uint256(Roles.Voter));
        _getVotingContract().setDelegate(voter);
    }

    // Returns the Voting contract address, named "Oracle" in the finder.
    function _getVotingContract() private view returns (StakerInterface) {
        return StakerInterface(finder.getImplementationAddress(OracleInterfaces.Oracle));
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"finderAddress","type":"address"},{"internalType":"address","name":"ownerAddress","type":"address"},{"internalType":"address","name":"voterAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"roleId","type":"uint256"},{"indexed":true,"internalType":"address","name":"newMember","type":"address"},{"indexed":true,"internalType":"address","name":"manager","type":"address"}],"name":"AddedSharedMember","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"roleId","type":"uint256"},{"indexed":true,"internalType":"address","name":"oldMember","type":"address"},{"indexed":true,"internalType":"address","name":"manager","type":"address"}],"name":"RemovedSharedMember","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"roleId","type":"uint256"},{"indexed":true,"internalType":"address","name":"newMember","type":"address"},{"indexed":true,"internalType":"address","name":"manager","type":"address"}],"name":"ResetExclusiveMember","type":"event"},{"inputs":[{"internalType":"uint256","name":"roleId","type":"uint256"},{"internalType":"address","name":"newMember","type":"address"}],"name":"addMember","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"delegateToVoter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"votingContract","type":"address"}],"name":"executeUnstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"finder","outputs":[{"internalType":"contract FinderInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"roleId","type":"uint256"}],"name":"getMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"roleId","type":"uint256"},{"internalType":"address","name":"memberToCheck","type":"address"}],"name":"holdsRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"roleId","type":"uint256"},{"internalType":"address","name":"memberToRemove","type":"address"}],"name":"removeMember","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"roleId","type":"uint256"}],"name":"renounceMembership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"amount","type":"uint128"},{"internalType":"address","name":"votingContract","type":"address"}],"name":"requestUnstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"roleId","type":"uint256"},{"internalType":"address","name":"newMember","type":"address"}],"name":"resetMember","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"amount","type":"uint128"},{"internalType":"address","name":"votingContract","type":"address"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"erc20Address","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawErc20","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063aaa14ca31161008c578063b166dfdd11610066578063b166dfdd146101eb578063b9a3c84c146101fe578063bd1f4b5214610225578063d97c05be1461023857600080fd5b8063aaa14ca314610180578063ab3545e514610193578063ac9650d8146101cb57600080fd5b80633dfbe378116100c85780633dfbe3781461012a5780636be7658b1461013257806374d0a676146101455780637cdc1cb91461015857600080fd5b806302b999d6146100ef5780630c556621146101045780632e1a7d4d14610117575b600080fd5b6101026100fd366004611b0c565b61024b565b005b610102610112366004611b29565b610353565b610102610125366004611b77565b610485565b61010261052c565b610102610140366004611b90565b6105c8565b610102610153366004611b90565b6107ad565b61016b610166366004611b90565b61096f565b60405190151581526020015b60405180910390f35b61010261018e366004611b77565b610a7d565b6101a66101a1366004611b77565b610c3e565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610177565b6101de6101d9366004611bb5565b610d26565b6040516101779190611c98565b6101026101f9366004611b29565b610e98565b6101a67f00000000000000000000000040f941e48a552bf496b154af6bf55725f18d77c381565b610102610233366004611d18565b6110f0565b610102610246366004611b90565b6111b1565b600254610258813361096f565b6102e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f53656e64657220646f6573206e6f7420686f6c6420726571756972656420726f60448201527f6c6500000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60008290508073ffffffffffffffffffffffffffffffffffffffff16630cea2bda6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561033657600080fd5b505af115801561034a573d6000803e3d6000fd5b50505050505050565b600254610360813361096f565b6103ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f53656e64657220646f6573206e6f7420686f6c6420726571756972656420726f60448201527f6c6500000000000000000000000000000000000000000000000000000000000060648201526084016102e0565b6040517f866be1e10000000000000000000000000000000000000000000000000000000081526fffffffffffffffffffffffffffffffff84166004820152829073ffffffffffffffffffffffffffffffffffffffff82169063866be1e190602401600060405180830381600087803b15801561046757600080fd5b505af115801561047b573d6000803e3d6000fd5b5050505050505050565b600154610492813361096f565b61051e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f53656e64657220646f6573206e6f7420686f6c6420726571756972656420726f60448201527f6c6500000000000000000000000000000000000000000000000000000000000060648201526084016102e0565b610528338361137d565b5050565b60006105386001610c3e565b90506105426114dc565b6040517fca5eb5e100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152919091169063ca5eb5e190602401600060405180830381600087803b1580156105ad57600080fd5b505af11580156105c1573d6000803e3d6000fd5b5050505050565b81600260008281526020819052604090206001015460ff1660028111156105f1576105f1611d44565b1461067e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4d7573742062652063616c6c6564206f6e20616e20696e697469616c697a656460448201527f2053686172656420726f6c65000000000000000000000000000000000000000060648201526084016102e0565b6000838152602081905260409020548390610699903361096f565b610724576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f43616e206f6e6c792062652063616c6c6564206279206120726f6c65206d616e60448201527f616765720000000000000000000000000000000000000000000000000000000060648201526084016102e0565b60008481526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552600390910190925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339287917feb3e33034c392e69263b04ec0fa376dc12784a41b6676c7f31b936cbc0fbb5af9190a450505050565b81600260008281526020819052604090206001015460ff1660028111156107d6576107d6611d44565b14610863576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4d7573742062652063616c6c6564206f6e20616e20696e697469616c697a656460448201527f2053686172656420726f6c65000000000000000000000000000000000000000060648201526084016102e0565b600083815260208190526040902054839061087e903361096f565b610909576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f43616e206f6e6c792062652063616c6c6564206279206120726f6c65206d616e60448201527f616765720000000000000000000000000000000000000000000000000000000060648201526084016102e0565b600084815260208190526040902061092490600301846115b2565b604051339073ffffffffffffffffffffffffffffffffffffffff85169086907f63502af7324ff6db91ab38f8236a648727d9385ea6c782073dd4882d8a61a48f90600090a450505050565b600082815260208190526040812060018082015460ff16600281111561099757610997611d44565b036109c557600281015473ffffffffffffffffffffffffffffffffffffffff8481169116145b915050610a77565b6002600182015460ff1660028111156109e0576109e0611d44565b03610a155773ffffffffffffffffffffffffffffffffffffffff8316600090815260038201602052604090205460ff166109bd565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f496e76616c696420726f6c65496400000000000000000000000000000000000060448201526064016102e0565b92915050565b80600260008281526020819052604090206001015460ff166002811115610aa657610aa6611d44565b14610b33576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4d7573742062652063616c6c6564206f6e20616e20696e697469616c697a656460448201527f2053686172656420726f6c65000000000000000000000000000000000000000060648201526084016102e0565b81610b3e813361096f565b610bca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f53656e64657220646f6573206e6f7420686f6c6420726571756972656420726f60448201527f6c6500000000000000000000000000000000000000000000000000000000000060648201526084016102e0565b600083815260208181526040808320338452600301909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556040513390819085907feb3e33034c392e69263b04ec0fa376dc12784a41b6676c7f31b936cbc0fbb5af90600090a4505050565b600081600160008281526020819052604090206001015460ff166002811115610c6957610c69611d44565b14610cf6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4d7573742062652063616c6c6564206f6e20616e20696e697469616c697a656460448201527f204578636c757369766520726f6c65000000000000000000000000000000000060648201526084016102e0565b60008381526020819052604090206002015473ffffffffffffffffffffffffffffffffffffffff165b9392505050565b60608167ffffffffffffffff811115610d4157610d41611d73565b604051908082528060200260200182016040528015610d7457816020015b6060815260200190600190039081610d5f5790505b50905060005b82811015610e915760008030868685818110610d9857610d98611da2565b9050602002810190610daa9190611dd1565b604051610db8929190611e3d565b600060405180830381855af49150503d8060008114610df3576040519150601f19603f3d011682016040523d82523d6000602084013e610df8565b606091505b509150915081610e5e57604481511015610e1157600080fd5b60048101905080806020019051810190610e2b9190611e4d565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102e09190611f0d565b80848481518110610e7157610e71611da2565b602002602001018190525050508080610e8990611f20565b915050610d7a565b5092915050565b600254610ea5813361096f565b610f31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f53656e64657220646f6573206e6f7420686f6c6420726571756972656420726f60448201527f6c6500000000000000000000000000000000000000000000000000000000000060648201526084016102e0565b600082905060008173ffffffffffffffffffffffffffffffffffffffff1663b03401236040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610f85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa99190611f7f565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301526fffffffffffffffffffffffffffffffff881660248301529192509082169063095ea7b3906044016020604051808303816000875af1158015611033573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110579190611f9c565b506040517f88fe2be80000000000000000000000000000000000000000000000000000000081526fffffffffffffffffffffffffffffffff8616600482015273ffffffffffffffffffffffffffffffffffffffff8316906388fe2be890602401600060405180830381600087803b1580156110d157600080fd5b505af11580156110e5573d6000803e3d6000fd5b505050505050505050565b6001546110fd813361096f565b611189576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f53656e64657220646f6573206e6f7420686f6c6420726571756972656420726f60448201527f6c6500000000000000000000000000000000000000000000000000000000000060648201526084016102e0565b826111ab73ffffffffffffffffffffffffffffffffffffffff8216338561167f565b50505050565b81600160008281526020819052604090206001015460ff1660028111156111da576111da611d44565b14611267576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4d7573742062652063616c6c6564206f6e20616e20696e697469616c697a656460448201527f204578636c757369766520726f6c65000000000000000000000000000000000060648201526084016102e0565b6000838152602081905260409020548390611282903361096f565b61130d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f43616e206f6e6c792062652063616c6c6564206279206120726f6c65206d616e60448201527f616765720000000000000000000000000000000000000000000000000000000060648201526084016102e0565b6000848152602081905260409020611328906002018461170c565b604051339073ffffffffffffffffffffffffffffffffffffffff85169086907f3b855c56b409b671c7112789d022675eb639d0bcb8896f1b6197c132f799e74690600090a450505050565b610528828261170c565b804710156113e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016102e0565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114611441576040519150601f19603f3d011682016040523d82523d6000602084013e611446565b606091505b50509050806114d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016102e0565b505050565b6040517faafd5e400000000000000000000000000000000000000000000000000000000081527f4f7261636c65000000000000000000000000000000000000000000000000000060048201526000907f00000000000000000000000040f941e48a552bf496b154af6bf55725f18d77c373ffffffffffffffffffffffffffffffffffffffff169063aafd5e4090602401602060405180830381865afa158015611589573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ad9190611f7f565b905090565b73ffffffffffffffffffffffffffffffffffffffff811661162f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f43616e6e6f74206164642030783020746f20612073686172656420726f6c650060448201526064016102e0565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020919091526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526114d79084906117f1565b73ffffffffffffffffffffffffffffffffffffffff81166117af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f43616e6e6f742073657420616e206578636c757369766520726f6c6520746f2060448201527f307830000000000000000000000000000000000000000000000000000000000060648201526084016102e0565b81547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff91909116179055565b6000611853826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166118fd9092919063ffffffff16565b8051909150156114d757808060200190518101906118719190611f9c565b6114d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016102e0565b606061190c8484600085611914565b949350505050565b6060824710156119a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016102e0565b843b611a0e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102e0565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611a379190611fbe565b60006040518083038185875af1925050503d8060008114611a74576040519150601f19603f3d011682016040523d82523d6000602084013e611a79565b606091505b5091509150611a89828286611a94565b979650505050505050565b60608315611aa3575081610d1f565b825115611ab35782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102e09190611f0d565b73ffffffffffffffffffffffffffffffffffffffff81168114611b0957600080fd5b50565b600060208284031215611b1e57600080fd5b8135610d1f81611ae7565b60008060408385031215611b3c57600080fd5b82356fffffffffffffffffffffffffffffffff81168114611b5c57600080fd5b91506020830135611b6c81611ae7565b809150509250929050565b600060208284031215611b8957600080fd5b5035919050565b60008060408385031215611ba357600080fd5b823591506020830135611b6c81611ae7565b60008060208385031215611bc857600080fd5b823567ffffffffffffffff80821115611be057600080fd5b818501915085601f830112611bf457600080fd5b813581811115611c0357600080fd5b8660208260051b8501011115611c1857600080fd5b60209290920196919550909350505050565b60005b83811015611c45578181015183820152602001611c2d565b50506000910152565b60008151808452611c66816020860160208601611c2a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611d0b577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0888603018452611cf9858351611c4e565b94509285019290850190600101611cbf565b5092979650505050505050565b60008060408385031215611d2b57600080fd5b8235611d3681611ae7565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112611e0657600080fd5b83018035915067ffffffffffffffff821115611e2157600080fd5b602001915036819003821315611e3657600080fd5b9250929050565b8183823760009101908152919050565b600060208284031215611e5f57600080fd5b815167ffffffffffffffff80821115611e7757600080fd5b818401915084601f830112611e8b57600080fd5b815181811115611e9d57611e9d611d73565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715611ee357611ee3611d73565b81604052828152876020848701011115611efc57600080fd5b611a89836020830160208801611c2a565b602081526000610d1f6020830184611c4e565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611f78577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b600060208284031215611f9157600080fd5b8151610d1f81611ae7565b600060208284031215611fae57600080fd5b81518015158114610d1f57600080fd5b60008251611fd0818460208701611c2a565b919091019291505056fea2646970667358221220ea98f612c38a6b97bc66609ae7bebf91498adbfd239bd013f8aaad6d8356437b64736f6c63430008100033

Deployed Bytecode Sourcemap

68381:1932:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;63291:189;;;;;;:::i;:::-;;:::i;:::-;;62872:211;;;;;;:::i;:::-;;:::i;56621:131::-;;;;;;:::i;:::-;;:::i;69909:150::-;;;:::i;48484:265::-;;;;;;:::i;:::-;;:::i;47858:242::-;;;;;;:::i;:::-;;:::i;45974:436::-;;;;;;:::i;:::-;;:::i;:::-;;;1542:14:1;;1535:22;1517:41;;1505:2;1490:18;45974:436:0;;;;;;;;49024:238;;;;;;:::i;:::-;;:::i;47341:162::-;;;;;;:::i;:::-;;:::i;:::-;;;1745:42:1;1733:55;;;1715:74;;1703:2;1688:18;47341:162:0;1569:226:1;64546:654:0;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;62318:307::-;;;;;;:::i;:::-;;:::i;68825:39::-;;;;;56941:196;;;;;;:::i;:::-;;:::i;46777:255::-;;;;;;:::i;:::-;;:::i;63291:189::-;63363:6;;44707:29;44717:6;44725:10;44707:9;:29::i;:::-;44699:76;;;;;;;4661:2:1;44699:76:0;;;4643:21:1;4700:2;4680:18;;;4673:30;4739:34;4719:18;;;4712:62;4810:4;4790:18;;;4783:32;4832:19;;44699:76:0;;;;;;;;;63382:22:::1;63423:14;63382:56;;63449:6;:21;;;:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;63371:109;63291:189:::0;;:::o;62872:211::-;62960:6;;44707:29;44717:6;44725:10;44707:9;:29::i;:::-;44699:76;;;;;;;4661:2:1;44699:76:0;;;4643:21:1;4700:2;4680:18;;;4673:30;4739:34;4719:18;;;4712:62;4810:4;4790:18;;;4783:32;4832:19;;44699:76:0;4459:398:1;44699:76:0;63046:29:::1;::::0;;;;5038:34:1;5026:47;;63046:29:0::1;::::0;::::1;5008:66:1::0;63020:14:0;;63046:21:::1;::::0;::::1;::::0;::::1;::::0;4981:18:1;;63046:29:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;62968:115;62872:211:::0;;;:::o;56621:131::-;56679:6;;44707:29;44717:6;44725:10;44707:9;:29::i;:::-;44699:76;;;;;;;4661:2:1;44699:76:0;;;4643:21:1;4700:2;4680:18;;;4673:30;4739:34;4719:18;;;4712:62;4810:4;4790:18;;;4783:32;4832:19;;44699:76:0;4459:398:1;44699:76:0;56698:46:::1;56724:10;56737:6;56698:17;:46::i;:::-;56621:131:::0;;:::o;69909:150::-;69954:13;69970:31;69988:11;47341:162;:::i;69970:31::-;69954:47;;70012:20;:18;:20::i;:::-;:39;;;;;:32;1733:55:1;;;70012:39:0;;;1715:74:1;70012:32:0;;;;;;;1688:18:1;;70012:39:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;69943:116;69909:150::o;48484:265::-;48564:6;45569:15;45543:5;:13;;;;;;;;;;:22;;;;;:41;;;;;;;;:::i;:::-;;45535:98;;;;;;;5476:2:1;45535:98:0;;;5458:21:1;5515:2;5495:18;;;5488:30;5554:34;5534:18;;;5527:62;5625:14;5605:18;;;5598:42;5657:19;;45535:98:0;5274:408:1;45535:98:0;44991:5:::1;:13:::0;;;::::1;::::0;;;;;;:26;48588:6;;44981:49:::1;::::0;45019:10:::1;44981:9;:49::i;:::-;44973:98;;;::::0;::::1;::::0;;5889:2:1;44973:98:0::1;::::0;::::1;5871:21:1::0;5928:2;5908:18;;;5901:30;5967:34;5947:18;;;5940:62;6038:6;6018:18;;;6011:34;6062:19;;44973:98:0::1;5687:400:1::0;44973:98:0::1;48607:5:::2;:13:::0;;;::::2;::::0;;;;;;;43413:38;;;;;;48607:34:::2;::::0;;::::2;43413:38:::0;;;;;;:46;;;;;;48686:55;48730:10:::2;::::0;48607:13;;48686:55:::2;::::0;48607:5;48686:55:::2;45644:1:::1;48484:265:::0;;;:::o;47858:242::-;47930:6;45569:15;45543:5;:13;;;;;;;;;;:22;;;;;:41;;;;;;;;:::i;:::-;;45535:98;;;;;;;5476:2:1;45535:98:0;;;5458:21:1;5515:2;5495:18;;;5488:30;5554:34;5534:18;;;5527:62;5625:14;5605:18;;;5598:42;5657:19;;45535:98:0;5274:408:1;45535:98:0;44991:5:::1;:13:::0;;;::::1;::::0;;;;;;:26;47954:6;;44981:49:::1;::::0;45019:10:::1;44981:9;:49::i;:::-;44973:98;;;::::0;::::1;::::0;;5889:2:1;44973:98:0::1;::::0;::::1;5871:21:1::0;5928:2;5908:18;;;5901:30;5967:34;5947:18;;;5940:62;6038:6;6018:18;;;6011:34;6062:19;;44973:98:0::1;5687:400:1::0;44973:98:0::1;47973:5:::2;:13:::0;;;::::2;::::0;;;;;;:55:::2;::::0;:34:::2;;48018:9:::0;47973:44:::2;:55::i;:::-;48044:48;::::0;48081:10:::2;::::0;48044:48:::2;::::0;::::2;::::0;48062:6;;48044:48:::2;::::0;;;::::2;45644:1:::1;47858:242:::0;;;:::o;45974:436::-;46053:4;46090:13;;;;;;;;;;46135:18;46118:13;;;;;;:35;;;;;;;;:::i;:::-;;46114:254;;46177:28;;;42202:21;:38;;;;:21;;:38;46177:52;46170:59;;;;;46114:254;46268:15;46251:13;;;;;;:32;;;;;;;;:::i;:::-;;46247:121;;43016:37;;;42992:4;43016:37;;;46307:25;;;43016:37;;;;;;;;46307:49;42889:172;46247:121;46378:24;;;;;6294:2:1;46378:24:0;;;6276:21:1;6333:2;6313:18;;;6306:30;6372:16;6352:18;;;6345:44;6406:18;;46378:24:0;6092:338:1;45974:436:0;;;;;:::o;49024:238::-;49086:6;45569:15;45543:5;:13;;;;;;;;;;:22;;;;;:41;;;;;;;;:::i;:::-;;45535:98;;;;;;;5476:2:1;45535:98:0;;;5458:21:1;5515:2;5495:18;;;5488:30;5554:34;5534:18;;;5527:62;5625:14;5605:18;;;5598:42;5657:19;;45535:98:0;5274:408:1;45535:98:0;49109:6:::1;44707:29;44717:6;44725:10;44707:9;:29::i;:::-;44699:76;;;::::0;::::1;::::0;;4661:2:1;44699:76:0::1;::::0;::::1;4643:21:1::0;4700:2;4680:18;;;4673:30;4739:34;4719:18;;;4712:62;4810:4;4790:18;;;4783:32;4832:19;;44699:76:0::1;4459:398:1::0;44699:76:0::1;49128:5:::2;:13:::0;;;::::2;::::0;;;;;;;49176:10:::2;43413:38:::0;;49128:34:::2;;43413:38:::0;;;;;:46;;;;;;49203:51:::2;::::0;49243:10:::2;::::0;;;49223:6;;49203:51:::2;::::0;;;::::2;45644:1:::1;49024:238:::0;;:::o;47341:162::-;47419:7;47402:6;45288:18;45262:5;:13;;;;;;;;;;:22;;;;;:44;;;;;;;;:::i;:::-;;45254:104;;;;;;;6637:2:1;45254:104:0;;;6619:21:1;6676:2;6656:18;;;6649:30;6715:34;6695:18;;;6688:62;6786:17;6766:18;;;6759:45;6821:19;;45254:104:0;6435:411:1;45254:104:0;47446:5:::1;:13:::0;;;::::1;::::0;;;;;;:37:::1;;42596:21:::0;;;47446:49:::1;47439:56:::0;47341:162;-1:-1:-1;;;47341:162:0:o;64546:654::-;64606:22;64663:4;64651:24;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;64641:34;;64691:9;64686:507;64706:15;;;64686:507;;;64744:12;;64789:4;64808;;64813:1;64808:7;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;64781:35;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;64743:73;;;;64838:7;64833:313;;64967:2;64951:6;:13;:18;64947:32;;;64971:8;;;64947:32;65052:4;65044:6;65040:17;65030:27;;65112:6;65101:28;;;;;;;;;;;;:::i;:::-;65094:36;;;;;;;;;;;:::i;64833:313::-;65175:6;65162:7;65170:1;65162:10;;;;;;;;:::i;:::-;;;;;;:19;;;;64728:465;;64723:3;;;;;:::i;:::-;;;;64686:507;;;;64546:654;;;;:::o;62318:307::-;62397:6;;44707:29;44717:6;44725:10;44707:9;:29::i;:::-;44699:76;;;;;;;4661:2:1;44699:76:0;;;4643:21:1;4700:2;4680:18;;;4673:30;4739:34;4719:18;;;4712:62;4810:4;4790:18;;;4783:32;4832:19;;44699:76:0;4459:398:1;44699:76:0;62416:22:::1;62457:14;62416:56;;62483:18;62511:6;:18;;;:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;62543:43;::::0;;;;:19:::1;10100:55:1::0;;;62543:43:0::1;::::0;::::1;10082:74:1::0;10204:34;10192:47;;10172:18;;;10165:75;62483:49:0;;-1:-1:-1;62543:19:0;;::::1;::::0;::::1;::::0;10055:18:1;;62543:43:0::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;62597:20:0::1;::::0;;;;5038:34:1;5026:47;;62597:20:0::1;::::0;::::1;5008:66:1::0;62597:12:0::1;::::0;::::1;::::0;::::1;::::0;4981:18:1;;62597:20:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;62405:220;;62318:307:::0;;;:::o;56941:196::-;57026:6;;44707:29;44717:6;44725:10;44707:9;:29::i;:::-;44699:76;;;;;;;4661:2:1;44699:76:0;;;4643:21:1;4700:2;4680:18;;;4673:30;4739:34;4719:18;;;4712:62;4810:4;4790:18;;;4783:32;4832:19;;44699:76:0;4459:398:1;44699:76:0;57067:12;57091:38:::1;:18;::::0;::::1;57110:10;57122:6:::0;57091:18:::1;:38::i;:::-;57034:103;56941:196:::0;;;:::o;46777:255::-;46854:6;45288:18;45262:5;:13;;;;;;;;;;:22;;;;;:44;;;;;;;;:::i;:::-;;45254:104;;;;;;;6637:2:1;45254:104:0;;;6619:21:1;6676:2;6656:18;;;6649:30;6715:34;6695:18;;;6688:62;6786:17;6766:18;;;6759:45;6821:19;;45254:104:0;6435:411:1;45254:104:0;44991:5:::1;:13:::0;;;::::1;::::0;;;;;;:26;46878:6;;44981:49:::1;::::0;45019:10:::1;44981:9;:49::i;:::-;44973:98;;;::::0;::::1;::::0;;5889:2:1;44973:98:0::1;::::0;::::1;5871:21:1::0;5928:2;5908:18;;;5901:30;5967:34;5947:18;;;5940:62;6038:6;6018:18;;;6011:34;6062:19;;44973:98:0::1;5687:400:1::0;44973:98:0::1;46897:5:::2;:13:::0;;;::::2;::::0;;;;;;:60:::2;::::0;:37:::2;;46947:9:::0;46897:49:::2;:60::i;:::-;46973:51;::::0;47013:10:::2;::::0;46973:51:::2;::::0;::::2;::::0;46994:6;;46973:51:::2;::::0;;;::::2;45369:1:::1;46777:255:::0;;;:::o;42633:146::-;42729:42;42741:14;42757:13;42729:11;:42::i;31937:317::-;32052:6;32027:21;:31;;32019:73;;;;;;;10735:2:1;32019:73:0;;;10717:21:1;10774:2;10754:18;;;10747:30;10813:31;10793:18;;;10786:59;10862:18;;32019:73:0;10533:353:1;32019:73:0;32106:12;32124:9;:14;;32146:6;32124:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32105:52;;;32176:7;32168:78;;;;;;;11303:2:1;32168:78:0;;;11285:21:1;11342:2;11322:18;;;11315:30;11381:34;11361:18;;;11354:62;11452:28;11432:18;;;11425:56;11498:19;;32168:78:0;11101:422:1;32168:78:0;32008:246;31937:317;;:::o;70142:168::-;70245:56;;;;;70277:23;70245:56;;;11674:25:1;70194:15:0;;70245:6;:31;;;;;11647:18:1;;70245:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;70222:80;;70142:168;:::o;43069:231::-;43176:27;;;43168:71;;;;;;;12168:2:1;43168:71:0;;;12150:21:1;12207:2;12187:18;;;12180:30;12246:33;12226:18;;;12219:61;12297:18;;43168:71:0;11966:355:1;43168:71:0;43250:35;;:22;:35;;;;;;;;;;;:42;;;;43288:4;43250:42;;;43069:231::o;38626:211::-;38770:58;;;12530:42:1;12518:55;;38770:58:0;;;12500:74:1;12590:18;;;;12583:34;;;38770:58:0;;;;;;;;;;12473:18:1;;;;38770:58:0;;;;;;;;;;38793:23;38770:58;;;38743:86;;38763:5;;38743:19;:86::i;42256:224::-;42363:25;;;42355:73;;;;;;;12830:2:1;42355:73:0;;;12812:21:1;12869:2;12849:18;;;12842:30;12908:34;12888:18;;;12881:62;12979:5;12959:18;;;12952:33;13002:19;;42355:73:0;12628:399:1;42355:73:0;42439:33;;;;;;;;;;;;42256:224::o;41199:716::-;41623:23;41649:69;41677:4;41649:69;;;;;;;;;;;;;;;;;41657:5;41649:27;;;;:69;;;;;:::i;:::-;41733:17;;41623:95;;-1:-1:-1;41733:21:0;41729:179;;41830:10;41819:30;;;;;;;;;;;;:::i;:::-;41811:85;;;;;;;13234:2:1;41811:85:0;;;13216:21:1;13273:2;13253:18;;;13246:30;13312:34;13292:18;;;13285:62;13383:12;13363:18;;;13356:40;13413:19;;41811:85:0;13032:406:1;33421:229:0;33558:12;33590:52;33612:6;33620:4;33626:1;33629:12;33590:21;:52::i;:::-;33583:59;33421:229;-1:-1:-1;;;;33421:229:0:o;34541:510::-;34711:12;34769:5;34744:21;:30;;34736:81;;;;;;;13645:2:1;34736:81:0;;;13627:21:1;13684:2;13664:18;;;13657:30;13723:34;13703:18;;;13696:62;13794:8;13774:18;;;13767:36;13820:19;;34736:81:0;13443:402:1;34736:81:0;30938:20;;34828:60;;;;;;;14052:2:1;34828:60:0;;;14034:21:1;14091:2;14071:18;;;14064:30;14130:31;14110:18;;;14103:59;14179:18;;34828:60:0;13850:353:1;34828:60:0;34902:12;34916:23;34943:6;:11;;34962:5;34969:4;34943:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34901:73;;;;34992:51;35009:7;35018:10;35030:12;34992:16;:51::i;:::-;34985:58;34541:510;-1:-1:-1;;;;;;;34541:510:0:o;37227:712::-;37377:12;37406:7;37402:530;;;-1:-1:-1;37437:10:0;37430:17;;37402:530;37551:17;;:21;37547:374;;37749:10;37743:17;37810:15;37797:10;37793:2;37789:19;37782:44;37547:374;37892:12;37885:20;;;;;;;;;;;:::i;14:154:1:-;100:42;93:5;89:54;82:5;79:65;69:93;;158:1;155;148:12;69:93;14:154;:::o;173:247::-;232:6;285:2;273:9;264:7;260:23;256:32;253:52;;;301:1;298;291:12;253:52;340:9;327:23;359:31;384:5;359:31;:::i;425:442::-;493:6;501;554:2;542:9;533:7;529:23;525:32;522:52;;;570:1;567;560:12;522:52;609:9;596:23;659:34;652:5;648:46;641:5;638:57;628:85;;709:1;706;699:12;628:85;732:5;-1:-1:-1;789:2:1;774:18;;761:32;802:33;761:32;802:33;:::i;:::-;854:7;844:17;;;425:442;;;;;:::o;872:180::-;931:6;984:2;972:9;963:7;959:23;955:32;952:52;;;1000:1;997;990:12;952:52;-1:-1:-1;1023:23:1;;872:180;-1:-1:-1;872:180:1:o;1057:315::-;1125:6;1133;1186:2;1174:9;1165:7;1161:23;1157:32;1154:52;;;1202:1;1199;1192:12;1154:52;1238:9;1225:23;1215:33;;1298:2;1287:9;1283:18;1270:32;1311:31;1336:5;1311:31;:::i;1800:626::-;1897:6;1905;1958:2;1946:9;1937:7;1933:23;1929:32;1926:52;;;1974:1;1971;1964:12;1926:52;2014:9;2001:23;2043:18;2084:2;2076:6;2073:14;2070:34;;;2100:1;2097;2090:12;2070:34;2138:6;2127:9;2123:22;2113:32;;2183:7;2176:4;2172:2;2168:13;2164:27;2154:55;;2205:1;2202;2195:12;2154:55;2245:2;2232:16;2271:2;2263:6;2260:14;2257:34;;;2287:1;2284;2277:12;2257:34;2340:7;2335:2;2325:6;2322:1;2318:14;2314:2;2310:23;2306:32;2303:45;2300:65;;;2361:1;2358;2351:12;2300:65;2392:2;2384:11;;;;;2414:6;;-1:-1:-1;1800:626:1;;-1:-1:-1;;;;1800:626:1:o;2431:250::-;2516:1;2526:113;2540:6;2537:1;2534:13;2526:113;;;2616:11;;;2610:18;2597:11;;;2590:39;2562:2;2555:10;2526:113;;;-1:-1:-1;;2673:1:1;2655:16;;2648:27;2431:250::o;2686:329::-;2727:3;2765:5;2759:12;2792:6;2787:3;2780:19;2808:76;2877:6;2870:4;2865:3;2861:14;2854:4;2847:5;2843:16;2808:76;:::i;:::-;2929:2;2917:15;2934:66;2913:88;2904:98;;;;3004:4;2900:109;;2686:329;-1:-1:-1;;2686:329:1:o;3020:859::-;3180:4;3209:2;3249;3238:9;3234:18;3279:2;3268:9;3261:21;3302:6;3337;3331:13;3368:6;3360;3353:22;3406:2;3395:9;3391:18;3384:25;;3468:2;3458:6;3455:1;3451:14;3440:9;3436:30;3432:39;3418:53;;3506:2;3498:6;3494:15;3527:1;3537:313;3551:6;3548:1;3545:13;3537:313;;;3640:66;3628:9;3620:6;3616:22;3612:95;3607:3;3600:108;3731:39;3763:6;3754;3748:13;3731:39;:::i;:::-;3721:49;-1:-1:-1;3828:12:1;;;;3793:15;;;;3573:1;3566:9;3537:313;;;-1:-1:-1;3867:6:1;;3020:859;-1:-1:-1;;;;;;;3020:859:1:o;4139:315::-;4207:6;4215;4268:2;4256:9;4247:7;4243:23;4239:32;4236:52;;;4284:1;4281;4274:12;4236:52;4323:9;4310:23;4342:31;4367:5;4342:31;:::i;:::-;4392:5;4444:2;4429:18;;;;4416:32;;-1:-1:-1;;;4139:315:1:o;5085:184::-;5137:77;5134:1;5127:88;5234:4;5231:1;5224:15;5258:4;5255:1;5248:15;6851:184;6903:77;6900:1;6893:88;7000:4;6997:1;6990:15;7024:4;7021:1;7014:15;7040:184;7092:77;7089:1;7082:88;7189:4;7186:1;7179:15;7213:4;7210:1;7203:15;7229:580;7306:4;7312:6;7372:11;7359:25;7462:66;7451:8;7435:14;7431:29;7427:102;7407:18;7403:127;7393:155;;7544:1;7541;7534:12;7393:155;7571:33;;7623:20;;;-1:-1:-1;7666:18:1;7655:30;;7652:50;;;7698:1;7695;7688:12;7652:50;7731:4;7719:17;;-1:-1:-1;7762:14:1;7758:27;;;7748:38;;7745:58;;;7799:1;7796;7789:12;7745:58;7229:580;;;;;:::o;7814:271::-;7997:6;7989;7984:3;7971:33;7953:3;8023:16;;8048:13;;;8023:16;7814:271;-1:-1:-1;7814:271:1:o;8090:956::-;8170:6;8223:2;8211:9;8202:7;8198:23;8194:32;8191:52;;;8239:1;8236;8229:12;8191:52;8272:9;8266:16;8301:18;8342:2;8334:6;8331:14;8328:34;;;8358:1;8355;8348:12;8328:34;8396:6;8385:9;8381:22;8371:32;;8441:7;8434:4;8430:2;8426:13;8422:27;8412:55;;8463:1;8460;8453:12;8412:55;8492:2;8486:9;8514:2;8510;8507:10;8504:36;;;8520:18;;:::i;:::-;8654:2;8648:9;8716:4;8708:13;;8559:66;8704:22;;;8728:2;8700:31;8696:40;8684:53;;;8752:18;;;8772:22;;;8749:46;8746:72;;;8798:18;;:::i;:::-;8838:10;8834:2;8827:22;8873:2;8865:6;8858:18;8913:7;8908:2;8903;8899;8895:11;8891:20;8888:33;8885:53;;;8934:1;8931;8924:12;8885:53;8947:68;9012:2;9007;8999:6;8995:15;8990:2;8986;8982:11;8947:68;:::i;9051:219::-;9200:2;9189:9;9182:21;9163:4;9220:44;9260:2;9249:9;9245:18;9237:6;9220:44;:::i;9275:349::-;9314:3;9345:66;9338:5;9335:77;9332:257;;9445:77;9442:1;9435:88;9546:4;9543:1;9536:15;9574:4;9571:1;9564:15;9332:257;-1:-1:-1;9616:1:1;9605:13;;9275:349::o;9629:274::-;9722:6;9775:2;9763:9;9754:7;9750:23;9746:32;9743:52;;;9791:1;9788;9781:12;9743:52;9823:9;9817:16;9842:31;9867:5;9842:31;:::i;10251:277::-;10318:6;10371:2;10359:9;10350:7;10346:23;10342:32;10339:52;;;10387:1;10384;10377:12;10339:52;10419:9;10413:16;10472:5;10465:13;10458:21;10451:5;10448:32;10438:60;;10494:1;10491;10484:12;14208:287;14337:3;14375:6;14369:13;14391:66;14450:6;14445:3;14438:4;14430:6;14426:17;14391:66;:::i;:::-;14473:16;;;;;14208:287;-1:-1:-1;;14208:287:1:o

Swarm Source

ipfs://ea98f612c38a6b97bc66609ae7bebf91498adbfd239bd013f8aaad6d8356437b

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  ]

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.