Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 96 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Execute | 18418786 | 376 days ago | IN | 0 ETH | 0.00171914 | ||||
Queue | 18403608 | 378 days ago | IN | 0 ETH | 0.00081036 | ||||
Cast Vote | 18378971 | 381 days ago | IN | 0 ETH | 0.00163552 | ||||
Propose | 18378960 | 381 days ago | IN | 0 ETH | 0.00210522 | ||||
Cast Vote | 18356835 | 384 days ago | IN | 0 ETH | 0.00094431 | ||||
Cast Vote | 18356822 | 384 days ago | IN | 0 ETH | 0.00081339 | ||||
Cast Vote | 18351621 | 385 days ago | IN | 0 ETH | 0.00043742 | ||||
Cast Vote | 18351576 | 385 days ago | IN | 0 ETH | 0.00043579 | ||||
Cast Vote | 18351562 | 385 days ago | IN | 0 ETH | 0.00051567 | ||||
Cast Vote | 18351275 | 385 days ago | IN | 0 ETH | 0.00064891 | ||||
Cast Vote | 18351248 | 385 days ago | IN | 0 ETH | 0.00047016 | ||||
Cast Vote | 18351222 | 385 days ago | IN | 0 ETH | 0.00046796 | ||||
Cast Vote | 18351184 | 385 days ago | IN | 0 ETH | 0.000494 | ||||
Cast Vote | 18351172 | 385 days ago | IN | 0 ETH | 0.00048348 | ||||
Cast Vote | 18351159 | 385 days ago | IN | 0 ETH | 0.00052272 | ||||
Cast Vote | 18351156 | 385 days ago | IN | 0 ETH | 0.00046191 | ||||
Cast Vote | 18351126 | 385 days ago | IN | 0 ETH | 0.00050959 | ||||
Cast Vote | 18351112 | 385 days ago | IN | 0 ETH | 0.00047267 | ||||
Cast Vote | 18351062 | 385 days ago | IN | 0 ETH | 0.00047759 | ||||
Cast Vote | 18350943 | 385 days ago | IN | 0 ETH | 0.00055196 | ||||
Cast Vote | 18350932 | 385 days ago | IN | 0 ETH | 0.00060889 | ||||
Cast Vote | 18350924 | 385 days ago | IN | 0 ETH | 0.0004932 | ||||
Cast Vote | 18350899 | 385 days ago | IN | 0 ETH | 0.00046977 | ||||
Cast Vote | 18350826 | 385 days ago | IN | 0 ETH | 0.00047133 | ||||
Cast Vote | 18350801 | 385 days ago | IN | 0 ETH | 0.00048558 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
14524400 | 943 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
Governess
Compiler Version
v0.8.9+commit.e5eed63a
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import '@openzeppelin/contracts/governance/Governor.sol'; import '@openzeppelin/contracts/governance/extensions/GovernorSettings.sol'; import '@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol'; import '@openzeppelin/contracts/governance/extensions/GovernorVotes.sol'; import '@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol'; import '@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol'; /// @custom:security-contact Twitter: @femboydao / Discord: 0xFem#1337 / Email: [email protected] contract Governess is Governor, GovernorSettings, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl { constructor( address _token, address _timelock, uint256 _proposalThreshold ) Governor('Governess') GovernorSettings( 1, /* 1 block */ 19636, /* 3 days */ _proposalThreshold ) GovernorVotes(IVotes(_token)) GovernorVotesQuorumFraction(4) GovernorTimelockControl(TimelockController(payable(_timelock))) {} // The following functions are overrides required by Solidity. function votingDelay() public view override(IGovernor, GovernorSettings) returns (uint256) { return super.votingDelay(); } function votingPeriod() public view override(IGovernor, GovernorSettings) returns (uint256) { return super.votingPeriod(); } function quorum(uint256 blockNumber) public view override(IGovernor, GovernorVotesQuorumFraction) returns (uint256) { return super.quorum(blockNumber); } function getVotes(address account, uint256 blockNumber) public view override(IGovernor, GovernorVotes) returns (uint256) { return super.getVotes(account, blockNumber); } function state(uint256 proposalId) public view override(Governor, GovernorTimelockControl) returns (ProposalState) { return super.state(proposalId); } function propose( address[] memory targets, uint256[] memory values, bytes[] memory calldatas, string memory description ) public override(Governor, IGovernor) returns (uint256) { return super.propose(targets, values, calldatas, description); } function proposalThreshold() public view override(Governor, GovernorSettings) returns (uint256) { return super.proposalThreshold(); } function _execute( uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash ) internal override(Governor, GovernorTimelockControl) { super._execute(proposalId, targets, values, calldatas, descriptionHash); } function _cancel( address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash ) internal override(Governor, GovernorTimelockControl) returns (uint256) { return super._cancel(targets, values, calldatas, descriptionHash); } function _executor() internal view override(Governor, GovernorTimelockControl) returns (address) { return super._executor(); } function supportsInterface(bytes4 interfaceId) public view override(Governor, GovernorTimelockControl) returns (bool) { return super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import '@openzeppelin/contracts/token/ERC20/ERC20.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol'; import '@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol'; /// @custom:security-contact Twitter: @femboydao / Discord: 0xFem#1337 / Email: [email protected] contract Fem is ERC20, Ownable, ERC20Permit, ERC20Votes { constructor() ERC20('FemboyDAO', 'FEM') ERC20Permit('FemboyDAO') {} function mint(address to, uint256 amount) public onlyOwner { _mint(to, amount); } function burn(address from, uint256 amount) public virtual onlyOwner { _burn(from, amount); } // The following functions are overrides required by Solidity. function _afterTokenTransfer( address from, address to, uint256 amount ) internal override(ERC20, ERC20Votes) { super._afterTokenTransfer(from, to, amount); } function _mint(address to, uint256 amount) internal override(ERC20, ERC20Votes) { super._mint(to, amount); } function _burn(address account, uint256 amount) internal override(ERC20, ERC20Votes) { super._burn(account, amount); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.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: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, 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}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, 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}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, 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) { address owner = _msgSender(); _approve(owner, spender, _allowances[owner][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) { address owner = _msgSender(); uint256 currentAllowance = _allowances[owner][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, 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: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; } _balances[to] += amount; emit Transfer(from, to, amount); _afterTokenTransfer(from, to, 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 Spend `amount` form the allowance of `owner` toward `spender`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - 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 {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-ERC20Permit.sol) pragma solidity ^0.8.0; import "./draft-IERC20Permit.sol"; import "../ERC20.sol"; import "../../../utils/cryptography/draft-EIP712.sol"; import "../../../utils/cryptography/ECDSA.sol"; import "../../../utils/Counters.sol"; /** * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * _Available since v3.4._ */ abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 { using Counters for Counters.Counter; mapping(address => Counters.Counter) private _nonces; // solhint-disable-next-line var-name-mixedcase bytes32 private immutable _PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); /** * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`. * * It's a good idea to use the same `name` that is defined as the ERC20 token name. */ constructor(string memory name) EIP712(name, "1") {} /** * @dev See {IERC20Permit-permit}. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public virtual override { require(block.timestamp <= deadline, "ERC20Permit: expired deadline"); bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline)); bytes32 hash = _hashTypedDataV4(structHash); address signer = ECDSA.recover(hash, v, r, s); require(signer == owner, "ERC20Permit: invalid signature"); _approve(owner, spender, value); } /** * @dev See {IERC20Permit-nonces}. */ function nonces(address owner) public view virtual override returns (uint256) { return _nonces[owner].current(); } /** * @dev See {IERC20Permit-DOMAIN_SEPARATOR}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view override returns (bytes32) { return _domainSeparatorV4(); } /** * @dev "Consume a nonce": return the current value and increment. * * _Available since v4.1._ */ function _useNonce(address owner) internal virtual returns (uint256 current) { Counters.Counter storage nonce = _nonces[owner]; current = nonce.current(); nonce.increment(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Votes.sol) pragma solidity ^0.8.0; import "./draft-ERC20Permit.sol"; import "../../../utils/math/Math.sol"; import "../../../governance/utils/IVotes.sol"; import "../../../utils/math/SafeCast.sol"; import "../../../utils/cryptography/ECDSA.sol"; /** * @dev Extension of ERC20 to support Compound-like voting and delegation. This version is more generic than Compound's, * and supports token supply up to 2^224^ - 1, while COMP is limited to 2^96^ - 1. * * NOTE: If exact COMP compatibility is required, use the {ERC20VotesComp} variant of this module. * * This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either * by calling the {delegate} function directly, or by providing a signature to be used with {delegateBySig}. Voting * power can be queried through the public accessors {getVotes} and {getPastVotes}. * * By default, token balance does not account for voting power. This makes transfers cheaper. The downside is that it * requires users to delegate to themselves in order to activate checkpoints and have their voting power tracked. * * _Available since v4.2._ */ abstract contract ERC20Votes is IVotes, ERC20Permit { struct Checkpoint { uint32 fromBlock; uint224 votes; } bytes32 private constant _DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)"); mapping(address => address) private _delegates; mapping(address => Checkpoint[]) private _checkpoints; Checkpoint[] private _totalSupplyCheckpoints; /** * @dev Get the `pos`-th checkpoint for `account`. */ function checkpoints(address account, uint32 pos) public view virtual returns (Checkpoint memory) { return _checkpoints[account][pos]; } /** * @dev Get number of checkpoints for `account`. */ function numCheckpoints(address account) public view virtual returns (uint32) { return SafeCast.toUint32(_checkpoints[account].length); } /** * @dev Get the address `account` is currently delegating to. */ function delegates(address account) public view virtual override returns (address) { return _delegates[account]; } /** * @dev Gets the current votes balance for `account` */ function getVotes(address account) public view virtual override returns (uint256) { uint256 pos = _checkpoints[account].length; return pos == 0 ? 0 : _checkpoints[account][pos - 1].votes; } /** * @dev Retrieve the number of votes for `account` at the end of `blockNumber`. * * Requirements: * * - `blockNumber` must have been already mined */ function getPastVotes(address account, uint256 blockNumber) public view virtual override returns (uint256) { require(blockNumber < block.number, "ERC20Votes: block not yet mined"); return _checkpointsLookup(_checkpoints[account], blockNumber); } /** * @dev Retrieve the `totalSupply` at the end of `blockNumber`. Note, this value is the sum of all balances. * It is but NOT the sum of all the delegated votes! * * Requirements: * * - `blockNumber` must have been already mined */ function getPastTotalSupply(uint256 blockNumber) public view virtual override returns (uint256) { require(blockNumber < block.number, "ERC20Votes: block not yet mined"); return _checkpointsLookup(_totalSupplyCheckpoints, blockNumber); } /** * @dev Lookup a value in a list of (sorted) checkpoints. */ function _checkpointsLookup(Checkpoint[] storage ckpts, uint256 blockNumber) private view returns (uint256) { // We run a binary search to look for the earliest checkpoint taken after `blockNumber`. // // During the loop, the index of the wanted checkpoint remains in the range [low-1, high). // With each iteration, either `low` or `high` is moved towards the middle of the range to maintain the invariant. // - If the middle checkpoint is after `blockNumber`, we look in [low, mid) // - If the middle checkpoint is before or equal to `blockNumber`, we look in [mid+1, high) // Once we reach a single value (when low == high), we've found the right checkpoint at the index high-1, if not // out of bounds (in which case we're looking too far in the past and the result is 0). // Note that if the latest checkpoint available is exactly for `blockNumber`, we end up with an index that is // past the end of the array, so we technically don't find a checkpoint after `blockNumber`, but it works out // the same. uint256 high = ckpts.length; uint256 low = 0; while (low < high) { uint256 mid = Math.average(low, high); if (ckpts[mid].fromBlock > blockNumber) { high = mid; } else { low = mid + 1; } } return high == 0 ? 0 : ckpts[high - 1].votes; } /** * @dev Delegate votes from the sender to `delegatee`. */ function delegate(address delegatee) public virtual override { _delegate(_msgSender(), delegatee); } /** * @dev Delegates votes from signer to `delegatee` */ function delegateBySig( address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s ) public virtual override { require(block.timestamp <= expiry, "ERC20Votes: signature expired"); address signer = ECDSA.recover( _hashTypedDataV4(keccak256(abi.encode(_DELEGATION_TYPEHASH, delegatee, nonce, expiry))), v, r, s ); require(nonce == _useNonce(signer), "ERC20Votes: invalid nonce"); _delegate(signer, delegatee); } /** * @dev Maximum token supply. Defaults to `type(uint224).max` (2^224^ - 1). */ function _maxSupply() internal view virtual returns (uint224) { return type(uint224).max; } /** * @dev Snapshots the totalSupply after it has been increased. */ function _mint(address account, uint256 amount) internal virtual override { super._mint(account, amount); require(totalSupply() <= _maxSupply(), "ERC20Votes: total supply risks overflowing votes"); _writeCheckpoint(_totalSupplyCheckpoints, _add, amount); } /** * @dev Snapshots the totalSupply after it has been decreased. */ function _burn(address account, uint256 amount) internal virtual override { super._burn(account, amount); _writeCheckpoint(_totalSupplyCheckpoints, _subtract, amount); } /** * @dev Move voting power when tokens are transferred. * * Emits a {DelegateVotesChanged} event. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual override { super._afterTokenTransfer(from, to, amount); _moveVotingPower(delegates(from), delegates(to), amount); } /** * @dev Change delegation for `delegator` to `delegatee`. * * Emits events {DelegateChanged} and {DelegateVotesChanged}. */ function _delegate(address delegator, address delegatee) internal virtual { address currentDelegate = delegates(delegator); uint256 delegatorBalance = balanceOf(delegator); _delegates[delegator] = delegatee; emit DelegateChanged(delegator, currentDelegate, delegatee); _moveVotingPower(currentDelegate, delegatee, delegatorBalance); } function _moveVotingPower( address src, address dst, uint256 amount ) private { if (src != dst && amount > 0) { if (src != address(0)) { (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[src], _subtract, amount); emit DelegateVotesChanged(src, oldWeight, newWeight); } if (dst != address(0)) { (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[dst], _add, amount); emit DelegateVotesChanged(dst, oldWeight, newWeight); } } } function _writeCheckpoint( Checkpoint[] storage ckpts, function(uint256, uint256) view returns (uint256) op, uint256 delta ) private returns (uint256 oldWeight, uint256 newWeight) { uint256 pos = ckpts.length; oldWeight = pos == 0 ? 0 : ckpts[pos - 1].votes; newWeight = op(oldWeight, delta); if (pos > 0 && ckpts[pos - 1].fromBlock == block.number) { ckpts[pos - 1].votes = SafeCast.toUint224(newWeight); } else { ckpts.push(Checkpoint({fromBlock: SafeCast.toUint32(block.number), votes: SafeCast.toUint224(newWeight)})); } } function _add(uint256 a, uint256 b) private pure returns (uint256) { return a + b; } function _subtract(uint256 a, uint256 b) private pure returns (uint256) { return a - b; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, 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 `from` to `to` 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 from, address to, 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol) pragma solidity ^0.8.0; import "./ECDSA.sol"; /** * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. * * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible, * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding * they need in their contracts using a combination of `abi.encode` and `keccak256`. * * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA * ({_hashTypedDataV4}). * * The implementation of the domain separator was designed to be as efficient as possible while still properly updating * the chain id to protect against replay attacks on an eventual fork of the chain. * * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. * * _Available since v3.4._ */ abstract contract EIP712 { /* solhint-disable var-name-mixedcase */ // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to // invalidate the cached domain separator if the chain id changes. bytes32 private immutable _CACHED_DOMAIN_SEPARATOR; uint256 private immutable _CACHED_CHAIN_ID; address private immutable _CACHED_THIS; bytes32 private immutable _HASHED_NAME; bytes32 private immutable _HASHED_VERSION; bytes32 private immutable _TYPE_HASH; /* solhint-enable var-name-mixedcase */ /** * @dev Initializes the domain separator and parameter caches. * * The meaning of `name` and `version` is specified in * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: * * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. * - `version`: the current major version of the signing domain. * * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart * contract upgrade]. */ constructor(string memory name, string memory version) { bytes32 hashedName = keccak256(bytes(name)); bytes32 hashedVersion = keccak256(bytes(version)); bytes32 typeHash = keccak256( "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" ); _HASHED_NAME = hashedName; _HASHED_VERSION = hashedVersion; _CACHED_CHAIN_ID = block.chainid; _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion); _CACHED_THIS = address(this); _TYPE_HASH = typeHash; } /** * @dev Returns the domain separator for the current chain. */ function _domainSeparatorV4() internal view returns (bytes32) { if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) { return _CACHED_DOMAIN_SEPARATOR; } else { return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION); } } function _buildDomainSeparator( bytes32 typeHash, bytes32 nameHash, bytes32 versionHash ) private view returns (bytes32) { return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this))); } /** * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this * function returns the hash of the fully encoded EIP712 message for this domain. * * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example: * * ```solidity * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( * keccak256("Mail(address to,string contents)"), * mailTo, * keccak256(bytes(mailContents)) * ))); * address signer = ECDSA.recover(digest, signature); * ``` */ function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (governance/utils/IVotes.sol) pragma solidity ^0.8.0; /** * @dev Common interface for {ERC20Votes}, {ERC721Votes}, and other {Votes}-enabled contracts. * * _Available since v4.5._ */ interface IVotes { /** * @dev Emitted when an account changes their delegate. */ event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate); /** * @dev Emitted when a token transfer or delegate change results in changes to a delegate's number of votes. */ event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance); /** * @dev Returns the current amount of votes that `account` has. */ function getVotes(address account) external view returns (uint256); /** * @dev Returns the amount of votes that `account` had at the end of a past block (`blockNumber`). */ function getPastVotes(address account, uint256 blockNumber) external view returns (uint256); /** * @dev Returns the total supply of votes available at the end of a past block (`blockNumber`). * * NOTE: This value is the sum of all available votes, which is not necessarily the sum of all delegated votes. * Votes that have not been delegated are still part of total supply, even though they would not participate in a * vote. */ function getPastTotalSupply(uint256 blockNumber) external view returns (uint256); /** * @dev Returns the delegate that `account` has chosen. */ function delegates(address account) external view returns (address); /** * @dev Delegates votes from the sender to `delegatee`. */ function delegate(address delegatee) external; /** * @dev Delegates votes from signer to `delegatee`. */ function delegateBySig( address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol) pragma solidity ^0.8.0; /** * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` restores this intuition by * reverting the transaction when such an operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. * * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing * all math on `uint256` and `int256` and then downcasting. */ library SafeCast { /** * @dev Returns the downcasted uint224 from uint256, reverting on * overflow (when the input is greater than largest uint224). * * Counterpart to Solidity's `uint224` operator. * * Requirements: * * - input must fit into 224 bits */ function toUint224(uint256 value) internal pure returns (uint224) { require(value <= type(uint224).max, "SafeCast: value doesn't fit in 224 bits"); return uint224(value); } /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */ function toUint128(uint256 value) internal pure returns (uint128) { require(value <= type(uint128).max, "SafeCast: value doesn't fit in 128 bits"); return uint128(value); } /** * @dev Returns the downcasted uint96 from uint256, reverting on * overflow (when the input is greater than largest uint96). * * Counterpart to Solidity's `uint96` operator. * * Requirements: * * - input must fit into 96 bits */ function toUint96(uint256 value) internal pure returns (uint96) { require(value <= type(uint96).max, "SafeCast: value doesn't fit in 96 bits"); return uint96(value); } /** * @dev Returns the downcasted uint64 from uint256, reverting on * overflow (when the input is greater than largest uint64). * * Counterpart to Solidity's `uint64` operator. * * Requirements: * * - input must fit into 64 bits */ function toUint64(uint256 value) internal pure returns (uint64) { require(value <= type(uint64).max, "SafeCast: value doesn't fit in 64 bits"); return uint64(value); } /** * @dev Returns the downcasted uint32 from uint256, reverting on * overflow (when the input is greater than largest uint32). * * Counterpart to Solidity's `uint32` operator. * * Requirements: * * - input must fit into 32 bits */ function toUint32(uint256 value) internal pure returns (uint32) { require(value <= type(uint32).max, "SafeCast: value doesn't fit in 32 bits"); return uint32(value); } /** * @dev Returns the downcasted uint16 from uint256, reverting on * overflow (when the input is greater than largest uint16). * * Counterpart to Solidity's `uint16` operator. * * Requirements: * * - input must fit into 16 bits */ function toUint16(uint256 value) internal pure returns (uint16) { require(value <= type(uint16).max, "SafeCast: value doesn't fit in 16 bits"); return uint16(value); } /** * @dev Returns the downcasted uint8 from uint256, reverting on * overflow (when the input is greater than largest uint8). * * Counterpart to Solidity's `uint8` operator. * * Requirements: * * - input must fit into 8 bits. */ function toUint8(uint256 value) internal pure returns (uint8) { require(value <= type(uint8).max, "SafeCast: value doesn't fit in 8 bits"); return uint8(value); } /** * @dev Converts a signed int256 into an unsigned uint256. * * Requirements: * * - input must be greater than or equal to 0. */ function toUint256(int256 value) internal pure returns (uint256) { require(value >= 0, "SafeCast: value must be positive"); return uint256(value); } /** * @dev Returns the downcasted int128 from int256, reverting on * overflow (when the input is less than smallest int128 or * greater than largest int128). * * Counterpart to Solidity's `int128` operator. * * Requirements: * * - input must fit into 128 bits * * _Available since v3.1._ */ function toInt128(int256 value) internal pure returns (int128) { require(value >= type(int128).min && value <= type(int128).max, "SafeCast: value doesn't fit in 128 bits"); return int128(value); } /** * @dev Returns the downcasted int64 from int256, reverting on * overflow (when the input is less than smallest int64 or * greater than largest int64). * * Counterpart to Solidity's `int64` operator. * * Requirements: * * - input must fit into 64 bits * * _Available since v3.1._ */ function toInt64(int256 value) internal pure returns (int64) { require(value >= type(int64).min && value <= type(int64).max, "SafeCast: value doesn't fit in 64 bits"); return int64(value); } /** * @dev Returns the downcasted int32 from int256, reverting on * overflow (when the input is less than smallest int32 or * greater than largest int32). * * Counterpart to Solidity's `int32` operator. * * Requirements: * * - input must fit into 32 bits * * _Available since v3.1._ */ function toInt32(int256 value) internal pure returns (int32) { require(value >= type(int32).min && value <= type(int32).max, "SafeCast: value doesn't fit in 32 bits"); return int32(value); } /** * @dev Returns the downcasted int16 from int256, reverting on * overflow (when the input is less than smallest int16 or * greater than largest int16). * * Counterpart to Solidity's `int16` operator. * * Requirements: * * - input must fit into 16 bits * * _Available since v3.1._ */ function toInt16(int256 value) internal pure returns (int16) { require(value >= type(int16).min && value <= type(int16).max, "SafeCast: value doesn't fit in 16 bits"); return int16(value); } /** * @dev Returns the downcasted int8 from int256, reverting on * overflow (when the input is less than smallest int8 or * greater than largest int8). * * Counterpart to Solidity's `int8` operator. * * Requirements: * * - input must fit into 8 bits. * * _Available since v3.1._ */ function toInt8(int256 value) internal pure returns (int8) { require(value >= type(int8).min && value <= type(int8).max, "SafeCast: value doesn't fit in 8 bits"); return int8(value); } /** * @dev Converts an unsigned uint256 into a signed int256. * * Requirements: * * - input must be less than or equal to maxInt256. */ function toInt256(uint256 value) internal pure returns (int256) { // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive require(value <= uint256(type(int256).max), "SafeCast: value doesn't fit in an int256"); return int256(value); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (governance/Governor.sol) pragma solidity ^0.8.0; import "../utils/cryptography/ECDSA.sol"; import "../utils/cryptography/draft-EIP712.sol"; import "../utils/introspection/ERC165.sol"; import "../utils/math/SafeCast.sol"; import "../utils/Address.sol"; import "../utils/Context.sol"; import "../utils/Timers.sol"; import "./IGovernor.sol"; /** * @dev Core of the governance system, designed to be extended though various modules. * * This contract is abstract and requires several function to be implemented in various modules: * * - A counting module must implement {quorum}, {_quorumReached}, {_voteSucceeded} and {_countVote} * - A voting module must implement {getVotes} * - Additionanly, the {votingPeriod} must also be implemented * * _Available since v4.3._ */ abstract contract Governor is Context, ERC165, EIP712, IGovernor { using SafeCast for uint256; using Timers for Timers.BlockNumber; bytes32 public constant BALLOT_TYPEHASH = keccak256("Ballot(uint256 proposalId,uint8 support)"); struct ProposalCore { Timers.BlockNumber voteStart; Timers.BlockNumber voteEnd; bool executed; bool canceled; } string private _name; mapping(uint256 => ProposalCore) private _proposals; /** * @dev Restrict access of functions to the governance executor, which may be the Governor itself or a timelock * contract, as specified by {_executor}. This generally means that function with this modifier must be voted on and * executed through the governance protocol. */ modifier onlyGovernance() { require(_msgSender() == _executor(), "Governor: onlyGovernance"); _; } /** * @dev Sets the value for {name} and {version} */ constructor(string memory name_) EIP712(name_, version()) { _name = name_; } /** * @dev Function to receive ETH that will be handled by the governor (disabled if executor is a third party contract) */ receive() external payable virtual { require(_executor() == address(this)); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IGovernor).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IGovernor-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IGovernor-version}. */ function version() public view virtual override returns (string memory) { return "1"; } /** * @dev See {IGovernor-hashProposal}. * * The proposal id is produced by hashing the RLC encoded `targets` array, the `values` array, the `calldatas` array * and the descriptionHash (bytes32 which itself is the keccak256 hash of the description string). This proposal id * can be produced from the proposal data which is part of the {ProposalCreated} event. It can even be computed in * advance, before the proposal is submitted. * * Note that the chainId and the governor address are not part of the proposal id computation. Consequently, the * same proposal (with same operation and same description) will have the same id if submitted on multiple governors * accross multiple networks. This also means that in order to execute the same operation twice (on the same * governor) the proposer will have to change the description in order to avoid proposal id conflicts. */ function hashProposal( address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash ) public pure virtual override returns (uint256) { return uint256(keccak256(abi.encode(targets, values, calldatas, descriptionHash))); } /** * @dev See {IGovernor-state}. */ function state(uint256 proposalId) public view virtual override returns (ProposalState) { ProposalCore storage proposal = _proposals[proposalId]; if (proposal.executed) { return ProposalState.Executed; } if (proposal.canceled) { return ProposalState.Canceled; } uint256 snapshot = proposalSnapshot(proposalId); if (snapshot == 0) { revert("Governor: unknown proposal id"); } if (snapshot >= block.number) { return ProposalState.Pending; } uint256 deadline = proposalDeadline(proposalId); if (deadline >= block.number) { return ProposalState.Active; } if (_quorumReached(proposalId) && _voteSucceeded(proposalId)) { return ProposalState.Succeeded; } else { return ProposalState.Defeated; } } /** * @dev See {IGovernor-proposalSnapshot}. */ function proposalSnapshot(uint256 proposalId) public view virtual override returns (uint256) { return _proposals[proposalId].voteStart.getDeadline(); } /** * @dev See {IGovernor-proposalDeadline}. */ function proposalDeadline(uint256 proposalId) public view virtual override returns (uint256) { return _proposals[proposalId].voteEnd.getDeadline(); } /** * @dev Part of the Governor Bravo's interface: _"The number of votes required in order for a voter to become a proposer"_. */ function proposalThreshold() public view virtual returns (uint256) { return 0; } /** * @dev Amount of votes already cast passes the threshold limit. */ function _quorumReached(uint256 proposalId) internal view virtual returns (bool); /** * @dev Is the proposal successful or not. */ function _voteSucceeded(uint256 proposalId) internal view virtual returns (bool); /** * @dev Register a vote with a given support and voting weight. * * Note: Support is generic and can represent various things depending on the voting system used. */ function _countVote( uint256 proposalId, address account, uint8 support, uint256 weight ) internal virtual; /** * @dev See {IGovernor-propose}. */ function propose( address[] memory targets, uint256[] memory values, bytes[] memory calldatas, string memory description ) public virtual override returns (uint256) { require( getVotes(msg.sender, block.number - 1) >= proposalThreshold(), "GovernorCompatibilityBravo: proposer votes below proposal threshold" ); uint256 proposalId = hashProposal(targets, values, calldatas, keccak256(bytes(description))); require(targets.length == values.length, "Governor: invalid proposal length"); require(targets.length == calldatas.length, "Governor: invalid proposal length"); require(targets.length > 0, "Governor: empty proposal"); ProposalCore storage proposal = _proposals[proposalId]; require(proposal.voteStart.isUnset(), "Governor: proposal already exists"); uint64 snapshot = block.number.toUint64() + votingDelay().toUint64(); uint64 deadline = snapshot + votingPeriod().toUint64(); proposal.voteStart.setDeadline(snapshot); proposal.voteEnd.setDeadline(deadline); emit ProposalCreated( proposalId, _msgSender(), targets, values, new string[](targets.length), calldatas, snapshot, deadline, description ); return proposalId; } /** * @dev See {IGovernor-execute}. */ function execute( address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash ) public payable virtual override returns (uint256) { uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash); ProposalState status = state(proposalId); require( status == ProposalState.Succeeded || status == ProposalState.Queued, "Governor: proposal not successful" ); _proposals[proposalId].executed = true; emit ProposalExecuted(proposalId); _execute(proposalId, targets, values, calldatas, descriptionHash); return proposalId; } /** * @dev Internal execution mechanism. Can be overriden to implement different execution mechanism */ function _execute( uint256, /* proposalId */ address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 /*descriptionHash*/ ) internal virtual { string memory errorMessage = "Governor: call reverted without message"; for (uint256 i = 0; i < targets.length; ++i) { (bool success, bytes memory returndata) = targets[i].call{value: values[i]}(calldatas[i]); Address.verifyCallResult(success, returndata, errorMessage); } } /** * @dev Internal cancel mechanism: locks up the proposal timer, preventing it from being re-submitted. Marks it as * canceled to allow distinguishing it from executed proposals. * * Emits a {IGovernor-ProposalCanceled} event. */ function _cancel( address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash ) internal virtual returns (uint256) { uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash); ProposalState status = state(proposalId); require( status != ProposalState.Canceled && status != ProposalState.Expired && status != ProposalState.Executed, "Governor: proposal not active" ); _proposals[proposalId].canceled = true; emit ProposalCanceled(proposalId); return proposalId; } /** * @dev See {IGovernor-castVote}. */ function castVote(uint256 proposalId, uint8 support) public virtual override returns (uint256) { address voter = _msgSender(); return _castVote(proposalId, voter, support, ""); } /** * @dev See {IGovernor-castVoteWithReason}. */ function castVoteWithReason( uint256 proposalId, uint8 support, string calldata reason ) public virtual override returns (uint256) { address voter = _msgSender(); return _castVote(proposalId, voter, support, reason); } /** * @dev See {IGovernor-castVoteBySig}. */ function castVoteBySig( uint256 proposalId, uint8 support, uint8 v, bytes32 r, bytes32 s ) public virtual override returns (uint256) { address voter = ECDSA.recover( _hashTypedDataV4(keccak256(abi.encode(BALLOT_TYPEHASH, proposalId, support))), v, r, s ); return _castVote(proposalId, voter, support, ""); } /** * @dev Internal vote casting mechanism: Check that the vote is pending, that it has not been cast yet, retrieve * voting weight using {IGovernor-getVotes} and call the {_countVote} internal function. * * Emits a {IGovernor-VoteCast} event. */ function _castVote( uint256 proposalId, address account, uint8 support, string memory reason ) internal virtual returns (uint256) { ProposalCore storage proposal = _proposals[proposalId]; require(state(proposalId) == ProposalState.Active, "Governor: vote not currently active"); uint256 weight = getVotes(account, proposal.voteStart.getDeadline()); _countVote(proposalId, account, support, weight); emit VoteCast(account, proposalId, support, weight, reason); return weight; } /** * @dev Relays a transaction or function call to an arbitrary target. In cases where the governance executor * is some contract other than the governor itself, like when using a timelock, this function can be invoked * in a governance proposal to recover tokens or Ether that was sent to the governor contract by mistake. * Note that if the executor is simply the governor itself, use of `relay` is redundant. */ function relay( address target, uint256 value, bytes calldata data ) external virtual onlyGovernance { Address.functionCallWithValue(target, data, value); } /** * @dev Address through which the governor executes action. Will be overloaded by module that execute actions * through another contract such as a timelock. */ function _executor() internal view virtual returns (address) { return address(this); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @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 * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 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); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Timers.sol) pragma solidity ^0.8.0; /** * @dev Tooling for timepoints, timers and delays */ library Timers { struct Timestamp { uint64 _deadline; } function getDeadline(Timestamp memory timer) internal pure returns (uint64) { return timer._deadline; } function setDeadline(Timestamp storage timer, uint64 timestamp) internal { timer._deadline = timestamp; } function reset(Timestamp storage timer) internal { timer._deadline = 0; } function isUnset(Timestamp memory timer) internal pure returns (bool) { return timer._deadline == 0; } function isStarted(Timestamp memory timer) internal pure returns (bool) { return timer._deadline > 0; } function isPending(Timestamp memory timer) internal view returns (bool) { return timer._deadline > block.timestamp; } function isExpired(Timestamp memory timer) internal view returns (bool) { return isStarted(timer) && timer._deadline <= block.timestamp; } struct BlockNumber { uint64 _deadline; } function getDeadline(BlockNumber memory timer) internal pure returns (uint64) { return timer._deadline; } function setDeadline(BlockNumber storage timer, uint64 timestamp) internal { timer._deadline = timestamp; } function reset(BlockNumber storage timer) internal { timer._deadline = 0; } function isUnset(BlockNumber memory timer) internal pure returns (bool) { return timer._deadline == 0; } function isStarted(BlockNumber memory timer) internal pure returns (bool) { return timer._deadline > 0; } function isPending(BlockNumber memory timer) internal view returns (bool) { return timer._deadline > block.number; } function isExpired(BlockNumber memory timer) internal view returns (bool) { return isStarted(timer) && timer._deadline <= block.number; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (governance/IGovernor.sol) pragma solidity ^0.8.0; import "../utils/introspection/ERC165.sol"; /** * @dev Interface of the {Governor} core. * * _Available since v4.3._ */ abstract contract IGovernor is IERC165 { enum ProposalState { Pending, Active, Canceled, Defeated, Succeeded, Queued, Expired, Executed } /** * @dev Emitted when a proposal is created. */ event ProposalCreated( uint256 proposalId, address proposer, address[] targets, uint256[] values, string[] signatures, bytes[] calldatas, uint256 startBlock, uint256 endBlock, string description ); /** * @dev Emitted when a proposal is canceled. */ event ProposalCanceled(uint256 proposalId); /** * @dev Emitted when a proposal is executed. */ event ProposalExecuted(uint256 proposalId); /** * @dev Emitted when a vote is cast. * * Note: `support` values should be seen as buckets. There interpretation depends on the voting module used. */ event VoteCast(address indexed voter, uint256 proposalId, uint8 support, uint256 weight, string reason); /** * @notice module:core * @dev Name of the governor instance (used in building the ERC712 domain separator). */ function name() public view virtual returns (string memory); /** * @notice module:core * @dev Version of the governor instance (used in building the ERC712 domain separator). Default: "1" */ function version() public view virtual returns (string memory); /** * @notice module:voting * @dev A description of the possible `support` values for {castVote} and the way these votes are counted, meant to * be consumed by UIs to show correct vote options and interpret the results. The string is a URL-encoded sequence of * key-value pairs that each describe one aspect, for example `support=bravo&quorum=for,abstain`. * * There are 2 standard keys: `support` and `quorum`. * * - `support=bravo` refers to the vote options 0 = Against, 1 = For, 2 = Abstain, as in `GovernorBravo`. * - `quorum=bravo` means that only For votes are counted towards quorum. * - `quorum=for,abstain` means that both For and Abstain votes are counted towards quorum. * * NOTE: The string can be decoded by the standard * https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams[`URLSearchParams`] * JavaScript class. */ // solhint-disable-next-line func-name-mixedcase function COUNTING_MODE() public pure virtual returns (string memory); /** * @notice module:core * @dev Hashing function used to (re)build the proposal id from the proposal details.. */ function hashProposal( address[] calldata targets, uint256[] calldata values, bytes[] calldata calldatas, bytes32 descriptionHash ) public pure virtual returns (uint256); /** * @notice module:core * @dev Current state of a proposal, following Compound's convention */ function state(uint256 proposalId) public view virtual returns (ProposalState); /** * @notice module:core * @dev Block number used to retrieve user's votes and quorum. As per Compound's Comp and OpenZeppelin's * ERC20Votes, the snapshot is performed at the end of this block. Hence, voting for this proposal starts at the * beginning of the following block. */ function proposalSnapshot(uint256 proposalId) public view virtual returns (uint256); /** * @notice module:core * @dev Block number at which votes close. Votes close at the end of this block, so it is possible to cast a vote * during this block. */ function proposalDeadline(uint256 proposalId) public view virtual returns (uint256); /** * @notice module:user-config * @dev Delay, in number of block, between the proposal is created and the vote starts. This can be increassed to * leave time for users to buy voting power, of delegate it, before the voting of a proposal starts. */ function votingDelay() public view virtual returns (uint256); /** * @notice module:user-config * @dev Delay, in number of blocks, between the vote start and vote ends. * * NOTE: The {votingDelay} can delay the start of the vote. This must be considered when setting the voting * duration compared to the voting delay. */ function votingPeriod() public view virtual returns (uint256); /** * @notice module:user-config * @dev Minimum number of cast voted required for a proposal to be successful. * * Note: The `blockNumber` parameter corresponds to the snaphot used for counting vote. This allows to scale the * quroum depending on values such as the totalSupply of a token at this block (see {ERC20Votes}). */ function quorum(uint256 blockNumber) public view virtual returns (uint256); /** * @notice module:reputation * @dev Voting power of an `account` at a specific `blockNumber`. * * Note: this can be implemented in a number of ways, for example by reading the delegated balance from one (or * multiple), {ERC20Votes} tokens. */ function getVotes(address account, uint256 blockNumber) public view virtual returns (uint256); /** * @notice module:voting * @dev Returns weither `account` has cast a vote on `proposalId`. */ function hasVoted(uint256 proposalId, address account) public view virtual returns (bool); /** * @dev Create a new proposal. Vote start {IGovernor-votingDelay} blocks after the proposal is created and ends * {IGovernor-votingPeriod} blocks after the voting starts. * * Emits a {ProposalCreated} event. */ function propose( address[] memory targets, uint256[] memory values, bytes[] memory calldatas, string memory description ) public virtual returns (uint256 proposalId); /** * @dev Execute a successful proposal. This requires the quorum to be reached, the vote to be successful, and the * deadline to be reached. * * Emits a {ProposalExecuted} event. * * Note: some module can modify the requirements for execution, for example by adding an additional timelock. */ function execute( address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash ) public payable virtual returns (uint256 proposalId); /** * @dev Cast a vote * * Emits a {VoteCast} event. */ function castVote(uint256 proposalId, uint8 support) public virtual returns (uint256 balance); /** * @dev Cast a vote with a reason * * Emits a {VoteCast} event. */ function castVoteWithReason( uint256 proposalId, uint8 support, string calldata reason ) public virtual returns (uint256 balance); /** * @dev Cast a vote using the user cryptographic signature. * * Emits a {VoteCast} event. */ function castVoteBySig( uint256 proposalId, uint8 support, uint8 v, bytes32 r, bytes32 s ) public virtual returns (uint256 balance); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (governance/extensions/GovernorTimelockControl.sol) pragma solidity ^0.8.0; import "./IGovernorTimelock.sol"; import "../Governor.sol"; import "../TimelockController.sol"; /** * @dev Extension of {Governor} that binds the execution process to an instance of {TimelockController}. This adds a * delay, enforced by the {TimelockController} to all successful proposal (in addition to the voting duration). The * {Governor} needs the proposer (and ideally the executor) roles for the {Governor} to work properly. * * Using this model means the proposal will be operated by the {TimelockController} and not by the {Governor}. Thus, * the assets and permissions must be attached to the {TimelockController}. Any asset sent to the {Governor} will be * inaccessible. * * WARNING: Setting up the TimelockController to have additional proposers besides the governor is very risky, as it * grants them powers that they must be trusted or known not to use: 1) {onlyGovernance} functions like {relay} are * available to them through the timelock, and 2) approved governance proposals can be blocked by them, effectively * executing a Denial of Service attack. This risk will be mitigated in a future release. * * _Available since v4.3._ */ abstract contract GovernorTimelockControl is IGovernorTimelock, Governor { TimelockController private _timelock; mapping(uint256 => bytes32) private _timelockIds; /** * @dev Emitted when the timelock controller used for proposal execution is modified. */ event TimelockChange(address oldTimelock, address newTimelock); /** * @dev Set the timelock. */ constructor(TimelockController timelockAddress) { _updateTimelock(timelockAddress); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, Governor) returns (bool) { return interfaceId == type(IGovernorTimelock).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Overriden version of the {Governor-state} function with added support for the `Queued` status. */ function state(uint256 proposalId) public view virtual override(IGovernor, Governor) returns (ProposalState) { ProposalState status = super.state(proposalId); if (status != ProposalState.Succeeded) { return status; } // core tracks execution, so we just have to check if successful proposal have been queued. bytes32 queueid = _timelockIds[proposalId]; if (queueid == bytes32(0)) { return status; } else if (_timelock.isOperationDone(queueid)) { return ProposalState.Executed; } else if (_timelock.isOperationPending(queueid)) { return ProposalState.Queued; } else { return ProposalState.Canceled; } } /** * @dev Public accessor to check the address of the timelock */ function timelock() public view virtual override returns (address) { return address(_timelock); } /** * @dev Public accessor to check the eta of a queued proposal */ function proposalEta(uint256 proposalId) public view virtual override returns (uint256) { uint256 eta = _timelock.getTimestamp(_timelockIds[proposalId]); return eta == 1 ? 0 : eta; // _DONE_TIMESTAMP (1) should be replaced with a 0 value } /** * @dev Function to queue a proposal to the timelock. */ function queue( address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash ) public virtual override returns (uint256) { uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash); require(state(proposalId) == ProposalState.Succeeded, "Governor: proposal not successful"); uint256 delay = _timelock.getMinDelay(); _timelockIds[proposalId] = _timelock.hashOperationBatch(targets, values, calldatas, 0, descriptionHash); _timelock.scheduleBatch(targets, values, calldatas, 0, descriptionHash, delay); emit ProposalQueued(proposalId, block.timestamp + delay); return proposalId; } /** * @dev Overriden execute function that run the already queued proposal through the timelock. */ function _execute( uint256, /* proposalId */ address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash ) internal virtual override { _timelock.executeBatch{value: msg.value}(targets, values, calldatas, 0, descriptionHash); } /** * @dev Overriden version of the {Governor-_cancel} function to cancel the timelocked proposal if it as already * been queued. */ function _cancel( address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash ) internal virtual override returns (uint256) { uint256 proposalId = super._cancel(targets, values, calldatas, descriptionHash); if (_timelockIds[proposalId] != 0) { _timelock.cancel(_timelockIds[proposalId]); delete _timelockIds[proposalId]; } return proposalId; } /** * @dev Address through which the governor executes action. In this case, the timelock. */ function _executor() internal view virtual override returns (address) { return address(_timelock); } /** * @dev Public endpoint to update the underlying timelock instance. Restricted to the timelock itself, so updates * must be proposed, scheduled, and executed through governance proposals. * * CAUTION: It is not recommended to change the timelock while there are other queued governance proposals. */ function updateTimelock(TimelockController newTimelock) external virtual onlyGovernance { _updateTimelock(newTimelock); } function _updateTimelock(TimelockController newTimelock) private { emit TimelockChange(address(_timelock), address(newTimelock)); _timelock = newTimelock; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (governance/extensions/IGovernorTimelock.sol) pragma solidity ^0.8.0; import "../IGovernor.sol"; /** * @dev Extension of the {IGovernor} for timelock supporting modules. * * _Available since v4.3._ */ abstract contract IGovernorTimelock is IGovernor { event ProposalQueued(uint256 proposalId, uint256 eta); function timelock() public view virtual returns (address); function proposalEta(uint256 proposalId) public view virtual returns (uint256); function queue( address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash ) public virtual returns (uint256 proposalId); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (governance/TimelockController.sol) pragma solidity ^0.8.0; import "../access/AccessControl.sol"; /** * @dev Contract module which acts as a timelocked controller. When set as the * owner of an `Ownable` smart contract, it enforces a timelock on all * `onlyOwner` maintenance operations. This gives time for users of the * controlled contract to exit before a potentially dangerous maintenance * operation is applied. * * By default, this contract is self administered, meaning administration tasks * have to go through the timelock process. The proposer (resp executor) role * is in charge of proposing (resp executing) operations. A common use case is * to position this {TimelockController} as the owner of a smart contract, with * a multisig or a DAO as the sole proposer. * * _Available since v3.3._ */ contract TimelockController is AccessControl { bytes32 public constant TIMELOCK_ADMIN_ROLE = keccak256("TIMELOCK_ADMIN_ROLE"); bytes32 public constant PROPOSER_ROLE = keccak256("PROPOSER_ROLE"); bytes32 public constant EXECUTOR_ROLE = keccak256("EXECUTOR_ROLE"); uint256 internal constant _DONE_TIMESTAMP = uint256(1); mapping(bytes32 => uint256) private _timestamps; uint256 private _minDelay; /** * @dev Emitted when a call is scheduled as part of operation `id`. */ event CallScheduled( bytes32 indexed id, uint256 indexed index, address target, uint256 value, bytes data, bytes32 predecessor, uint256 delay ); /** * @dev Emitted when a call is performed as part of operation `id`. */ event CallExecuted(bytes32 indexed id, uint256 indexed index, address target, uint256 value, bytes data); /** * @dev Emitted when operation `id` is cancelled. */ event Cancelled(bytes32 indexed id); /** * @dev Emitted when the minimum delay for future operations is modified. */ event MinDelayChange(uint256 oldDuration, uint256 newDuration); /** * @dev Initializes the contract with a given `minDelay`. */ constructor( uint256 minDelay, address[] memory proposers, address[] memory executors ) { _setRoleAdmin(TIMELOCK_ADMIN_ROLE, TIMELOCK_ADMIN_ROLE); _setRoleAdmin(PROPOSER_ROLE, TIMELOCK_ADMIN_ROLE); _setRoleAdmin(EXECUTOR_ROLE, TIMELOCK_ADMIN_ROLE); // deployer + self administration _setupRole(TIMELOCK_ADMIN_ROLE, _msgSender()); _setupRole(TIMELOCK_ADMIN_ROLE, address(this)); // register proposers for (uint256 i = 0; i < proposers.length; ++i) { _setupRole(PROPOSER_ROLE, proposers[i]); } // register executors for (uint256 i = 0; i < executors.length; ++i) { _setupRole(EXECUTOR_ROLE, executors[i]); } _minDelay = minDelay; emit MinDelayChange(0, minDelay); } /** * @dev Modifier to make a function callable only by a certain role. In * addition to checking the sender's role, `address(0)` 's role is also * considered. Granting a role to `address(0)` is equivalent to enabling * this role for everyone. */ modifier onlyRoleOrOpenRole(bytes32 role) { if (!hasRole(role, address(0))) { _checkRole(role, _msgSender()); } _; } /** * @dev Contract might receive/hold ETH as part of the maintenance process. */ receive() external payable {} /** * @dev Returns whether an id correspond to a registered operation. This * includes both Pending, Ready and Done operations. */ function isOperation(bytes32 id) public view virtual returns (bool pending) { return getTimestamp(id) > 0; } /** * @dev Returns whether an operation is pending or not. */ function isOperationPending(bytes32 id) public view virtual returns (bool pending) { return getTimestamp(id) > _DONE_TIMESTAMP; } /** * @dev Returns whether an operation is ready or not. */ function isOperationReady(bytes32 id) public view virtual returns (bool ready) { uint256 timestamp = getTimestamp(id); return timestamp > _DONE_TIMESTAMP && timestamp <= block.timestamp; } /** * @dev Returns whether an operation is done or not. */ function isOperationDone(bytes32 id) public view virtual returns (bool done) { return getTimestamp(id) == _DONE_TIMESTAMP; } /** * @dev Returns the timestamp at with an operation becomes ready (0 for * unset operations, 1 for done operations). */ function getTimestamp(bytes32 id) public view virtual returns (uint256 timestamp) { return _timestamps[id]; } /** * @dev Returns the minimum delay for an operation to become valid. * * This value can be changed by executing an operation that calls `updateDelay`. */ function getMinDelay() public view virtual returns (uint256 duration) { return _minDelay; } /** * @dev Returns the identifier of an operation containing a single * transaction. */ function hashOperation( address target, uint256 value, bytes calldata data, bytes32 predecessor, bytes32 salt ) public pure virtual returns (bytes32 hash) { return keccak256(abi.encode(target, value, data, predecessor, salt)); } /** * @dev Returns the identifier of an operation containing a batch of * transactions. */ function hashOperationBatch( address[] calldata targets, uint256[] calldata values, bytes[] calldata datas, bytes32 predecessor, bytes32 salt ) public pure virtual returns (bytes32 hash) { return keccak256(abi.encode(targets, values, datas, predecessor, salt)); } /** * @dev Schedule an operation containing a single transaction. * * Emits a {CallScheduled} event. * * Requirements: * * - the caller must have the 'proposer' role. */ function schedule( address target, uint256 value, bytes calldata data, bytes32 predecessor, bytes32 salt, uint256 delay ) public virtual onlyRole(PROPOSER_ROLE) { bytes32 id = hashOperation(target, value, data, predecessor, salt); _schedule(id, delay); emit CallScheduled(id, 0, target, value, data, predecessor, delay); } /** * @dev Schedule an operation containing a batch of transactions. * * Emits one {CallScheduled} event per transaction in the batch. * * Requirements: * * - the caller must have the 'proposer' role. */ function scheduleBatch( address[] calldata targets, uint256[] calldata values, bytes[] calldata datas, bytes32 predecessor, bytes32 salt, uint256 delay ) public virtual onlyRole(PROPOSER_ROLE) { require(targets.length == values.length, "TimelockController: length mismatch"); require(targets.length == datas.length, "TimelockController: length mismatch"); bytes32 id = hashOperationBatch(targets, values, datas, predecessor, salt); _schedule(id, delay); for (uint256 i = 0; i < targets.length; ++i) { emit CallScheduled(id, i, targets[i], values[i], datas[i], predecessor, delay); } } /** * @dev Schedule an operation that is to becomes valid after a given delay. */ function _schedule(bytes32 id, uint256 delay) private { require(!isOperation(id), "TimelockController: operation already scheduled"); require(delay >= getMinDelay(), "TimelockController: insufficient delay"); _timestamps[id] = block.timestamp + delay; } /** * @dev Cancel an operation. * * Requirements: * * - the caller must have the 'proposer' role. */ function cancel(bytes32 id) public virtual onlyRole(PROPOSER_ROLE) { require(isOperationPending(id), "TimelockController: operation cannot be cancelled"); delete _timestamps[id]; emit Cancelled(id); } /** * @dev Execute an (ready) operation containing a single transaction. * * Emits a {CallExecuted} event. * * Requirements: * * - the caller must have the 'executor' role. */ function execute( address target, uint256 value, bytes calldata data, bytes32 predecessor, bytes32 salt ) public payable virtual onlyRoleOrOpenRole(EXECUTOR_ROLE) { bytes32 id = hashOperation(target, value, data, predecessor, salt); _beforeCall(id, predecessor); _call(id, 0, target, value, data); _afterCall(id); } /** * @dev Execute an (ready) operation containing a batch of transactions. * * Emits one {CallExecuted} event per transaction in the batch. * * Requirements: * * - the caller must have the 'executor' role. */ function executeBatch( address[] calldata targets, uint256[] calldata values, bytes[] calldata datas, bytes32 predecessor, bytes32 salt ) public payable virtual onlyRoleOrOpenRole(EXECUTOR_ROLE) { require(targets.length == values.length, "TimelockController: length mismatch"); require(targets.length == datas.length, "TimelockController: length mismatch"); bytes32 id = hashOperationBatch(targets, values, datas, predecessor, salt); _beforeCall(id, predecessor); for (uint256 i = 0; i < targets.length; ++i) { _call(id, i, targets[i], values[i], datas[i]); } _afterCall(id); } /** * @dev Checks before execution of an operation's calls. */ function _beforeCall(bytes32 id, bytes32 predecessor) private view { require(isOperationReady(id), "TimelockController: operation is not ready"); require(predecessor == bytes32(0) || isOperationDone(predecessor), "TimelockController: missing dependency"); } /** * @dev Checks after execution of an operation's calls. */ function _afterCall(bytes32 id) private { require(isOperationReady(id), "TimelockController: operation is not ready"); _timestamps[id] = _DONE_TIMESTAMP; } /** * @dev Execute an operation's call. * * Emits a {CallExecuted} event. */ function _call( bytes32 id, uint256 index, address target, uint256 value, bytes calldata data ) private { (bool success, ) = target.call{value: value}(data); require(success, "TimelockController: underlying transaction reverted"); emit CallExecuted(id, index, target, value, data); } /** * @dev Changes the minimum timelock duration for future operations. * * Emits a {MinDelayChange} event. * * Requirements: * * - the caller must be the timelock itself. This can only be achieved by scheduling and later executing * an operation where the timelock is the target and the data is the ABI-encoded call to this function. */ function updateDelay(uint256 newDelay) external virtual { require(msg.sender == address(this), "TimelockController: caller must be timelock"); emit MinDelayChange(_minDelay, newDelay); _minDelay = newDelay; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import '@openzeppelin/contracts/governance/TimelockController.sol'; import './Governess.sol'; import './FemErecter.sol'; /** * @notice Deployer for Fem governance contracts and FemErecter. * Deploys governance in an unusable state, then activates the * contracts once the sale is successful. */ contract GovernessActivator { TimelockController public immutable timelockController; Governess public immutable governess; IFem public immutable fem; FemErecter public immutable femErecter; constructor( address _fem, address _devAddress, uint256 _devTokenBips, uint32 _saleStartTime, uint32 _saleDuration, uint32 _timeToSpend, uint256 _minimumEthRaised ) { fem = IFem(_fem); Governess _governess = new Governess(_fem, address(this), type(uint256).max); governess = _governess; address[] memory proposers = new address[](1); address[] memory executors = new address[](1); proposers[0] = address(_governess); executors[0] = address(_governess); TimelockController timelock = new TimelockController(2 days, proposers, executors); timelockController = timelock; timelockController.renounceRole(keccak256('TIMELOCK_ADMIN_ROLE'), address(this)); femErecter = new FemErecter( address(timelock), _devAddress, _devTokenBips, _fem, _saleStartTime, _saleDuration, _timeToSpend, _minimumEthRaised ); } function activateGoverness() external { require( femErecter.state() == IFemErecter.SaleState.FUNDS_PENDING, 'Can not activate governess before sale succeeds' ); uint256 finalSupply = (fem.totalSupply() * (10000 + femErecter.devTokenBips())) / 10000; uint256 proposalThreshold = finalSupply / 100; governess.setProposalThreshold(proposalThreshold); governess.updateTimelock(timelockController); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import './InitializedOwnable.sol'; import './IFemErecter.sol'; contract FemErecter is InitializedOwnable, IFemErecter { using SafeERC20 for IERC20; IFem public immutable override fem; address public immutable override devAddress; uint256 public immutable override devTokenBips; uint256 public immutable override saleStartTime; uint256 public immutable override saleEndTime; uint256 public immutable override saleDuration; uint256 public immutable override spendDeadline; uint256 public immutable override minimumEthRaised; bool public override ethClaimed; mapping(address => uint256) public override depositedAmount; modifier requireState(SaleState _state, string memory errorMessage) { require(state() == _state, errorMessage); _; } constructor( address _owner, address _devAddress, uint256 _devTokenBips, address _fem, uint32 _saleStartTime, uint32 _saleDuration, uint32 _timeToSpend, uint256 _minimumEthRaised ) InitializedOwnable(_owner) { require(_devTokenBips > 0, 'devTokenBips can not be 0'); require(_devTokenBips <= 1000, 'devTokenBips too high'); require(_saleStartTime > block.timestamp, 'start too early'); devAddress = _devAddress; devTokenBips = _devTokenBips; fem = IFem(_fem); saleStartTime = _saleStartTime; uint256 endTime = _saleStartTime + _saleDuration; saleEndTime = endTime; saleDuration = _saleDuration; spendDeadline = endTime + _timeToSpend; minimumEthRaised = _minimumEthRaised; } /** * @dev Reports the current state of the token sale. */ function state() public view override returns (SaleState) { if (block.timestamp < saleStartTime) return SaleState.PENDING; if (block.timestamp < saleEndTime) return SaleState.ACTIVE; // If ETH has been claimed, the sale was a success if (ethClaimed) return SaleState.SUCCESS; // If insufficient ETH has been raised or deadline has passed, sale was a failure if (address(this).balance < minimumEthRaised || block.timestamp >= spendDeadline) return SaleState.FAILURE; // Sale is over with enough ETH raised, deadline has not passed to spend it return SaleState.FUNDS_PENDING; } /** * @notice Allows governance to claim ETH raised from the sale. * note: Only callable if {state()} is {SaleState.FUNDS_PENDING} * - Sale is over. * - Spend deadline has not passed. * - ETH has not already been claimed. * - More than {minimumEthRaised} was raised by the sale. */ function claimETH(address to) external override onlyOwner requireState(SaleState.FUNDS_PENDING, 'Funds not pending governance claim') { ethClaimed = true; uint256 amount = address(this).balance; _sendETH(to, amount); emit EthClaimed(to, amount); fem.mint(devAddress, (fem.totalSupply() * devTokenBips) / 10000); fem.transferOwnership(owner()); } /** * @notice Deposit ETH in exchange for equivalent amount of FEM. * note: Only callable if {state()} is {SaleState.ACTIVE} * - Sale has started. * - Sale is not over. */ function deposit() external payable override requireState(SaleState.ACTIVE, 'Sale not active') { require(msg.value > 0, 'Can not deposit 0 ETH'); depositedAmount[msg.sender] += msg.value; fem.mint(msg.sender, msg.value); emit Deposit(msg.sender, msg.value); } /** * @notice Burn FEM in exchange for equivalent amount of ETH. * note: Only callable if {state()} is {SaleState.FAILURE} * - Sale is over. * - Insufficient ETH raised OR spend deadline has passed without ETH being claimed. */ function burnFem(uint256 amount) public override requireState(SaleState.FAILURE, 'Sale has not failed') { fem.burn(msg.sender, amount); _sendETH(_msgSender(), amount); emit Withdraw(msg.sender, amount); } function _sendETH(address to, uint256 amount) internal { (bool success, ) = to.call{value: amount}(''); require(success, 'Failed to transfer ETH'); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (governance/extensions/GovernorSettings.sol) pragma solidity ^0.8.0; import "../Governor.sol"; /** * @dev Extension of {Governor} for settings updatable through governance. * * _Available since v4.4._ */ abstract contract GovernorSettings is Governor { uint256 private _votingDelay; uint256 private _votingPeriod; uint256 private _proposalThreshold; event VotingDelaySet(uint256 oldVotingDelay, uint256 newVotingDelay); event VotingPeriodSet(uint256 oldVotingPeriod, uint256 newVotingPeriod); event ProposalThresholdSet(uint256 oldProposalThreshold, uint256 newProposalThreshold); /** * @dev Initialize the governance parameters. */ constructor( uint256 initialVotingDelay, uint256 initialVotingPeriod, uint256 initialProposalThreshold ) { _setVotingDelay(initialVotingDelay); _setVotingPeriod(initialVotingPeriod); _setProposalThreshold(initialProposalThreshold); } /** * @dev See {IGovernor-votingDelay}. */ function votingDelay() public view virtual override returns (uint256) { return _votingDelay; } /** * @dev See {IGovernor-votingPeriod}. */ function votingPeriod() public view virtual override returns (uint256) { return _votingPeriod; } /** * @dev See {Governor-proposalThreshold}. */ function proposalThreshold() public view virtual override returns (uint256) { return _proposalThreshold; } /** * @dev Update the voting delay. This operation can only be performed through a governance proposal. * * Emits a {VotingDelaySet} event. */ function setVotingDelay(uint256 newVotingDelay) public virtual onlyGovernance { _setVotingDelay(newVotingDelay); } /** * @dev Update the voting period. This operation can only be performed through a governance proposal. * * Emits a {VotingPeriodSet} event. */ function setVotingPeriod(uint256 newVotingPeriod) public virtual onlyGovernance { _setVotingPeriod(newVotingPeriod); } /** * @dev Update the proposal threshold. This operation can only be performed through a governance proposal. * * Emits a {ProposalThresholdSet} event. */ function setProposalThreshold(uint256 newProposalThreshold) public virtual onlyGovernance { _setProposalThreshold(newProposalThreshold); } /** * @dev Internal setter for the voting delay. * * Emits a {VotingDelaySet} event. */ function _setVotingDelay(uint256 newVotingDelay) internal virtual { emit VotingDelaySet(_votingDelay, newVotingDelay); _votingDelay = newVotingDelay; } /** * @dev Internal setter for the voting period. * * Emits a {VotingPeriodSet} event. */ function _setVotingPeriod(uint256 newVotingPeriod) internal virtual { // voting period must be at least one block long require(newVotingPeriod > 0, "GovernorSettings: voting period too low"); emit VotingPeriodSet(_votingPeriod, newVotingPeriod); _votingPeriod = newVotingPeriod; } /** * @dev Internal setter for the proposal threshold. * * Emits a {ProposalThresholdSet} event. */ function _setProposalThreshold(uint256 newProposalThreshold) internal virtual { emit ProposalThresholdSet(_proposalThreshold, newProposalThreshold); _proposalThreshold = newProposalThreshold; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (governance/extensions/GovernorCountingSimple.sol) pragma solidity ^0.8.0; import "../Governor.sol"; /** * @dev Extension of {Governor} for simple, 3 options, vote counting. * * _Available since v4.3._ */ abstract contract GovernorCountingSimple is Governor { /** * @dev Supported vote types. Matches Governor Bravo ordering. */ enum VoteType { Against, For, Abstain } struct ProposalVote { uint256 againstVotes; uint256 forVotes; uint256 abstainVotes; mapping(address => bool) hasVoted; } mapping(uint256 => ProposalVote) private _proposalVotes; /** * @dev See {IGovernor-COUNTING_MODE}. */ // solhint-disable-next-line func-name-mixedcase function COUNTING_MODE() public pure virtual override returns (string memory) { return "support=bravo&quorum=for,abstain"; } /** * @dev See {IGovernor-hasVoted}. */ function hasVoted(uint256 proposalId, address account) public view virtual override returns (bool) { return _proposalVotes[proposalId].hasVoted[account]; } /** * @dev Accessor to the internal vote counts. */ function proposalVotes(uint256 proposalId) public view virtual returns ( uint256 againstVotes, uint256 forVotes, uint256 abstainVotes ) { ProposalVote storage proposalvote = _proposalVotes[proposalId]; return (proposalvote.againstVotes, proposalvote.forVotes, proposalvote.abstainVotes); } /** * @dev See {Governor-_quorumReached}. */ function _quorumReached(uint256 proposalId) internal view virtual override returns (bool) { ProposalVote storage proposalvote = _proposalVotes[proposalId]; return quorum(proposalSnapshot(proposalId)) <= proposalvote.forVotes + proposalvote.abstainVotes; } /** * @dev See {Governor-_voteSucceeded}. In this module, the forVotes must be strictly over the againstVotes. */ function _voteSucceeded(uint256 proposalId) internal view virtual override returns (bool) { ProposalVote storage proposalvote = _proposalVotes[proposalId]; return proposalvote.forVotes > proposalvote.againstVotes; } /** * @dev See {Governor-_countVote}. In this module, the support follows the `VoteType` enum (from Governor Bravo). */ function _countVote( uint256 proposalId, address account, uint8 support, uint256 weight ) internal virtual override { ProposalVote storage proposalvote = _proposalVotes[proposalId]; require(!proposalvote.hasVoted[account], "GovernorVotingSimple: vote already cast"); proposalvote.hasVoted[account] = true; if (support == uint8(VoteType.Against)) { proposalvote.againstVotes += weight; } else if (support == uint8(VoteType.For)) { proposalvote.forVotes += weight; } else if (support == uint8(VoteType.Abstain)) { proposalvote.abstainVotes += weight; } else { revert("GovernorVotingSimple: invalid value for enum VoteType"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (governance/extensions/GovernorVotes.sol) pragma solidity ^0.8.0; import "../Governor.sol"; import "../utils/IVotes.sol"; /** * @dev Extension of {Governor} for voting weight extraction from an {ERC20Votes} token, or since v4.5 an {ERC721Votes} token. * * _Available since v4.3._ */ abstract contract GovernorVotes is Governor { IVotes public immutable token; constructor(IVotes tokenAddress) { token = tokenAddress; } /** * Read the voting weight from the token's built in snapshot mechanism (see {IGovernor-getVotes}). */ function getVotes(address account, uint256 blockNumber) public view virtual override returns (uint256) { return token.getPastVotes(account, blockNumber); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (governance/extensions/GovernorVotesQuorumFraction.sol) pragma solidity ^0.8.0; import "./GovernorVotes.sol"; /** * @dev Extension of {Governor} for voting weight extraction from an {ERC20Votes} token and a quorum expressed as a * fraction of the total supply. * * _Available since v4.3._ */ abstract contract GovernorVotesQuorumFraction is GovernorVotes { uint256 private _quorumNumerator; event QuorumNumeratorUpdated(uint256 oldQuorumNumerator, uint256 newQuorumNumerator); /** * @dev Initialize quorum as a fraction of the token's total supply. * * The fraction is specified as `numerator / denominator`. By default the denominator is 100, so quorum is * specified as a percent: a numerator of 10 corresponds to quorum being 10% of total supply. The denominator can be * customized by overriding {quorumDenominator}. */ constructor(uint256 quorumNumeratorValue) { _updateQuorumNumerator(quorumNumeratorValue); } /** * @dev Returns the current quorum numerator. See {quorumDenominator}. */ function quorumNumerator() public view virtual returns (uint256) { return _quorumNumerator; } /** * @dev Returns the quorum denominator. Defaults to 100, but may be overridden. */ function quorumDenominator() public view virtual returns (uint256) { return 100; } /** * @dev Returns the quorum for a block number, in terms of number of votes: `supply * numerator / denominator`. */ function quorum(uint256 blockNumber) public view virtual override returns (uint256) { return (token.getPastTotalSupply(blockNumber) * quorumNumerator()) / quorumDenominator(); } /** * @dev Changes the quorum numerator. * * Emits a {QuorumNumeratorUpdated} event. * * Requirements: * * - Must be called through a governance proposal. * - New numerator must be smaller or equal to the denominator. */ function updateQuorumNumerator(uint256 newQuorumNumerator) external virtual onlyGovernance { _updateQuorumNumerator(newQuorumNumerator); } /** * @dev Changes the quorum numerator. * * Emits a {QuorumNumeratorUpdated} event. * * Requirements: * * - New numerator must be smaller or equal to the denominator. */ function _updateQuorumNumerator(uint256 newQuorumNumerator) internal virtual { require( newQuorumNumerator <= quorumDenominator(), "GovernorVotesQuorumFraction: quorumNumerator over quorumDenominator" ); uint256 oldQuorumNumerator = _quorumNumerator; _quorumNumerator = newQuorumNumerator; emit QuorumNumeratorUpdated(oldQuorumNumerator, newQuorumNumerator); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.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"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import '@openzeppelin/contracts/utils/Context.sol'; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract InitializedOwnable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting `firstOwner` as the initial owner. */ constructor(address firstOwner) { _owner = firstOwner; emit OwnershipTransferred(address(0), firstOwner); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), 'Ownable: caller is not the owner'); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), 'Ownable: new owner is the zero address'); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; interface IFem { function mint(address to, uint256 amount) external; function burn(address src, uint256 amount) external; function transferOwnership(address newOwner) external; function totalSupply() external view returns (uint256); } interface IFemErecter { /** * @notice Emitted when ETH is deposited. */ event Deposit(address indexed account, uint256 amount); /** * @notice Emitted when ETH is withdrawn and FEM is burned. */ event Withdraw(address indexed account, uint256 amount); /** * @notice Emitted when ETH is claimed by the DAO. */ event EthClaimed(address to, uint256 amount); enum SaleState { PENDING, // Sale has not started yet ACTIVE, // Sale is active FUNDS_PENDING, // Sale complete with more than minimum ETH raised, pending use by DAO SUCCESS, // Sale complete with ETH claimed by DAO FAILURE // Sale complete with less than minimum ETH raised OR funds not used in time } /* View Functions */ function devAddress() external view returns (address); function devTokenBips() external view returns (uint256); function ethClaimed() external view returns (bool); function fem() external view returns (IFem); function saleStartTime() external view returns (uint256); function saleEndTime() external view returns (uint256); function saleDuration() external view returns (uint256); function spendDeadline() external view returns (uint256); function minimumEthRaised() external view returns (uint256); function depositedAmount(address) external view returns (uint256); /// @notice Reports the current state of the token sale. function state() external view returns (SaleState); /* Actions */ /// @notice Claim ETH raised through the sale for the DAO. /// note: Only callable if {state()} is {SaleState.FUNDS_PENDING} function claimETH(address to) external; /// @notice Deposit ETH in exchange for equivalent amount of FEM. /// note: Only callable if {state()} is {SaleState.ACTIVE} function deposit() external payable; /// @notice Burn FEM in exchange for equivalent amount of ETH. /// note: Only callable if {state()} is {SaleState.FAILURE} function burnFem(uint256 amount) external; }
{ "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "bytecodeHash": "none", "useLiteralContent": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_timelock","type":"address"},{"internalType":"uint256","name":"_proposalThreshold","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"ProposalCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"address","name":"proposer","type":"address"},{"indexed":false,"internalType":"address[]","name":"targets","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"},{"indexed":false,"internalType":"string[]","name":"signatures","type":"string[]"},{"indexed":false,"internalType":"bytes[]","name":"calldatas","type":"bytes[]"},{"indexed":false,"internalType":"uint256","name":"startBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endBlock","type":"uint256"},{"indexed":false,"internalType":"string","name":"description","type":"string"}],"name":"ProposalCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"ProposalExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"eta","type":"uint256"}],"name":"ProposalQueued","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldProposalThreshold","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newProposalThreshold","type":"uint256"}],"name":"ProposalThresholdSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldQuorumNumerator","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newQuorumNumerator","type":"uint256"}],"name":"QuorumNumeratorUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldTimelock","type":"address"},{"indexed":false,"internalType":"address","name":"newTimelock","type":"address"}],"name":"TimelockChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"voter","type":"address"},{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"uint8","name":"support","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"weight","type":"uint256"},{"indexed":false,"internalType":"string","name":"reason","type":"string"}],"name":"VoteCast","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldVotingDelay","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newVotingDelay","type":"uint256"}],"name":"VotingDelaySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldVotingPeriod","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newVotingPeriod","type":"uint256"}],"name":"VotingPeriodSet","type":"event"},{"inputs":[],"name":"BALLOT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"COUNTING_MODE","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"uint8","name":"support","type":"uint8"}],"name":"castVote","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"uint8","name":"support","type":"uint8"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"castVoteBySig","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"uint8","name":"support","type":"uint8"},{"internalType":"string","name":"reason","type":"string"}],"name":"castVoteWithReason","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes[]","name":"calldatas","type":"bytes[]"},{"internalType":"bytes32","name":"descriptionHash","type":"bytes32"}],"name":"execute","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"getVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"address","name":"account","type":"address"}],"name":"hasVoted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes[]","name":"calldatas","type":"bytes[]"},{"internalType":"bytes32","name":"descriptionHash","type":"bytes32"}],"name":"hashProposal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"proposalDeadline","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"proposalEta","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"proposalSnapshot","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proposalThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"proposalVotes","outputs":[{"internalType":"uint256","name":"againstVotes","type":"uint256"},{"internalType":"uint256","name":"forVotes","type":"uint256"},{"internalType":"uint256","name":"abstainVotes","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes[]","name":"calldatas","type":"bytes[]"},{"internalType":"string","name":"description","type":"string"}],"name":"propose","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes[]","name":"calldatas","type":"bytes[]"},{"internalType":"bytes32","name":"descriptionHash","type":"bytes32"}],"name":"queue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"quorum","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"quorumDenominator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"quorumNumerator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"relay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newProposalThreshold","type":"uint256"}],"name":"setProposalThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newVotingDelay","type":"uint256"}],"name":"setVotingDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newVotingPeriod","type":"uint256"}],"name":"setVotingPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"state","outputs":[{"internalType":"enum IGovernor.ProposalState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timelock","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IVotes","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"newQuorumNumerator","type":"uint256"}],"name":"updateQuorumNumerator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract TimelockController","name":"newTimelock","type":"address"}],"name":"updateTimelock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"votingDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"votingPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
6101606040523480156200001257600080fd5b50604051620032da380380620032da8339810160408190526200003591620004a7565b816004846001614cb48560405180604001604052806009815260200168476f7665726e65737360b81b81525080620000726200016d60201b60201c565b815160208084019190912082518383012060e08290526101008190524660a0818152604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81880181905281830187905260608201869052608082019490945230818401528151808203909301835260c00190528051940193909320919290916080523060c0526101205250508251620001189250600091506020840190620003e4565b506200012690508362000188565b6200013182620001c9565b6200013c8162000270565b5050506001600160a01b0316610140526200015781620002b1565b5062000163816200037b565b5050505062000525565b6040805180820190915260018152603160f81b602082015290565b60025460408051918252602082018390527fc565b045403dc03c2eea82b81a0465edad9e2e7fc4d97e11421c209da93d7a93910160405180910390a1600255565b600081116200022f5760405162461bcd60e51b815260206004820152602760248201527f476f7665726e6f7253657474696e67733a20766f74696e6720706572696f6420604482015266746f6f206c6f7760c81b60648201526084015b60405180910390fd5b60035460408051918252602082018390527f7e3f7f0708a84de9203036abaa450dccc85ad5ff52f78c170f3edb55cf5e8828910160405180910390a1600355565b60045460408051918252602082018390527fccb45da8d5717e6c4544694297c4ba5cf151d455c9bb0ed4fc7a38411bc05461910160405180910390a1600455565b6064811115620003365760405162461bcd60e51b815260206004820152604360248201527f476f7665726e6f72566f74657351756f72756d4672616374696f6e3a2071756f60448201527f72756d4e756d657261746f72206f7665722071756f72756d44656e6f6d696e616064820152623a37b960e91b608482015260a40162000226565b600680549082905560408051828152602081018490527f0553476bf02ef2726e8ce5ced78d63e26e602e4a2257b1f559418e24b4633997910160405180910390a15050565b600754604080516001600160a01b03928316815291831660208301527f08f74ea46ef7894f65eabfb5e6e695de773a000b47c529ab559178069b226401910160405180910390a1600780546001600160a01b0319166001600160a01b0392909216919091179055565b828054620003f290620004e8565b90600052602060002090601f01602090048101928262000416576000855562000461565b82601f106200043157805160ff191683800117855562000461565b8280016001018555821562000461579182015b828111156200046157825182559160200191906001019062000444565b506200046f92915062000473565b5090565b5b808211156200046f576000815560010162000474565b80516001600160a01b0381168114620004a257600080fd5b919050565b600080600060608486031215620004bd57600080fd5b620004c8846200048a565b9250620004d8602085016200048a565b9150604084015190509250925092565b600181811c90821680620004fd57607f821691505b602082108114156200051f57634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e051610100516101205161014051612d4c6200058e600039600081816106ce01528181611770015261184a01526000611a1301526000611a6201526000611a3d01526000611996015260006119c0015260006119ea0152612d4c6000f3fe6080604052600436106101f25760003560e01c80637d5e81e21161010d578063c59057e4116100a0578063ea0217cf1161006f578063ea0217cf1461063c578063eb9019d41461065c578063ece40cc11461067c578063f8ce560a1461069c578063fc0c546a146106bc57600080fd5b8063c59057e414610570578063d33219b414610590578063dd4e2ba5146105c2578063deaaa7cc1461060857600080fd5b8063ab58fb8e116100dc578063ab58fb8e146104fb578063b58131b01461051b578063c01f9e3714610530578063c28bc2fa1461055057600080fd5b80637d5e81e21461049257806397c3d334146104b2578063a7713a70146104c6578063a890c910146104db57600080fd5b80633bccf4fd1161018557806354fd4d501161015457806354fd4d5014610408578063567813881461043257806370b0f660146104525780637b3c71d31461047257600080fd5b80633bccf4fd1461031c5780633e4f49e61461033c5780634385963214610369578063544ffc9c146103b357600080fd5b8063160cbed7116101c1578063160cbed7146102b45780632656227d146102d45780632d63f693146102e75780633932abb11461030757600080fd5b806301ffc9a71461021a57806302a251a31461024f57806306f3f9e61461027257806306fdde031461029257600080fd5b3661021557306102006106f0565b6001600160a01b03161461021357600080fd5b005b600080fd5b34801561022657600080fd5b5061023a6102353660046121e5565b610709565b60405190151581526020015b60405180910390f35b34801561025b57600080fd5b5061026461071a565b604051908152602001610246565b34801561027e57600080fd5b5061021361028d36600461220f565b610725565b34801561029e57600080fd5b506102a7610772565b6040516102469190612284565b3480156102c057600080fd5b506102646102cf3660046124cf565b610804565b6102646102e23660046124cf565b610a22565b3480156102f357600080fd5b5061026461030236600461220f565b610af5565b34801561031357600080fd5b50610264610b2c565b34801561032857600080fd5b50610264610337366004612574565b610b37565b34801561034857600080fd5b5061035c61035736600461220f565b610bcb565b60405161024691906125d8565b34801561037557600080fd5b5061023a610384366004612600565b60008281526005602090815260408083206001600160a01b038516845260030190915290205460ff1692915050565b3480156103bf57600080fd5b506103ed6103ce36600461220f565b6000908152600560205260409020805460018201546002909201549092565b60408051938452602084019290925290820152606001610246565b34801561041457600080fd5b506040805180820190915260018152603160f81b60208201526102a7565b34801561043e57600080fd5b5061026461044d366004612630565b610bd6565b34801561045e57600080fd5b5061021361046d36600461220f565b610bff565b34801561047e57600080fd5b5061026461048d3660046126a4565b610c40565b34801561049e57600080fd5b506102646104ad3660046126fd565b610c92565b3480156104be57600080fd5b506064610264565b3480156104d257600080fd5b50600654610264565b3480156104e757600080fd5b506102136104f63660046127bd565b610ca9565b34801561050757600080fd5b5061026461051636600461220f565b610cea565b34801561052757600080fd5b50610264610d94565b34801561053c57600080fd5b5061026461054b36600461220f565b610d9f565b34801561055c57600080fd5b5061021361056b3660046127da565b610dce565b34801561057c57600080fd5b5061026461058b3660046124cf565b610e4f565b34801561059c57600080fd5b506007546001600160a01b03165b6040516001600160a01b039091168152602001610246565b3480156105ce57600080fd5b506040805180820190915260208082527f737570706f72743d627261766f2671756f72756d3d666f722c6162737461696e908201526102a7565b34801561061457600080fd5b506102647f150214d74d59b7d1e90c73fc22ef3d991dd0a76b046543d4d80ab92d2a50328f81565b34801561064857600080fd5b5061021361065736600461220f565b610e89565b34801561066857600080fd5b5061026461067736600461281d565b610eca565b34801561068857600080fd5b5061021361069736600461220f565b610ed6565b3480156106a857600080fd5b506102646106b736600461220f565b610f17565b3480156106c857600080fd5b506105aa7f000000000000000000000000000000000000000000000000000000000000000081565b60006107046007546001600160a01b031690565b905090565b600061071482610f22565b92915050565b600061070460035490565b61072d6106f0565b6001600160a01b0316336001600160a01b0316146107665760405162461bcd60e51b815260040161075d90612849565b60405180910390fd5b61076f81610f47565b50565b60606000805461078190612880565b80601f01602080910402602001604051908101604052809291908181526020018280546107ad90612880565b80156107fa5780601f106107cf576101008083540402835291602001916107fa565b820191906000526020600020905b8154815290600101906020018083116107dd57829003601f168201915b5050505050905090565b60008061081386868686610e4f565b9050600461082082610bcb565b6007811115610831576108316125c2565b1461084e5760405162461bcd60e51b815260040161075d906128bb565b6007546040805163793d064960e11b815290516000926001600160a01b03169163f27a0c92916004808301926020929190829003018186803b15801561089357600080fd5b505afa1580156108a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108cb91906128fc565b60075460405163b1c5f42760e01b81529192506001600160a01b03169063b1c5f42790610905908a908a908a906000908b906004016129de565b60206040518083038186803b15801561091d57600080fd5b505afa158015610931573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095591906128fc565b6000838152600860205260408082209290925560075491516308f2a0bb60e41b81526001600160a01b0390921691638f2a0bb0916109a0918b918b918b91908b908990600401612a2c565b600060405180830381600087803b1580156109ba57600080fd5b505af11580156109ce573d6000803e3d6000fd5b505050507f9a2e42fd6722813d69113e7d0079d3d940171428df7373df9c7f7617cfda2892828242610a009190612a9a565b6040805192835260208301919091520160405180910390a15095945050505050565b600080610a3186868686610e4f565b90506000610a3e82610bcb565b90506004816007811115610a5457610a546125c2565b1480610a7157506005816007811115610a6f57610a6f6125c2565b145b610a8d5760405162461bcd60e51b815260040161075d906128bb565b600082815260016020818152604092839020600201805460ff191690921790915590518381527f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f910160405180910390a1610aeb828888888861100f565b5095945050505050565b60008181526001602090815260408083208151928301909152546001600160401b0316908190525b6001600160401b031692915050565b600061070460025490565b604080517f150214d74d59b7d1e90c73fc22ef3d991dd0a76b046543d4d80ab92d2a50328f602082015290810186905260ff851660608201526000908190610ba390610b9b906080016040516020818303038152906040528051906020012061101c565b86868661106a565b9050610bc087828860405180602001604052806000815250611088565b979650505050505050565b600061071482611193565b600080339050610bf784828560405180602001604052806000815250611088565b949350505050565b610c076106f0565b6001600160a01b0316336001600160a01b031614610c375760405162461bcd60e51b815260040161075d90612849565b61076f816112fb565b600080339050610c8886828787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061108892505050565b9695505050505050565b6000610ca08585858561133c565b95945050505050565b610cb16106f0565b6001600160a01b0316336001600160a01b031614610ce15760405162461bcd60e51b815260040161075d90612849565b61076f81611617565b60075460008281526008602052604080822054905163d45c443560e01b81526004810191909152909182916001600160a01b039091169063d45c44359060240160206040518083038186803b158015610d4257600080fd5b505afa158015610d56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7a91906128fc565b905080600114610d8a5780610d8d565b60005b9392505050565b600061070460045490565b60008181526001602081815260408084208151928301909152909101546001600160401b031690819052610b1d565b610dd66106f0565b6001600160a01b0316336001600160a01b031614610e065760405162461bcd60e51b815260040161075d90612849565b610e488483838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250889250611680915050565b5050505050565b600084848484604051602001610e689493929190612ab2565b60408051601f19818403018152919052805160209091012095945050505050565b610e916106f0565b6001600160a01b0316336001600160a01b031614610ec15760405162461bcd60e51b815260040161075d90612849565b61076f816116a6565b6000610d8d8383611747565b610ede6106f0565b6001600160a01b0316336001600160a01b031614610f0e5760405162461bcd60e51b815260040161075d90612849565b61076f816117ec565b60006107148261182d565b60006001600160e01b03198216636e665ced60e01b14806107145750610714826118e0565b6064811115610fca5760405162461bcd60e51b815260206004820152604360248201527f476f7665726e6f72566f74657351756f72756d4672616374696f6e3a2071756f60448201527f72756d4e756d657261746f72206f7665722071756f72756d44656e6f6d696e616064820152623a37b960e91b608482015260a40161075d565b600680549082905560408051828152602081018490527f0553476bf02ef2726e8ce5ced78d63e26e602e4a2257b1f559418e24b4633997910160405180910390a15050565b610e488585858585611915565b6000610714611029611989565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b600080600061107b87878787611ab0565b91509150610aeb81611b9d565b60008481526001602081905260408220906110a287610bcb565b60078111156110b3576110b36125c2565b1461110c5760405162461bcd60e51b815260206004820152602360248201527f476f7665726e6f723a20766f7465206e6f742063757272656e746c792061637460448201526269766560e81b606482015260840161075d565b604080516020810190915281546001600160401b031690819052600090611134908790610eca565b905061114287878784611d58565b856001600160a01b03167fb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda4888784886040516111819493929190612afd565b60405180910390a29695505050505050565b60008061119f83611ed7565b905060048160078111156111b5576111b56125c2565b146111c05792915050565b600083815260086020526040902054806111db575092915050565b600754604051632ab0f52960e01b8152600481018390526001600160a01b0390911690632ab0f5299060240160206040518083038186803b15801561121f57600080fd5b505afa158015611233573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112579190612b25565b15611266575060079392505050565b600754604051632c258a9f60e11b8152600481018390526001600160a01b039091169063584b153e9060240160206040518083038186803b1580156112aa57600080fd5b505afa1580156112be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e29190612b25565b156112f1575060059392505050565b5060029392505050565b60025460408051918252602082018390527fc565b045403dc03c2eea82b81a0465edad9e2e7fc4d97e11421c209da93d7a93910160405180910390a1600255565b6000611346610d94565b61135533610677600143612b47565b10156113d55760405162461bcd60e51b815260206004820152604360248201527f476f7665726e6f72436f6d7061746962696c697479427261766f3a2070726f7060448201527f6f73657220766f7465732062656c6f772070726f706f73616c207468726573686064820152621bdb1960ea1b608482015260a40161075d565b60006113ea8686868680519060200120610e4f565b9050845186511461140d5760405162461bcd60e51b815260040161075d90612b5e565b835186511461142e5760405162461bcd60e51b815260040161075d90612b5e565b600086511161147f5760405162461bcd60e51b815260206004820152601860248201527f476f7665726e6f723a20656d7074792070726f706f73616c0000000000000000604482015260640161075d565b600081815260016020908152604091829020825191820190925281546001600160401b031690819052156114ff5760405162461bcd60e51b815260206004820152602160248201527f476f7665726e6f723a2070726f706f73616c20616c72656164792065786973746044820152607360f81b606482015260840161075d565b600061151161150c610b2c565b611fe3565b61151a43611fe3565b6115249190612b9f565b9050600061153361150c61071a565b61153d9083612b9f565b835467ffffffffffffffff19166001600160401b038416178455905060018301805467ffffffffffffffff19166001600160401b0383161790557f7d84a6263ae0d98d3329bd7b46bb4e8d6f98cd35a7adb45c274c8b7fd5ebd5e084338b8b8d516001600160401b038111156115b5576115b5612297565b6040519080825280602002602001820160405280156115e857816020015b60608152602001906001900390816115d35790505b508c88888e60405161160299989796959493929190612bca565b60405180910390a15091979650505050505050565b600754604080516001600160a01b03928316815291831660208301527f08f74ea46ef7894f65eabfb5e6e695de773a000b47c529ab559178069b226401910160405180910390a1600780546001600160a01b0319166001600160a01b0392909216919091179055565b6060610bf7848484604051806060016040528060298152602001612d176029913961204f565b600081116117065760405162461bcd60e51b815260206004820152602760248201527f476f7665726e6f7253657474696e67733a20766f74696e6720706572696f6420604482015266746f6f206c6f7760c81b606482015260840161075d565b60035460408051918252602082018390527f7e3f7f0708a84de9203036abaa450dccc85ad5ff52f78c170f3edb55cf5e8828910160405180910390a1600355565b604051630748d63560e31b81526001600160a01b038381166004830152602482018390526000917f000000000000000000000000000000000000000000000000000000000000000090911690633a46b1a89060440160206040518083038186803b1580156117b457600080fd5b505afa1580156117c8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8d91906128fc565b60045460408051918252602082018390527fccb45da8d5717e6c4544694297c4ba5cf151d455c9bb0ed4fc7a38411bc05461910160405180910390a1600455565b60006064600654604051632394e7a360e21b8152600481018590527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690638e539e8c9060240160206040518083038186803b15801561189457600080fd5b505afa1580156118a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118cc91906128fc565b6118d69190612cb9565b6107149190612cd8565b60006001600160e01b0319821663bf26d89760e01b148061071457506301ffc9a760e01b6001600160e01b0319831614610714565b60075460405163e38335e560e01b81526001600160a01b039091169063e38335e59034906119509088908890889060009089906004016129de565b6000604051808303818588803b15801561196957600080fd5b505af115801561197d573d6000803e3d6000fd5b50505050505050505050565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480156119e257507f000000000000000000000000000000000000000000000000000000000000000046145b15611a0c57507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611ae75750600090506003611b94565b8460ff16601b14158015611aff57508460ff16601c14155b15611b105750600090506004611b94565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611b64573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611b8d57600060019250925050611b94565b9150600090505b94509492505050565b6000816004811115611bb157611bb16125c2565b1415611bba5750565b6001816004811115611bce57611bce6125c2565b1415611c1c5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161075d565b6002816004811115611c3057611c306125c2565b1415611c7e5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161075d565b6003816004811115611c9257611c926125c2565b1415611ceb5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161075d565b6004816004811115611cff57611cff6125c2565b141561076f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161075d565b60008481526005602090815260408083206001600160a01b0387168452600381019092529091205460ff1615611de05760405162461bcd60e51b815260206004820152602760248201527f476f7665726e6f72566f74696e6753696d706c653a20766f746520616c726561604482015266191e4818d85cdd60ca1b606482015260840161075d565b6001600160a01b03841660009081526003820160205260408120805460ff1916600117905560ff168360ff161415611e315781816000016000828254611e269190612a9a565b90915550610e489050565b60ff831660011415611e515781816001016000828254611e269190612a9a565b60ff831660021415611e715781816002016000828254611e269190612a9a565b60405162461bcd60e51b815260206004820152603560248201527f476f7665726e6f72566f74696e6753696d706c653a20696e76616c69642076616044820152746c756520666f7220656e756d20566f74655479706560581b606482015260840161075d565b6000818152600160205260408120600281015460ff1615611efb5750600792915050565b6002810154610100900460ff1615611f165750600292915050565b6000611f2184610af5565b905080611f705760405162461bcd60e51b815260206004820152601d60248201527f476f7665726e6f723a20756e6b6e6f776e2070726f706f73616c206964000000604482015260640161075d565b438110611f81575060009392505050565b6000611f8c85610d9f565b9050438110611fa057506001949350505050565b611fa985612175565b8015611fc8575060008581526005602052604090208054600190910154115b15611fd857506004949350505050565b506003949350505050565b60006001600160401b0382111561204b5760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203660448201526534206269747360d01b606482015260840161075d565b5090565b6060824710156120b05760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161075d565b6001600160a01b0385163b6121075760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161075d565b600080866001600160a01b031685876040516121239190612cfa565b60006040518083038185875af1925050503d8060008114612160576040519150601f19603f3d011682016040523d82523d6000602084013e612165565b606091505b5091509150610bc08282866121ac565b6000818152600560205260408120600281015460018201546121979190612a9a565b6121a36106b785610af5565b11159392505050565b606083156121bb575081610d8d565b8251156121cb5782518084602001fd5b8160405162461bcd60e51b815260040161075d9190612284565b6000602082840312156121f757600080fd5b81356001600160e01b031981168114610d8d57600080fd5b60006020828403121561222157600080fd5b5035919050565b60005b8381101561224357818101518382015260200161222b565b83811115612252576000848401525b50505050565b60008151808452612270816020860160208601612228565b601f01601f19169290920160200192915050565b602081526000610d8d6020830184612258565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156122d5576122d5612297565b604052919050565b60006001600160401b038211156122f6576122f6612297565b5060051b60200190565b6001600160a01b038116811461076f57600080fd5b600082601f83011261232657600080fd5b8135602061233b612336836122dd565b6122ad565b82815260059290921b8401810191818101908684111561235a57600080fd5b8286015b8481101561237e57803561237181612300565b835291830191830161235e565b509695505050505050565b600082601f83011261239a57600080fd5b813560206123aa612336836122dd565b82815260059290921b840181019181810190868411156123c957600080fd5b8286015b8481101561237e57803583529183019183016123cd565b60006001600160401b038311156123fd576123fd612297565b612410601f8401601f19166020016122ad565b905082815283838301111561242457600080fd5b828260208301376000602084830101529392505050565b600082601f83011261244c57600080fd5b8135602061245c612336836122dd565b82815260059290921b8401810191818101908684111561247b57600080fd5b8286015b8481101561237e5780356001600160401b0381111561249e5760008081fd5b8701603f810189136124b05760008081fd5b6124c18986830135604084016123e4565b84525091830191830161247f565b600080600080608085870312156124e557600080fd5b84356001600160401b03808211156124fc57600080fd5b61250888838901612315565b9550602087013591508082111561251e57600080fd5b61252a88838901612389565b9450604087013591508082111561254057600080fd5b5061254d8782880161243b565b949793965093946060013593505050565b803560ff8116811461256f57600080fd5b919050565b600080600080600060a0868803121561258c57600080fd5b8535945061259c6020870161255e565b93506125aa6040870161255e565b94979396509394606081013594506080013592915050565b634e487b7160e01b600052602160045260246000fd5b60208101600883106125fa57634e487b7160e01b600052602160045260246000fd5b91905290565b6000806040838503121561261357600080fd5b82359150602083013561262581612300565b809150509250929050565b6000806040838503121561264357600080fd5b823591506126536020840161255e565b90509250929050565b60008083601f84011261266e57600080fd5b5081356001600160401b0381111561268557600080fd5b60208301915083602082850101111561269d57600080fd5b9250929050565b600080600080606085870312156126ba57600080fd5b843593506126ca6020860161255e565b925060408501356001600160401b038111156126e557600080fd5b6126f18782880161265c565b95989497509550505050565b6000806000806080858703121561271357600080fd5b84356001600160401b038082111561272a57600080fd5b61273688838901612315565b9550602087013591508082111561274c57600080fd5b61275888838901612389565b9450604087013591508082111561276e57600080fd5b61277a8883890161243b565b9350606087013591508082111561279057600080fd5b508501601f810187136127a257600080fd5b6127b1878235602084016123e4565b91505092959194509250565b6000602082840312156127cf57600080fd5b8135610d8d81612300565b600080600080606085870312156127f057600080fd5b84356127fb81612300565b93506020850135925060408501356001600160401b038111156126e557600080fd5b6000806040838503121561283057600080fd5b823561283b81612300565b946020939093013593505050565b60208082526018908201527f476f7665726e6f723a206f6e6c79476f7665726e616e63650000000000000000604082015260600190565b600181811c9082168061289457607f821691505b602082108114156128b557634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526021908201527f476f7665726e6f723a2070726f706f73616c206e6f74207375636365737366756040820152601b60fa1b606082015260800190565b60006020828403121561290e57600080fd5b5051919050565b600081518084526020808501945080840160005b8381101561294e5781516001600160a01b031687529582019590820190600101612929565b509495945050505050565b600081518084526020808501945080840160005b8381101561294e5781518752958201959082019060010161296d565b600081518084526020808501808196508360051b8101915082860160005b858110156129d15782840389526129bf848351612258565b988501989350908401906001016129a7565b5091979650505050505050565b60a0815260006129f160a0830188612915565b8281036020840152612a038188612959565b90508281036040840152612a178187612989565b60608401959095525050608001529392505050565b60c081526000612a3f60c0830189612915565b8281036020840152612a518189612959565b90508281036040840152612a658188612989565b60608401969096525050608081019290925260a0909101529392505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115612aad57612aad612a84565b500190565b608081526000612ac56080830187612915565b8281036020840152612ad78187612959565b90508281036040840152612aeb8186612989565b91505082606083015295945050505050565b84815260ff84166020820152826040820152608060608201526000610c886080830184612258565b600060208284031215612b3757600080fd5b81518015158114610d8d57600080fd5b600082821015612b5957612b59612a84565b500390565b60208082526021908201527f476f7665726e6f723a20696e76616c69642070726f706f73616c206c656e67746040820152600d60fb1b606082015260800190565b60006001600160401b03808316818516808303821115612bc157612bc1612a84565b01949350505050565b60006101208b8352602060018060a01b038c1681850152816040850152612bf38285018c612915565b91508382036060850152612c07828b612959565b915083820360808501528189518084528284019150828160051b850101838c0160005b83811015612c5857601f19878403018552612c46838351612258565b94860194925090850190600101612c2a565b505086810360a0880152612c6c818c612989565b945050505050612c8760c08401876001600160401b03169052565b6001600160401b03851660e0840152828103610100840152612ca98185612258565b9c9b505050505050505050505050565b6000816000190483118215151615612cd357612cd3612a84565b500290565b600082612cf557634e487b7160e01b600052601260045260246000fd5b500490565b60008251612d0c818460208701612228565b919091019291505056fe416464726573733a206c6f772d6c6576656c2063616c6c20776974682076616c7565206661696c6564a164736f6c6343000809000a000000000000000000000000f344b01da08b142d2466dae9e47e333f22e645880000000000000000000000006723659425dfdf94caf6345fa269855066fb57f0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Deployed Bytecode
0x6080604052600436106101f25760003560e01c80637d5e81e21161010d578063c59057e4116100a0578063ea0217cf1161006f578063ea0217cf1461063c578063eb9019d41461065c578063ece40cc11461067c578063f8ce560a1461069c578063fc0c546a146106bc57600080fd5b8063c59057e414610570578063d33219b414610590578063dd4e2ba5146105c2578063deaaa7cc1461060857600080fd5b8063ab58fb8e116100dc578063ab58fb8e146104fb578063b58131b01461051b578063c01f9e3714610530578063c28bc2fa1461055057600080fd5b80637d5e81e21461049257806397c3d334146104b2578063a7713a70146104c6578063a890c910146104db57600080fd5b80633bccf4fd1161018557806354fd4d501161015457806354fd4d5014610408578063567813881461043257806370b0f660146104525780637b3c71d31461047257600080fd5b80633bccf4fd1461031c5780633e4f49e61461033c5780634385963214610369578063544ffc9c146103b357600080fd5b8063160cbed7116101c1578063160cbed7146102b45780632656227d146102d45780632d63f693146102e75780633932abb11461030757600080fd5b806301ffc9a71461021a57806302a251a31461024f57806306f3f9e61461027257806306fdde031461029257600080fd5b3661021557306102006106f0565b6001600160a01b03161461021357600080fd5b005b600080fd5b34801561022657600080fd5b5061023a6102353660046121e5565b610709565b60405190151581526020015b60405180910390f35b34801561025b57600080fd5b5061026461071a565b604051908152602001610246565b34801561027e57600080fd5b5061021361028d36600461220f565b610725565b34801561029e57600080fd5b506102a7610772565b6040516102469190612284565b3480156102c057600080fd5b506102646102cf3660046124cf565b610804565b6102646102e23660046124cf565b610a22565b3480156102f357600080fd5b5061026461030236600461220f565b610af5565b34801561031357600080fd5b50610264610b2c565b34801561032857600080fd5b50610264610337366004612574565b610b37565b34801561034857600080fd5b5061035c61035736600461220f565b610bcb565b60405161024691906125d8565b34801561037557600080fd5b5061023a610384366004612600565b60008281526005602090815260408083206001600160a01b038516845260030190915290205460ff1692915050565b3480156103bf57600080fd5b506103ed6103ce36600461220f565b6000908152600560205260409020805460018201546002909201549092565b60408051938452602084019290925290820152606001610246565b34801561041457600080fd5b506040805180820190915260018152603160f81b60208201526102a7565b34801561043e57600080fd5b5061026461044d366004612630565b610bd6565b34801561045e57600080fd5b5061021361046d36600461220f565b610bff565b34801561047e57600080fd5b5061026461048d3660046126a4565b610c40565b34801561049e57600080fd5b506102646104ad3660046126fd565b610c92565b3480156104be57600080fd5b506064610264565b3480156104d257600080fd5b50600654610264565b3480156104e757600080fd5b506102136104f63660046127bd565b610ca9565b34801561050757600080fd5b5061026461051636600461220f565b610cea565b34801561052757600080fd5b50610264610d94565b34801561053c57600080fd5b5061026461054b36600461220f565b610d9f565b34801561055c57600080fd5b5061021361056b3660046127da565b610dce565b34801561057c57600080fd5b5061026461058b3660046124cf565b610e4f565b34801561059c57600080fd5b506007546001600160a01b03165b6040516001600160a01b039091168152602001610246565b3480156105ce57600080fd5b506040805180820190915260208082527f737570706f72743d627261766f2671756f72756d3d666f722c6162737461696e908201526102a7565b34801561061457600080fd5b506102647f150214d74d59b7d1e90c73fc22ef3d991dd0a76b046543d4d80ab92d2a50328f81565b34801561064857600080fd5b5061021361065736600461220f565b610e89565b34801561066857600080fd5b5061026461067736600461281d565b610eca565b34801561068857600080fd5b5061021361069736600461220f565b610ed6565b3480156106a857600080fd5b506102646106b736600461220f565b610f17565b3480156106c857600080fd5b506105aa7f000000000000000000000000f344b01da08b142d2466dae9e47e333f22e6458881565b60006107046007546001600160a01b031690565b905090565b600061071482610f22565b92915050565b600061070460035490565b61072d6106f0565b6001600160a01b0316336001600160a01b0316146107665760405162461bcd60e51b815260040161075d90612849565b60405180910390fd5b61076f81610f47565b50565b60606000805461078190612880565b80601f01602080910402602001604051908101604052809291908181526020018280546107ad90612880565b80156107fa5780601f106107cf576101008083540402835291602001916107fa565b820191906000526020600020905b8154815290600101906020018083116107dd57829003601f168201915b5050505050905090565b60008061081386868686610e4f565b9050600461082082610bcb565b6007811115610831576108316125c2565b1461084e5760405162461bcd60e51b815260040161075d906128bb565b6007546040805163793d064960e11b815290516000926001600160a01b03169163f27a0c92916004808301926020929190829003018186803b15801561089357600080fd5b505afa1580156108a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108cb91906128fc565b60075460405163b1c5f42760e01b81529192506001600160a01b03169063b1c5f42790610905908a908a908a906000908b906004016129de565b60206040518083038186803b15801561091d57600080fd5b505afa158015610931573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095591906128fc565b6000838152600860205260408082209290925560075491516308f2a0bb60e41b81526001600160a01b0390921691638f2a0bb0916109a0918b918b918b91908b908990600401612a2c565b600060405180830381600087803b1580156109ba57600080fd5b505af11580156109ce573d6000803e3d6000fd5b505050507f9a2e42fd6722813d69113e7d0079d3d940171428df7373df9c7f7617cfda2892828242610a009190612a9a565b6040805192835260208301919091520160405180910390a15095945050505050565b600080610a3186868686610e4f565b90506000610a3e82610bcb565b90506004816007811115610a5457610a546125c2565b1480610a7157506005816007811115610a6f57610a6f6125c2565b145b610a8d5760405162461bcd60e51b815260040161075d906128bb565b600082815260016020818152604092839020600201805460ff191690921790915590518381527f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f910160405180910390a1610aeb828888888861100f565b5095945050505050565b60008181526001602090815260408083208151928301909152546001600160401b0316908190525b6001600160401b031692915050565b600061070460025490565b604080517f150214d74d59b7d1e90c73fc22ef3d991dd0a76b046543d4d80ab92d2a50328f602082015290810186905260ff851660608201526000908190610ba390610b9b906080016040516020818303038152906040528051906020012061101c565b86868661106a565b9050610bc087828860405180602001604052806000815250611088565b979650505050505050565b600061071482611193565b600080339050610bf784828560405180602001604052806000815250611088565b949350505050565b610c076106f0565b6001600160a01b0316336001600160a01b031614610c375760405162461bcd60e51b815260040161075d90612849565b61076f816112fb565b600080339050610c8886828787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061108892505050565b9695505050505050565b6000610ca08585858561133c565b95945050505050565b610cb16106f0565b6001600160a01b0316336001600160a01b031614610ce15760405162461bcd60e51b815260040161075d90612849565b61076f81611617565b60075460008281526008602052604080822054905163d45c443560e01b81526004810191909152909182916001600160a01b039091169063d45c44359060240160206040518083038186803b158015610d4257600080fd5b505afa158015610d56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7a91906128fc565b905080600114610d8a5780610d8d565b60005b9392505050565b600061070460045490565b60008181526001602081815260408084208151928301909152909101546001600160401b031690819052610b1d565b610dd66106f0565b6001600160a01b0316336001600160a01b031614610e065760405162461bcd60e51b815260040161075d90612849565b610e488483838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250889250611680915050565b5050505050565b600084848484604051602001610e689493929190612ab2565b60408051601f19818403018152919052805160209091012095945050505050565b610e916106f0565b6001600160a01b0316336001600160a01b031614610ec15760405162461bcd60e51b815260040161075d90612849565b61076f816116a6565b6000610d8d8383611747565b610ede6106f0565b6001600160a01b0316336001600160a01b031614610f0e5760405162461bcd60e51b815260040161075d90612849565b61076f816117ec565b60006107148261182d565b60006001600160e01b03198216636e665ced60e01b14806107145750610714826118e0565b6064811115610fca5760405162461bcd60e51b815260206004820152604360248201527f476f7665726e6f72566f74657351756f72756d4672616374696f6e3a2071756f60448201527f72756d4e756d657261746f72206f7665722071756f72756d44656e6f6d696e616064820152623a37b960e91b608482015260a40161075d565b600680549082905560408051828152602081018490527f0553476bf02ef2726e8ce5ced78d63e26e602e4a2257b1f559418e24b4633997910160405180910390a15050565b610e488585858585611915565b6000610714611029611989565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b600080600061107b87878787611ab0565b91509150610aeb81611b9d565b60008481526001602081905260408220906110a287610bcb565b60078111156110b3576110b36125c2565b1461110c5760405162461bcd60e51b815260206004820152602360248201527f476f7665726e6f723a20766f7465206e6f742063757272656e746c792061637460448201526269766560e81b606482015260840161075d565b604080516020810190915281546001600160401b031690819052600090611134908790610eca565b905061114287878784611d58565b856001600160a01b03167fb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda4888784886040516111819493929190612afd565b60405180910390a29695505050505050565b60008061119f83611ed7565b905060048160078111156111b5576111b56125c2565b146111c05792915050565b600083815260086020526040902054806111db575092915050565b600754604051632ab0f52960e01b8152600481018390526001600160a01b0390911690632ab0f5299060240160206040518083038186803b15801561121f57600080fd5b505afa158015611233573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112579190612b25565b15611266575060079392505050565b600754604051632c258a9f60e11b8152600481018390526001600160a01b039091169063584b153e9060240160206040518083038186803b1580156112aa57600080fd5b505afa1580156112be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e29190612b25565b156112f1575060059392505050565b5060029392505050565b60025460408051918252602082018390527fc565b045403dc03c2eea82b81a0465edad9e2e7fc4d97e11421c209da93d7a93910160405180910390a1600255565b6000611346610d94565b61135533610677600143612b47565b10156113d55760405162461bcd60e51b815260206004820152604360248201527f476f7665726e6f72436f6d7061746962696c697479427261766f3a2070726f7060448201527f6f73657220766f7465732062656c6f772070726f706f73616c207468726573686064820152621bdb1960ea1b608482015260a40161075d565b60006113ea8686868680519060200120610e4f565b9050845186511461140d5760405162461bcd60e51b815260040161075d90612b5e565b835186511461142e5760405162461bcd60e51b815260040161075d90612b5e565b600086511161147f5760405162461bcd60e51b815260206004820152601860248201527f476f7665726e6f723a20656d7074792070726f706f73616c0000000000000000604482015260640161075d565b600081815260016020908152604091829020825191820190925281546001600160401b031690819052156114ff5760405162461bcd60e51b815260206004820152602160248201527f476f7665726e6f723a2070726f706f73616c20616c72656164792065786973746044820152607360f81b606482015260840161075d565b600061151161150c610b2c565b611fe3565b61151a43611fe3565b6115249190612b9f565b9050600061153361150c61071a565b61153d9083612b9f565b835467ffffffffffffffff19166001600160401b038416178455905060018301805467ffffffffffffffff19166001600160401b0383161790557f7d84a6263ae0d98d3329bd7b46bb4e8d6f98cd35a7adb45c274c8b7fd5ebd5e084338b8b8d516001600160401b038111156115b5576115b5612297565b6040519080825280602002602001820160405280156115e857816020015b60608152602001906001900390816115d35790505b508c88888e60405161160299989796959493929190612bca565b60405180910390a15091979650505050505050565b600754604080516001600160a01b03928316815291831660208301527f08f74ea46ef7894f65eabfb5e6e695de773a000b47c529ab559178069b226401910160405180910390a1600780546001600160a01b0319166001600160a01b0392909216919091179055565b6060610bf7848484604051806060016040528060298152602001612d176029913961204f565b600081116117065760405162461bcd60e51b815260206004820152602760248201527f476f7665726e6f7253657474696e67733a20766f74696e6720706572696f6420604482015266746f6f206c6f7760c81b606482015260840161075d565b60035460408051918252602082018390527f7e3f7f0708a84de9203036abaa450dccc85ad5ff52f78c170f3edb55cf5e8828910160405180910390a1600355565b604051630748d63560e31b81526001600160a01b038381166004830152602482018390526000917f000000000000000000000000f344b01da08b142d2466dae9e47e333f22e6458890911690633a46b1a89060440160206040518083038186803b1580156117b457600080fd5b505afa1580156117c8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8d91906128fc565b60045460408051918252602082018390527fccb45da8d5717e6c4544694297c4ba5cf151d455c9bb0ed4fc7a38411bc05461910160405180910390a1600455565b60006064600654604051632394e7a360e21b8152600481018590527f000000000000000000000000f344b01da08b142d2466dae9e47e333f22e645886001600160a01b031690638e539e8c9060240160206040518083038186803b15801561189457600080fd5b505afa1580156118a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118cc91906128fc565b6118d69190612cb9565b6107149190612cd8565b60006001600160e01b0319821663bf26d89760e01b148061071457506301ffc9a760e01b6001600160e01b0319831614610714565b60075460405163e38335e560e01b81526001600160a01b039091169063e38335e59034906119509088908890889060009089906004016129de565b6000604051808303818588803b15801561196957600080fd5b505af115801561197d573d6000803e3d6000fd5b50505050505050505050565b6000306001600160a01b037f000000000000000000000000710c7e422a98963d6ba216840b1d83e77064a031161480156119e257507f000000000000000000000000000000000000000000000000000000000000000146145b15611a0c57507ffa41f9dc656115a4f3a08b70c5597a2e1c1a753472a8a7c876f9757480e3ebb290565b50604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6020808301919091527f809add7bf96cb513844b97b1cebdb9851bb90aa466be51f6317a15516cf82a20828401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611ae75750600090506003611b94565b8460ff16601b14158015611aff57508460ff16601c14155b15611b105750600090506004611b94565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611b64573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611b8d57600060019250925050611b94565b9150600090505b94509492505050565b6000816004811115611bb157611bb16125c2565b1415611bba5750565b6001816004811115611bce57611bce6125c2565b1415611c1c5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161075d565b6002816004811115611c3057611c306125c2565b1415611c7e5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161075d565b6003816004811115611c9257611c926125c2565b1415611ceb5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161075d565b6004816004811115611cff57611cff6125c2565b141561076f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161075d565b60008481526005602090815260408083206001600160a01b0387168452600381019092529091205460ff1615611de05760405162461bcd60e51b815260206004820152602760248201527f476f7665726e6f72566f74696e6753696d706c653a20766f746520616c726561604482015266191e4818d85cdd60ca1b606482015260840161075d565b6001600160a01b03841660009081526003820160205260408120805460ff1916600117905560ff168360ff161415611e315781816000016000828254611e269190612a9a565b90915550610e489050565b60ff831660011415611e515781816001016000828254611e269190612a9a565b60ff831660021415611e715781816002016000828254611e269190612a9a565b60405162461bcd60e51b815260206004820152603560248201527f476f7665726e6f72566f74696e6753696d706c653a20696e76616c69642076616044820152746c756520666f7220656e756d20566f74655479706560581b606482015260840161075d565b6000818152600160205260408120600281015460ff1615611efb5750600792915050565b6002810154610100900460ff1615611f165750600292915050565b6000611f2184610af5565b905080611f705760405162461bcd60e51b815260206004820152601d60248201527f476f7665726e6f723a20756e6b6e6f776e2070726f706f73616c206964000000604482015260640161075d565b438110611f81575060009392505050565b6000611f8c85610d9f565b9050438110611fa057506001949350505050565b611fa985612175565b8015611fc8575060008581526005602052604090208054600190910154115b15611fd857506004949350505050565b506003949350505050565b60006001600160401b0382111561204b5760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203660448201526534206269747360d01b606482015260840161075d565b5090565b6060824710156120b05760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161075d565b6001600160a01b0385163b6121075760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161075d565b600080866001600160a01b031685876040516121239190612cfa565b60006040518083038185875af1925050503d8060008114612160576040519150601f19603f3d011682016040523d82523d6000602084013e612165565b606091505b5091509150610bc08282866121ac565b6000818152600560205260408120600281015460018201546121979190612a9a565b6121a36106b785610af5565b11159392505050565b606083156121bb575081610d8d565b8251156121cb5782518084602001fd5b8160405162461bcd60e51b815260040161075d9190612284565b6000602082840312156121f757600080fd5b81356001600160e01b031981168114610d8d57600080fd5b60006020828403121561222157600080fd5b5035919050565b60005b8381101561224357818101518382015260200161222b565b83811115612252576000848401525b50505050565b60008151808452612270816020860160208601612228565b601f01601f19169290920160200192915050565b602081526000610d8d6020830184612258565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156122d5576122d5612297565b604052919050565b60006001600160401b038211156122f6576122f6612297565b5060051b60200190565b6001600160a01b038116811461076f57600080fd5b600082601f83011261232657600080fd5b8135602061233b612336836122dd565b6122ad565b82815260059290921b8401810191818101908684111561235a57600080fd5b8286015b8481101561237e57803561237181612300565b835291830191830161235e565b509695505050505050565b600082601f83011261239a57600080fd5b813560206123aa612336836122dd565b82815260059290921b840181019181810190868411156123c957600080fd5b8286015b8481101561237e57803583529183019183016123cd565b60006001600160401b038311156123fd576123fd612297565b612410601f8401601f19166020016122ad565b905082815283838301111561242457600080fd5b828260208301376000602084830101529392505050565b600082601f83011261244c57600080fd5b8135602061245c612336836122dd565b82815260059290921b8401810191818101908684111561247b57600080fd5b8286015b8481101561237e5780356001600160401b0381111561249e5760008081fd5b8701603f810189136124b05760008081fd5b6124c18986830135604084016123e4565b84525091830191830161247f565b600080600080608085870312156124e557600080fd5b84356001600160401b03808211156124fc57600080fd5b61250888838901612315565b9550602087013591508082111561251e57600080fd5b61252a88838901612389565b9450604087013591508082111561254057600080fd5b5061254d8782880161243b565b949793965093946060013593505050565b803560ff8116811461256f57600080fd5b919050565b600080600080600060a0868803121561258c57600080fd5b8535945061259c6020870161255e565b93506125aa6040870161255e565b94979396509394606081013594506080013592915050565b634e487b7160e01b600052602160045260246000fd5b60208101600883106125fa57634e487b7160e01b600052602160045260246000fd5b91905290565b6000806040838503121561261357600080fd5b82359150602083013561262581612300565b809150509250929050565b6000806040838503121561264357600080fd5b823591506126536020840161255e565b90509250929050565b60008083601f84011261266e57600080fd5b5081356001600160401b0381111561268557600080fd5b60208301915083602082850101111561269d57600080fd5b9250929050565b600080600080606085870312156126ba57600080fd5b843593506126ca6020860161255e565b925060408501356001600160401b038111156126e557600080fd5b6126f18782880161265c565b95989497509550505050565b6000806000806080858703121561271357600080fd5b84356001600160401b038082111561272a57600080fd5b61273688838901612315565b9550602087013591508082111561274c57600080fd5b61275888838901612389565b9450604087013591508082111561276e57600080fd5b61277a8883890161243b565b9350606087013591508082111561279057600080fd5b508501601f810187136127a257600080fd5b6127b1878235602084016123e4565b91505092959194509250565b6000602082840312156127cf57600080fd5b8135610d8d81612300565b600080600080606085870312156127f057600080fd5b84356127fb81612300565b93506020850135925060408501356001600160401b038111156126e557600080fd5b6000806040838503121561283057600080fd5b823561283b81612300565b946020939093013593505050565b60208082526018908201527f476f7665726e6f723a206f6e6c79476f7665726e616e63650000000000000000604082015260600190565b600181811c9082168061289457607f821691505b602082108114156128b557634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526021908201527f476f7665726e6f723a2070726f706f73616c206e6f74207375636365737366756040820152601b60fa1b606082015260800190565b60006020828403121561290e57600080fd5b5051919050565b600081518084526020808501945080840160005b8381101561294e5781516001600160a01b031687529582019590820190600101612929565b509495945050505050565b600081518084526020808501945080840160005b8381101561294e5781518752958201959082019060010161296d565b600081518084526020808501808196508360051b8101915082860160005b858110156129d15782840389526129bf848351612258565b988501989350908401906001016129a7565b5091979650505050505050565b60a0815260006129f160a0830188612915565b8281036020840152612a038188612959565b90508281036040840152612a178187612989565b60608401959095525050608001529392505050565b60c081526000612a3f60c0830189612915565b8281036020840152612a518189612959565b90508281036040840152612a658188612989565b60608401969096525050608081019290925260a0909101529392505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115612aad57612aad612a84565b500190565b608081526000612ac56080830187612915565b8281036020840152612ad78187612959565b90508281036040840152612aeb8186612989565b91505082606083015295945050505050565b84815260ff84166020820152826040820152608060608201526000610c886080830184612258565b600060208284031215612b3757600080fd5b81518015158114610d8d57600080fd5b600082821015612b5957612b59612a84565b500390565b60208082526021908201527f476f7665726e6f723a20696e76616c69642070726f706f73616c206c656e67746040820152600d60fb1b606082015260800190565b60006001600160401b03808316818516808303821115612bc157612bc1612a84565b01949350505050565b60006101208b8352602060018060a01b038c1681850152816040850152612bf38285018c612915565b91508382036060850152612c07828b612959565b915083820360808501528189518084528284019150828160051b850101838c0160005b83811015612c5857601f19878403018552612c46838351612258565b94860194925090850190600101612c2a565b505086810360a0880152612c6c818c612989565b945050505050612c8760c08401876001600160401b03169052565b6001600160401b03851660e0840152828103610100840152612ca98185612258565b9c9b505050505050505050505050565b6000816000190483118215151615612cd357612cd3612a84565b500290565b600082612cf557634e487b7160e01b600052601260045260246000fd5b500490565b60008251612d0c818460208701612228565b919091019291505056fe416464726573733a206c6f772d6c6576656c2063616c6c20776974682076616c7565206661696c6564a164736f6c6343000809000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000f344b01da08b142d2466dae9e47e333f22e645880000000000000000000000006723659425dfdf94caf6345fa269855066fb57f0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-----Decoded View---------------
Arg [0] : _token (address): 0xF344B01DA08b142D2466dae9e47E333f22e64588
Arg [1] : _timelock (address): 0x6723659425DfdF94caf6345fA269855066FB57f0
Arg [2] : _proposalThreshold (uint256): 115792089237316195423570985008687907853269984665640564039457584007913129639935
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000f344b01da08b142d2466dae9e47e333f22e64588
Arg [1] : 0000000000000000000000006723659425dfdf94caf6345fa269855066fb57f0
Arg [2] : ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Deployed Bytecode Sourcemap
625:2710:33:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2148:4:3;2125:11;:9;:11::i;:::-;-1:-1:-1;;;;;2125:28:3;;2117:37;;;;;;625:2710:33;;;;;3143:190;;;;;;;;;;-1:-1:-1;3143:190:33;;;;;:::i;:::-;;:::i;:::-;;;470:14:37;;463:22;445:41;;433:2;418:18;3143:190:33;;;;;;;;1345:130;;;;;;;;;;;;;:::i;:::-;;;643:25:37;;;631:2;616:18;1345:130:33;497:177:37;2068:150:10;;;;;;;;;;-1:-1:-1;2068:150:10;;;;;:::i;:::-;;:::i;2498:98:3:-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;3609:739:8:-;;;;;;;;;;-1:-1:-1;3609:739:8;;;;;:::i;:::-;;:::i;7887:706:3:-;;;;;;:::i;:::-;;:::i;5047:163::-;;;;;;;;;;-1:-1:-1;5047:163:3;;;;;:::i;:::-;;:::i;1213:128:33:-;;;;;;;;;;;;;:::i;10831:427:3:-;;;;;;;;;;-1:-1:-1;10831:427:3;;;;;:::i;:::-;;:::i;1839:156:33:-;;;;;;;;;;-1:-1:-1;1839:156:33;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;1024:167:6:-;;;;;;;;;;-1:-1:-1;1024:167:6;;;;;:::i;:::-;1117:4;1140:26;;;:14;:26;;;;;;;;-1:-1:-1;;;;;1140:44:6;;;;:35;;:44;;;;;;;;1024:167;;;;;1263:389;;;;;;;;;;-1:-1:-1;1263:389:6;;;;;:::i;:::-;1380:20;1525:26;;;:14;:26;;;;;1569:25;;1596:21;;;;1619:25;;;;;1569;;1263:389;;;;;7794:25:37;;;7850:2;7835:18;;7828:34;;;;7878:18;;;7871:34;7782:2;7767:18;1263:389:6;7592:319:37;2655:99:3;;;;;;;;;;-1:-1:-1;2737:10:3;;;;;;;;;;;;-1:-1:-1;;;2737:10:3;;;;2655:99;;10232:198;;;;;;;;;;-1:-1:-1;10232:198:3;;;;;:::i;:::-;;:::i;1738:126:7:-;;;;;;;;;;-1:-1:-1;1738:126:7;;;;;:::i;:::-;;:::i;10500:266:3:-;;;;;;;;;;-1:-1:-1;10500:266:3;;;;;:::i;:::-;;:::i;1999:268:33:-;;;;;;;;;;-1:-1:-1;1999:268:33;;;;;:::i;:::-;;:::i;1371:94:10:-;;;;;;;;;;-1:-1:-1;1455:3:10;1371:94;;1160:105;;;;;;;;;;-1:-1:-1;1242:16:10;;1160:105;;5995:133:8;;;;;;;;;;-1:-1:-1;5995:133:8;;;;;:::i;:::-;;:::i;3270:259::-;;;;;;;;;;-1:-1:-1;3270:259:8;;;;;:::i;:::-;;:::i;2271:139:33:-;;;;;;;;;;;;;:::i;5278:161:3:-;;;;;;;;;;-1:-1:-1;5278:161:3;;;;;:::i;:::-;;:::i;12558:196::-;;;;;;;;;;-1:-1:-1;12558:196:3;;;;;:::i;:::-;;:::i;3700:308::-;;;;;;;;;;-1:-1:-1;3700:308:3;;;;;:::i;:::-;;:::i;3073:109:8:-;;;;;;;;;;-1:-1:-1;3165:9:8;;-1:-1:-1;;;;;3165:9:8;3073:109;;;-1:-1:-1;;;;;11301:32:37;;;11283:51;;11271:2;11256:18;3073:109:8;11137:203:37;828:136:6;;;;;;;;;;-1:-1:-1;916:41:6;;;;;;;;;;;;;;;;;;828:136;;1006:95:3;;;;;;;;;;;;1048:53;1006:95;;2039:130:7;;;;;;;;;;-1:-1:-1;2039:130:7;;;;;:::i;:::-;;:::i;1642:193:33:-;;;;;;;;;;-1:-1:-1;1642:193:33;;;;;:::i;:::-;;:::i;2354:150:7:-;;;;;;;;;;-1:-1:-1;2354:150:7;;;;;:::i;:::-;;:::i;1479:159:33:-;;;;;;;;;;-1:-1:-1;1479:159:33;;;;;:::i;:::-;;:::i;420:29:9:-;;;;;;;;;;;;;;;3007:132:33;3095:7;3117:17;3165:9:8;;-1:-1:-1;;;;;3165:9:8;;3073:109;3117:17:33;3110:24;;3007:132;:::o;3143:190::-;3271:4;3292:36;3316:11;3292:23;:36::i;:::-;3285:43;3143:190;-1:-1:-1;;3143:190:33:o;1345:130::-;1428:7;1450:20;1359:13:7;;;1271:108;2068:150:10;1708:11:3;:9;:11::i;:::-;-1:-1:-1;;;;;1692:27:3;719:10:21;-1:-1:-1;;;;;1692:27:3;;1684:64;;;;-1:-1:-1;;;1684:64:3;;;;;;;:::i;:::-;;;;;;;;;2169:42:10::1;2192:18;2169:22;:42::i;:::-;2068:150:::0;:::o;2498:98:3:-;2552:13;2584:5;2577:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2498:98;:::o;3609:739:8:-;3797:7;3816:18;3837:57;3850:7;3859:6;3867:9;3878:15;3837:12;:57::i;:::-;3816:78;-1:-1:-1;3934:23:8;3913:17;3919:10;3913:5;:17::i;:::-;:44;;;;;;;;:::i;:::-;;3905:90;;;;-1:-1:-1;;;3905:90:8;;;;;;;:::i;:::-;4022:9;;:23;;;-1:-1:-1;;;4022:23:8;;;;4006:13;;-1:-1:-1;;;;;4022:9:8;;:21;;:23;;;;;;;;;;;;;;:9;:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4082:9;;:76;;-1:-1:-1;;;4082:76:8;;4006:39;;-1:-1:-1;;;;;;4082:9:8;;:28;;:76;;4111:7;;4120:6;;4128:9;;4082;;4142:15;;4082:76;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4055:24;;;;:12;:24;;;;;;:103;;;;4168:9;;:78;;-1:-1:-1;;;4168:78:8;;-1:-1:-1;;;;;4168:9:8;;;;:23;;:78;;4192:7;;4201:6;;4209:9;;4055:24;4223:15;;4240:5;;4168:78;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4262:51;4277:10;4307:5;4289:15;:23;;;;:::i;:::-;4262:51;;;17311:25:37;;;17367:2;17352:18;;17345:34;;;;17284:18;4262:51:8;;;;;;;-1:-1:-1;4331:10:8;3609:739;-1:-1:-1;;;;;3609:739:8:o;7887:706:3:-;8085:7;8104:18;8125:57;8138:7;8147:6;8155:9;8166:15;8125:12;:57::i;:::-;8104:78;;8193:20;8216:17;8222:10;8216:5;:17::i;:::-;8193:40;-1:-1:-1;8274:23:3;8264:6;:33;;;;;;;;:::i;:::-;;:67;;;-1:-1:-1;8311:20:3;8301:6;:30;;;;;;;;:::i;:::-;;8264:67;8243:147;;;;-1:-1:-1;;;8243:147:3;;;;;;;:::i;:::-;8400:22;;;;8434:4;8400:22;;;;;;;;;:31;;:38;;-1:-1:-1;;8400:38:3;;;;;;;8454:28;;643:25:37;;;8454:28:3;;616:18:37;8454:28:3;;;;;;;8493:65;8502:10;8514:7;8523:6;8531:9;8542:15;8493:8;:65::i;:::-;-1:-1:-1;8576:10:3;7887:706;-1:-1:-1;;;;;7887:706:3:o;5047:163::-;5131:7;5157:22;;;:10;:22;;;;;;;;:44;;;;;;;;;-1:-1:-1;;;;;5157:44:3;;;;;:46;-1:-1:-1;;;;;5150:53:3;;5047:163;-1:-1:-1;;5047:163:3:o;1213:128:33:-;1295:7;1317:19;1188:12:7;;;1101:106;10831:427:3;11088:48;;;1048:53;11088:48;;;17588:25:37;17629:18;;;17622:34;;;17704:4;17692:17;;17672:18;;;17665:45;10999:7:3;;;;11034:159;;11061:77;;17561:18:37;;11088:48:3;;;;;;;;;;;;11078:59;;;;;;11061:16;:77::i;:::-;11152:1;11167;11182;11034:13;:159::i;:::-;11018:175;;11210:41;11220:10;11232:5;11239:7;11210:41;;;;;;;;;;;;:9;:41::i;:::-;11203:48;10831:427;-1:-1:-1;;;;;;;10831:427:3:o;1839:156:33:-;1939:13;1967:23;1979:10;1967:11;:23::i;10232:198:3:-;10318:7;;719:10:21;10337:28:3;;10382:41;10392:10;10404:5;10411:7;10382:41;;;;;;;;;;;;:9;:41::i;:::-;10375:48;10232:198;-1:-1:-1;;;;10232:198:3:o;1738:126:7:-;1708:11:3;:9;:11::i;:::-;-1:-1:-1;;;;;1692:27:3;719:10:21;-1:-1:-1;;;;;1692:27:3;;1684:64;;;;-1:-1:-1;;;1684:64:3;;;;;;;:::i;:::-;1826:31:7::1;1842:14;1826:15;:31::i;10500:266:3:-:0;10650:7;;719:10:21;10669:28:3;;10714:45;10724:10;10736:5;10743:7;10752:6;;10714:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10714:9:3;;-1:-1:-1;;;10714:45:3:i;:::-;10707:52;10500:266;-1:-1:-1;;;;;;10500:266:3:o;1999:268:33:-;2186:7;2208:54;2222:7;2231:6;2239:9;2250:11;2208:13;:54::i;:::-;2201:61;1999:268;-1:-1:-1;;;;;1999:268:33:o;5995:133:8:-;1708:11:3;:9;:11::i;:::-;-1:-1:-1;;;;;1692:27:3;719:10:21;-1:-1:-1;;;;;1692:27:3;;1684:64;;;;-1:-1:-1;;;1684:64:3;;;;;;;:::i;:::-;6093:28:8::1;6109:11;6093:15;:28::i;3270:259::-:0;3382:9;;3349:7;3405:24;;;:12;:24;;;;;;;3382:48;;-1:-1:-1;;;3382:48:8;;;;;643:25:37;;;;3349:7:8;;;;-1:-1:-1;;;;;3382:9:8;;;;:22;;616:18:37;;3382:48:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3368:62;;3447:3;3454:1;3447:8;:18;;3462:3;3447:18;;;3458:1;3447:18;3440:25;3270:259;-1:-1:-1;;;3270:259:8:o;2271:139:33:-;2358:7;2380:25;1540:18:7;;;1447:118;5278:161:3;5362:7;5388:22;;;:10;:22;;;;;;;;:42;;;;;;;;:30;;;:42;-1:-1:-1;;;;;5388:42:3;;;;;:44;1170:117:24;12558:196:3;1708:11;:9;:11::i;:::-;-1:-1:-1;;;;;1692:27:3;719:10:21;-1:-1:-1;;;;;1692:27:3;;1684:64;;;;-1:-1:-1;;;1684:64:3;;;;;;;:::i;:::-;12697:50:::1;12727:6;12735:4;;12697:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;::::0;;;;-1:-1:-1;12741:5:3;;-1:-1:-1;12697:29:3::1;::::0;-1:-1:-1;;12697:50:3:i:1;:::-;;12558:196:::0;;;;:::o;3700:308::-;3900:7;3955;3964:6;3972:9;3983:15;3944:55;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;3944:55:3;;;;;;;;;3934:66;;3944:55;3934:66;;;;;3700:308;-1:-1:-1;;;;;3700:308:3:o;2039:130:7:-;1708:11:3;:9;:11::i;:::-;-1:-1:-1;;;;;1692:27:3;719:10:21;-1:-1:-1;;;;;1692:27:3;;1684:64;;;;-1:-1:-1;;;1684:64:3;;;;;;;:::i;:::-;2129:33:7::1;2146:15;2129:16;:33::i;1642:193:33:-:0;1770:7;1794:36;1809:7;1818:11;1794:14;:36::i;2354:150:7:-;1708:11:3;:9;:11::i;:::-;-1:-1:-1;;;;;1692:27:3;719:10:21;-1:-1:-1;;;;;1692:27:3;;1684:64;;;;-1:-1:-1;;;1684:64:3;;;;;;;:::i;:::-;2454:43:7::1;2476:20;2454:21;:43::i;1479:159:33:-:0;1586:7;1608:25;1621:11;1608:12;:25::i;1886:224:8:-;1990:4;-1:-1:-1;;;;;;2013:50:8;;-1:-1:-1;;;2013:50:8;;:90;;;2067:36;2091:11;2067:23;:36::i;2439:430:10:-;1455:3;2547:18;:41;;2526:155;;;;-1:-1:-1;;;2526:155:10;;18686:2:37;2526:155:10;;;18668:21:37;18725:2;18705:18;;;18698:30;18764:34;18744:18;;;18737:62;18835:34;18815:18;;;18808:62;-1:-1:-1;;;18886:19:37;;;18879:34;18930:19;;2526:155:10;18484:471:37;2526:155:10;2721:16;;;2747:37;;;;2800:62;;;17311:25:37;;;17367:2;17352:18;;17345:34;;;2800:62:10;;17284:18:37;2800:62:10;;;;;;;2516:353;2439:430;:::o;2414:299:33:-;2637:71;2652:10;2664:7;2673:6;2681:9;2692:15;2637:14;:71::i;4339:165:26:-;4416:7;4442:55;4464:20;:18;:20::i;:::-;4486:10;9226:57:25;;-1:-1:-1;;;9226:57:25;;;25742:27:37;25785:11;;;25778:27;;;25821:12;;;25814:28;;;9190:7:25;;25858:12:37;;9226:57:25;;;;;;;;;;;;9216:68;;;;;;9209:75;;9097:194;;;;;7452:270;7575:7;7595:17;7614:18;7636:25;7647:4;7653:1;7656;7659;7636:10;:25::i;:::-;7594:67;;;;7671:18;7683:5;7671:11;:18::i;11540:567:3:-;11697:7;11748:22;;;:10;:22;;;;;;;;11788:17;11794:10;11788:5;:17::i;:::-;:41;;;;;;;;:::i;:::-;;11780:89;;;;-1:-1:-1;;;11780:89:3;;19162:2:37;11780:89:3;;;19144:21:37;19201:2;19181:18;;;19174:30;19240:34;19220:18;;;19213:62;-1:-1:-1;;;19291:18:37;;;19284:33;19334:19;;11780:89:3;18960:399:37;11780:89:3;11915:30;;;;;;;;;;;-1:-1:-1;;;;;11915:30:3;;;;;-1:-1:-1;;11897:51:3;;11906:7;;11897:8;:51::i;:::-;11880:68;;11958:48;11969:10;11981:7;11990;11999:6;11958:10;:48::i;:::-;12031:7;-1:-1:-1;;;;;12022:54:3;;12040:10;12052:7;12061:6;12069;12022:54;;;;;;;;;:::i;:::-;;;;;;;;12094:6;11540:567;-1:-1:-1;;;;;;11540:567:3:o;2239:747:8:-;2333:13;2358:20;2381:23;2393:10;2381:11;:23::i;:::-;2358:46;-1:-1:-1;2429:23:8;2419:6;:33;;;;;;;;:::i;:::-;;2415:77;;2475:6;2239:747;-1:-1:-1;;2239:747:8:o;2415:77::-;2602:15;2620:24;;;:12;:24;;;;;;2658:21;2654:326;;-1:-1:-1;2702:6:8;2239:747;-1:-1:-1;;2239:747:8:o;2654:326::-;2729:9;;:34;;-1:-1:-1;;;2729:34:8;;;;;643:25:37;;;-1:-1:-1;;;;;2729:9:8;;;;:25;;616:18:37;;2729:34:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2725:255;;;-1:-1:-1;2786:22:8;;2239:747;-1:-1:-1;;;2239:747:8:o;2725:255::-;2829:9;;:37;;-1:-1:-1;;;2829:37:8;;;;;643:25:37;;;-1:-1:-1;;;;;2829:9:8;;;;:28;;616:18:37;;2829:37:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2825:155;;;-1:-1:-1;2889:20:8;;2239:747;-1:-1:-1;;;2239:747:8:o;2825:155::-;-1:-1:-1;2947:22:8;;2239:747;-1:-1:-1;;;2239:747:8:o;2622:171:7:-;2718:12;;2703:44;;;17311:25:37;;;17367:2;17352:18;;17345:34;;;2703:44:7;;17284:18:37;2703:44:7;;;;;;;2757:12;:29;2622:171::o;6404:1424:3:-;6596:7;6678:19;:17;:19::i;:::-;6636:38;6645:10;6657:16;6672:1;6657:12;:16;:::i;6636:38::-;:61;;6615:175;;;;-1:-1:-1;;;6615:175:3;;20425:2:37;6615:175:3;;;20407:21:37;20464:2;20444:18;;;20437:30;20503:34;20483:18;;;20476:62;20574:34;20554:18;;;20547:62;-1:-1:-1;;;20625:19:37;;;20618:34;20669:19;;6615:175:3;20223:471:37;6615:175:3;6801:18;6822:71;6835:7;6844:6;6852:9;6879:11;6863:29;;;;;;6822:12;:71::i;:::-;6801:92;;6930:6;:13;6912:7;:14;:31;6904:77;;;;-1:-1:-1;;;6904:77:3;;;;;;;:::i;:::-;7017:9;:16;6999:7;:14;:34;6991:80;;;;-1:-1:-1;;;6991:80:3;;;;;;;:::i;:::-;7106:1;7089:7;:14;:18;7081:55;;;;-1:-1:-1;;;7081:55:3;;21303:2:37;7081:55:3;;;21285:21:37;21342:2;21322:18;;;21315:30;21381:26;21361:18;;;21354:54;21425:18;;7081:55:3;21101:348:37;7081:55:3;7147:29;7179:22;;;:10;:22;;;;;;;;;7219:26;;;;;;;;;;-1:-1:-1;;;;;7219:26:3;;;;;1600:20:24;7211:74:3;;;;-1:-1:-1;;;7211:74:3;;21656:2:37;7211:74:3;;;21638:21:37;21695:2;21675:18;;;21668:30;21734:34;21714:18;;;21707:62;-1:-1:-1;;;21785:18:37;;;21778:31;21826:19;;7211:74:3;21454:397:37;7211:74:3;7296:15;7340:24;:13;:11;:13::i;:::-;:22;:24::i;:::-;7314:23;:12;:21;:23::i;:::-;:50;;;;:::i;:::-;7296:68;;7374:15;7403:25;:14;:12;:14::i;:25::-;7392:36;;:8;:36;:::i;:::-;1378:27:24;;-1:-1:-1;;1378:27:24;-1:-1:-1;;;;;1378:27:24;;;;;7374:54:3;-1:-1:-1;7489:16:3;;;1378:27:24;;-1:-1:-1;;1378:27:24;-1:-1:-1;;;;;1378:27:24;;;;;7543:250:3;7572:10;719::21;7622:7:3;7643:6;7676:7;:14;-1:-1:-1;;;;;7663:28:3;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7705:9;7728:8;7750;7772:11;7543:250;;;;;;;;;;;;;;:::i;:::-;;;;;;;;-1:-1:-1;7811:10:3;;6404:1424;-1:-1:-1;;;;;;;6404:1424:3:o;6134:176:8:-;6237:9;;6214:56;;;-1:-1:-1;;;;;6237:9:8;;;24305:34:37;;24375:15;;;24370:2;24355:18;;24348:43;6214:56:8;;24240:18:37;6214:56:8;;;;;;;6280:9;:23;;-1:-1:-1;;;;;;6280:23:8;-1:-1:-1;;;;;6280:23:8;;;;;;;;;;6134:176::o;4446:254:20:-;4575:12;4606:87;4628:6;4636:4;4642:5;4606:87;;;;;;;;;;;;;;;;;:21;:87::i;2913:316:7:-;3074:1;3056:15;:19;3048:71;;;;-1:-1:-1;;;3048:71:7;;24604:2:37;3048:71:7;;;24586:21:37;24643:2;24623:18;;;24616:30;24682:34;24662:18;;;24655:62;-1:-1:-1;;;24733:18:37;;;24726:37;24780:19;;3048:71:7;24402:403:37;3048:71:7;3150:13;;3134:47;;;17311:25:37;;;17367:2;17352:18;;17345:34;;;3134:47:7;;17284:18:37;3134:47:7;;;;;;;3191:13;:31;2913:316::o;651:167:9:-;771:40;;-1:-1:-1;;;771:40:9;;-1:-1:-1;;;;;25002:32:37;;;771:40:9;;;24984:51:37;25051:18;;;25044:34;;;745:7:9;;771:5;:18;;;;;;24957::37;;771:40:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;3359:213:7:-;3473:18;;3452:62;;;17311:25:37;;;17367:2;17352:18;;17345:34;;;3452:62:7;;17284:18:37;3452:62:7;;;;;;;3524:18;:41;3359:213::o;1603:189:10:-;1678:7;1455:3;1242:16;;1705:37;;-1:-1:-1;;;1705:37:10;;;;;643:25:37;;;1705:5:10;-1:-1:-1;;;;;1705:24:10;;;;616:18:37;;1705:37:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:57;;;;:::i;:::-;1704:81;;;;:::i;2228:214:3:-;2330:4;-1:-1:-1;;;;;;2353:42:3;;-1:-1:-1;;;2353:42:3;;:82;;-1:-1:-1;;;;;;;;;;937:40:27;;;2399:36:3;829:155:27;4468:323:8;4696:9;;:88;;-1:-1:-1;;;4696:88:8;;-1:-1:-1;;;;;4696:9:8;;;;:22;;4726:9;;4696:88;;4737:7;;4746:6;;4754:9;;4696;;4768:15;;4696:88;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4468:323;;;;;:::o;3143:308:26:-;3196:7;3227:4;-1:-1:-1;;;;;3236:12:26;3219:29;;:66;;;;;3269:16;3252:13;:33;3219:66;3215:230;;;-1:-1:-1;3308:24:26;;3143:308::o;3215:230::-;-1:-1:-1;3633:73:26;;;3392:10;3633:73;;;;30701:25:37;;;;3404:12:26;30742:18:37;;;30735:34;3418:15:26;30785:18:37;;;30778:34;3677:13:26;30828:18:37;;;30821:34;3700:4:26;30871:19:37;;;;30864:61;;;;3633:73:26;;;;;;;;;;30673:19:37;;;;3633:73:26;;;3623:84;;;;;;3007:132:33:o;5716:1603:25:-;5842:7;;6766:66;6753:79;;6749:161;;;-1:-1:-1;6864:1:25;;-1:-1:-1;6868:30:25;6848:51;;6749:161;6923:1;:7;;6928:2;6923:7;;:18;;;;;6934:1;:7;;6939:2;6934:7;;6923:18;6919:100;;;-1:-1:-1;6973:1:25;;-1:-1:-1;6977:30:25;6957:51;;6919:100;7130:24;;;7113:14;7130:24;;;;;;;;;26108:25:37;;;26181:4;26169:17;;26149:18;;;26142:45;;;;26203:18;;;26196:34;;;26246:18;;;26239:34;;;7130:24:25;;26080:19:37;;7130:24:25;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;7130:24:25;;-1:-1:-1;;7130:24:25;;;-1:-1:-1;;;;;;;7168:20:25;;7164:101;;7220:1;7224:29;7204:50;;;;;;;7164:101;7283:6;-1:-1:-1;7291:20:25;;-1:-1:-1;5716:1603:25;;;;;;;;:::o;548:631::-;625:20;616:5;:29;;;;;;;;:::i;:::-;;612:561;;;548:631;:::o;612:561::-;721:29;712:5;:38;;;;;;;;:::i;:::-;;708:465;;;766:34;;-1:-1:-1;;;766:34:25;;26486:2:37;766:34:25;;;26468:21:37;26525:2;26505:18;;;26498:30;26564:26;26544:18;;;26537:54;26608:18;;766:34:25;26284:348:37;708:465:25;830:35;821:5;:44;;;;;;;;:::i;:::-;;817:356;;;881:41;;-1:-1:-1;;;881:41:25;;26839:2:37;881:41:25;;;26821:21:37;26878:2;26858:18;;;26851:30;26917:33;26897:18;;;26890:61;26968:18;;881:41:25;26637:355:37;817:356:25;952:30;943:5;:39;;;;;;;;:::i;:::-;;939:234;;;998:44;;-1:-1:-1;;;998:44:25;;27199:2:37;998:44:25;;;27181:21:37;27238:2;27218:18;;;27211:30;27277:34;27257:18;;;27250:62;-1:-1:-1;;;27328:18:37;;;27321:32;27370:19;;998:44:25;26997:398:37;939:234:25;1072:30;1063:5;:39;;;;;;;;:::i;:::-;;1059:114;;;1118:44;;-1:-1:-1;;;1118:44:25;;27602:2:37;1118:44:25;;;27584:21:37;27641:2;27621:18;;;27614:30;27680:34;27660:18;;;27653:62;-1:-1:-1;;;27731:18:37;;;27724:32;27773:19;;1118:44:25;27400:398:37;2503:780:6;2665:33;2701:26;;;:14;:26;;;;;;;;-1:-1:-1;;;;;2747:30:6;;;;:21;;;:30;;;;;;;;;2746:31;2738:83;;;;-1:-1:-1;;;2738:83:6;;28005:2:37;2738:83:6;;;27987:21:37;28044:2;28024:18;;;28017:30;28083:34;28063:18;;;28056:62;-1:-1:-1;;;28134:18:37;;;28127:37;28181:19;;2738:83:6;27803:403:37;2738:83:6;-1:-1:-1;;;;;2831:30:6;;;;;;:21;;;:30;;;;;:37;;-1:-1:-1;;2831:37:6;2864:4;2831:37;;;2883:34;;:7;:34;;;2879:398;;;2962:6;2933:12;:25;;;:35;;;;;;;:::i;:::-;;;;-1:-1:-1;2879:398:6;;-1:-1:-1;2879:398:6;;2989:30;;;3006:12;2989:30;2985:292;;;3060:6;3035:12;:21;;;:31;;;;;;;:::i;2985:292::-;3087:34;;;3104:16;3087:34;3083:194;;;3166:6;3137:12;:25;;;:35;;;;;;;:::i;3083:194::-;3203:63;;-1:-1:-1;;;3203:63:6;;28413:2:37;3203:63:6;;;28395:21:37;28452:2;28432:18;;;28425:30;28491:34;28471:18;;;28464:62;-1:-1:-1;;;28542:18:37;;;28535:51;28603:19;;3203:63:6;28211:417:37;4065:914:3;4138:13;4195:22;;;:10;:22;;;;;4232:17;;;;;;4228:77;;;-1:-1:-1;4272:22:3;;4065:914;-1:-1:-1;;4065:914:3:o;4228:77::-;4319:17;;;;;;;;;4315:77;;;-1:-1:-1;4359:22:3;;4065:914;-1:-1:-1;;4065:914:3:o;4315:77::-;4402:16;4421:28;4438:10;4421:16;:28::i;:::-;4402:47;-1:-1:-1;4464:13:3;4460:83;;4493:39;;-1:-1:-1;;;4493:39:3;;28835:2:37;4493:39:3;;;28817:21:37;28874:2;28854:18;;;28847:30;28913:31;28893:18;;;28886:59;28962:18;;4493:39:3;28633:353:37;4460:83:3;4569:12;4557:8;:24;4553:83;;-1:-1:-1;4604:21:3;;4065:914;-1:-1:-1;;;4065:914:3:o;4553:83::-;4646:16;4665:28;4682:10;4665:16;:28::i;:::-;4646:47;;4720:12;4708:8;:24;4704:82;;-1:-1:-1;4755:20:3;;4065:914;-1:-1:-1;;;;4065:914:3:o;4704:82::-;4800:26;4815:10;4800:14;:26::i;:::-;:56;;;;-1:-1:-1;2211:4:6;2263:26;;;:14;:26;;;;;2331:25;;2307:21;;;;;:49;4830:26:3;4796:177;;;-1:-1:-1;4879:23:3;;4065:914;-1:-1:-1;;;;4065:914:3:o;4796:177::-;-1:-1:-1;4940:22:3;;4065:914;-1:-1:-1;;;;4065:914:3:o;2571:187:30:-;2627:6;-1:-1:-1;;;;;2653:25:30;;;2645:76;;;;-1:-1:-1;;;2645:76:30;;29193:2:37;2645:76:30;;;29175:21:37;29232:2;29212:18;;;29205:30;29271:34;29251:18;;;29244:62;-1:-1:-1;;;29322:18:37;;;29315:36;29368:19;;2645:76:30;28991:402:37;2645:76:30;-1:-1:-1;2745:5:30;2571:187::o;4948:499:20:-;5113:12;5170:5;5145:21;:30;;5137:81;;;;-1:-1:-1;;;5137:81:20;;29600:2:37;5137:81:20;;;29582:21:37;29639:2;29619:18;;;29612:30;29678:34;29658:18;;;29651:62;-1:-1:-1;;;29729:18:37;;;29722:36;29775:19;;5137:81:20;29398:402:37;5137:81:20;-1:-1:-1;;;;;1465:19:20;;;5228:60;;;;-1:-1:-1;;;5228:60:20;;30007:2:37;5228:60:20;;;29989:21:37;30046:2;30026:18;;;30019:30;30085:31;30065:18;;;30058:59;30134:18;;5228:60:20;29805:353:37;5228:60:20;5300:12;5314:23;5341:6;-1:-1:-1;;;;;5341:11:20;5360:5;5367:4;5341:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5299:73;;;;5389:51;5406:7;5415:10;5427:12;5389:16;:51::i;1717:276:6:-;1801:4;1853:26;;;:14;:26;;;;;1961:25;;;;1937:21;;;;:49;;1961:25;1937:49;:::i;:::-;1897:36;1904:28;1921:10;1904:16;:28::i;1897:36::-;:89;;;1717:276;-1:-1:-1;;;1717:276:6:o;7561:692:20:-;7707:12;7735:7;7731:516;;;-1:-1:-1;7765:10:20;7758:17;;7731:516;7876:17;;:21;7872:365;;8070:10;8064:17;8130:15;8117:10;8113:2;8109:19;8102:44;7872:365;8209:12;8202:20;;-1:-1:-1;;;8202:20:20;;;;;;;;:::i;14:286:37:-;72:6;125:2;113:9;104:7;100:23;96:32;93:52;;;141:1;138;131:12;93:52;167:23;;-1:-1:-1;;;;;;219:32:37;;209:43;;199:71;;266:1;263;256:12;679:180;738:6;791:2;779:9;770:7;766:23;762:32;759:52;;;807:1;804;797:12;759:52;-1:-1:-1;830:23:37;;679:180;-1:-1:-1;679:180:37:o;864:258::-;936:1;946:113;960:6;957:1;954:13;946:113;;;1036:11;;;1030:18;1017:11;;;1010:39;982:2;975:10;946:113;;;1077:6;1074:1;1071:13;1068:48;;;1112:1;1103:6;1098:3;1094:16;1087:27;1068:48;;864:258;;;:::o;1127:::-;1169:3;1207:5;1201:12;1234:6;1229:3;1222:19;1250:63;1306:6;1299:4;1294:3;1290:14;1283:4;1276:5;1272:16;1250:63;:::i;:::-;1367:2;1346:15;-1:-1:-1;;1342:29:37;1333:39;;;;1374:4;1329:50;;1127:258;-1:-1:-1;;1127:258:37:o;1390:220::-;1539:2;1528:9;1521:21;1502:4;1559:45;1600:2;1589:9;1585:18;1577:6;1559:45;:::i;1615:127::-;1676:10;1671:3;1667:20;1664:1;1657:31;1707:4;1704:1;1697:15;1731:4;1728:1;1721:15;1747:275;1818:2;1812:9;1883:2;1864:13;;-1:-1:-1;;1860:27:37;1848:40;;-1:-1:-1;;;;;1903:34:37;;1939:22;;;1900:62;1897:88;;;1965:18;;:::i;:::-;2001:2;1994:22;1747:275;;-1:-1:-1;1747:275:37:o;2027:183::-;2087:4;-1:-1:-1;;;;;2112:6:37;2109:30;2106:56;;;2142:18;;:::i;:::-;-1:-1:-1;2187:1:37;2183:14;2199:4;2179:25;;2027:183::o;2215:131::-;-1:-1:-1;;;;;2290:31:37;;2280:42;;2270:70;;2336:1;2333;2326:12;2351:737;2405:5;2458:3;2451:4;2443:6;2439:17;2435:27;2425:55;;2476:1;2473;2466:12;2425:55;2512:6;2499:20;2538:4;2562:60;2578:43;2618:2;2578:43;:::i;:::-;2562:60;:::i;:::-;2656:15;;;2742:1;2738:10;;;;2726:23;;2722:32;;;2687:12;;;;2766:15;;;2763:35;;;2794:1;2791;2784:12;2763:35;2830:2;2822:6;2818:15;2842:217;2858:6;2853:3;2850:15;2842:217;;;2938:3;2925:17;2955:31;2980:5;2955:31;:::i;:::-;2999:18;;3037:12;;;;2875;;2842:217;;;-1:-1:-1;3077:5:37;2351:737;-1:-1:-1;;;;;;2351:737:37:o;3093:662::-;3147:5;3200:3;3193:4;3185:6;3181:17;3177:27;3167:55;;3218:1;3215;3208:12;3167:55;3254:6;3241:20;3280:4;3304:60;3320:43;3360:2;3320:43;:::i;3304:60::-;3398:15;;;3484:1;3480:10;;;;3468:23;;3464:32;;;3429:12;;;;3508:15;;;3505:35;;;3536:1;3533;3526:12;3505:35;3572:2;3564:6;3560:15;3584:142;3600:6;3595:3;3592:15;3584:142;;;3666:17;;3654:30;;3704:12;;;;3617;;3584:142;;3760:406;3824:5;-1:-1:-1;;;;;3850:6:37;3847:30;3844:56;;;3880:18;;:::i;:::-;3918:57;3963:2;3942:15;;-1:-1:-1;;3938:29:37;3969:4;3934:40;3918:57;:::i;:::-;3909:66;;3998:6;3991:5;3984:21;4038:3;4029:6;4024:3;4020:16;4017:25;4014:45;;;4055:1;4052;4045:12;4014:45;4104:6;4099:3;4092:4;4085:5;4081:16;4068:43;4158:1;4151:4;4142:6;4135:5;4131:18;4127:29;4120:40;3760:406;;;;;:::o;4171:1087::-;4223:5;4276:3;4269:4;4261:6;4257:17;4253:27;4243:55;;4294:1;4291;4284:12;4243:55;4330:6;4317:20;4356:4;4380:60;4396:43;4436:2;4396:43;:::i;4380:60::-;4474:15;;;4560:1;4556:10;;;;4544:23;;4540:32;;;4505:12;;;;4584:15;;;4581:35;;;4612:1;4609;4602:12;4581:35;4648:2;4640:6;4636:15;4660:569;4676:6;4671:3;4668:15;4660:569;;;4762:3;4749:17;-1:-1:-1;;;;;4785:11:37;4782:35;4779:125;;;4858:1;4887:2;4883;4876:14;4779:125;4927:24;;4986:2;4978:11;;4974:21;-1:-1:-1;4964:119:37;;5037:1;5066:2;5062;5055:14;4964:119;5108:78;5182:3;5176:2;5172;5168:11;5155:25;5150:2;5146;5142:11;5108:78;:::i;:::-;5096:91;;-1:-1:-1;5207:12:37;;;;4693;;4660:569;;5263:897;5433:6;5441;5449;5457;5510:3;5498:9;5489:7;5485:23;5481:33;5478:53;;;5527:1;5524;5517:12;5478:53;5567:9;5554:23;-1:-1:-1;;;;;5637:2:37;5629:6;5626:14;5623:34;;;5653:1;5650;5643:12;5623:34;5676:61;5729:7;5720:6;5709:9;5705:22;5676:61;:::i;:::-;5666:71;;5790:2;5779:9;5775:18;5762:32;5746:48;;5819:2;5809:8;5806:16;5803:36;;;5835:1;5832;5825:12;5803:36;5858:63;5913:7;5902:8;5891:9;5887:24;5858:63;:::i;:::-;5848:73;;5974:2;5963:9;5959:18;5946:32;5930:48;;6003:2;5993:8;5990:16;5987:36;;;6019:1;6016;6009:12;5987:36;;6042:61;6095:7;6084:8;6073:9;6069:24;6042:61;:::i;:::-;5263:897;;;;-1:-1:-1;6032:71:37;;6150:2;6135:18;6122:32;;-1:-1:-1;;;5263:897:37:o;6165:156::-;6231:20;;6291:4;6280:16;;6270:27;;6260:55;;6311:1;6308;6301:12;6260:55;6165:156;;;:::o;6326:458::-;6417:6;6425;6433;6441;6449;6502:3;6490:9;6481:7;6477:23;6473:33;6470:53;;;6519:1;6516;6509:12;6470:53;6555:9;6542:23;6532:33;;6584:36;6616:2;6605:9;6601:18;6584:36;:::i;:::-;6574:46;;6639:36;6671:2;6660:9;6656:18;6639:36;:::i;:::-;6326:458;;;;-1:-1:-1;6629:46:37;;6722:2;6707:18;;6694:32;;-1:-1:-1;6773:3:37;6758:19;6745:33;;6326:458;-1:-1:-1;;6326:458:37:o;6789:127::-;6850:10;6845:3;6841:20;6838:1;6831:31;6881:4;6878:1;6871:15;6905:4;6902:1;6895:15;6921:346;7071:2;7056:18;;7104:1;7093:13;;7083:144;;7149:10;7144:3;7140:20;7137:1;7130:31;7184:4;7181:1;7174:15;7212:4;7209:1;7202:15;7083:144;7236:25;;;6921:346;:::o;7272:315::-;7340:6;7348;7401:2;7389:9;7380:7;7376:23;7372:32;7369:52;;;7417:1;7414;7407:12;7369:52;7453:9;7440:23;7430:33;;7513:2;7502:9;7498:18;7485:32;7526:31;7551:5;7526:31;:::i;:::-;7576:5;7566:15;;;7272:315;;;;;:::o;7916:250::-;7982:6;7990;8043:2;8031:9;8022:7;8018:23;8014:32;8011:52;;;8059:1;8056;8049:12;8011:52;8095:9;8082:23;8072:33;;8124:36;8156:2;8145:9;8141:18;8124:36;:::i;:::-;8114:46;;7916:250;;;;;:::o;8171:348::-;8223:8;8233:6;8287:3;8280:4;8272:6;8268:17;8264:27;8254:55;;8305:1;8302;8295:12;8254:55;-1:-1:-1;8328:20:37;;-1:-1:-1;;;;;8360:30:37;;8357:50;;;8403:1;8400;8393:12;8357:50;8440:4;8432:6;8428:17;8416:29;;8492:3;8485:4;8476:6;8468;8464:19;8460:30;8457:39;8454:59;;;8509:1;8506;8499:12;8454:59;8171:348;;;;;:::o;8524:549::-;8611:6;8619;8627;8635;8688:2;8676:9;8667:7;8663:23;8659:32;8656:52;;;8704:1;8701;8694:12;8656:52;8740:9;8727:23;8717:33;;8769:36;8801:2;8790:9;8786:18;8769:36;:::i;:::-;8759:46;;8856:2;8845:9;8841:18;8828:32;-1:-1:-1;;;;;8875:6:37;8872:30;8869:50;;;8915:1;8912;8905:12;8869:50;8954:59;9005:7;8996:6;8985:9;8981:22;8954:59;:::i;:::-;8524:549;;;;-1:-1:-1;9032:8:37;-1:-1:-1;;;;8524:549:37:o;9078:1157::-;9258:6;9266;9274;9282;9335:3;9323:9;9314:7;9310:23;9306:33;9303:53;;;9352:1;9349;9342:12;9303:53;9392:9;9379:23;-1:-1:-1;;;;;9462:2:37;9454:6;9451:14;9448:34;;;9478:1;9475;9468:12;9448:34;9501:61;9554:7;9545:6;9534:9;9530:22;9501:61;:::i;:::-;9491:71;;9615:2;9604:9;9600:18;9587:32;9571:48;;9644:2;9634:8;9631:16;9628:36;;;9660:1;9657;9650:12;9628:36;9683:63;9738:7;9727:8;9716:9;9712:24;9683:63;:::i;:::-;9673:73;;9799:2;9788:9;9784:18;9771:32;9755:48;;9828:2;9818:8;9815:16;9812:36;;;9844:1;9841;9834:12;9812:36;9867:61;9920:7;9909:8;9898:9;9894:24;9867:61;:::i;:::-;9857:71;;9981:2;9970:9;9966:18;9953:32;9937:48;;10010:2;10000:8;9997:16;9994:36;;;10026:1;10023;10016:12;9994:36;-1:-1:-1;10049:24:37;;10104:4;10096:13;;10092:27;-1:-1:-1;10082:55:37;;10133:1;10130;10123:12;10082:55;10156:73;10221:7;10216:2;10203:16;10198:2;10194;10190:11;10156:73;:::i;:::-;10146:83;;;9078:1157;;;;;;;:::o;10240:274::-;10326:6;10379:2;10367:9;10358:7;10354:23;10350:32;10347:52;;;10395:1;10392;10385:12;10347:52;10434:9;10421:23;10453:31;10478:5;10453:31;:::i;10519:613::-;10607:6;10615;10623;10631;10684:2;10672:9;10663:7;10659:23;10655:32;10652:52;;;10700:1;10697;10690:12;10652:52;10739:9;10726:23;10758:31;10783:5;10758:31;:::i;:::-;10808:5;-1:-1:-1;10860:2:37;10845:18;;10832:32;;-1:-1:-1;10915:2:37;10900:18;;10887:32;-1:-1:-1;;;;;10931:30:37;;10928:50;;;10974:1;10971;10964:12;11527:315;11595:6;11603;11656:2;11644:9;11635:7;11631:23;11627:32;11624:52;;;11672:1;11669;11662:12;11624:52;11711:9;11698:23;11730:31;11755:5;11730:31;:::i;:::-;11780:5;11832:2;11817:18;;;;11804:32;;-1:-1:-1;;;11527:315:37:o;12070:348::-;12272:2;12254:21;;;12311:2;12291:18;;;12284:30;12350:26;12345:2;12330:18;;12323:54;12409:2;12394:18;;12070:348::o;12423:380::-;12502:1;12498:12;;;;12545;;;12566:61;;12620:4;12612:6;12608:17;12598:27;;12566:61;12673:2;12665:6;12662:14;12642:18;12639:38;12636:161;;;12719:10;12714:3;12710:20;12707:1;12700:31;12754:4;12751:1;12744:15;12782:4;12779:1;12772:15;12636:161;;12423:380;;;:::o;12808:397::-;13010:2;12992:21;;;13049:2;13029:18;;;13022:30;13088:34;13083:2;13068:18;;13061:62;-1:-1:-1;;;13154:2:37;13139:18;;13132:31;13195:3;13180:19;;12808:397::o;13210:184::-;13280:6;13333:2;13321:9;13312:7;13308:23;13304:32;13301:52;;;13349:1;13346;13339:12;13301:52;-1:-1:-1;13372:16:37;;13210:184;-1:-1:-1;13210:184:37:o;13399:461::-;13452:3;13490:5;13484:12;13517:6;13512:3;13505:19;13543:4;13572:2;13567:3;13563:12;13556:19;;13609:2;13602:5;13598:14;13630:1;13640:195;13654:6;13651:1;13648:13;13640:195;;;13719:13;;-1:-1:-1;;;;;13715:39:37;13703:52;;13775:12;;;;13810:15;;;;13751:1;13669:9;13640:195;;;-1:-1:-1;13851:3:37;;13399:461;-1:-1:-1;;;;;13399:461:37:o;13865:435::-;13918:3;13956:5;13950:12;13983:6;13978:3;13971:19;14009:4;14038:2;14033:3;14029:12;14022:19;;14075:2;14068:5;14064:14;14096:1;14106:169;14120:6;14117:1;14114:13;14106:169;;;14181:13;;14169:26;;14215:12;;;;14250:15;;;;14142:1;14135:9;14106:169;;14305:615;14356:3;14394:5;14388:12;14421:6;14416:3;14409:19;14447:4;14488:2;14483:3;14479:12;14513:11;14540;14533:18;;14590:6;14587:1;14583:14;14576:5;14572:26;14560:38;;14632:2;14625:5;14621:14;14653:1;14663:231;14677:6;14674:1;14671:13;14663:231;;;14748:5;14742:4;14738:16;14733:3;14726:29;14776:38;14809:4;14800:6;14794:13;14776:38;:::i;:::-;14872:12;;;;14768:46;-1:-1:-1;14837:15:37;;;;14699:1;14692:9;14663:231;;;-1:-1:-1;14910:4:37;;14305:615;-1:-1:-1;;;;;;;14305:615:37:o;14925:838::-;15342:3;15331:9;15324:22;15305:4;15369:57;15421:3;15410:9;15406:19;15398:6;15369:57;:::i;:::-;15474:9;15466:6;15462:22;15457:2;15446:9;15442:18;15435:50;15508:44;15545:6;15537;15508:44;:::i;:::-;15494:58;;15600:9;15592:6;15588:22;15583:2;15572:9;15568:18;15561:50;15628:42;15663:6;15655;15628:42;:::i;:::-;15701:2;15686:18;;15679:34;;;;-1:-1:-1;;15744:3:37;15729:19;15722:35;15620:50;14925:838;-1:-1:-1;;;14925:838:37:o;15957:910::-;16402:3;16391:9;16384:22;16365:4;16429:57;16481:3;16470:9;16466:19;16458:6;16429:57;:::i;:::-;16534:9;16526:6;16522:22;16517:2;16506:9;16502:18;16495:50;16568:44;16605:6;16597;16568:44;:::i;:::-;16554:58;;16660:9;16652:6;16648:22;16643:2;16632:9;16628:18;16621:50;16688:42;16723:6;16715;16688:42;:::i;:::-;16761:2;16746:18;;16739:34;;;;-1:-1:-1;;16804:3:37;16789:19;;16782:35;;;;16848:3;16833:19;;;16826:35;16680:50;15957:910;-1:-1:-1;;;15957:910:37:o;16872:127::-;16933:10;16928:3;16924:20;16921:1;16914:31;16964:4;16961:1;16954:15;16988:4;16985:1;16978:15;17004:128;17044:3;17075:1;17071:6;17068:1;17065:13;17062:39;;;17081:18;;:::i;:::-;-1:-1:-1;17117:9:37;;17004:128::o;17721:758::-;18102:3;18091:9;18084:22;18065:4;18129:57;18181:3;18170:9;18166:19;18158:6;18129:57;:::i;:::-;18234:9;18226:6;18222:22;18217:2;18206:9;18202:18;18195:50;18268:44;18305:6;18297;18268:44;:::i;:::-;18254:58;;18360:9;18352:6;18348:22;18343:2;18332:9;18328:18;18321:50;18388:42;18423:6;18415;18388:42;:::i;:::-;18380:50;;;18466:6;18461:2;18450:9;18446:18;18439:34;17721:758;;;;;;;:::o;19364:442::-;19593:6;19582:9;19575:25;19648:4;19640:6;19636:17;19631:2;19620:9;19616:18;19609:45;19690:6;19685:2;19674:9;19670:18;19663:34;19733:3;19728:2;19717:9;19713:18;19706:31;19556:4;19754:46;19795:3;19784:9;19780:19;19772:6;19754:46;:::i;19811:277::-;19878:6;19931:2;19919:9;19910:7;19906:23;19902:32;19899:52;;;19947:1;19944;19937:12;19899:52;19979:9;19973:16;20032:5;20025:13;20018:21;20011:5;20008:32;19998:60;;20054:1;20051;20044:12;20093:125;20133:4;20161:1;20158;20155:8;20152:34;;;20166:18;;:::i;:::-;-1:-1:-1;20203:9:37;;20093:125::o;20699:397::-;20901:2;20883:21;;;20940:2;20920:18;;;20913:30;20979:34;20974:2;20959:18;;20952:62;-1:-1:-1;;;21045:2:37;21030:18;;21023:31;21086:3;21071:19;;20699:397::o;21856:236::-;21895:3;-1:-1:-1;;;;;21968:2:37;21965:1;21961:10;21998:2;21995:1;21991:10;22029:3;22025:2;22021:12;22016:3;22013:21;22010:47;;;22037:18;;:::i;:::-;22073:13;;21856:236;-1:-1:-1;;;;21856:236:37:o;22204:1884::-;22776:4;22805:3;22835:6;22824:9;22817:25;22861:2;22928:1;22924;22919:3;22915:11;22911:19;22903:6;22899:32;22894:2;22883:9;22879:18;22872:60;22968:2;22963;22952:9;22948:18;22941:30;22994:56;23046:2;23035:9;23031:18;23023:6;22994:56;:::i;:::-;22980:70;;23098:9;23090:6;23086:22;23081:2;23070:9;23066:18;23059:50;23132:44;23169:6;23161;23132:44;:::i;:::-;23118:58;;23225:9;23217:6;23213:22;23207:3;23196:9;23192:19;23185:51;23256:6;23291;23285:13;23322:6;23314;23307:22;23357:2;23349:6;23345:15;23338:22;;23416:2;23406:6;23403:1;23399:14;23391:6;23387:27;23383:36;23454:2;23446:6;23442:15;23475:1;23485:252;23499:6;23496:1;23493:13;23485:252;;;23589:2;23585:7;23576:6;23568;23564:19;23560:33;23555:3;23548:46;23617:40;23650:6;23641;23635:13;23617:40;:::i;:::-;23715:12;;;;23607:50;-1:-1:-1;23680:15:37;;;;23521:1;23514:9;23485:252;;;23489:3;;23786:9;23778:6;23774:22;23768:3;23757:9;23753:19;23746:51;23820:42;23855:6;23847;23820:42;:::i;:::-;23806:56;;;;;;23871:46;23912:3;23901:9;23897:19;23889:6;-1:-1:-1;;;;;22162:30:37;22150:43;;22097:102;23871:46;-1:-1:-1;;;;;22162:30:37;;23967:3;23952:19;;22150:43;24021:9;24013:6;24009:22;24003:3;23992:9;23988:19;23981:51;24049:33;24075:6;24067;24049:33;:::i;:::-;24041:41;22204:1884;-1:-1:-1;;;;;;;;;;;;22204:1884:37:o;25089:168::-;25129:7;25195:1;25191;25187:6;25183:14;25180:1;25177:21;25172:1;25165:9;25158:17;25154:45;25151:71;;;25202:18;;:::i;:::-;-1:-1:-1;25242:9:37;;25089:168::o;25262:217::-;25302:1;25328;25318:132;;25372:10;25367:3;25363:20;25360:1;25353:31;25407:4;25404:1;25397:15;25435:4;25432:1;25425:15;25318:132;-1:-1:-1;25464:9:37;;25262:217::o;30163:274::-;30292:3;30330:6;30324:13;30346:53;30392:6;30387:3;30380:4;30372:6;30368:17;30346:53;:::i;:::-;30415:16;;;;;30163:274;-1:-1:-1;;30163:274:37:o
Swarm Source
none://none
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.