Overview
S Balance
0 S
S Value
-More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Art Proxy | 632104 | 4 hrs ago | IN | 0 S | 0.00005226 |
Loading...
Loading
This contract contains unverified libraries: BalanceLogicLibrary, DelegationLogicLibrary
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
VotingEscrow
Compiler Version
v0.8.19+commit.7dd6d404
Contract Source Code (Solidity)
/** *Submitted for verification at SonicScan.org on 2024-12-18 */ // SPDX-License-Identifier: GPL-3.0-or-later // Hydrometer combines powerful liquidity incentives, low slippage, and a vote-locked governance model using $HYDRO and $veHYDRO tokens, ensuring an innovative and decentralized experience for all users. //https://x.com/Hydrometer_Fi pragma solidity 0.8.19; // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } interface IVeArtProxy { /// @dev Art configuration struct Config { // NFT metadata variables int256 _tokenId; int256 _balanceOf; int256 _lockedEnd; int256 _lockedAmount; // Line art variables int256 shape; uint256 palette; int256 maxLines; int256 dash; // Randomness variables int256 seed1; int256 seed2; int256 seed3; } /// @dev Individual line art path variables. struct lineConfig { bytes8 color; uint256 stroke; uint256 offset; uint256 offsetHalf; uint256 offsetDashSum; uint256 pathLength; } /// @dev Represents an (x,y) coordinate in a line. struct Point { int256 x; int256 y; } /// @notice Generate a SVG based on veNFT metadata /// @param _tokenId Unique veNFT identifier /// @return output SVG metadata as HTML tag function tokenURI(uint256 _tokenId) external view returns (string memory output); /// @notice Generate only the foreground <path> elements of the line art for an NFT (excluding SVG header), for flexibility purposes. /// @param _tokenId Unique veNFT identifier /// @return output Encoded output of generateShape() function lineArtPathsOnly(uint256 _tokenId) external view returns (bytes memory output); /// @notice Generate the master art config metadata for a veNFT /// @param _tokenId Unique veNFT identifier /// @return cfg Config struct function generateConfig(uint256 _tokenId) external view returns (Config memory cfg); /// @notice Generate the points for two stripe lines based on the config generated for a veNFT /// @param cfg Master art config metadata of a veNFT /// @param l Number of line drawn /// @return Line (x, y) coordinates of the drawn stripes function twoStripes(Config memory cfg, int256 l) external pure returns (Point[100] memory Line); /// @notice Generate the points for circles based on the config generated for a veNFT /// @param cfg Master art config metadata of a veNFT /// @param l Number of circles drawn /// @return Line (x, y) coordinates of the drawn circles function circles(Config memory cfg, int256 l) external pure returns (Point[100] memory Line); /// @notice Generate the points for interlocking circles based on the config generated for a veNFT /// @param cfg Master art config metadata of a veNFT /// @param l Number of interlocking circles drawn /// @return Line (x, y) coordinates of the drawn interlocking circles function interlockingCircles(Config memory cfg, int256 l) external pure returns (Point[100] memory Line); /// @notice Generate the points for corners based on the config generated for a veNFT /// @param cfg Master art config metadata of a veNFT /// @param l Number of corners drawn /// @return Line (x, y) coordinates of the drawn corners function corners(Config memory cfg, int256 l) external pure returns (Point[100] memory Line); /// @notice Generate the points for a curve based on the config generated for a veNFT /// @param cfg Master art config metadata of a veNFT /// @param l Number of curve drawn /// @return Line (x, y) coordinates of the drawn curve function curves(Config memory cfg, int256 l) external pure returns (Point[100] memory Line); /// @notice Generate the points for a spiral based on the config generated for a veNFT /// @param cfg Master art config metadata of a veNFT /// @param l Number of spiral drawn /// @return Line (x, y) coordinates of the drawn spiral function spiral(Config memory cfg, int256 l) external pure returns (Point[100] memory Line); /// @notice Generate the points for an explosion based on the config generated for a veNFT /// @param cfg Master art config metadata of a veNFT /// @param l Number of explosion drawn /// @return Line (x, y) coordinates of the drawn explosion function explosion(Config memory cfg, int256 l) external pure returns (Point[100] memory Line); /// @notice Generate the points for a wormhole based on the config generated for a veNFT /// @param cfg Master art config metadata of a veNFT /// @param l Number of wormhole drawn /// @return Line (x, y) coordinates of the drawn wormhole function wormhole(Config memory cfg, int256 l) external pure returns (Point[100] memory Line); } // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol) // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) /** * @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); } /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); } /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); } // OpenZeppelin Contracts (interfaces/IERC6372.sol) interface IERC6372 { /** * @dev Clock used for flagging checkpoints. Can be overridden to implement timestamp based checkpoints (and voting). */ function clock() external view returns (uint48); /** * @dev Description of the clock */ // solhint-disable-next-line func-name-mixedcase function CLOCK_MODE() external view returns (string memory); } // OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol) // OpenZeppelin Contracts v4.4.1 (interfaces/IERC721.sol) /// @title EIP-721 Metadata Update Extension interface IERC4906 is IERC165, IERC721 { /// @dev This event emits when the metadata of a token is changed. /// So that the third-party platforms such as NFT market could /// timely update the images and related attributes of the NFT. event MetadataUpdate(uint256 _tokenId); /// @dev This event emits when the metadata of a range of tokens is changed. /// So that the third-party platforms such as NFT market could /// timely update the images and related attributes of the NFTs. event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId); } /// Modified IVotes interface for tokenId based voting interface IVotes { /** * @dev Emitted when an account changes their delegate. */ event DelegateChanged(address indexed delegator, uint256 indexed fromDelegate, uint256 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 amount of votes that `tokenId` had at a specific moment in the past. * If the account passed in is not the owner, returns 0. */ function getPastVotes(address account, uint256 tokenId, uint256 timepoint) external view returns (uint256); /** * @dev Returns the total supply of votes available at a specific moment in the past. If the `clock()` is * configured to use block numbers, this will return the value the end of the corresponding block. * * 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 timepoint) external view returns (uint256); /** * @dev Returns the delegate that `tokenId` has chosen. Can never be equal to the delegator's `tokenId`. * Returns 0 if not delegated. */ function delegates(uint256 tokenId) external view returns (uint256); /** * @dev Delegates votes from the sender to `delegatee`. */ function delegate(uint256 delegator, uint256 delegatee) external; /** * @dev Delegates votes from `delegator` to `delegatee`. Signer must own `delegator`. */ function delegateBySig( uint256 delegator, uint256 delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s ) external; } interface IVotingEscrow is IVotes, IERC4906, IERC6372, IERC721Metadata { struct LockedBalance { int128 amount; uint256 end; bool isPermanent; } struct UserPoint { int128 bias; int128 slope; // # -dweight / dt uint256 ts; uint256 blk; // block uint256 permanent; } struct GlobalPoint { int128 bias; int128 slope; // # -dweight / dt uint256 ts; uint256 blk; // block uint256 permanentLockBalance; } /// @notice A checkpoint for recorded delegated voting weights at a certain timestamp struct Checkpoint { uint256 fromTimestamp; address owner; uint256 delegatedBalance; uint256 delegatee; } enum DepositType { DEPOSIT_FOR_TYPE, CREATE_LOCK_TYPE, INCREASE_LOCK_AMOUNT, INCREASE_UNLOCK_TIME } /// @dev Different types of veNFTs: /// NORMAL - typical veNFT /// LOCKED - veNFT which is locked into a MANAGED veNFT /// MANAGED - veNFT which can accept the deposit of NORMAL veNFTs enum EscrowType { NORMAL, LOCKED, MANAGED } error AlreadyVoted(); error AmountTooBig(); error ERC721ReceiverRejectedTokens(); error ERC721TransferToNonERC721ReceiverImplementer(); error InvalidNonce(); error InvalidSignature(); error InvalidSignatureS(); error InvalidManagedNFTId(); error LockDurationNotInFuture(); error LockDurationTooLong(); error LockExpired(); error LockNotExpired(); error NoLockFound(); error NonExistentToken(); error NotApprovedOrOwner(); error NotDistributor(); error NotEmergencyCouncilOrGovernor(); error NotGovernor(); error NotGovernorOrManager(); error NotManagedNFT(); error NotManagedOrNormalNFT(); error NotLockedNFT(); error NotNormalNFT(); error NotPermanentLock(); error NotOwner(); error NotTeam(); error NotVoter(); error OwnershipChange(); error PermanentLock(); error SameAddress(); error SameNFT(); error SameState(); error SplitNoOwner(); error SplitNotAllowed(); error SignatureExpired(); error TooManyTokenIDs(); error ZeroAddress(); error ZeroAmount(); error ZeroBalance(); event Deposit( address indexed provider, uint256 indexed tokenId, DepositType indexed depositType, uint256 value, uint256 locktime, uint256 ts ); event Withdraw(address indexed provider, uint256 indexed tokenId, uint256 value, uint256 ts); event LockPermanent(address indexed _owner, uint256 indexed _tokenId, uint256 amount, uint256 _ts); event UnlockPermanent(address indexed _owner, uint256 indexed _tokenId, uint256 amount, uint256 _ts); event Supply(uint256 prevSupply, uint256 supply); event Merge( address indexed _sender, uint256 indexed _from, uint256 indexed _to, uint256 _amountFrom, uint256 _amountTo, uint256 _amountFinal, uint256 _locktime, uint256 _ts ); event Split( uint256 indexed _from, uint256 indexed _tokenId1, uint256 indexed _tokenId2, address _sender, uint256 _splitAmount1, uint256 _splitAmount2, uint256 _locktime, uint256 _ts ); event CreateManaged( address indexed _to, uint256 indexed _mTokenId, address indexed _from, address _lockedManagedReward, address _freeManagedReward ); event DepositManaged( address indexed _owner, uint256 indexed _tokenId, uint256 indexed _mTokenId, uint256 _weight, uint256 _ts ); event WithdrawManaged( address indexed _owner, uint256 indexed _tokenId, uint256 indexed _mTokenId, uint256 _weight, uint256 _ts ); event SetAllowedManager(address indexed _allowedManager); // State variables /// @notice Address of Meta-tx Forwarder function forwarder() external view returns (address); /// @notice Address of FactoryRegistry.sol function factoryRegistry() external view returns (address); /// @notice Address of token (HYDRO) used to create a veNFT function token() external view returns (address); /// @notice Address of RewardsDistributor.sol function distributor() external view returns (address); /// @notice Address of Voter.sol function voter() external view returns (address); /// @notice Address of Protocol Team multisig function team() external view returns (address); /// @notice Address of art proxy used for on-chain art generation function artProxy() external view returns (address); /// @dev address which can create managed NFTs function allowedManager() external view returns (address); /// @dev Current count of token function tokenId() external view returns (uint256); /*/////////////////////////////////////////////////////////////// MANAGED NFT STORAGE //////////////////////////////////////////////////////////////*/ /// @dev Mapping of token id to escrow type /// Takes advantage of the fact default value is EscrowType.NORMAL function escrowType(uint256 tokenId) external view returns (EscrowType); /// @dev Mapping of token id to managed id function idToManaged(uint256 tokenId) external view returns (uint256 managedTokenId); /// @dev Mapping of user token id to managed token id to weight of token id function weights(uint256 tokenId, uint256 managedTokenId) external view returns (uint256 weight); /// @dev Mapping of managed id to deactivated state function deactivated(uint256 tokenId) external view returns (bool inactive); /// @dev Mapping from managed nft id to locked managed rewards /// `token` denominated rewards (rebases/rewards) stored in locked managed rewards contract /// to prevent co-mingling of assets function managedToLocked(uint256 tokenId) external view returns (address); /// @dev Mapping from managed nft id to free managed rewards contract /// these rewards can be freely withdrawn by users function managedToFree(uint256 tokenId) external view returns (address); /*/////////////////////////////////////////////////////////////// MANAGED NFT LOGIC //////////////////////////////////////////////////////////////*/ /// @notice Create managed NFT (a permanent lock) for use within ecosystem. /// @dev Throws if address already owns a managed NFT. /// @return _mTokenId managed token id. function createManagedLockFor(address _to) external returns (uint256 _mTokenId); /// @notice Delegates balance to managed nft /// Note that NFTs deposited into a managed NFT will be re-locked /// to the maximum lock time on withdrawal. /// Permanent locks that are deposited will automatically unlock. /// @dev Managed nft will remain max-locked as long as there is at least one /// deposit or withdrawal per week. /// Throws if deposit nft is managed. /// Throws if recipient nft is not managed. /// Throws if deposit nft is already locked. /// Throws if not called by voter. /// @param _tokenId tokenId of NFT being deposited /// @param _mTokenId tokenId of managed NFT that will receive the deposit function depositManaged(uint256 _tokenId, uint256 _mTokenId) external; /// @notice Retrieves locked rewards and withdraws balance from managed nft. /// Note that the NFT withdrawn is re-locked to the maximum lock time. /// @dev Throws if NFT not locked. /// Throws if not called by voter. /// @param _tokenId tokenId of NFT being deposited. function withdrawManaged(uint256 _tokenId) external; /// @notice Permit one address to call createManagedLockFor() that is not Voter.governor() function setAllowedManager(address _allowedManager) external; /// @notice Set Managed NFT state. Inactive NFTs cannot be deposited into. /// @param _mTokenId managed nft state to set /// @param _state true => inactive, false => active function setManagedState(uint256 _mTokenId, bool _state) external; /*/////////////////////////////////////////////////////////////// METADATA STORAGE //////////////////////////////////////////////////////////////*/ function name() external view returns (string memory); function symbol() external view returns (string memory); function version() external view returns (string memory); function decimals() external view returns (uint8); function setTeam(address _team) external; function setArtProxy(address _proxy) external; /// @inheritdoc IERC721Metadata function tokenURI(uint256 tokenId) external view returns (string memory); /*////////////////////////////////////////////////////////////// ERC721 BALANCE/OWNER STORAGE //////////////////////////////////////////////////////////////*/ /// @dev Mapping from owner address to mapping of index to tokenId function ownerToNFTokenIdList(address _owner, uint256 _index) external view returns (uint256 _tokenId); /// @inheritdoc IERC721 function ownerOf(uint256 tokenId) external view returns (address owner); /// @inheritdoc IERC721 function balanceOf(address owner) external view returns (uint256 balance); /*////////////////////////////////////////////////////////////// ERC721 APPROVAL STORAGE //////////////////////////////////////////////////////////////*/ /// @inheritdoc IERC721 function getApproved(uint256 _tokenId) external view returns (address operator); /// @inheritdoc IERC721 function isApprovedForAll(address owner, address operator) external view returns (bool); /// @notice Check whether spender is owner or an approved user for a given veNFT /// @param _spender . /// @param _tokenId . function isApprovedOrOwner(address _spender, uint256 _tokenId) external returns (bool); /*////////////////////////////////////////////////////////////// ERC721 LOGIC //////////////////////////////////////////////////////////////*/ /// @inheritdoc IERC721 function approve(address to, uint256 tokenId) external; /// @inheritdoc IERC721 function setApprovalForAll(address operator, bool approved) external; /// @inheritdoc IERC721 function transferFrom(address from, address to, uint256 tokenId) external; /// @inheritdoc IERC721 function safeTransferFrom(address from, address to, uint256 tokenId) external; /// @inheritdoc IERC721 function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; /*////////////////////////////////////////////////////////////// ERC165 LOGIC //////////////////////////////////////////////////////////////*/ /// @inheritdoc IERC165 function supportsInterface(bytes4 _interfaceID) external view returns (bool); /*////////////////////////////////////////////////////////////// ESCROW STORAGE //////////////////////////////////////////////////////////////*/ /// @notice Total count of epochs witnessed since contract creation function epoch() external view returns (uint256); /// @notice Total amount of token() deposited function supply() external view returns (uint256); /// @notice Aggregate permanent locked balances function permanentLockBalance() external view returns (uint256); function userPointEpoch(uint256 _tokenId) external view returns (uint256 _epoch); /// @notice time -> signed slope change function slopeChanges(uint256 _timestamp) external view returns (int128); /// @notice account -> can split function canSplit(address _account) external view returns (bool); /// @notice Global point history at a given index function pointHistory(uint256 _loc) external view returns (GlobalPoint memory); /// @notice Get the LockedBalance (amount, end) of a _tokenId /// @param _tokenId . /// @return LockedBalance of _tokenId function locked(uint256 _tokenId) external view returns (LockedBalance memory); /// @notice User -> UserPoint[userEpoch] function userPointHistory(uint256 _tokenId, uint256 _loc) external view returns (UserPoint memory); /*////////////////////////////////////////////////////////////// ESCROW LOGIC //////////////////////////////////////////////////////////////*/ /// @notice Record global data to checkpoint function checkpoint() external; /// @notice Deposit `_value` tokens for `_tokenId` and add to the lock /// @dev Anyone (even a smart contract) can deposit for someone else, but /// cannot extend their locktime and deposit for a brand new user /// @param _tokenId lock NFT /// @param _value Amount to add to user's lock function depositFor(uint256 _tokenId, uint256 _value) external; /// @notice Deposit `_value` tokens for `msg.sender` and lock for `_lockDuration` /// @param _value Amount to deposit /// @param _lockDuration Number of seconds to lock tokens for (rounded down to nearest week) /// @return TokenId of created veNFT function createLock(uint256 _value, uint256 _lockDuration) external returns (uint256); /// @notice Deposit `_value` tokens for `_to` and lock for `_lockDuration` /// @param _value Amount to deposit /// @param _lockDuration Number of seconds to lock tokens for (rounded down to nearest week) /// @param _to Address to deposit /// @return TokenId of created veNFT function createLockFor(uint256 _value, uint256 _lockDuration, address _to) external returns (uint256); /// @notice Deposit `_value` additional tokens for `_tokenId` without modifying the unlock time /// @param _value Amount of tokens to deposit and add to the lock function increaseAmount(uint256 _tokenId, uint256 _value) external; /// @notice Extend the unlock time for `_tokenId` /// Cannot extend lock time of permanent locks /// @param _lockDuration New number of seconds until tokens unlock function increaseUnlockTime(uint256 _tokenId, uint256 _lockDuration) external; /// @notice Withdraw all tokens for `_tokenId` /// @dev Only possible if the lock is both expired and not permanent /// This will burn the veNFT. Any rebases or rewards that are unclaimed /// will no longer be claimable. Claim all rebases and rewards prior to calling this. function withdraw(uint256 _tokenId) external; /// @notice Merges `_from` into `_to`. /// @dev Cannot merge `_from` locks that are permanent or have already voted this epoch. /// Cannot merge `_to` locks that have already expired. /// This will burn the veNFT. Any rebases or rewards that are unclaimed /// will no longer be claimable. Claim all rebases and rewards prior to calling this. /// @param _from VeNFT to merge from. /// @param _to VeNFT to merge into. function merge(uint256 _from, uint256 _to) external; /// @notice Splits veNFT into two new veNFTS - one with oldLocked.amount - `_amount`, and the second with `_amount` /// @dev This burns the tokenId of the target veNFT /// Callable by approved or owner /// If this is called by approved, approved will not have permissions to manipulate the newly created veNFTs /// Returns the two new split veNFTs to owner /// If `from` is permanent, will automatically dedelegate. /// This will burn the veNFT. Any rebases or rewards that are unclaimed /// will no longer be claimable. Claim all rebases and rewards prior to calling this. /// @param _from VeNFT to split. /// @param _amount Amount to split from veNFT. /// @return _tokenId1 Return tokenId of veNFT with oldLocked.amount - `_amount`. /// @return _tokenId2 Return tokenId of veNFT with `_amount`. function split(uint256 _from, uint256 _amount) external returns (uint256 _tokenId1, uint256 _tokenId2); /// @notice Toggle split for a specific address. /// @dev Toggle split for address(0) to enable or disable for all. /// @param _account Address to toggle split permissions /// @param _bool True to allow, false to disallow function toggleSplit(address _account, bool _bool) external; /// @notice Permanently lock a veNFT. Voting power will be equal to /// `LockedBalance.amount` with no decay. Required to delegate. /// @dev Only callable by unlocked normal veNFTs. /// @param _tokenId tokenId to lock. function lockPermanent(uint256 _tokenId) external; /// @notice Unlock a permanently locked veNFT. Voting power will decay. /// Will automatically dedelegate if delegated. /// @dev Only callable by permanently locked veNFTs. /// Cannot unlock if already voted this epoch. /// @param _tokenId tokenId to unlock. function unlockPermanent(uint256 _tokenId) external; /*/////////////////////////////////////////////////////////////// GAUGE VOTING STORAGE //////////////////////////////////////////////////////////////*/ /// @notice Get the voting power for _tokenId at the current timestamp /// @dev Returns 0 if called in the same block as a transfer. /// @param _tokenId . /// @return Voting power function balanceOfNFT(uint256 _tokenId) external view returns (uint256); /// @notice Get the voting power for _tokenId at a given timestamp /// @param _tokenId . /// @param _t Timestamp to query voting power /// @return Voting power function balanceOfNFTAt(uint256 _tokenId, uint256 _t) external view returns (uint256); /// @notice Calculate total voting power at current timestamp /// @return Total voting power at current timestamp function totalSupply() external view returns (uint256); /// @notice Calculate total voting power at a given timestamp /// @param _t Timestamp to query total voting power /// @return Total voting power at given timestamp function totalSupplyAt(uint256 _t) external view returns (uint256); /*/////////////////////////////////////////////////////////////// GAUGE VOTING LOGIC //////////////////////////////////////////////////////////////*/ /// @notice See if a queried _tokenId has actively voted /// @param _tokenId . /// @return True if voted, else false function voted(uint256 _tokenId) external view returns (bool); /// @notice Set the global state voter and distributor /// @dev This is only called once, at setup function setVoterAndDistributor(address _voter, address _distributor) external; /// @notice Set `voted` for _tokenId to true or false /// @dev Only callable by voter /// @param _tokenId . /// @param _voted . function voting(uint256 _tokenId, bool _voted) external; /*/////////////////////////////////////////////////////////////// DAO VOTING STORAGE //////////////////////////////////////////////////////////////*/ /// @notice The number of checkpoints for each tokenId function numCheckpoints(uint256 tokenId) external view returns (uint48); /// @notice A record of states for signing / validating signatures function nonces(address account) external view returns (uint256); /// @inheritdoc IVotes function delegates(uint256 delegator) external view returns (uint256); /// @notice A record of delegated token checkpoints for each account, by index /// @param tokenId . /// @param index . /// @return Checkpoint function checkpoints(uint256 tokenId, uint48 index) external view returns (Checkpoint memory); /// @inheritdoc IVotes function getPastVotes(address account, uint256 tokenId, uint256 timestamp) external view returns (uint256); /// @inheritdoc IVotes function getPastTotalSupply(uint256 timestamp) external view returns (uint256); /*/////////////////////////////////////////////////////////////// DAO VOTING LOGIC //////////////////////////////////////////////////////////////*/ /// @inheritdoc IVotes function delegate(uint256 delegator, uint256 delegatee) external; /// @inheritdoc IVotes function delegateBySig( uint256 delegator, uint256 delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s ) external; /*////////////////////////////////////////////////////////////// ERC6372 LOGIC //////////////////////////////////////////////////////////////*/ /// @inheritdoc IERC6372 function clock() external view returns (uint48); /// @inheritdoc IERC6372 function CLOCK_MODE() external view returns (string memory); } interface IVoter { error AlreadyVotedOrDeposited(); error DistributeWindow(); error FactoryPathNotApproved(); error GaugeAlreadyKilled(); error GaugeAlreadyRevived(); error GaugeExists(); error GaugeDoesNotExist(address _pool); error GaugeNotAlive(address _gauge); error InactiveManagedNFT(); error MaximumVotingNumberTooLow(); error NonZeroVotes(); error NotAPool(); error NotApprovedOrOwner(); error NotGovernor(); error NotEmergencyCouncil(); error NotMinter(); error NotWhitelistedNFT(); error NotWhitelistedToken(); error SameValue(); error SpecialVotingWindow(); error TooManyPools(); error UnequalLengths(); error ZeroBalance(); error ZeroAddress(); event GaugeCreated( address indexed poolFactory, address indexed votingRewardsFactory, address indexed gaugeFactory, address pool, address bribeVotingReward, address feeVotingReward, address gauge, address creator ); event GaugeKilled(address indexed gauge); event GaugeRevived(address indexed gauge); event Voted( address indexed voter, address indexed pool, uint256 indexed tokenId, uint256 weight, uint256 totalWeight, uint256 timestamp ); event Abstained( address indexed voter, address indexed pool, uint256 indexed tokenId, uint256 weight, uint256 totalWeight, uint256 timestamp ); event NotifyReward(address indexed sender, address indexed reward, uint256 amount); event DistributeReward(address indexed sender, address indexed gauge, uint256 amount); event WhitelistToken(address indexed whitelister, address indexed token, bool indexed _bool); event WhitelistNFT(address indexed whitelister, uint256 indexed tokenId, bool indexed _bool); /// @notice Store trusted forwarder address to pass into factories function forwarder() external view returns (address); /// @notice The ve token that governs these contracts function ve() external view returns (address); /// @notice Factory registry for valid pool / gauge / rewards factories function factoryRegistry() external view returns (address); /// @notice Address of Minter.sol function minter() external view returns (address); /// @notice Standard OZ IGovernor using ve for vote weights. function governor() external view returns (address); /// @notice Custom Epoch Governor using ve for vote weights. function epochGovernor() external view returns (address); /// @notice credibly neutral party similar to Curve's Emergency DAO function emergencyCouncil() external view returns (address); /// @dev Total Voting Weights function totalWeight() external view returns (uint256); /// @dev Most number of pools one voter can vote for at once function maxVotingNum() external view returns (uint256); // mappings /// @dev Pool => Gauge function gauges(address pool) external view returns (address); /// @dev Gauge => Pool function poolForGauge(address gauge) external view returns (address); /// @dev Gauge => Fees Voting Reward function gaugeToFees(address gauge) external view returns (address); /// @dev Gauge => Bribes Voting Reward function gaugeToBribe(address gauge) external view returns (address); /// @dev Pool => Weights function weights(address pool) external view returns (uint256); /// @dev NFT => Pool => Votes function votes(uint256 tokenId, address pool) external view returns (uint256); /// @dev NFT => Total voting weight of NFT function usedWeights(uint256 tokenId) external view returns (uint256); /// @dev Nft => Timestamp of last vote (ensures single vote per epoch) function lastVoted(uint256 tokenId) external view returns (uint256); /// @dev Address => Gauge function isGauge(address) external view returns (bool); /// @dev Token => Whitelisted status function isWhitelistedToken(address token) external view returns (bool); /// @dev TokenId => Whitelisted status function isWhitelistedNFT(uint256 tokenId) external view returns (bool); /// @dev Gauge => Liveness status function isAlive(address gauge) external view returns (bool); /// @dev Gauge => Amount claimable function claimable(address gauge) external view returns (uint256); /// @notice Number of pools with a Gauge function length() external view returns (uint256); /// @notice Called by Minter to distribute weekly emissions rewards for disbursement amongst gauges. /// @dev Assumes totalWeight != 0 (Will never be zero as long as users are voting). /// Throws if not called by minter. /// @param _amount Amount of rewards to distribute. function notifyRewardAmount(uint256 _amount) external; /// @dev Utility to distribute to gauges of pools in range _start to _finish. /// @param _start Starting index of gauges to distribute to. /// @param _finish Ending index of gauges to distribute to. function distribute(uint256 _start, uint256 _finish) external; /// @dev Utility to distribute to gauges of pools in array. /// @param _gauges Array of gauges to distribute to. function distribute(address[] memory _gauges) external; /// @notice Called by users to update voting balances in voting rewards contracts. /// @param _tokenId Id of veNFT whose balance you wish to update. function poke(uint256 _tokenId) external; /// @notice Called by users to vote for pools. Votes distributed proportionally based on weights. /// Can only vote or deposit into a managed NFT once per epoch. /// Can only vote for gauges that have not been killed. /// @dev Weights are distributed proportional to the sum of the weights in the array. /// Throws if length of _poolVote and _weights do not match. /// @param _tokenId Id of veNFT you are voting with. /// @param _poolVote Array of pools you are voting for. /// @param _weights Weights of pools. function vote(uint256 _tokenId, address[] calldata _poolVote, uint256[] calldata _weights) external; /// @notice Called by users to reset voting state. Required if you wish to make changes to /// veNFT state (e.g. merge, split, deposit into managed etc). /// Cannot reset in the same epoch that you voted in. /// Can vote or deposit into a managed NFT again after reset. /// @param _tokenId Id of veNFT you are reseting. function reset(uint256 _tokenId) external; /// @notice Called by users to deposit into a managed NFT. /// Can only vote or deposit into a managed NFT once per epoch. /// Note that NFTs deposited into a managed NFT will be re-locked /// to the maximum lock time on withdrawal. /// @dev Throws if not approved or owner. /// Throws if managed NFT is inactive. /// Throws if depositing within privileged window (one hour prior to epoch flip). function depositManaged(uint256 _tokenId, uint256 _mTokenId) external; /// @notice Called by users to withdraw from a managed NFT. /// Cannot do it in the same epoch that you deposited into a managed NFT. /// Can vote or deposit into a managed NFT again after withdrawing. /// Note that the NFT withdrawn is re-locked to the maximum lock time. function withdrawManaged(uint256 _tokenId) external; /// @notice Claim emissions from gauges. /// @param _gauges Array of gauges to collect emissions from. function claimRewards(address[] memory _gauges) external; /// @notice Claim bribes for a given NFT. /// @dev Utility to help batch bribe claims. /// @param _bribes Array of BribeVotingReward contracts to collect from. /// @param _tokens Array of tokens that are used as bribes. /// @param _tokenId Id of veNFT that you wish to claim bribes for. function claimBribes(address[] memory _bribes, address[][] memory _tokens, uint256 _tokenId) external; /// @notice Claim fees for a given NFT. /// @dev Utility to help batch fee claims. /// @param _fees Array of FeesVotingReward contracts to collect from. /// @param _tokens Array of tokens that are used as fees. /// @param _tokenId Id of veNFT that you wish to claim fees for. function claimFees(address[] memory _fees, address[][] memory _tokens, uint256 _tokenId) external; /// @notice Set new governor. /// @dev Throws if not called by governor. /// @param _governor . function setGovernor(address _governor) external; /// @notice Set new epoch based governor. /// @dev Throws if not called by governor. /// @param _epochGovernor . function setEpochGovernor(address _epochGovernor) external; /// @notice Set new emergency council. /// @dev Throws if not called by emergency council. /// @param _emergencyCouncil . function setEmergencyCouncil(address _emergencyCouncil) external; /// @notice Set maximum number of gauges that can be voted for. /// @dev Throws if not called by governor. /// Throws if _maxVotingNum is too low. /// Throws if the values are the same. /// @param _maxVotingNum . function setMaxVotingNum(uint256 _maxVotingNum) external; /// @notice Whitelist (or unwhitelist) token for use in bribes. /// @dev Throws if not called by governor. /// @param _token . /// @param _bool . function whitelistToken(address _token, bool _bool) external; /// @notice Whitelist (or unwhitelist) token id for voting in last hour prior to epoch flip. /// @dev Throws if not called by governor. /// Throws if already whitelisted. /// @param _tokenId . /// @param _bool . function whitelistNFT(uint256 _tokenId, bool _bool) external; /// @notice Create a new gauge (unpermissioned). /// @dev Governor can create a new gauge for a pool with any address. /// @param _poolFactory . /// @param _pool . function createGauge(address _poolFactory, address _pool) external returns (address); /// @notice Kills a gauge. The gauge will not receive any new emissions and cannot be deposited into. /// Can still withdraw from gauge. /// @dev Throws if not called by emergency council. /// Throws if gauge already killed. /// @param _gauge . function killGauge(address _gauge) external; /// @notice Revives a killed gauge. Gauge will can receive emissions and deposits again. /// @dev Throws if not called by emergency council. /// Throws if gauge is not killed. /// @param _gauge . function reviveGauge(address _gauge) external; /// @dev Update claims to emissions for an array of gauges. /// @param _gauges Array of gauges to update emissions for. function updateFor(address[] memory _gauges) external; /// @dev Update claims to emissions for gauges based on their pool id as stored in Voter. /// @param _start Starting index of pools. /// @param _end Ending index of pools. function updateFor(uint256 _start, uint256 _end) external; /// @dev Update claims to emissions for single gauge /// @param _gauge . function updateFor(address _gauge) external; } // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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); /** * @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); } // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Permit.sol) /** * @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); } // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [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://consensys.net/diligence/blog/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 functionCallWithValue(target, data, 0, "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"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or 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 { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // 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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } /** * @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)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @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"); } } } interface IReward { error InvalidReward(); error NotAuthorized(); error NotGauge(); error NotEscrowToken(); error NotSingleToken(); error NotVotingEscrow(); error NotWhitelisted(); error ZeroAmount(); event Deposit(address indexed from, uint256 indexed tokenId, uint256 amount); event Withdraw(address indexed from, uint256 indexed tokenId, uint256 amount); event NotifyReward(address indexed from, address indexed reward, uint256 indexed epoch, uint256 amount); event ClaimRewards(address indexed from, address indexed reward, uint256 amount); /// @notice A checkpoint for marking balance struct Checkpoint { uint256 timestamp; uint256 balanceOf; } /// @notice A checkpoint for marking supply struct SupplyCheckpoint { uint256 timestamp; uint256 supply; } /// @notice Epoch duration constant (7 days) function DURATION() external view returns (uint256); /// @notice Address of Voter.sol function voter() external view returns (address); /// @notice Address of VotingEscrow.sol function ve() external view returns (address); /// @dev Address which has permission to externally call _deposit() & _withdraw() function authorized() external view returns (address); /// @notice Total amount currently deposited via _deposit() function totalSupply() external view returns (uint256); /// @notice Current amount deposited by tokenId function balanceOf(uint256 tokenId) external view returns (uint256); /// @notice Amount of tokens to reward depositors for a given epoch /// @param token Address of token to reward /// @param epochStart Startime of rewards epoch /// @return Amount of token function tokenRewardsPerEpoch(address token, uint256 epochStart) external view returns (uint256); /// @notice Most recent timestamp a veNFT has claimed their rewards /// @param token Address of token rewarded /// @param tokenId veNFT unique identifier /// @return Timestamp function lastEarn(address token, uint256 tokenId) external view returns (uint256); /// @notice True if a token is or has been an active reward token, else false function isReward(address token) external view returns (bool); /// @notice The number of checkpoints for each tokenId deposited function numCheckpoints(uint256 tokenId) external view returns (uint256); /// @notice The total number of checkpoints function supplyNumCheckpoints() external view returns (uint256); /// @notice Deposit an amount into the rewards contract to earn future rewards associated to a veNFT /// @dev Internal notation used as only callable internally by `authorized`. /// @param amount Amount deposited for the veNFT /// @param tokenId Unique identifier of the veNFT function _deposit(uint256 amount, uint256 tokenId) external; /// @notice Withdraw an amount from the rewards contract associated to a veNFT /// @dev Internal notation used as only callable internally by `authorized`. /// @param amount Amount deposited for the veNFT /// @param tokenId Unique identifier of the veNFT function _withdraw(uint256 amount, uint256 tokenId) external; /// @notice Claim the rewards earned by a veNFT staker /// @param tokenId Unique identifier of the veNFT /// @param tokens Array of tokens to claim rewards of function getReward(uint256 tokenId, address[] memory tokens) external; /// @notice Add rewards for stakers to earn /// @param token Address of token to reward /// @param amount Amount of token to transfer to rewards function notifyRewardAmount(address token, uint256 amount) external; /// @notice Determine the prior balance for an account as of a block number /// @dev Block number must be a finalized block or else this function will revert to prevent misinformation. /// @param tokenId The token of the NFT to check /// @param timestamp The timestamp to get the balance at /// @return The balance the account had as of the given block function getPriorBalanceIndex(uint256 tokenId, uint256 timestamp) external view returns (uint256); /// @notice Determine the prior index of supply staked by of a timestamp /// @dev Timestamp must be <= current timestamp /// @param timestamp The timestamp to get the index at /// @return Index of supply checkpoint function getPriorSupplyIndex(uint256 timestamp) external view returns (uint256); /// @notice Get number of rewards tokens function rewardsListLength() external view returns (uint256); /// @notice Calculate how much in rewards are earned for a specific token and veNFT /// @param token Address of token to fetch rewards of /// @param tokenId Unique identifier of the veNFT /// @return Amount of token earned in rewards function earned(address token, uint256 tokenId) external view returns (uint256); } interface IFactoryRegistry { error FallbackFactory(); error InvalidFactoriesToPoolFactory(); error PathAlreadyApproved(); error PathNotApproved(); error SameAddress(); error ZeroAddress(); event Approve(address indexed poolFactory, address indexed votingRewardsFactory, address indexed gaugeFactory); event Unapprove(address indexed poolFactory, address indexed votingRewardsFactory, address indexed gaugeFactory); event SetManagedRewardsFactory(address indexed _newRewardsFactory); /// @notice Approve a set of factories used in the Protocol. /// Router.sol is able to swap any poolFactories currently approved. /// Cannot approve address(0) factories. /// Cannot aprove path that is already approved. /// Each poolFactory has one unique set and maintains state. In the case a poolFactory is unapproved /// and then re-approved, the same set of factories must be used. In other words, you cannot overwrite /// the factories tied to a poolFactory address. /// VotingRewardsFactories and GaugeFactories may use the same address across multiple poolFactories. /// @dev Callable by onlyOwner /// @param poolFactory . /// @param votingRewardsFactory . /// @param gaugeFactory . function approve(address poolFactory, address votingRewardsFactory, address gaugeFactory) external; /// @notice Unapprove a set of factories used in the Protocol. /// While a poolFactory is unapproved, Router.sol cannot swap with pools made from the corresponding factory /// Can only unapprove an approved path. /// Cannot unapprove the fallback path (core v2 factories). /// @dev Callable by onlyOwner /// @param poolFactory . function unapprove(address poolFactory) external; /// @notice Factory to create free and locked rewards for a managed veNFT function managedRewardsFactory() external view returns (address); /// @notice Set the rewards factory address /// @dev Callable by onlyOwner /// @param _newManagedRewardsFactory address of new managedRewardsFactory function setManagedRewardsFactory(address _newManagedRewardsFactory) external; /// @notice Get the factories correlated to a poolFactory. /// Once set, this can never be modified. /// Returns the correlated factories even after an approved poolFactory is unapproved. function factoriesToPoolFactory( address poolFactory ) external view returns (address votingRewardsFactory, address gaugeFactory); /// @notice Get all PoolFactories approved by the registry /// @dev The same PoolFactory address cannot be used twice /// @return Array of PoolFactory addresses function poolFactories() external view returns (address[] memory); /// @notice Check if a PoolFactory is approved within the factory registry. Router uses this method to /// ensure a pool swapped from is approved. /// @param poolFactory . /// @return True if PoolFactory is approved, else false function isPoolFactoryApproved(address poolFactory) external view returns (bool); /// @notice Get the length of the poolFactories array function poolFactoriesLength() external view returns (uint256); } interface IManagedRewardsFactory { event ManagedRewardCreated( address indexed voter, address indexed lockedManagedReward, address indexed freeManagedReward ); /// @notice creates a LockedManagedReward and a FreeManagedReward contract for a managed veNFT /// @param _forwarder Address of trusted forwarder /// @param _voter Address of Voter.sol /// @return lockedManagedReward Address of LockedManagedReward contract created /// @return freeManagedReward Address of FreeManagedReward contract created function createRewards( address _forwarder, address _voter ) external returns (address lockedManagedReward, address freeManagedReward); } // OpenZeppelin Contracts (last updated v4.7.0) (metatx/ERC2771Context.sol) // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } /** * @dev Context variant with ERC2771 support. */ abstract contract ERC2771Context is Context { /// @custom:oz-upgrades-unsafe-allow state-variable-immutable address private immutable _trustedForwarder; /// @custom:oz-upgrades-unsafe-allow constructor constructor(address trustedForwarder) { _trustedForwarder = trustedForwarder; } function isTrustedForwarder(address forwarder) public view virtual returns (bool) { return forwarder == _trustedForwarder; } function _msgSender() internal view virtual override returns (address sender) { if (isTrustedForwarder(msg.sender)) { // The assembly code is more direct than the Solidity version using `abi.decode`. /// @solidity memory-safe-assembly assembly { sender := shr(96, calldataload(sub(calldatasize(), 20))) } } else { return super._msgSender(); } } function _msgData() internal view virtual override returns (bytes calldata) { if (isTrustedForwarder(msg.sender)) { return msg.data[:msg.data.length - 20]; } else { return super._msgData(); } } } // OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol) /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } } /// @title SafeCast Library /// @author velodrome.finance /// @notice Safely convert unsigned and signed integers without overflow / underflow library SafeCastLibrary { error SafeCastOverflow(); error SafeCastUnderflow(); /// @dev Safely convert uint256 to int128 function toInt128(uint256 value) internal pure returns (int128) { if (value > uint128(type(int128).max)) revert SafeCastOverflow(); return int128(uint128(value)); } /// @dev Safely convert int128 to uint256 function toUint256(int128 value) internal pure returns (uint256) { if (value < 0) revert SafeCastUnderflow(); return uint256(int256(value)); } } library DelegationLogicLibrary { using SafeCastLibrary for int128; /// @notice Used by `_mint`, `_transferFrom`, `_burn` and `delegate` /// to update delegator voting checkpoints. /// Automatically dedelegates, then updates checkpoint. /// @dev This function depends on `_locked` and must be called prior to token state changes. /// If you wish to dedelegate only, use `_delegate(tokenId, 0)` instead. /// @param _locked State of all locked balances /// @param _numCheckpoints State of all user checkpoint counts /// @param _checkpoints State of all user checkpoints /// @param _delegates State of all user delegatees /// @param _delegator The delegator to update checkpoints for /// @param _delegatee The new delegatee for the delegator. Cannot be equal to `_delegator` (use 0 instead). /// @param _owner The new (or current) owner for the delegator function checkpointDelegator( mapping(uint256 => IVotingEscrow.LockedBalance) storage _locked, mapping(uint256 => uint48) storage _numCheckpoints, mapping(uint256 => mapping(uint48 => IVotingEscrow.Checkpoint)) storage _checkpoints, mapping(uint256 => uint256) storage _delegates, uint256 _delegator, uint256 _delegatee, address _owner ) external { uint256 delegatedBalance = _locked[_delegator].amount.toUint256(); uint48 numCheckpoint = _numCheckpoints[_delegator]; IVotingEscrow.Checkpoint storage cpOld = numCheckpoint > 0 ? _checkpoints[_delegator][numCheckpoint - 1] : _checkpoints[_delegator][0]; // Dedelegate from delegatee if delegated checkpointDelegatee(_numCheckpoints, _checkpoints, cpOld.delegatee, delegatedBalance, false); IVotingEscrow.Checkpoint storage cp = _checkpoints[_delegator][numCheckpoint]; cp.fromTimestamp = block.timestamp; cp.delegatedBalance = cpOld.delegatedBalance; cp.delegatee = _delegatee; cp.owner = _owner; if (_isCheckpointInNewBlock(_numCheckpoints, _checkpoints, _delegator)) { _numCheckpoints[_delegator]++; } else { _checkpoints[_delegator][numCheckpoint - 1] = cp; delete _checkpoints[_delegator][numCheckpoint]; } _delegates[_delegator] = _delegatee; } /// @notice Update delegatee's `delegatedBalance` by `balance`. /// Only updates if delegating to a new delegatee. /// @dev If used with `balance` == `_locked[_tokenId].amount`, then this is the same as /// delegating or dedelegating from `_tokenId` /// If used with `balance` < `_locked[_tokenId].amount`, then this is used to adjust /// `delegatedBalance` when a user's balance is modified (e.g. `increaseAmount`, `merge` etc). /// If `delegatee` is 0 (i.e. user is not delegating), then do nothing. /// @param _numCheckpoints State of all user checkpoint counts /// @param _checkpoints State of all user checkpoints /// @param _delegatee The delegatee's tokenId /// @param balance_ The delta in balance change /// @param _increase True if balance is increasing, false if decreasing function checkpointDelegatee( mapping(uint256 => uint48) storage _numCheckpoints, mapping(uint256 => mapping(uint48 => IVotingEscrow.Checkpoint)) storage _checkpoints, uint256 _delegatee, uint256 balance_, bool _increase ) public { if (_delegatee == 0) return; uint48 numCheckpoint = _numCheckpoints[_delegatee]; IVotingEscrow.Checkpoint storage cpOld = numCheckpoint > 0 ? _checkpoints[_delegatee][numCheckpoint - 1] : _checkpoints[_delegatee][0]; IVotingEscrow.Checkpoint storage cp = _checkpoints[_delegatee][numCheckpoint]; cp.fromTimestamp = block.timestamp; cp.owner = cpOld.owner; // do not expect balance_ > cpOld.delegatedBalance when decrementing but just in case cp.delegatedBalance = _increase ? cpOld.delegatedBalance + balance_ : (balance_ < cpOld.delegatedBalance ? cpOld.delegatedBalance - balance_ : 0); cp.delegatee = cpOld.delegatee; if (_isCheckpointInNewBlock(_numCheckpoints, _checkpoints, _delegatee)) { _numCheckpoints[_delegatee]++; } else { _checkpoints[_delegatee][numCheckpoint - 1] = cp; delete _checkpoints[_delegatee][numCheckpoint]; } } function _isCheckpointInNewBlock( mapping(uint256 => uint48) storage _numCheckpoints, mapping(uint256 => mapping(uint48 => IVotingEscrow.Checkpoint)) storage _checkpoints, uint256 _tokenId ) internal view returns (bool) { uint48 _nCheckPoints = _numCheckpoints[_tokenId]; if (_nCheckPoints > 0 && _checkpoints[_tokenId][_nCheckPoints - 1].fromTimestamp == block.timestamp) { return false; } else { return true; } } /// @notice Binary search to get the voting checkpoint for a token id at or prior to a given timestamp. /// @dev If a checkpoint does not exist prior to the timestamp, this will return 0. /// @param _numCheckpoints State of all user checkpoint counts /// @param _checkpoints State of all user checkpoints /// @param _tokenId . /// @param _timestamp . /// @return The index of the checkpoint. function getPastVotesIndex( mapping(uint256 => uint48) storage _numCheckpoints, mapping(uint256 => mapping(uint48 => IVotingEscrow.Checkpoint)) storage _checkpoints, uint256 _tokenId, uint256 _timestamp ) internal view returns (uint48) { uint48 nCheckpoints = _numCheckpoints[_tokenId]; if (nCheckpoints == 0) return 0; // First check most recent balance if (_checkpoints[_tokenId][nCheckpoints - 1].fromTimestamp <= _timestamp) return (nCheckpoints - 1); // Next check implicit zero balance if (_checkpoints[_tokenId][0].fromTimestamp > _timestamp) return 0; uint48 lower = 0; uint48 upper = nCheckpoints - 1; while (upper > lower) { uint48 center = upper - (upper - lower) / 2; // ceil, avoiding overflow IVotingEscrow.Checkpoint storage cp = _checkpoints[_tokenId][center]; if (cp.fromTimestamp == _timestamp) { return center; } else if (cp.fromTimestamp < _timestamp) { lower = center; } else { upper = center - 1; } } return lower; } /// @notice Retrieves historical voting balance for a token id at a given timestamp. /// @dev If a checkpoint does not exist prior to the timestamp, this will return 0. /// The user must also own the token at the time in order to receive a voting balance. /// @param _numCheckpoints State of all user checkpoint counts /// @param _checkpoints State of all user checkpoints /// @param _account . /// @param _tokenId . /// @param _timestamp . /// @return Total voting balance including delegations at a given timestamp. function getPastVotes( mapping(uint256 => uint48) storage _numCheckpoints, mapping(uint256 => mapping(uint48 => IVotingEscrow.Checkpoint)) storage _checkpoints, address _account, uint256 _tokenId, uint256 _timestamp ) external view returns (uint256) { uint48 _checkIndex = getPastVotesIndex(_numCheckpoints, _checkpoints, _tokenId, _timestamp); IVotingEscrow.Checkpoint memory lastCheckpoint = _checkpoints[_tokenId][_checkIndex]; // If no point exists prior to the given timestamp, return 0 if (lastCheckpoint.fromTimestamp > _timestamp) return 0; // Check ownership if (_account != lastCheckpoint.owner) return 0; uint256 votes = lastCheckpoint.delegatedBalance; return lastCheckpoint.delegatee == 0 ? votes + IVotingEscrow(address(this)).balanceOfNFTAt(_tokenId, _timestamp) : votes; } } library BalanceLogicLibrary { using SafeCastLibrary for uint256; using SafeCastLibrary for int128; uint256 internal constant WEEK = 1 weeks; /// @notice Binary search to get the user point index for a token id at or prior to a given timestamp /// @dev If a user point does not exist prior to the timestamp, this will return 0. /// @param _userPointEpoch State of all user point epochs /// @param _userPointHistory State of all user point history /// @param _tokenId . /// @param _timestamp . /// @return User point index function getPastUserPointIndex( mapping(uint256 => uint256) storage _userPointEpoch, mapping(uint256 => IVotingEscrow.UserPoint[1000000000]) storage _userPointHistory, uint256 _tokenId, uint256 _timestamp ) internal view returns (uint256) { uint256 _userEpoch = _userPointEpoch[_tokenId]; if (_userEpoch == 0) return 0; // First check most recent balance if (_userPointHistory[_tokenId][_userEpoch].ts <= _timestamp) return (_userEpoch); // Next check implicit zero balance if (_userPointHistory[_tokenId][1].ts > _timestamp) return 0; uint256 lower = 0; uint256 upper = _userEpoch; while (upper > lower) { uint256 center = upper - (upper - lower) / 2; // ceil, avoiding overflow IVotingEscrow.UserPoint storage userPoint = _userPointHistory[_tokenId][center]; if (userPoint.ts == _timestamp) { return center; } else if (userPoint.ts < _timestamp) { lower = center; } else { upper = center - 1; } } return lower; } /// @notice Binary search to get the global point index at or prior to a given timestamp /// @dev If a checkpoint does not exist prior to the timestamp, this will return 0. /// @param _epoch Current global point epoch /// @param _pointHistory State of all global point history /// @param _timestamp . /// @return Global point index function getPastGlobalPointIndex( uint256 _epoch, mapping(uint256 => IVotingEscrow.GlobalPoint) storage _pointHistory, uint256 _timestamp ) internal view returns (uint256) { if (_epoch == 0) return 0; // First check most recent balance if (_pointHistory[_epoch].ts <= _timestamp) return (_epoch); // Next check implicit zero balance if (_pointHistory[1].ts > _timestamp) return 0; uint256 lower = 0; uint256 upper = _epoch; while (upper > lower) { uint256 center = upper - (upper - lower) / 2; // ceil, avoiding overflow IVotingEscrow.GlobalPoint storage globalPoint = _pointHistory[center]; if (globalPoint.ts == _timestamp) { return center; } else if (globalPoint.ts < _timestamp) { lower = center; } else { upper = center - 1; } } return lower; } /// @notice Get the current voting power for `_tokenId` /// @dev Adheres to the ERC20 `balanceOf` interface for Aragon compatibility /// Fetches last user point prior to a certain timestamp, then walks forward to timestamp. /// @param _userPointEpoch State of all user point epochs /// @param _userPointHistory State of all user point history /// @param _tokenId NFT for lock /// @param _t Epoch time to return voting power at /// @return User voting power function balanceOfNFTAt( mapping(uint256 => uint256) storage _userPointEpoch, mapping(uint256 => IVotingEscrow.UserPoint[1000000000]) storage _userPointHistory, uint256 _tokenId, uint256 _t ) external view returns (uint256) { uint256 _epoch = getPastUserPointIndex(_userPointEpoch, _userPointHistory, _tokenId, _t); // epoch 0 is an empty point if (_epoch == 0) return 0; IVotingEscrow.UserPoint memory lastPoint = _userPointHistory[_tokenId][_epoch]; if (lastPoint.permanent != 0) { return lastPoint.permanent; } else { lastPoint.bias -= lastPoint.slope * (_t - lastPoint.ts).toInt128(); if (lastPoint.bias < 0) { lastPoint.bias = 0; } return lastPoint.bias.toUint256(); } } /// @notice Calculate total voting power at some point in the past /// @param _slopeChanges State of all slopeChanges /// @param _pointHistory State of all global point history /// @param _epoch The epoch to start search from /// @param _t Time to calculate the total voting power at /// @return Total voting power at that time function supplyAt( mapping(uint256 => int128) storage _slopeChanges, mapping(uint256 => IVotingEscrow.GlobalPoint) storage _pointHistory, uint256 _epoch, uint256 _t ) external view returns (uint256) { uint256 epoch_ = getPastGlobalPointIndex(_epoch, _pointHistory, _t); // epoch 0 is an empty point if (epoch_ == 0) return 0; IVotingEscrow.GlobalPoint memory _point = _pointHistory[epoch_]; int128 bias = _point.bias; int128 slope = _point.slope; uint256 ts = _point.ts; uint256 t_i = (ts / WEEK) * WEEK; for (uint256 i = 0; i < 255; ++i) { t_i += WEEK; int128 dSlope = 0; if (t_i > _t) { t_i = _t; } else { dSlope = _slopeChanges[t_i]; } bias -= slope * (t_i - ts).toInt128(); if (t_i == _t) { break; } slope += dSlope; ts = t_i; } if (bias < 0) { bias = 0; } return bias.toUint256() + _point.permanentLockBalance; } } /// @title Voting Escrow /// @notice veNFT implementation that escrows ERC-20 tokens in the form of an ERC-721 NFT /// @notice Votes have a weight depending on time, so that users are committed to the future of (whatever they are voting for) /// @author Modified from Solidly (https://github.com/solidlyexchange/solidly/blob/master/contracts/ve.sol) /// @author Modified from Curve (https://github.com/curvefi/curve-dao-contracts/blob/master/contracts/VotingEscrow.vy) /// @author velodrome.finance, @figs999, @pegahcarter /// @dev Vote weight decays linearly over time. Lock time cannot be more than `MAXTIME` (4 years). contract VotingEscrow is IVotingEscrow, ERC2771Context, ReentrancyGuard { using SafeERC20 for IERC20; using SafeCastLibrary for uint256; using SafeCastLibrary for int128; /*////////////////////////////////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////*/ /// @inheritdoc IVotingEscrow address public immutable forwarder; /// @inheritdoc IVotingEscrow address public immutable factoryRegistry; /// @inheritdoc IVotingEscrow address public immutable token; /// @inheritdoc IVotingEscrow address public distributor; /// @inheritdoc IVotingEscrow address public voter; /// @inheritdoc IVotingEscrow address public team; /// @inheritdoc IVotingEscrow address public artProxy; /// @inheritdoc IVotingEscrow address public allowedManager; mapping(uint256 => GlobalPoint) internal _pointHistory; // epoch -> unsigned global point /// @dev Mapping of interface id to bool about whether or not it's supported mapping(bytes4 => bool) internal supportedInterfaces; /// @dev ERC165 interface ID of ERC165 bytes4 internal constant ERC165_INTERFACE_ID = 0x01ffc9a7; /// @dev ERC165 interface ID of ERC721 bytes4 internal constant ERC721_INTERFACE_ID = 0x80ac58cd; /// @dev ERC165 interface ID of ERC721Metadata bytes4 internal constant ERC721_METADATA_INTERFACE_ID = 0x5b5e139f; /// @dev ERC165 interface ID of ERC4906 bytes4 internal constant ERC4906_INTERFACE_ID = 0x49064906; /// @dev ERC165 interface ID of ERC6372 bytes4 internal constant ERC6372_INTERFACE_ID = 0xda287a1d; /// @inheritdoc IVotingEscrow uint256 public tokenId; /// @param _forwarder address of trusted forwarder /// @param _token `HYDRO` token address /// @param _factoryRegistry Factory Registry address constructor(address _forwarder, address _token, address _factoryRegistry) ERC2771Context(_forwarder) { forwarder = _forwarder; token = _token; factoryRegistry = _factoryRegistry; team = _msgSender(); voter = _msgSender(); _pointHistory[0].blk = block.number; _pointHistory[0].ts = block.timestamp; supportedInterfaces[ERC165_INTERFACE_ID] = true; supportedInterfaces[ERC721_INTERFACE_ID] = true; supportedInterfaces[ERC721_METADATA_INTERFACE_ID] = true; supportedInterfaces[ERC4906_INTERFACE_ID] = true; supportedInterfaces[ERC6372_INTERFACE_ID] = true; // mint-ish emit Transfer(address(0), address(this), tokenId); // burn-ish emit Transfer(address(this), address(0), tokenId); } /*/////////////////////////////////////////////////////////////// MANAGED NFT STORAGE //////////////////////////////////////////////////////////////*/ /// @inheritdoc IVotingEscrow mapping(uint256 => EscrowType) public escrowType; /// @inheritdoc IVotingEscrow mapping(uint256 => uint256) public idToManaged; /// @inheritdoc IVotingEscrow mapping(uint256 => mapping(uint256 => uint256)) public weights; /// @inheritdoc IVotingEscrow mapping(uint256 => bool) public deactivated; /// @inheritdoc IVotingEscrow mapping(uint256 => address) public managedToLocked; /// @inheritdoc IVotingEscrow mapping(uint256 => address) public managedToFree; /*/////////////////////////////////////////////////////////////// MANAGED NFT LOGIC //////////////////////////////////////////////////////////////*/ /// @inheritdoc IVotingEscrow function createManagedLockFor(address _to) external nonReentrant returns (uint256 _mTokenId) { address sender = _msgSender(); if (sender != allowedManager && sender != IVoter(voter).governor()) revert NotGovernorOrManager(); _mTokenId = ++tokenId; _mint(_to, _mTokenId); _depositFor(_mTokenId, 0, 0, LockedBalance(0, 0, true), DepositType.CREATE_LOCK_TYPE); escrowType[_mTokenId] = EscrowType.MANAGED; (address _lockedManagedReward, address _freeManagedReward) = IManagedRewardsFactory( IFactoryRegistry(factoryRegistry).managedRewardsFactory() ).createRewards(forwarder, voter); managedToLocked[_mTokenId] = _lockedManagedReward; managedToFree[_mTokenId] = _freeManagedReward; emit CreateManaged(_to, _mTokenId, sender, _lockedManagedReward, _freeManagedReward); } /// @inheritdoc IVotingEscrow function depositManaged(uint256 _tokenId, uint256 _mTokenId) external nonReentrant { if (_msgSender() != voter) revert NotVoter(); if (escrowType[_mTokenId] != EscrowType.MANAGED) revert NotManagedNFT(); if (escrowType[_tokenId] != EscrowType.NORMAL) revert NotNormalNFT(); if (_balanceOfNFTAt(_tokenId, block.timestamp) == 0) revert ZeroBalance(); // adjust user nft int128 _amount = _locked[_tokenId].amount; if (_locked[_tokenId].isPermanent) { permanentLockBalance -= _amount.toUint256(); _delegate(_tokenId, 0); } _checkpoint(_tokenId, _locked[_tokenId], LockedBalance(0, 0, false)); _locked[_tokenId] = LockedBalance(0, 0, false); // adjust managed nft uint256 _weight = _amount.toUint256(); permanentLockBalance += _weight; LockedBalance memory newLocked = _locked[_mTokenId]; newLocked.amount += _amount; _checkpointDelegatee(_delegates[_mTokenId], _weight, true); _checkpoint(_mTokenId, _locked[_mTokenId], newLocked); _locked[_mTokenId] = newLocked; weights[_tokenId][_mTokenId] = _weight; idToManaged[_tokenId] = _mTokenId; escrowType[_tokenId] = EscrowType.LOCKED; address _lockedManagedReward = managedToLocked[_mTokenId]; IReward(_lockedManagedReward)._deposit(_weight, _tokenId); address _freeManagedReward = managedToFree[_mTokenId]; IReward(_freeManagedReward)._deposit(_weight, _tokenId); emit DepositManaged(_ownerOf(_tokenId), _tokenId, _mTokenId, _weight, block.timestamp); emit MetadataUpdate(_tokenId); } /// @inheritdoc IVotingEscrow function withdrawManaged(uint256 _tokenId) external nonReentrant { uint256 _mTokenId = idToManaged[_tokenId]; if (_msgSender() != voter) revert NotVoter(); if (_mTokenId == 0) revert InvalidManagedNFTId(); if (escrowType[_tokenId] != EscrowType.LOCKED) revert NotLockedNFT(); // update accrued rewards address _lockedManagedReward = managedToLocked[_mTokenId]; address _freeManagedReward = managedToFree[_mTokenId]; uint256 _weight = weights[_tokenId][_mTokenId]; uint256 _reward = IReward(_lockedManagedReward).earned(address(token), _tokenId); uint256 _total = _weight + _reward; uint256 _unlockTime = ((block.timestamp + MAXTIME) / WEEK) * WEEK; // claim locked rewards (rebases + compounded reward) address[] memory rewards = new address[](1); rewards[0] = address(token); IReward(_lockedManagedReward).getReward(_tokenId, rewards); // adjust user nft LockedBalance memory newLockedNormal = LockedBalance(_total.toInt128(), _unlockTime, false); _checkpoint(_tokenId, _locked[_tokenId], newLockedNormal); _locked[_tokenId] = newLockedNormal; // adjust managed nft LockedBalance memory newLockedManaged = _locked[_mTokenId]; // do not expect _total > locked.amount / permanentLockBalance but just in case newLockedManaged.amount -= ( _total.toInt128() < newLockedManaged.amount ? _total.toInt128() : newLockedManaged.amount ); permanentLockBalance -= (_total < permanentLockBalance ? _total : permanentLockBalance); _checkpointDelegatee(_delegates[_mTokenId], _total, false); _checkpoint(_mTokenId, _locked[_mTokenId], newLockedManaged); _locked[_mTokenId] = newLockedManaged; IReward(_lockedManagedReward)._withdraw(_weight, _tokenId); IReward(_freeManagedReward)._withdraw(_weight, _tokenId); delete idToManaged[_tokenId]; delete weights[_tokenId][_mTokenId]; delete escrowType[_tokenId]; emit WithdrawManaged(_ownerOf(_tokenId), _tokenId, _mTokenId, _total, block.timestamp); emit MetadataUpdate(_tokenId); } /// @inheritdoc IVotingEscrow function setAllowedManager(address _allowedManager) external { if (_msgSender() != IVoter(voter).governor()) revert NotGovernor(); if (_allowedManager == allowedManager) revert SameAddress(); if (_allowedManager == address(0)) revert ZeroAddress(); allowedManager = _allowedManager; emit SetAllowedManager(_allowedManager); } /// @inheritdoc IVotingEscrow function setManagedState(uint256 _mTokenId, bool _state) external { if (_msgSender() != IVoter(voter).emergencyCouncil() && _msgSender() != IVoter(voter).governor()) revert NotEmergencyCouncilOrGovernor(); if (escrowType[_mTokenId] != EscrowType.MANAGED) revert NotManagedNFT(); if (deactivated[_mTokenId] == _state) revert SameState(); deactivated[_mTokenId] = _state; } /*/////////////////////////////////////////////////////////////// METADATA STORAGE //////////////////////////////////////////////////////////////*/ string public constant name = "veNFT"; string public constant symbol = "veNFT"; string public constant version = "2.0.0"; uint8 public constant decimals = 18; function setTeam(address _team) external { if (_msgSender() != team) revert NotTeam(); if (_team == address(0)) revert ZeroAddress(); team = _team; } function setArtProxy(address _proxy) external { if (_msgSender() != team) revert NotTeam(); artProxy = _proxy; emit BatchMetadataUpdate(0, type(uint256).max); } /// @inheritdoc IVotingEscrow function tokenURI(uint256 _tokenId) external view returns (string memory) { if (_ownerOf(_tokenId) == address(0)) revert NonExistentToken(); return IVeArtProxy(artProxy).tokenURI(_tokenId); } /*////////////////////////////////////////////////////////////// ERC721 BALANCE/OWNER STORAGE //////////////////////////////////////////////////////////////*/ /// @dev Mapping from NFT ID to the address that owns it. mapping(uint256 => address) internal idToOwner; /// @dev Mapping from owner address to count of his tokens. mapping(address => uint256) internal ownerToNFTokenCount; function _ownerOf(uint256 _tokenId) internal view returns (address) { return idToOwner[_tokenId]; } /// @inheritdoc IVotingEscrow function ownerOf(uint256 _tokenId) external view returns (address) { return _ownerOf(_tokenId); } /// @inheritdoc IVotingEscrow function balanceOf(address _owner) external view returns (uint256) { return ownerToNFTokenCount[_owner]; } /*////////////////////////////////////////////////////////////// ERC721 APPROVAL STORAGE //////////////////////////////////////////////////////////////*/ /// @dev Mapping from NFT ID to approved address. mapping(uint256 => address) internal idToApprovals; /// @dev Mapping from owner address to mapping of operator addresses. mapping(address => mapping(address => bool)) internal ownerToOperators; mapping(uint256 => uint256) internal ownershipChange; /// @inheritdoc IVotingEscrow function getApproved(uint256 _tokenId) external view returns (address) { return idToApprovals[_tokenId]; } /// @inheritdoc IVotingEscrow function isApprovedForAll(address _owner, address _operator) external view returns (bool) { return (ownerToOperators[_owner])[_operator]; } /// @inheritdoc IVotingEscrow function isApprovedOrOwner(address _spender, uint256 _tokenId) external view returns (bool) { return _isApprovedOrOwner(_spender, _tokenId); } function _isApprovedOrOwner(address _spender, uint256 _tokenId) internal view returns (bool) { address owner = _ownerOf(_tokenId); bool spenderIsOwner = owner == _spender; bool spenderIsApproved = _spender == idToApprovals[_tokenId]; bool spenderIsApprovedForAll = (ownerToOperators[owner])[_spender]; return spenderIsOwner || spenderIsApproved || spenderIsApprovedForAll; } /*////////////////////////////////////////////////////////////// ERC721 LOGIC //////////////////////////////////////////////////////////////*/ /// @inheritdoc IVotingEscrow function approve(address _approved, uint256 _tokenId) external { address sender = _msgSender(); address owner = _ownerOf(_tokenId); // Throws if `_tokenId` is not a valid NFT if (owner == address(0)) revert ZeroAddress(); // Throws if `_approved` is the current owner if (owner == _approved) revert SameAddress(); // Check requirements bool senderIsOwner = (_ownerOf(_tokenId) == sender); bool senderIsApprovedForAll = (ownerToOperators[owner])[sender]; if (!senderIsOwner && !senderIsApprovedForAll) revert NotApprovedOrOwner(); // Set the approval idToApprovals[_tokenId] = _approved; emit Approval(owner, _approved, _tokenId); } /// @inheritdoc IVotingEscrow function setApprovalForAll(address _operator, bool _approved) external { address sender = _msgSender(); // Throws if `_operator` is the `msg.sender` if (_operator == sender) revert SameAddress(); ownerToOperators[sender][_operator] = _approved; emit ApprovalForAll(sender, _operator, _approved); } /* TRANSFER FUNCTIONS */ function _transferFrom(address _from, address _to, uint256 _tokenId, address _sender) internal { if (escrowType[_tokenId] == EscrowType.LOCKED) revert NotManagedOrNormalNFT(); // Check requirements if (!_isApprovedOrOwner(_sender, _tokenId)) revert NotApprovedOrOwner(); // Clear approval. Throws if `_from` is not the current owner if (_ownerOf(_tokenId) != _from) revert NotOwner(); delete idToApprovals[_tokenId]; // Remove NFT. Throws if `_tokenId` is not a valid NFT _removeTokenFrom(_from, _tokenId); // Update voting checkpoints _checkpointDelegator(_tokenId, 0, _to); // Add NFT _addTokenTo(_to, _tokenId); // Set the block of ownership transfer (for Flash NFT protection) ownershipChange[_tokenId] = block.number; // Log the transfer emit Transfer(_from, _to, _tokenId); } /// @inheritdoc IVotingEscrow function transferFrom(address _from, address _to, uint256 _tokenId) external { _transferFrom(_from, _to, _tokenId, _msgSender()); } /// @inheritdoc IVotingEscrow function safeTransferFrom(address _from, address _to, uint256 _tokenId) external { safeTransferFrom(_from, _to, _tokenId, ""); } function _isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /// @inheritdoc IVotingEscrow function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes memory _data) public { address sender = _msgSender(); _transferFrom(_from, _to, _tokenId, sender); if (_isContract(_to)) { // Throws if transfer destination is a contract which does not implement 'onERC721Received' try IERC721Receiver(_to).onERC721Received(sender, _from, _tokenId, _data) returns (bytes4 response) { if (response != IERC721Receiver(_to).onERC721Received.selector) { revert ERC721ReceiverRejectedTokens(); } } catch (bytes memory reason) { if (reason.length == 0) { revert ERC721TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } } /*////////////////////////////////////////////////////////////// ERC165 LOGIC //////////////////////////////////////////////////////////////*/ /// @inheritdoc IVotingEscrow function supportsInterface(bytes4 _interfaceID) external view returns (bool) { return supportedInterfaces[_interfaceID]; } /*////////////////////////////////////////////////////////////// INTERNAL MINT/BURN LOGIC //////////////////////////////////////////////////////////////*/ /// @inheritdoc IVotingEscrow mapping(address => mapping(uint256 => uint256)) public ownerToNFTokenIdList; /// @dev Mapping from NFT ID to index of owner mapping(uint256 => uint256) internal tokenToOwnerIndex; /// @dev Add a NFT to an index mapping to a given address /// @param _to address of the receiver /// @param _tokenId uint ID Of the token to be added function _addTokenToOwnerList(address _to, uint256 _tokenId) internal { uint256 currentCount = ownerToNFTokenCount[_to]; ownerToNFTokenIdList[_to][currentCount] = _tokenId; tokenToOwnerIndex[_tokenId] = currentCount; } /// @dev Add a NFT to a given address /// Throws if `_tokenId` is owned by someone. function _addTokenTo(address _to, uint256 _tokenId) internal { // Throws if `_tokenId` is owned by someone assert(_ownerOf(_tokenId) == address(0)); // Change the owner idToOwner[_tokenId] = _to; // Update owner token index tracking _addTokenToOwnerList(_to, _tokenId); // Change count tracking ownerToNFTokenCount[_to] += 1; } /// @dev Function to mint tokens /// Throws if `_to` is zero address. /// Throws if `_tokenId` is owned by someone. /// @param _to The address that will receive the minted tokens. /// @param _tokenId The token id to mint. /// @return A boolean that indicates if the operation was successful. function _mint(address _to, uint256 _tokenId) internal returns (bool) { // Throws if `_to` is zero address assert(_to != address(0)); // Add NFT. Throws if `_tokenId` is owned by someone _addTokenTo(_to, _tokenId); // Update voting checkpoints _checkpointDelegator(_tokenId, 0, _to); emit Transfer(address(0), _to, _tokenId); return true; } /// @dev Remove a NFT from an index mapping to a given address /// @param _from address of the sender /// @param _tokenId uint ID Of the token to be removed function _removeTokenFromOwnerList(address _from, uint256 _tokenId) internal { // Delete uint256 currentCount = ownerToNFTokenCount[_from] - 1; uint256 currentIndex = tokenToOwnerIndex[_tokenId]; if (currentCount == currentIndex) { // update ownerToNFTokenIdList ownerToNFTokenIdList[_from][currentCount] = 0; // update tokenToOwnerIndex tokenToOwnerIndex[_tokenId] = 0; } else { uint256 lastTokenId = ownerToNFTokenIdList[_from][currentCount]; // Add // update ownerToNFTokenIdList ownerToNFTokenIdList[_from][currentIndex] = lastTokenId; // update tokenToOwnerIndex tokenToOwnerIndex[lastTokenId] = currentIndex; // Delete // update ownerToNFTokenIdList ownerToNFTokenIdList[_from][currentCount] = 0; // update tokenToOwnerIndex tokenToOwnerIndex[_tokenId] = 0; } } /// @dev Remove a NFT from a given address /// Throws if `_from` is not the current owner. function _removeTokenFrom(address _from, uint256 _tokenId) internal { // Throws if `_from` is not the current owner assert(_ownerOf(_tokenId) == _from); // Change the owner idToOwner[_tokenId] = address(0); // Update owner token index tracking _removeTokenFromOwnerList(_from, _tokenId); // Change count tracking ownerToNFTokenCount[_from] -= 1; } /// @dev Must be called prior to updating `LockedBalance` function _burn(uint256 _tokenId) internal { address sender = _msgSender(); if (!_isApprovedOrOwner(sender, _tokenId)) revert NotApprovedOrOwner(); address owner = _ownerOf(_tokenId); // Clear approval delete idToApprovals[_tokenId]; // Update voting checkpoints _checkpointDelegator(_tokenId, 0, address(0)); // Remove token _removeTokenFrom(owner, _tokenId); emit Transfer(owner, address(0), _tokenId); } /*////////////////////////////////////////////////////////////// ESCROW STORAGE //////////////////////////////////////////////////////////////*/ uint256 internal constant WEEK = 1 weeks; uint256 internal constant MAXTIME = 4 * 365 * 86400; int128 internal constant iMAXTIME = 4 * 365 * 86400; uint256 internal constant MULTIPLIER = 1 ether; /// @inheritdoc IVotingEscrow uint256 public epoch; /// @inheritdoc IVotingEscrow uint256 public supply; mapping(uint256 => LockedBalance) internal _locked; mapping(uint256 => UserPoint[1000000000]) internal _userPointHistory; mapping(uint256 => uint256) public userPointEpoch; /// @inheritdoc IVotingEscrow mapping(uint256 => int128) public slopeChanges; /// @inheritdoc IVotingEscrow mapping(address => bool) public canSplit; /// @inheritdoc IVotingEscrow uint256 public permanentLockBalance; /// @inheritdoc IVotingEscrow function locked(uint256 _tokenId) external view returns (LockedBalance memory) { return _locked[_tokenId]; } /// @inheritdoc IVotingEscrow function userPointHistory(uint256 _tokenId, uint256 _loc) external view returns (UserPoint memory) { return _userPointHistory[_tokenId][_loc]; } /// @inheritdoc IVotingEscrow function pointHistory(uint256 _loc) external view returns (GlobalPoint memory) { return _pointHistory[_loc]; } /*////////////////////////////////////////////////////////////// ESCROW LOGIC //////////////////////////////////////////////////////////////*/ /// @notice Record global and per-user data to checkpoints. Used by VotingEscrow system. /// @param _tokenId NFT token ID. No user checkpoint if 0 /// @param _oldLocked Pevious locked amount / end lock time for the user /// @param _newLocked New locked amount / end lock time for the user function _checkpoint(uint256 _tokenId, LockedBalance memory _oldLocked, LockedBalance memory _newLocked) internal { UserPoint memory uOld; UserPoint memory uNew; int128 oldDslope = 0; int128 newDslope = 0; uint256 _epoch = epoch; if (_tokenId != 0) { uNew.permanent = _newLocked.isPermanent ? _newLocked.amount.toUint256() : 0; // Calculate slopes and biases // Kept at zero when they have to if (_oldLocked.end > block.timestamp && _oldLocked.amount > 0) { uOld.slope = _oldLocked.amount / iMAXTIME; uOld.bias = uOld.slope * (_oldLocked.end - block.timestamp).toInt128(); } if (_newLocked.end > block.timestamp && _newLocked.amount > 0) { uNew.slope = _newLocked.amount / iMAXTIME; uNew.bias = uNew.slope * (_newLocked.end - block.timestamp).toInt128(); } // Read values of scheduled changes in the slope // _oldLocked.end can be in the past and in the future // _newLocked.end can ONLY by in the FUTURE unless everything expired: than zeros oldDslope = slopeChanges[_oldLocked.end]; if (_newLocked.end != 0) { if (_newLocked.end == _oldLocked.end) { newDslope = oldDslope; } else { newDslope = slopeChanges[_newLocked.end]; } } } GlobalPoint memory lastPoint = GlobalPoint({ bias: 0, slope: 0, ts: block.timestamp, blk: block.number, permanentLockBalance: 0 }); if (_epoch > 0) { lastPoint = _pointHistory[_epoch]; } uint256 lastCheckpoint = lastPoint.ts; // initialLastPoint is used for extrapolation to calculate block number // (approximately, for *At methods) and save them // as we cannot figure that out exactly from inside the contract GlobalPoint memory initialLastPoint = GlobalPoint({ bias: lastPoint.bias, slope: lastPoint.slope, ts: lastPoint.ts, blk: lastPoint.blk, permanentLockBalance: lastPoint.permanentLockBalance }); uint256 blockSlope = 0; // dblock/dt if (block.timestamp > lastPoint.ts) { blockSlope = (MULTIPLIER * (block.number - lastPoint.blk)) / (block.timestamp - lastPoint.ts); } // If last point is already recorded in this block, slope=0 // But that's ok b/c we know the block in such case // Go over weeks to fill history and calculate what the current point is { uint256 t_i = (lastCheckpoint / WEEK) * WEEK; for (uint256 i = 0; i < 255; ++i) { // Hopefully it won't happen that this won't get used in 5 years! // If it does, users will be able to withdraw but vote weight will be broken t_i += WEEK; // Initial value of t_i is always larger than the ts of the last point int128 d_slope = 0; if (t_i > block.timestamp) { t_i = block.timestamp; } else { d_slope = slopeChanges[t_i]; } lastPoint.bias -= lastPoint.slope * (t_i - lastCheckpoint).toInt128(); lastPoint.slope += d_slope; if (lastPoint.bias < 0) { // This can happen lastPoint.bias = 0; } if (lastPoint.slope < 0) { // This cannot happen - just in case lastPoint.slope = 0; } lastCheckpoint = t_i; lastPoint.ts = t_i; lastPoint.blk = initialLastPoint.blk + (blockSlope * (t_i - initialLastPoint.ts)) / MULTIPLIER; _epoch += 1; if (t_i == block.timestamp) { lastPoint.blk = block.number; break; } else { _pointHistory[_epoch] = lastPoint; } } } if (_tokenId != 0) { // If last point was in this block, the slope change has been applied already // But in such case we have 0 slope(s) lastPoint.slope += (uNew.slope - uOld.slope); lastPoint.bias += (uNew.bias - uOld.bias); if (lastPoint.slope < 0) { lastPoint.slope = 0; } if (lastPoint.bias < 0) { lastPoint.bias = 0; } lastPoint.permanentLockBalance = permanentLockBalance; } // If timestamp of last global point is the same, overwrite the last global point // Else record the new global point into history // Exclude epoch 0 (note: _epoch is always >= 1, see above) // Two possible outcomes: // Missing global checkpoints in prior weeks. In this case, _epoch = epoch + x, where x > 1 // No missing global checkpoints, but timestamp != block.timestamp. Create new checkpoint. // No missing global checkpoints, but timestamp == block.timestamp. Overwrite last checkpoint. if (_epoch != 1 && _pointHistory[_epoch - 1].ts == block.timestamp) { // _epoch = epoch + 1, so we do not increment epoch _pointHistory[_epoch - 1] = lastPoint; } else { // more than one global point may have been written, so we update epoch epoch = _epoch; _pointHistory[_epoch] = lastPoint; } if (_tokenId != 0) { // Schedule the slope changes (slope is going down) // We subtract new_user_slope from [_newLocked.end] // and add old_user_slope to [_oldLocked.end] if (_oldLocked.end > block.timestamp) { // oldDslope was <something> - uOld.slope, so we cancel that oldDslope += uOld.slope; if (_newLocked.end == _oldLocked.end) { oldDslope -= uNew.slope; // It was a new deposit, not extension } slopeChanges[_oldLocked.end] = oldDslope; } if (_newLocked.end > block.timestamp) { // update slope if new lock is greater than old lock and is not permanent or if old lock is permanent if ((_newLocked.end > _oldLocked.end)) { newDslope -= uNew.slope; // old slope disappeared at this point slopeChanges[_newLocked.end] = newDslope; } // else: we recorded it already in oldDslope } // If timestamp of last user point is the same, overwrite the last user point // Else record the new user point into history // Exclude epoch 0 uNew.ts = block.timestamp; uNew.blk = block.number; uint256 userEpoch = userPointEpoch[_tokenId]; if (userEpoch != 0 && _userPointHistory[_tokenId][userEpoch].ts == block.timestamp) { _userPointHistory[_tokenId][userEpoch] = uNew; } else { userPointEpoch[_tokenId] = ++userEpoch; _userPointHistory[_tokenId][userEpoch] = uNew; } } } /// @notice Deposit and lock tokens for a user /// @param _tokenId NFT that holds lock /// @param _value Amount to deposit /// @param _unlockTime New time when to unlock the tokens, or 0 if unchanged /// @param _oldLocked Previous locked amount / timestamp /// @param _depositType The type of deposit function _depositFor( uint256 _tokenId, uint256 _value, uint256 _unlockTime, LockedBalance memory _oldLocked, DepositType _depositType ) internal { uint256 supplyBefore = supply; supply = supplyBefore + _value; // Set newLocked to _oldLocked without mangling memory LockedBalance memory newLocked; (newLocked.amount, newLocked.end, newLocked.isPermanent) = ( _oldLocked.amount, _oldLocked.end, _oldLocked.isPermanent ); // Adding to existing lock, or if a lock is expired - creating a new one newLocked.amount += _value.toInt128(); if (_unlockTime != 0) { newLocked.end = _unlockTime; } _locked[_tokenId] = newLocked; // Possibilities: // Both _oldLocked.end could be current or expired (>/< block.timestamp) // or if the lock is a permanent lock, then _oldLocked.end == 0 // value == 0 (extend lock) or value > 0 (add to lock or extend lock) // newLocked.end > block.timestamp (always) _checkpoint(_tokenId, _oldLocked, newLocked); address from = _msgSender(); if (_value != 0) { IERC20(token).safeTransferFrom(from, address(this), _value); } emit Deposit(from, _tokenId, _depositType, _value, newLocked.end, block.timestamp); emit Supply(supplyBefore, supplyBefore + _value); } /// @inheritdoc IVotingEscrow function checkpoint() external nonReentrant { _checkpoint(0, LockedBalance(0, 0, false), LockedBalance(0, 0, false)); } /// @inheritdoc IVotingEscrow function depositFor(uint256 _tokenId, uint256 _value) external nonReentrant { if (escrowType[_tokenId] == EscrowType.MANAGED && _msgSender() != distributor) revert NotDistributor(); _increaseAmountFor(_tokenId, _value, DepositType.DEPOSIT_FOR_TYPE); } /// @dev Deposit `_value` tokens for `_to` and lock for `_lockDuration` /// @param _value Amount to deposit /// @param _lockDuration Number of seconds to lock tokens for (rounded down to nearest week) /// @param _to Address to deposit function _createLock(uint256 _value, uint256 _lockDuration, address _to) internal returns (uint256) { uint256 unlockTime = ((block.timestamp + _lockDuration) / WEEK) * WEEK; // Locktime is rounded down to weeks if (_value == 0) revert ZeroAmount(); if (unlockTime <= block.timestamp) revert LockDurationNotInFuture(); if (unlockTime > block.timestamp + MAXTIME) revert LockDurationTooLong(); uint256 _tokenId = ++tokenId; _mint(_to, _tokenId); _depositFor(_tokenId, _value, unlockTime, _locked[_tokenId], DepositType.CREATE_LOCK_TYPE); return _tokenId; } /// @inheritdoc IVotingEscrow function createLock(uint256 _value, uint256 _lockDuration) external nonReentrant returns (uint256) { return _createLock(_value, _lockDuration, _msgSender()); } /// @inheritdoc IVotingEscrow function createLockFor(uint256 _value, uint256 _lockDuration, address _to) external nonReentrant returns (uint256) { return _createLock(_value, _lockDuration, _to); } function _increaseAmountFor(uint256 _tokenId, uint256 _value, DepositType _depositType) internal { EscrowType _escrowType = escrowType[_tokenId]; if (_escrowType == EscrowType.LOCKED) revert NotManagedOrNormalNFT(); LockedBalance memory oldLocked = _locked[_tokenId]; if (_value == 0) revert ZeroAmount(); if (oldLocked.amount <= 0) revert NoLockFound(); if (oldLocked.end <= block.timestamp && !oldLocked.isPermanent) revert LockExpired(); if (oldLocked.isPermanent) permanentLockBalance += _value; _checkpointDelegatee(_delegates[_tokenId], _value, true); _depositFor(_tokenId, _value, 0, oldLocked, _depositType); if (_escrowType == EscrowType.MANAGED) { // increaseAmount called on managed tokens are treated as locked rewards address _lockedManagedReward = managedToLocked[_tokenId]; address _token = token; IERC20(_token).safeApprove(_lockedManagedReward, _value); IReward(_lockedManagedReward).notifyRewardAmount(_token, _value); IERC20(_token).safeApprove(_lockedManagedReward, 0); } emit MetadataUpdate(_tokenId); } /// @inheritdoc IVotingEscrow function increaseAmount(uint256 _tokenId, uint256 _value) external nonReentrant { if (!_isApprovedOrOwner(_msgSender(), _tokenId)) revert NotApprovedOrOwner(); _increaseAmountFor(_tokenId, _value, DepositType.INCREASE_LOCK_AMOUNT); } /// @inheritdoc IVotingEscrow function increaseUnlockTime(uint256 _tokenId, uint256 _lockDuration) external nonReentrant { if (!_isApprovedOrOwner(_msgSender(), _tokenId)) revert NotApprovedOrOwner(); if (escrowType[_tokenId] != EscrowType.NORMAL) revert NotNormalNFT(); LockedBalance memory oldLocked = _locked[_tokenId]; if (oldLocked.isPermanent) revert PermanentLock(); uint256 unlockTime = ((block.timestamp + _lockDuration) / WEEK) * WEEK; // Locktime is rounded down to weeks if (oldLocked.end <= block.timestamp) revert LockExpired(); if (oldLocked.amount <= 0) revert NoLockFound(); if (unlockTime <= oldLocked.end) revert LockDurationNotInFuture(); if (unlockTime > block.timestamp + MAXTIME) revert LockDurationTooLong(); _depositFor(_tokenId, 0, unlockTime, oldLocked, DepositType.INCREASE_UNLOCK_TIME); emit MetadataUpdate(_tokenId); } /// @inheritdoc IVotingEscrow function withdraw(uint256 _tokenId) external nonReentrant { address sender = _msgSender(); if (!_isApprovedOrOwner(sender, _tokenId)) revert NotApprovedOrOwner(); if (voted[_tokenId]) revert AlreadyVoted(); if (escrowType[_tokenId] != EscrowType.NORMAL) revert NotNormalNFT(); LockedBalance memory oldLocked = _locked[_tokenId]; if (oldLocked.isPermanent) revert PermanentLock(); if (block.timestamp < oldLocked.end) revert LockNotExpired(); uint256 value = oldLocked.amount.toUint256(); // Burn the NFT _burn(_tokenId); _locked[_tokenId] = LockedBalance(0, 0, false); uint256 supplyBefore = supply; supply = supplyBefore - value; // oldLocked can have either expired <= timestamp or zero end // oldLocked has only 0 end // Both can have >= 0 amount _checkpoint(_tokenId, oldLocked, LockedBalance(0, 0, false)); IERC20(token).safeTransfer(sender, value); emit Withdraw(sender, _tokenId, value, block.timestamp); emit Supply(supplyBefore, supplyBefore - value); } /// @inheritdoc IVotingEscrow function merge(uint256 _from, uint256 _to) external nonReentrant { address sender = _msgSender(); if (voted[_from]) revert AlreadyVoted(); if (escrowType[_from] != EscrowType.NORMAL) revert NotNormalNFT(); if (escrowType[_to] != EscrowType.NORMAL) revert NotNormalNFT(); if (_from == _to) revert SameNFT(); if (!_isApprovedOrOwner(sender, _from)) revert NotApprovedOrOwner(); if (!_isApprovedOrOwner(sender, _to)) revert NotApprovedOrOwner(); LockedBalance memory oldLockedTo = _locked[_to]; if (oldLockedTo.end <= block.timestamp && !oldLockedTo.isPermanent) revert LockExpired(); LockedBalance memory oldLockedFrom = _locked[_from]; if (oldLockedFrom.isPermanent) revert PermanentLock(); uint256 end = oldLockedFrom.end >= oldLockedTo.end ? oldLockedFrom.end : oldLockedTo.end; _burn(_from); _locked[_from] = LockedBalance(0, 0, false); _checkpoint(_from, oldLockedFrom, LockedBalance(0, 0, false)); LockedBalance memory newLockedTo; newLockedTo.amount = oldLockedTo.amount + oldLockedFrom.amount; newLockedTo.isPermanent = oldLockedTo.isPermanent; if (newLockedTo.isPermanent) { permanentLockBalance += oldLockedFrom.amount.toUint256(); } else { newLockedTo.end = end; } _checkpointDelegatee(_delegates[_to], oldLockedFrom.amount.toUint256(), true); _checkpoint(_to, oldLockedTo, newLockedTo); _locked[_to] = newLockedTo; emit Merge( sender, _from, _to, oldLockedFrom.amount.toUint256(), oldLockedTo.amount.toUint256(), newLockedTo.amount.toUint256(), newLockedTo.end, block.timestamp ); emit MetadataUpdate(_to); } /// @inheritdoc IVotingEscrow function split( uint256 _from, uint256 _amount ) external nonReentrant returns (uint256 _tokenId1, uint256 _tokenId2) { address sender = _msgSender(); address owner = _ownerOf(_from); if (owner == address(0)) revert SplitNoOwner(); if (!canSplit[owner] && !canSplit[address(0)]) revert SplitNotAllowed(); if (escrowType[_from] != EscrowType.NORMAL) revert NotNormalNFT(); if (voted[_from]) revert AlreadyVoted(); if (!_isApprovedOrOwner(sender, _from)) revert NotApprovedOrOwner(); LockedBalance memory newLocked = _locked[_from]; if (newLocked.end <= block.timestamp && !newLocked.isPermanent) revert LockExpired(); int128 _splitAmount = _amount.toInt128(); if (_splitAmount == 0) revert ZeroAmount(); if (newLocked.amount <= _splitAmount) revert AmountTooBig(); // Zero out and burn old veNFT _burn(_from); _locked[_from] = LockedBalance(0, 0, false); _checkpoint(_from, newLocked, LockedBalance(0, 0, false)); // Create new veNFT using old balance - amount newLocked.amount -= _splitAmount; _tokenId1 = _createSplitNFT(owner, newLocked); // Create new veNFT using amount newLocked.amount = _splitAmount; _tokenId2 = _createSplitNFT(owner, newLocked); emit Split( _from, _tokenId1, _tokenId2, sender, _locked[_tokenId1].amount.toUint256(), _splitAmount.toUint256(), newLocked.end, block.timestamp ); } function _createSplitNFT(address _to, LockedBalance memory _newLocked) private returns (uint256 _tokenId) { _tokenId = ++tokenId; _locked[_tokenId] = _newLocked; _checkpoint(_tokenId, LockedBalance(0, 0, false), _newLocked); _mint(_to, _tokenId); } /// @inheritdoc IVotingEscrow function toggleSplit(address _account, bool _bool) external { if (_msgSender() != team) revert NotTeam(); canSplit[_account] = _bool; } /// @inheritdoc IVotingEscrow function lockPermanent(uint256 _tokenId) external { address sender = _msgSender(); if (!_isApprovedOrOwner(sender, _tokenId)) revert NotApprovedOrOwner(); if (escrowType[_tokenId] != EscrowType.NORMAL) revert NotNormalNFT(); LockedBalance memory _newLocked = _locked[_tokenId]; if (_newLocked.isPermanent) revert PermanentLock(); if (_newLocked.end <= block.timestamp) revert LockExpired(); if (_newLocked.amount <= 0) revert NoLockFound(); uint256 _amount = _newLocked.amount.toUint256(); permanentLockBalance += _amount; _newLocked.end = 0; _newLocked.isPermanent = true; _checkpoint(_tokenId, _locked[_tokenId], _newLocked); _locked[_tokenId] = _newLocked; emit LockPermanent(sender, _tokenId, _amount, block.timestamp); emit MetadataUpdate(_tokenId); } /// @inheritdoc IVotingEscrow function unlockPermanent(uint256 _tokenId) external { address sender = _msgSender(); if (!_isApprovedOrOwner(sender, _tokenId)) revert NotApprovedOrOwner(); if (escrowType[_tokenId] != EscrowType.NORMAL) revert NotNormalNFT(); if (voted[_tokenId]) revert AlreadyVoted(); LockedBalance memory _newLocked = _locked[_tokenId]; if (!_newLocked.isPermanent) revert NotPermanentLock(); uint256 _amount = _newLocked.amount.toUint256(); permanentLockBalance -= _amount; _newLocked.end = ((block.timestamp + MAXTIME) / WEEK) * WEEK; _newLocked.isPermanent = false; _delegate(_tokenId, 0); _checkpoint(_tokenId, _locked[_tokenId], _newLocked); _locked[_tokenId] = _newLocked; emit UnlockPermanent(sender, _tokenId, _amount, block.timestamp); emit MetadataUpdate(_tokenId); } /*/////////////////////////////////////////////////////////////// GAUGE VOTING STORAGE //////////////////////////////////////////////////////////////*/ function _balanceOfNFTAt(uint256 _tokenId, uint256 _t) internal view returns (uint256) { return BalanceLogicLibrary.balanceOfNFTAt(userPointEpoch, _userPointHistory, _tokenId, _t); } function _supplyAt(uint256 _timestamp) internal view returns (uint256) { return BalanceLogicLibrary.supplyAt(slopeChanges, _pointHistory, epoch, _timestamp); } /// @inheritdoc IVotingEscrow function balanceOfNFT(uint256 _tokenId) public view returns (uint256) { if (ownershipChange[_tokenId] == block.number) return 0; return _balanceOfNFTAt(_tokenId, block.timestamp); } /// @inheritdoc IVotingEscrow function balanceOfNFTAt(uint256 _tokenId, uint256 _t) external view returns (uint256) { return _balanceOfNFTAt(_tokenId, _t); } /// @inheritdoc IVotingEscrow function totalSupply() external view returns (uint256) { return _supplyAt(block.timestamp); } /// @inheritdoc IVotingEscrow function totalSupplyAt(uint256 _timestamp) external view returns (uint256) { return _supplyAt(_timestamp); } /*/////////////////////////////////////////////////////////////// GAUGE VOTING LOGIC //////////////////////////////////////////////////////////////*/ /// @inheritdoc IVotingEscrow mapping(uint256 => bool) public voted; /// @inheritdoc IVotingEscrow function setVoterAndDistributor(address _voter, address _distributor) external { if (_msgSender() != voter) revert NotVoter(); voter = _voter; distributor = _distributor; } /// @inheritdoc IVotingEscrow function voting(uint256 _tokenId, bool _voted) external { if (_msgSender() != voter) revert NotVoter(); voted[_tokenId] = _voted; } /*/////////////////////////////////////////////////////////////// DAO VOTING STORAGE //////////////////////////////////////////////////////////////*/ /// @notice The EIP-712 typehash for the contract's domain bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); /// @notice The EIP-712 typehash for the delegation struct used by the contract bytes32 public constant DELEGATION_TYPEHASH = keccak256("Delegation(uint256 delegator,uint256 delegatee,uint256 nonce,uint256 expiry)"); /// @notice A record of each accounts delegate mapping(uint256 => uint256) private _delegates; /// @notice A record of delegated token checkpoints for each tokenId, by index mapping(uint256 => mapping(uint48 => Checkpoint)) private _checkpoints; /// @inheritdoc IVotingEscrow mapping(uint256 => uint48) public numCheckpoints; /// @inheritdoc IVotingEscrow mapping(address => uint256) public nonces; /// @inheritdoc IVotingEscrow function delegates(uint256 delegator) external view returns (uint256) { return _delegates[delegator]; } /// @inheritdoc IVotingEscrow function checkpoints(uint256 _tokenId, uint48 _index) external view returns (Checkpoint memory) { return _checkpoints[_tokenId][_index]; } /// @inheritdoc IVotingEscrow function getPastVotes(address _account, uint256 _tokenId, uint256 _timestamp) external view returns (uint256) { return DelegationLogicLibrary.getPastVotes(numCheckpoints, _checkpoints, _account, _tokenId, _timestamp); } /// @inheritdoc IVotingEscrow function getPastTotalSupply(uint256 _timestamp) external view returns (uint256) { return _supplyAt(_timestamp); } /*/////////////////////////////////////////////////////////////// DAO VOTING LOGIC //////////////////////////////////////////////////////////////*/ function _checkpointDelegator(uint256 _delegator, uint256 _delegatee, address _owner) internal { DelegationLogicLibrary.checkpointDelegator( _locked, numCheckpoints, _checkpoints, _delegates, _delegator, _delegatee, _owner ); } function _checkpointDelegatee(uint256 _delegatee, uint256 balance_, bool _increase) internal { DelegationLogicLibrary.checkpointDelegatee(numCheckpoints, _checkpoints, _delegatee, balance_, _increase); } /// @notice Record user delegation checkpoints. Used by voting system. /// @dev Skips delegation if already delegated to `delegatee`. function _delegate(uint256 _delegator, uint256 _delegatee) internal { LockedBalance memory delegateLocked = _locked[_delegator]; if (!delegateLocked.isPermanent) revert NotPermanentLock(); if (_delegatee != 0 && _ownerOf(_delegatee) == address(0)) revert NonExistentToken(); if (ownershipChange[_delegator] == block.number) revert OwnershipChange(); if (_delegatee == _delegator) _delegatee = 0; uint256 currentDelegate = _delegates[_delegator]; if (currentDelegate == _delegatee) return; uint256 delegatedBalance = delegateLocked.amount.toUint256(); _checkpointDelegator(_delegator, _delegatee, _ownerOf(_delegator)); _checkpointDelegatee(_delegatee, delegatedBalance, true); emit DelegateChanged(_msgSender(), currentDelegate, _delegatee); } /// @inheritdoc IVotingEscrow function delegate(uint256 delegator, uint256 delegatee) external { if (!_isApprovedOrOwner(_msgSender(), delegator)) revert NotApprovedOrOwner(); return _delegate(delegator, delegatee); } /// @inheritdoc IVotingEscrow function delegateBySig( uint256 delegator, uint256 delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s ) external { // 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) revert InvalidSignatureS(); bytes32 domainSeparator = keccak256( abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), keccak256(bytes(version)), block.chainid, address(this)) ); bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegator, delegatee, nonce, expiry)); bytes32 digest = keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); address signatory = ecrecover(digest, v, r, s); if (!_isApprovedOrOwner(signatory, delegator)) revert NotApprovedOrOwner(); if (signatory == address(0)) revert InvalidSignature(); if (nonce != nonces[signatory]++) revert InvalidNonce(); if (block.timestamp > expiry) revert SignatureExpired(); return _delegate(delegator, delegatee); } /*////////////////////////////////////////////////////////////// ERC6372 LOGIC //////////////////////////////////////////////////////////////*/ /// @inheritdoc IVotingEscrow function clock() external view returns (uint48) { return uint48(block.timestamp); } /// @inheritdoc IVotingEscrow function CLOCK_MODE() external pure returns (string memory) { return "mode=timestamp"; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_forwarder","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_factoryRegistry","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyVoted","type":"error"},{"inputs":[],"name":"AmountTooBig","type":"error"},{"inputs":[],"name":"ERC721ReceiverRejectedTokens","type":"error"},{"inputs":[],"name":"ERC721TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"InvalidManagedNFTId","type":"error"},{"inputs":[],"name":"InvalidNonce","type":"error"},{"inputs":[],"name":"InvalidSignature","type":"error"},{"inputs":[],"name":"InvalidSignatureS","type":"error"},{"inputs":[],"name":"LockDurationNotInFuture","type":"error"},{"inputs":[],"name":"LockDurationTooLong","type":"error"},{"inputs":[],"name":"LockExpired","type":"error"},{"inputs":[],"name":"LockNotExpired","type":"error"},{"inputs":[],"name":"NoLockFound","type":"error"},{"inputs":[],"name":"NonExistentToken","type":"error"},{"inputs":[],"name":"NotApprovedOrOwner","type":"error"},{"inputs":[],"name":"NotDistributor","type":"error"},{"inputs":[],"name":"NotEmergencyCouncilOrGovernor","type":"error"},{"inputs":[],"name":"NotGovernor","type":"error"},{"inputs":[],"name":"NotGovernorOrManager","type":"error"},{"inputs":[],"name":"NotLockedNFT","type":"error"},{"inputs":[],"name":"NotManagedNFT","type":"error"},{"inputs":[],"name":"NotManagedOrNormalNFT","type":"error"},{"inputs":[],"name":"NotNormalNFT","type":"error"},{"inputs":[],"name":"NotOwner","type":"error"},{"inputs":[],"name":"NotPermanentLock","type":"error"},{"inputs":[],"name":"NotTeam","type":"error"},{"inputs":[],"name":"NotVoter","type":"error"},{"inputs":[],"name":"OwnershipChange","type":"error"},{"inputs":[],"name":"PermanentLock","type":"error"},{"inputs":[],"name":"SafeCastOverflow","type":"error"},{"inputs":[],"name":"SafeCastUnderflow","type":"error"},{"inputs":[],"name":"SameAddress","type":"error"},{"inputs":[],"name":"SameNFT","type":"error"},{"inputs":[],"name":"SameState","type":"error"},{"inputs":[],"name":"SignatureExpired","type":"error"},{"inputs":[],"name":"SplitNoOwner","type":"error"},{"inputs":[],"name":"SplitNotAllowed","type":"error"},{"inputs":[],"name":"TooManyTokenIDs","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"inputs":[],"name":"ZeroAmount","type":"error"},{"inputs":[],"name":"ZeroBalance","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_toTokenId","type":"uint256"}],"name":"BatchMetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_mTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":false,"internalType":"address","name":"_lockedManagedReward","type":"address"},{"indexed":false,"internalType":"address","name":"_freeManagedReward","type":"address"}],"name":"CreateManaged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegator","type":"address"},{"indexed":true,"internalType":"uint256","name":"fromDelegate","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"toDelegate","type":"uint256"}],"name":"DelegateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":false,"internalType":"uint256","name":"previousBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBalance","type":"uint256"}],"name":"DelegateVotesChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"provider","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"enum IVotingEscrow.DepositType","name":"depositType","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"locktime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ts","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_mTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_weight","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_ts","type":"uint256"}],"name":"DepositManaged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_ts","type":"uint256"}],"name":"LockPermanent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"_from","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_to","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_amountFrom","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_amountTo","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_amountFinal","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_locktime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_ts","type":"uint256"}],"name":"Merge","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"MetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_allowedManager","type":"address"}],"name":"SetAllowedManager","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_from","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_tokenId1","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_tokenId2","type":"uint256"},{"indexed":false,"internalType":"address","name":"_sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"_splitAmount1","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_splitAmount2","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_locktime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_ts","type":"uint256"}],"name":"Split","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"prevSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"supply","type":"uint256"}],"name":"Supply","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_ts","type":"uint256"}],"name":"UnlockPermanent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"provider","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ts","type":"uint256"}],"name":"Withdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_mTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_weight","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_ts","type":"uint256"}],"name":"WithdrawManaged","type":"event"},{"inputs":[],"name":"CLOCK_MODE","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"DELEGATION_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allowedManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_approved","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"artProxy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"balanceOfNFT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_t","type":"uint256"}],"name":"balanceOfNFTAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"canSplit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"checkpoint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint48","name":"_index","type":"uint48"}],"name":"checkpoints","outputs":[{"components":[{"internalType":"uint256","name":"fromTimestamp","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"delegatedBalance","type":"uint256"},{"internalType":"uint256","name":"delegatee","type":"uint256"}],"internalType":"struct IVotingEscrow.Checkpoint","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"clock","outputs":[{"internalType":"uint48","name":"","type":"uint48"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"uint256","name":"_lockDuration","type":"uint256"}],"name":"createLock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"uint256","name":"_lockDuration","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"createLockFor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"createManagedLockFor","outputs":[{"internalType":"uint256","name":"_mTokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"deactivated","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"delegator","type":"uint256"},{"internalType":"uint256","name":"delegatee","type":"uint256"}],"name":"delegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"delegator","type":"uint256"},{"internalType":"uint256","name":"delegatee","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"delegateBySig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"delegator","type":"uint256"}],"name":"delegates","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"depositFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_mTokenId","type":"uint256"}],"name":"depositManaged","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"distributor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"epoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"escrowType","outputs":[{"internalType":"enum IVotingEscrow.EscrowType","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"factoryRegistry","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"forwarder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"getPastTotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"getPastVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"idToManaged","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"increaseAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_lockDuration","type":"uint256"}],"name":"increaseUnlockTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"isApprovedOrOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"lockPermanent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"locked","outputs":[{"components":[{"internalType":"int128","name":"amount","type":"int128"},{"internalType":"uint256","name":"end","type":"uint256"},{"internalType":"bool","name":"isPermanent","type":"bool"}],"internalType":"struct IVotingEscrow.LockedBalance","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"managedToFree","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"managedToLocked","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"}],"name":"merge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"numCheckpoints","outputs":[{"internalType":"uint48","name":"","type":"uint48"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"ownerToNFTokenIdList","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"permanentLockBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_loc","type":"uint256"}],"name":"pointHistory","outputs":[{"components":[{"internalType":"int128","name":"bias","type":"int128"},{"internalType":"int128","name":"slope","type":"int128"},{"internalType":"uint256","name":"ts","type":"uint256"},{"internalType":"uint256","name":"blk","type":"uint256"},{"internalType":"uint256","name":"permanentLockBalance","type":"uint256"}],"internalType":"struct IVotingEscrow.GlobalPoint","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_allowedManager","type":"address"}],"name":"setAllowedManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"},{"internalType":"bool","name":"_approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_proxy","type":"address"}],"name":"setArtProxy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mTokenId","type":"uint256"},{"internalType":"bool","name":"_state","type":"bool"}],"name":"setManagedState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_team","type":"address"}],"name":"setTeam","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_voter","type":"address"},{"internalType":"address","name":"_distributor","type":"address"}],"name":"setVoterAndDistributor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"slopeChanges","outputs":[{"internalType":"int128","name":"","type":"int128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"split","outputs":[{"internalType":"uint256","name":"_tokenId1","type":"uint256"},{"internalType":"uint256","name":"_tokenId2","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"supply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"team","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"bool","name":"_bool","type":"bool"}],"name":"toggleSplit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"totalSupplyAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"unlockPermanent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"userPointEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_loc","type":"uint256"}],"name":"userPointHistory","outputs":[{"components":[{"internalType":"int128","name":"bias","type":"int128"},{"internalType":"int128","name":"slope","type":"int128"},{"internalType":"uint256","name":"ts","type":"uint256"},{"internalType":"uint256","name":"blk","type":"uint256"},{"internalType":"uint256","name":"permanent","type":"uint256"}],"internalType":"struct IVotingEscrow.UserPoint","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"voted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"voter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bool","name":"_voted","type":"bool"}],"name":"voting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"weights","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"withdrawManaged","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6101006040523480156200001257600080fd5b50604051620062c2380380620062c2833981016040819052620000359162000266565b6001600160a01b038084166080819052600160005560a05282811660e052811660c0526200006262000221565b600380546001600160a01b0319166001600160a01b03929092169190911790556200008c62000221565b600280546001600160a01b0319166001600160a01b0392909216919091179055437f54cdd369e4e8a8515e52ca72ec816c2101831ad1f18bf44102ed171459c9b4fa55427f54cdd369e4e8a8515e52ca72ec816c2101831ad1f18bf44102ed171459c9b4f95560076020527f1142c8ae8ad77901cd97fce843895a9ccf91a8cbd5b191350a94c1d957b07f74805460ff1990811660019081179092557f2379132be4428a30bdcf8f40c0757cba23c7e3f4204cd933dabcc3d42093e80480548216831790557f7108cf076693445f3e0461801864e91d74eb5e0eee196ef60b5961a16cd35b9380548216831790557fbc48a5b87e2e2cb168c956e8aca8ee5c5d50c657bb1c18b9ad30280d5cf98f5b805482168317905563da287a1d60e01b60009081527f7105fc4c24d760d461c0883f925f50b55888872394b962f52e936e529601d62a8054909216909217905560085460405190913091600080516020620062a2833981519152908290a46008546040516000903090600080516020620062a2833981519152908390a4505050620002b0565b6080516000906001600160a01b0316330362000244575060131936013560601c90565b503390565b80516001600160a01b03811681146200026157600080fd5b919050565b6000806000606084860312156200027c57600080fd5b620002878462000249565b9250620002976020850162000249565b9150620002a76040850162000249565b90509250925092565b60805160a05160c05160e051615f806200032260003960008181610d6b01528181611263015281816117870152818161186a01528181613f080152614e7e0152600081816106e90152611fdb015260008181610d4401526120600152600081816108a60152613cd40152615f806000f3fe608060405234801561001057600080fd5b50600436106104805760003560e01c806370a0823111610257578063b45a3c0e11610146578063e58f5947116100c3578063ec32e6df11610087578063ec32e6df14610ca7578063f04cb3a814610cba578063f52a36f714610d09578063f645d4f914610d3f578063fc0c546a14610d6657600080fd5b8063e58f594714610bfe578063e75b1c2e14610c1e578063e7a324dc14610c31578063e7e242d414610c58578063e985e9c514610c6b57600080fd5b8063c87b56dd1161010a578063c87b56dd14610b9f578063d1c2babb14610bb2578063d9a3495214610bc5578063e0514aba14610bd8578063e0c11f9a14610beb57600080fd5b8063b45a3c0e14610ad6578063b52c05fe14610b5e578063b88d4fde14610b71578063bfe1092814610b84578063c2c4c5c114610b9757600080fd5b806391ddadf4116101d4578063a22cb46511610198578063a22cb46514610a44578063a738da8214610a57578063a899b36c14610a80578063b1548afc14610aa3578063b2383e5514610ac357600080fd5b806391ddadf414610a1857806395d89b41146104de578063981b24d0146109d95780639954a98914610a1e5780639d507b8b14610a3157600080fd5b80638ad4c4471161021b5780638ad4c4471461099b5780638bf9d84c146109ae5780638e539e8c146109d95780638fbb38ff146109ec578063900cf0cf14610a0f57600080fd5b806370a08231146108fc5780637c728000146109255780637ecebe0014610955578063834b0b691461097557806385f2aef21461098857600080fd5b8063370fb5fa116103735780634bf5d7e9116102f057806354fd4d50116102b457806354fd4d501461085f5780635594a04514610883578063572b6c05146108965780635a4f459a146108d65780636352211e146108e957600080fd5b80634bf5d7e9146107af5780634d01cb66146107d95780634d6fb775146107e257806350589793146107f5578063515857d41461083457600080fd5b806342842e0e1161033757806342842e0e1461072e578063430c20811461074157806344acb42a1461075457806346c96aac146107745780634b19becc1461078757600080fd5b8063370fb5fa146106ab57806337b1f500146106be5780633a6396a5146106d15780633bf0c9fb146106e45780633d085a371461070b57600080fd5b806320606b70116104015780632e720f7d116103c55780632e720f7d146106455780632f7f9ba914610658578063313ce5671461066b57806333230dc01461068557806335b0f6bd1461069857600080fd5b806320606b70146105bc57806323b872dd146105e357806327a6ee98146105f65780632d0485ec1461061f5780632e1a7d4d1461063257600080fd5b8063095ea7b311610448578063095ea7b3146105655780630ec84dda1461057857806317d70f7c1461058b57806318160ddd1461059457806319a0a9d51461059c57600080fd5b806301ffc9a714610485578063047fc9aa146104c757806306fdde03146104de578063081812fc1461050f578063095cf5c614610550575b600080fd5b6104b2610493366004615761565b6001600160e01b03191660009081526007602052604090205460ff1690565b60405190151581526020015b60405180910390f35b6104d060175481565b6040519081526020016104be565b610502604051806040016040528060058152602001641d9953919560da1b81525081565b6040516104be91906157ce565b61053861051d3660046157e1565b6000908152601160205260409020546001600160a01b031690565b6040516001600160a01b0390911681526020016104be565b61056361055e36600461580f565b610d8d565b005b61056361057336600461582c565b610e11565b610563610586366004615858565b610f52565b6104d060085481565b6104d0610fdf565b6104d06105aa3660046157e1565b600a6020526000908152604090205481565b6104d07f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6105636105f136600461587a565b610fef565b6105386106043660046157e1565b600e602052600090815260409020546001600160a01b031681565b61056361062d3660046158bb565b611007565b6105636106403660046157e1565b611070565b61056361065336600461580f565b611324565b600554610538906001600160a01b031681565b610673601281565b60405160ff90911681526020016104be565b610563610693366004615902565b6113b8565b6105636106a63660046157e1565b61141e565b6105636106b93660046157e1565b61168d565b6105636106cc366004615930565b611c92565b6104d06106df36600461580f565b611e78565b6105387f000000000000000000000000000000000000000000000000000000000000000081565b6104b261071936600461580f565b601c6020526000908152604090205460ff1681565b61056361073c36600461587a565b612177565b6104b261074f36600461582c565b612192565b610767610762366004615858565b6121a7565b6040516104be9190615955565b600254610538906001600160a01b031681565b61079a610795366004615858565b612225565b604080519283526020830191909152016104be565b60408051808201909152600e81526d06d6f64653d74696d657374616d760941b6020820152610502565b6104d0601d5481565b6104d06107f0366004615994565b6125a2565b61081d6108033660046157e1565b60216020526000908152604090205465ffffffffffff1681565b60405165ffffffffffff90911681526020016104be565b6104d0610842366004615858565b600b60209081526000928352604080842090915290825290205481565b610502604051806040016040528060058152602001640322e302e360dc1b81525081565b600454610538906001600160a01b031681565b6104b26108a436600461580f565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b6105636108e4366004615930565b612647565b6105386108f73660046157e1565b6126a2565b6104d061090a36600461580f565b6001600160a01b031660009081526010602052604090205490565b6109486109333660046157e1565b60096020526000908152604090205460ff1681565b6040516104be91906159df565b6104d061096336600461580f565b60226020526000908152604090205481565b610563610983366004615a07565b6126ad565b600354610538906001600160a01b031681565b6107676109a93660046157e1565b612987565b6104d06109bc36600461582c565b601460209081526000928352604080842090915290825290205481565b6104d06109e73660046157e1565b612a18565b6104b26109fa3660046157e1565b601e6020526000908152604090205460ff1681565b6104d060165481565b4261081d565b610563610a2c36600461580f565b612a23565b610563610a3f366004615858565b612b72565b610563610a52366004615902565b612d46565b610538610a653660046157e1565b600d602052600090815260409020546001600160a01b031681565b6104b2610a8e3660046157e1565b600c6020526000908152604090205460ff1681565b6104d0610ab13660046157e1565b6000908152601f602052604090205490565b610563610ad1366004615858565b612df1565b610b37610ae43660046157e1565b6040805160608082018352600080835260208084018290529284018190529384526018825292829020825193840183528054600f0b84526001810154918401919091526002015460ff1615159082015290565b604080518251600f0b815260208084015190820152918101511515908201526060016104be565b6104d0610b6c366004615858565b612e2d565b610563610b7f366004615adb565b612e55565b600154610538906001600160a01b031681565b610563612f78565b610502610bad3660046157e1565b612fca565b610563610bc0366004615858565b61306d565b610563610bd3366004615858565b6134cc565b6104d0610be6366004615858565b6134fe565b610563610bf9366004615858565b61350a565b6104d0610c0c3660046157e1565b601a6020526000908152604090205481565b610563610c2c3660046157e1565b6139c7565b6104d07f9947d5709c1682eaa3946b2d84115c9c0d1c946b149d76e69b457458b42ea29e81565b6104d0610c663660046157e1565b613bf6565b6104b2610c793660046158bb565b6001600160a01b03918216600090815260126020908152604080832093909416825291909152205460ff1690565b6104d0610cb5366004615b8a565b613c1e565b610ccd610cc8366004615bc3565b613c3f565b6040516104be9190815181526020808301516001600160a01b031690820152604080830151908201526060918201519181019190915260800190565b610d2c610d173660046157e1565b601b60205260009081526040902054600f0b81565b604051600f9190910b81526020016104be565b6105387f000000000000000000000000000000000000000000000000000000000000000081565b6105387f000000000000000000000000000000000000000000000000000000000000000081565b6003546001600160a01b0316610da1613cd0565b6001600160a01b031614610dc857604051633a7cfa5d60e21b815260040160405180910390fd5b6001600160a01b038116610def5760405163d92e233d60e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000610e1b613cd0565b90506000610e2883613d14565b90506001600160a01b038116610e515760405163d92e233d60e01b815260040160405180910390fd5b836001600160a01b0316816001600160a01b031603610e835760405163367558c360e01b815260040160405180910390fd5b6000826001600160a01b0316610e9885613d14565b6001600160a01b0384811660009081526012602090815260408083208985168452909152902054911691909114915060ff16811582610ed5575080155b15610ef35760405163390cdd9b60e21b815260040160405180910390fd5b60008581526011602052604080822080546001600160a01b0319166001600160a01b038a811691821790925591518893918716917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050505050565b610f5a613d2f565b600260008381526009602052604090205460ff166002811115610f7f57610f7f6159c9565b148015610fa757506001546001600160a01b0316610f9b613cd0565b6001600160a01b031614155b15610fc55760405163385296d560e01b815260040160405180910390fd5b610fd182826000613d8d565b610fdb6001600055565b5050565b6000610fea42613fd8565b905090565b611002838383610ffd613cd0565b614068565b505050565b6002546001600160a01b031661101b613cd0565b6001600160a01b0316146110425760405163c18384c160e01b815260040160405180910390fd5b600280546001600160a01b039384166001600160a01b03199182161790915560018054929093169116179055565b611078613d2f565b6000611082613cd0565b905061108e8183614196565b6110ab5760405163390cdd9b60e21b815260040160405180910390fd5b6000828152601e602052604090205460ff16156110db57604051637c9a1cf960e01b815260040160405180910390fd5b60008281526009602052604081205460ff1660028111156110fe576110fe6159c9565b1461111c576040516317a66f3760e01b815260040160405180910390fd5b60008281526018602090815260409182902082516060810184528154600f0b81526001820154928101929092526002015460ff161580159282019290925290611178576040516334d10f9560e11b815260040160405180910390fd5b806020015142101561119d5760405163342ad40160e11b815260040160405180910390fd5b60006111af8260000151600f0b614200565b90506111ba8461422c565b6040805160608101825260008082526020808301828152838501838152898452601890925293909120915182546001600160801b0319166001600160801b039091161782559151600182015590516002909101805460ff19169115159190911790556017546112298282615c09565b601755604080516060810182526000808252602082018190529181019190915261125690869085906142dc565b61128a6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168584614aad565b6040805183815242602082015286916001600160a01b038716917f02f25270a4d87bea75db541cdfe559334a275b4a233520ed6c0a2429667cca94910160405180910390a37f5e2aa66efd74cce82b21852e317e5490d9ecc9e6bb953ae24d90851258cc2f5c816112fb8482615c09565b6040805192835260208301919091520160405180910390a1505050506113216001600055565b50565b6003546001600160a01b0316611338613cd0565b6001600160a01b03161461135f57604051633a7cfa5d60e21b815260040160405180910390fd5b600480546001600160a01b0319166001600160a01b038316179055604080516000815260001960208201527f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c910160405180910390a150565b6003546001600160a01b03166113cc613cd0565b6001600160a01b0316146113f357604051633a7cfa5d60e21b815260040160405180910390fd5b6001600160a01b03919091166000908152601c60205260409020805460ff1916911515919091179055565b6000611428613cd0565b90506114348183614196565b6114515760405163390cdd9b60e21b815260040160405180910390fd5b60008281526009602052604081205460ff166002811115611474576114746159c9565b14611492576040516317a66f3760e01b815260040160405180910390fd5b6000828152601e602052604090205460ff16156114c257604051637c9a1cf960e01b815260040160405180910390fd5b60008281526018602090815260409182902082516060810184528154600f0b81526001820154928101929092526002015460ff1615159181018290529061151c57604051632188f8ab60e01b815260040160405180910390fd5b600061152e8260000151600f0b614200565b905080601d60008282546115429190615c09565b9091555062093a8090508061155b630784ce0042615c1c565b6115659190615c45565b61156f9190615c59565b6020830152600060408301819052611588908590614b10565b60008481526018602090815260409182902082516060810184528154600f0b81526001820154928101929092526002015460ff161515918101919091526115d1908590846142dc565b600084815260186020908152604091829020845181546001600160801b0319166001600160801b03909116178155848201516001820155848301516002909101805460ff19169115159190911790558151838152429181019190915285916001600160a01b038616917f668d293c0a181c1f163fd0d3c757239a9c17bd26c5e483150e374455433b27fa91015b60405180910390a3604051848152600080516020615f2b8339815191529060200160405180910390a150505050565b611695613d2f565b6000818152600a60205260409020546002546001600160a01b03166116b8613cd0565b6001600160a01b0316146116df5760405163c18384c160e01b815260040160405180910390fd5b806000036117005760405163d7caa26160e01b815260040160405180910390fd5b600160008381526009602052604090205460ff166002811115611725576117256159c9565b1461174357604051630fd82f7760e11b815260040160405180910390fd5b6000818152600d6020908152604080832054600e835281842054868552600b8452828520868652909352818420549151633e491d4760e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018890529182169491909316928490633e491d4790604401602060405180830381865afa1580156117e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118099190615c70565b905060006118178284615c1c565b9050600062093a808061182e630784ce0042615c1c565b6118389190615c45565b6118429190615c59565b60408051600180825281830190925291925060009190602080830190803683370190505090507f00000000000000000000000000000000000000000000000000000000000000008160008151811061189c5761189c615c89565b6001600160a01b03928316602091820292909201015260405163f5f8d36560e01b81529088169063f5f8d365906118d9908c908590600401615c9f565b600060405180830381600087803b1580156118f357600080fd5b505af1158015611907573d6000803e3d6000fd5b505050506000604051806060016040528061192186614c78565b600f90810b82526020808301879052600060409384018190528e8152601882528390208351606081018552815490930b83526001810154918301919091526002015460ff1615159181019190915290915061197e908b90836142dc565b60008a8152601860209081526040808320845181546001600160801b0319166001600160801b0390911617815584830151600180830191909155858301516002928301805460ff19169115159190911790558d85529382902082516060810184528154600f0b8082529582015494810194909452015460ff1615159082015290611a0786614c78565b600f0b12611a16578051611a1f565b611a1f85614c78565b81518290611a2e908390615cf6565b600f0b905250601d548510611a4557601d54611a47565b845b601d6000828254611a589190615c09565b909155505060008a8152601f6020526040812054611a77918790614ca6565b60008a81526018602090815260409182902082516060810184528154600f0b81526001820154928101929092526002015460ff16151591810191909152611ac0908b90836142dc565b60008a815260186020908152604091829020835181546001600160801b0319166001600160801b03909116178155908301516001820155828201516002909101805460ff19169115159190911790555163278afc8b60e21b815260048101889052602481018c90526001600160a01b038a1690639e2bf22c90604401600060405180830381600087803b158015611b5657600080fd5b505af1158015611b6a573d6000803e3d6000fd5b505060405163278afc8b60e21b8152600481018a9052602481018e90526001600160a01b038b169250639e2bf22c9150604401600060405180830381600087803b158015611bb757600080fd5b505af1158015611bcb573d6000803e3d6000fd5b50505060008c8152600a60209081526040808320839055600b82528083208e845282528083208390558e835260099091529020805460ff1916905550898b611c1281613d14565b6001600160a01b03167f5319474ec1e9d118585a40e615ea37be254007e6bb5b039756c3813c2d1354898842604051611c55929190918252602082015260400190565b60405180910390a46040518b8152600080516020615f2b8339815191529060200160405180910390a1505050505050505050506113216001600055565b600260009054906101000a90046001600160a01b03166001600160a01b0316637778960e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611ce5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d099190615d23565b6001600160a01b0316611d1a613cd0565b6001600160a01b031614158015611dc05750600260009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611da39190615d23565b6001600160a01b0316611db4613cd0565b6001600160a01b031614155b15611dde5760405163459d6a3f60e01b815260040160405180910390fd5b600260008381526009602052604090205460ff166002811115611e0357611e036159c9565b14611e215760405163054b1e0160e51b815260040160405180910390fd5b6000828152600c602052604090205481151560ff909116151503611e5857604051631490ad1160e01b815260040160405180910390fd5b6000918252600c6020526040909120805460ff1916911515919091179055565b6000611e82613d2f565b6000611e8c613cd0565b6005549091506001600160a01b03808316911614801590611f355750600260009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b8152600401602060405180830381865afa158015611efb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f1f9190615d23565b6001600160a01b0316816001600160a01b031614155b15611f5357604051633bc1d15f60e01b815260040160405180910390fd5b600860008154611f6290615d40565b91829055509150611f738383614d23565b50611fa58260008060405180606001604052806000600f0b815260200160008152602001600115158152506001614d92565b6000828152600960209081526040808320805460ff1916600217905580516301a15ccf60e31b8152905183926001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001692630d0ae67892600480830193928290030181865afa158015612022573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120469190615d23565b60025460405163dabc8e8360e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152918216602482015291169063dabc8e839060440160408051808303816000875af11580156120b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120dc9190615d59565b6000868152600d6020908152604080832080546001600160a01b038781166001600160a01b03199283168117909355600e8552948390208054878716921682179055825191825292810192909252939550919350858116928792918916917fae65a147ec014982132ce8b32019735e3c5f41457848d2ce2e2c3e0cbc9df7bc910160405180910390a45050506121726001600055565b919050565b61100283838360405180602001604052806000815250612e55565b600061219e8383614196565b90505b92915050565b6121af615716565b600083815260196020526040902082633b9aca0081106121d1576121d1615c89565b6040805160a081018252600492909202929092018054600f81810b8452600160801b909104900b60208301526001810154928201929092526002820154606082015260039091015460808201529392505050565b600080612230613d2f565b600061223a613cd0565b9050600061224786613d14565b90506001600160a01b03811661227057604051632c2151ef60e11b815260040160405180910390fd5b6001600160a01b0381166000908152601c602052604090205460ff161580156122c4575060008052601c6020527fb9c6de81004e18dedadca3e5eabaab449ca91dff6f58efc9461da635fe77f8495460ff16155b156122e257604051633df16fd960e21b815260040160405180910390fd5b60008681526009602052604081205460ff166002811115612305576123056159c9565b14612323576040516317a66f3760e01b815260040160405180910390fd5b6000868152601e602052604090205460ff161561235357604051637c9a1cf960e01b815260040160405180910390fd5b61235d8287614196565b61237a5760405163390cdd9b60e21b815260040160405180910390fd5b60008681526018602090815260409182902082516060810184528154600f0b8152600182015492810183905260029091015460ff1615159281019290925242108015906123c957508060400151155b156123e7576040516307b7d7dd60e51b815260040160405180910390fd5b60006123f287614c78565b905080600f0b60000361241857604051631f2a200560e01b815260040160405180910390fd5b80600f0b8260000151600f0b1361244257604051636b2f218360e01b815260040160405180910390fd5b61244b8861422c565b6040805160608082018352600080835260208084018281528486018381528e845260188352868420955186546001600160801b0319166001600160801b0390911617865590516001860155516002909401805460ff19169415159490941790935583519182018452808252918101829052918201526124cd90899084906142dc565b80826000018181516124df9190615cf6565b600f0b9052506124ef8383614f57565b600f82900b835295506125028383614f57565b600087815260186020526040902054909550859087908a907f8303de8187a6102fdc3fe20c756dddd68df0ae027b77e2391c19a855e0821f3390889061254a90600f0b614200565b61255687600f0b614200565b6020808a0151604080516001600160a01b03909616865291850193909352830152606082015242608082015260a00160405180910390a45050505061259b6001600055565b9250929050565b6040516332b53f5360e11b815260216004820152602060248201526001600160a01b038416604482015260648101839052608481018290526000907396d5767c916bd13c89e25405f009260866f8b6909063656a7ea69060a401602060405180830381865af4158015612619573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061263d9190615c70565b90505b9392505050565b6002546001600160a01b031661265b613cd0565b6001600160a01b0316146126825760405163c18384c160e01b815260040160405180910390fd5b6000918252601e6020526040909120805460ff1916911515919091179055565b60006121a182613d14565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08111156126ee576040516317e97eb760e31b815260040160405180910390fd5b6040805180820182526005808252641d9953919560da1b60209283015282518084018452908152640322e302e360dc1b9082015281517f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866818301527fc792e9874e7b42c234d1e8448cec020a0f065019c8cd6f7ccdb65b8c110157e9818401527fb4bcb154e38601c389396fa918314da42d4626f13ef6d0ceb07e5f5d26b2fbc360608201524660808201523060a0808301919091528351808303909101815260c0820184528051908301207f9947d5709c1682eaa3946b2d84115c9c0d1c946b149d76e69b457458b42ea29e60e083015261010082018b905261012082018a905261014082018990526101608083018990528451808403909101815261018083019094528351939092019290922061190160f01b6101a08401526101a283018290526101c2830181905290916000906101e20160408051601f198184030181528282528051602091820120600080855291840180845281905260ff8a169284019290925260608301889052608083018790529092509060019060a0016020604051602081039080840390855afa1580156128ad573d6000803e3d6000fd5b5050506020604051035190506128c3818c614196565b6128e05760405163390cdd9b60e21b815260040160405180910390fd5b6001600160a01b03811661290757604051638baa579f60e01b815260040160405180910390fd5b6001600160a01b038116600090815260226020526040812080549161292b83615d40565b91905055891461294e57604051633ab3447f60e11b815260040160405180910390fd5b8742111561296f57604051630819bdcd60e01b815260040160405180910390fd5b6129798b8b614b10565b505050505b50505050505050565b6129bf6040518060a001604052806000600f0b81526020016000600f0b81526020016000815260200160008152602001600081525090565b50600090815260066020908152604091829020825160a0810184528154600f81810b8352600160801b909104900b9281019290925260018101549282019290925260028201546060820152600390910154608082015290565b60006121a182613fd8565b600260009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b8152600401602060405180830381865afa158015612a76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a9a9190615d23565b6001600160a01b0316612aab613cd0565b6001600160a01b031614612ad257604051633b8d9d7560e21b815260040160405180910390fd5b6005546001600160a01b0390811690821603612b015760405163367558c360e01b815260040160405180910390fd5b6001600160a01b038116612b285760405163d92e233d60e01b815260040160405180910390fd5b600580546001600160a01b0319166001600160a01b0383169081179091556040517f1a6ce72407c68def4b7d2e724c896070d89cf2b2a2dd56b6897b5febd88420f590600090a250565b612b7a613d2f565b612b8b612b85613cd0565b83614196565b612ba85760405163390cdd9b60e21b815260040160405180910390fd5b60008281526009602052604081205460ff166002811115612bcb57612bcb6159c9565b14612be9576040516317a66f3760e01b815260040160405180910390fd5b60008281526018602090815260409182902082516060810184528154600f0b81526001820154928101929092526002015460ff161580159282019290925290612c45576040516334d10f9560e11b815260040160405180910390fd5b600062093a8080612c568542615c1c565b612c609190615c45565b612c6a9190615c59565b905042826020015111612c90576040516307b7d7dd60e51b815260040160405180910390fd5b60008260000151600f0b13612cb85760405163f90e998d60e01b815260040160405180910390fd5b81602001518111612cdc57604051638e6b5b6760e01b815260040160405180910390fd5b612cea630784ce0042615c1c565b811115612d0a5760405163f761f1cd60e01b815260040160405180910390fd5b612d1984600083856003614d92565b604051848152600080516020615f2b8339815191529060200160405180910390a15050610fdb6001600055565b6000612d50613cd0565b9050806001600160a01b0316836001600160a01b031603612d845760405163367558c360e01b815260040160405180910390fd5b6001600160a01b03818116600081815260126020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612df9613d2f565b612e04612b85613cd0565b612e215760405163390cdd9b60e21b815260040160405180910390fd5b610fd182826002613d8d565b6000612e37613d2f565b612e498383612e44613cd0565b614ff2565b90506121a16001600055565b6000612e5f613cd0565b9050612e6d85858584614068565b833b15612f7157604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612ea6908490899088908890600401615d88565b6020604051808303816000875af1925050508015612ee1575060408051601f3d908101601f19168201909252612ede91810190615dc5565b60015b612f3e573d808015612f0f576040519150601f19603f3d011682016040523d82523d6000602084013e612f14565b606091505b508051600003612f3657604051626b5e2960e61b815260040160405180910390fd5b805181602001fd5b6001600160e01b03198116630a85bd0160e11b14612f6f5760405163279929b160e21b815260040160405180910390fd5b505b5050505050565b612f80613d2f565b604080516060808201835260008083526020808401829052838501829052845192830185528183528201819052928101839052612fbe9291906142dc565b612fc86001600055565b565b60606000612fd783613d14565b6001600160a01b031603612ffe57604051634a1850bf60e11b815260040160405180910390fd5b6004805460405163c87b56dd60e01b81529182018490526001600160a01b03169063c87b56dd90602401600060405180830381865afa158015613045573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526121a19190810190615de2565b613075613d2f565b600061307f613cd0565b6000848152601e602052604090205490915060ff16156130b257604051637c9a1cf960e01b815260040160405180910390fd5b60008381526009602052604081205460ff1660028111156130d5576130d56159c9565b146130f3576040516317a66f3760e01b815260040160405180910390fd5b60008281526009602052604081205460ff166002811115613116576131166159c9565b14613134576040516317a66f3760e01b815260040160405180910390fd5b818303613154576040516349da877960e11b815260040160405180910390fd5b61315e8184614196565b61317b5760405163390cdd9b60e21b815260040160405180910390fd5b6131858183614196565b6131a25760405163390cdd9b60e21b815260040160405180910390fd5b60008281526018602090815260409182902082516060810184528154600f0b8152600182015492810183905260029091015460ff1615159281019290925242108015906131f157508060400151155b1561320f576040516307b7d7dd60e51b815260040160405180910390fd5b60008481526018602090815260409182902082516060810184528154600f0b81526001820154928101929092526002015460ff16158015928201929092529061326b576040516334d10f9560e11b815260040160405180910390fd5b600082602001518260200151101561328757826020015161328d565b81602001515b90506132988661422c565b6040805160608082018352600080835260208084018281528486018381528c845260188352868420955186546001600160801b0319166001600160801b0390911617865590516001860155516002909401805460ff191694151594909417909355835191820184528082529181018290529182015261331a90879084906142dc565b6040805160608101825260008082526020820181905291810191909152825184516133459190615e50565b600f0b81526040808501511580159183019190915261338857825161336c90600f0b614200565b601d600082825461337d9190615c1c565b909155506133909050565b602081018290525b6000868152601f602052604090205483516133b991906133b290600f0b614200565b6001614ca6565b6133c48685836142dc565b600086815260186020908152604091829020835181546001600160801b0319166001600160801b03909116178155908301516001820155908201516002909101805460ff19169115159190911790558251869088906001600160a01b038816907f986e3c958e3bdf1f58c2150357fc94624dd4e77b08f9802d8e2e885fa0d6a1989061345290600f0b614200565b885161346090600f0b614200565b865161346e90600f0b614200565b6020808901516040805195865291850193909352830152606082015242608082015260a00160405180910390a4604051868152600080516020615f2b833981519152906020015b60405180910390a15050505050610fdb6001600055565b6134d7612b85613cd0565b6134f45760405163390cdd9b60e21b815260040160405180910390fd5b610fdb8282614b10565b600061219e8383615104565b613512613d2f565b6002546001600160a01b0316613526613cd0565b6001600160a01b03161461354d5760405163c18384c160e01b815260040160405180910390fd5b600260008281526009602052604090205460ff166002811115613572576135726159c9565b146135905760405163054b1e0160e51b815260040160405180910390fd5b60008281526009602052604081205460ff1660028111156135b3576135b36159c9565b146135d1576040516317a66f3760e01b815260040160405180910390fd5b6135db8242615104565b6000036135fb5760405163334ab3f560e11b815260040160405180910390fd5b60008281526018602052604090208054600290910154600f9190910b9060ff161561364e5761362c81600f0b614200565b601d600082825461363d9190615c09565b9091555061364e9050836000614b10565b60008381526018602090815260408083208151606080820184528254600f0b825260018301548286015260029092015460ff1615158184015282519182018352848252928101849052908101929092526136aa918591906142dc565b60408051606081018252600080825260208083018281528385018381528884526018909252938220925183546001600160801b0319166001600160801b039091161783559251600183015591516002909101805460ff1916911515919091179055613718600f83900b614200565b905080601d600082825461372c9190615c1c565b909155505060008381526018602090815260409182902082516060810184528154600f0b80825260018301549382019390935260029091015460ff1615159281019290925283908290613780908390615e50565b600f0b9052506000848152601f60205260409020546137a190836001614ca6565b60008481526018602090815260409182902082516060810184528154600f0b81526001820154928101929092526002015460ff161515918101919091526137ea908590836142dc565b6000848152601860209081526040808320845181546001600160801b0319166001600160801b0390911617815584830151600180830191909155858301516002909201805460ff19908116931515939093179055898552600b84528285208986528452828520879055898552600a8452828520899055600984528285208054909216179055868352600d9091529081902054905163f320772360e01b815260048101849052602481018790526001600160a01b0390911690819063f320772390604401600060405180830381600087803b1580156138c757600080fd5b505af11580156138db573d6000803e3d6000fd5b5050506000868152600e60205260409081902054905163f320772360e01b815260048101869052602481018990526001600160a01b039091169150819063f320772390604401600060405180830381600087803b15801561393b57600080fd5b505af115801561394f573d6000803e3d6000fd5b50505050858761395e89613d14565b6001600160a01b03167ff7757ce35992f4ee014dee2e0c97ed6245758960a6ecc9e124897a5fb7b0142387426040516139a1929190918252602082015260400190565b60405180910390a4604051878152600080516020615f2b833981519152906020016134b5565b60006139d1613cd0565b90506139dd8183614196565b6139fa5760405163390cdd9b60e21b815260040160405180910390fd5b60008281526009602052604081205460ff166002811115613a1d57613a1d6159c9565b14613a3b576040516317a66f3760e01b815260040160405180910390fd5b60008281526018602090815260409182902082516060810184528154600f0b81526001820154928101929092526002015460ff161580159282019290925290613a97576040516334d10f9560e11b815260040160405180910390fd5b42816020015111613abb576040516307b7d7dd60e51b815260040160405180910390fd5b60008160000151600f0b13613ae35760405163f90e998d60e01b815260040160405180910390fd5b6000613af58260000151600f0b614200565b905080601d6000828254613b099190615c1c565b90915550506000602080840182905260016040808601829052878452601883529283902083516060810185528154600f0b8152918101549282019290925260029091015460ff16151591810191909152613b65908590846142dc565b600084815260186020908152604091829020845181546001600160801b0319166001600160801b03909116178155848201516001820155848301516002909101805460ff19169115159190911790558151838152429181019190915285916001600160a01b038616917f793cb7a30a4bb8669ec607dfcbdc93f5a3e9d282f38191fddab43ccaf79efb80910161165e565b600081815260136020526040812054439003613c1457506000919050565b6121a18242615104565b6000613c28613d2f565b613c33848484614ff2565b90506126406001600055565b613c7360405180608001604052806000815260200160006001600160a01b0316815260200160008152602001600081525090565b5060009182526020808052604080842065ffffffffffff9390931684529181529181902081516080810183528154815260018201546001600160a01b03169381019390935260028101549183019190915260030154606082015290565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163303613d0f575060131936013560601c90565b503390565b6000908152600f60205260409020546001600160a01b031690565b600260005403613d865760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002600055565b60008381526009602052604090205460ff166001816002811115613db357613db36159c9565b03613dd157604051635eb32db160e11b815260040160405180910390fd5b600084815260186020908152604080832081516060810183528154600f0b81526001820154938101939093526002015460ff1615159082015290849003613e2b57604051631f2a200560e01b815260040160405180910390fd5b60008160000151600f0b13613e535760405163f90e998d60e01b815260040160405180910390fd5b42816020015111158015613e6957508060400151155b15613e87576040516307b7d7dd60e51b815260040160405180910390fd5b806040015115613ea95783601d6000828254613ea39190615c1c565b90915550505b6000858152601f6020526040902054613ec490856001614ca6565b613ed2858560008487614d92565b6002826002811115613ee657613ee66159c9565b03613fb0576000858152600d60205260409020546001600160a01b03908116907f000000000000000000000000000000000000000000000000000000000000000090613f359082168388615190565b60405163b66503cf60e01b81526001600160a01b0382811660048301526024820188905283169063b66503cf90604401600060405180830381600087803b158015613f7f57600080fd5b505af1158015613f93573d6000803e3d6000fd5b50613fad925050506001600160a01b038216836000615190565b50505b604051858152600080516020615f2b8339815191529060200160405180910390a15050505050565b601654604051637259b01960e01b8152601b600482015260066024820152604481019190915260648101829052600090731608e8ad76a267adcfe2a1b4f342e24e832215e190637259b01990608401602060405180830381865af4158015614044573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121a19190615c70565b600160008381526009602052604090205460ff16600281111561408d5761408d6159c9565b036140ab57604051635eb32db160e11b815260040160405180910390fd5b6140b58183614196565b6140d25760405163390cdd9b60e21b815260040160405180910390fd5b836001600160a01b03166140e583613d14565b6001600160a01b03161461410c576040516330cd747160e01b815260040160405180910390fd5b600082815260116020526040902080546001600160a01b031916905561413284836152a5565b61413e82600085615326565b6141488383615390565b6000828152601360205260408082204390555183916001600160a01b0380871692908816917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a450505050565b6000806141a283613d14565b6000848152601160209081526040808320546001600160a01b0380861680865260128552838620828c1680885295529290942054949550908214939216149060ff1682806141ed5750815b806141f55750805b979650505050505050565b60008082600f0b12156142255760405162406f5d60e21b815260040160405180910390fd5b50600f0b90565b6000614236613cd0565b90506142428183614196565b61425f5760405163390cdd9b60e21b815260040160405180910390fd5b600061426a83613d14565b600084815260116020526040812080546001600160a01b031916905590915061429590849080615326565b61429f81846152a5565b60405183906000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4505050565b6142e4615716565b6142ec615716565b6016546000908190871561443f57856040015161430a576000614318565b855161431890600f0b614200565b6080850152602087015142108015614337575060008760000151600f0b135b1561438557865161434d90630784ce0090615e7d565b600f0b6020808701919091528701516143709061436b904290615c09565b614c78565b856020015161437f9190615ebb565b600f0b85525b42866020015111801561439f575060008660000151600f0b135b156143e85785516143b590630784ce0090615e7d565b600f0b6020808601919091528601516143d39061436b904290615c09565b84602001516143e29190615ebb565b600f0b84525b6020808801516000908152601b8252604090205490870151600f9190910b93501561443f5786602001518660200151036144245782915061443f565b6020808701516000908152601b9091526040902054600f0b91505b6040805160a0810182526000808252602082018190524292820192909252436060820152608081019190915281156144c85750600081815260066020908152604091829020825160a0810184528154600f81810b8352600160801b909104900b928101929092526001810154928201929092526002820154606082015260039091015460808201525b60008160400151905060006040518060a001604052808460000151600f0b81526020018460200151600f0b8152602001846040015181526020018460600151815260200184608001518152509050600083604001514211156145615760408401516145339042615c09565b60608501516145429043615c09565b61455490670de0b6b3a7640000615c59565b61455e9190615c45565b90505b600062093a806145718186615c45565b61457b9190615c59565b905060005b60ff8110156147025761459662093a8083615c1c565b91506000428311156145aa574292506145be565b506000828152601b6020526040902054600f0b5b6145cb61436b8785615c09565b87602001516145da9190615ebb565b875188906145e9908390615cf6565b600f0b905250602087018051829190614603908390615e50565b600f90810b90915288516000910b1215905061461e57600087525b60008760200151600f0b121561463657600060208801525b60408088018490528501519295508592670de0b6b3a76400009061465a9085615c09565b6146649086615c59565b61466e9190615c45565b856060015161467d9190615c1c565b606088015261468d600189615c1c565b97504283036146a25750436060870152614702565b6000888152600660209081526040918290208951918a01516001600160801b03908116600160801b029216919091178155908801516001820155606088015160028201556080880151600390910155506146fb81615d40565b9050614580565b50508b15614791578860200151886020015161471e9190615cf6565b8460200181815161472f9190615e50565b600f0b905250885188516147439190615cf6565b84518590614752908390615e50565b600f90810b90915260208601516000910b1215905061477357600060208501525b60008460000151600f0b121561478857600084525b601d5460808501525b846001141580156147c1575042600660006147ad600189615c09565b815260200190815260200160002060010154145b1561482b5783600660006147d6600189615c09565b815260208082019290925260409081016000208351928401516001600160801b03908116600160801b029316929092178255820151600182015560608201516002820155608090910151600390910155614880565b60168590556000858152600660209081526040918290208651918701516001600160801b03908116600160801b0292169190911781559085015160018201556060850151600282015560808501516003909101555b8b15614a9f57428b6020015111156148f25760208901516148a19088615e50565b96508a602001518a60200151036148c45760208801516148c19088615cf6565b96505b60208b8101516000908152601b9091526040902080546001600160801b0319166001600160801b0389161790555b428a60200151111561494d578a602001518a60200151111561494d57602088015161491d9087615cf6565b60208b8101516000908152601b9091526040902080546001600160801b0319166001600160801b03831617905595505b426040808a01919091524360608a015260008d8152601a602052205480158015906149a1575060008d8152601960205260409020429082633b9aca00811061499757614997615c89565b6004020160010154145b15614a175760008d8152601960205260409020899082633b9aca0081106149ca576149ca615c89565b825160208401516001600160801b03908116600160801b02911617600491909102919091019081556040820151600182015560608201516002820155608090910151600390910155614a9d565b614a2081615d40565b60008e8152601a6020908152604080832084905560199091529020909150899082633b9aca008110614a5457614a54615c89565b825160208401516001600160801b03908116600160801b029116176004919091029190910190815560408201516001820155606082015160028201556080909101516003909101555b505b505050505050505050505050565b6040516001600160a01b03831660248201526044810182905261100290849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152615422565b60008281526018602090815260409182902082516060810184528154600f0b81526001820154928101929092526002015460ff16151591810182905290614b6a57604051632188f8ab60e01b815260040160405180910390fd5b8115801590614b8a57506000614b7f83613d14565b6001600160a01b0316145b15614ba857604051634a1850bf60e11b815260040160405180910390fd5b600083815260136020526040902054439003614bd7576040516342d6fce760e01b815260040160405180910390fd5b828203614be357600091505b6000838152601f6020526040902054828103614bff5750505050565b6000614c118360000151600f0b614200565b9050614c268585614c2188613d14565b615326565b614c3284826001614ca6565b8382614c3c613cd0565b6001600160a01b03167ff1aa2a9e40138176a3ee6099df056f5c175f8511a0d8b8275d94d1ea5de4677360405160405180910390a45050505050565b600060016001607f1b03821115614ca2576040516393dafdf160e01b815260040160405180910390fd5b5090565b6040516375f199b960e11b81526021600482015260206024820152604481018490526064810183905281151560848201527396d5767c916bd13c89e25405f009260866f8b6909063ebe333729060a4015b60006040518083038186803b158015614d0f57600080fd5b505af415801561297e573d6000803e3d6000fd5b60006001600160a01b038316614d3b57614d3b615edb565b614d458383615390565b614d5182600085615326565b60405182906001600160a01b038516906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a450600192915050565b601754614d9f8582615c1c565b6017556040805160608101825260008082526020808301828152838501928352875191880151948801511515909252929052600f9190910b8152614de286614c78565b81518290614df1908390615e50565b600f0b9052508415614e0557602081018590525b600087815260186020908152604091829020835181546001600160801b0319166001600160801b03909116178155908301516001820155908201516002909101805460ff1916911515919091179055614e5f8785836142dc565b6000614e69613cd0565b90508615614ea657614ea66001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001682308a6154f4565b836003811115614eb857614eb86159c9565b602083810151604080518b8152928301919091524282820152518a916001600160a01b038516917f8835c22a0c751188de86681e15904223c054bedd5c68ec8858945b78312902739181900360600190a47f5e2aa66efd74cce82b21852e317e5490d9ecc9e6bb953ae24d90851258cc2f5c83614f358982615c1c565b6040805192835260208301919091520160405180910390a15050505050505050565b6000600860008154614f6890615d40565b91829055506000818152601860209081526040808320865181546001600160801b0319166001600160801b03909116178155868301516001820155868201516002909101805460ff19169115159190911790558051606081018252838152918201839052810191909152909150614fe1908290846142dc565b614feb8382614d23565b5092915050565b60008062093a80806150048642615c1c565b61500e9190615c45565b6150189190615c59565b90508460000361503b57604051631f2a200560e01b815260040160405180910390fd5b42811161505b57604051638e6b5b6760e01b815260040160405180910390fd5b615069630784ce0042615c1c565b8111156150895760405163f761f1cd60e01b815260040160405180910390fd5b600060086000815461509a90615d40565b918290555090506150ab8482614d23565b5060008181526018602090815260409182902082516060810184528154600f0b81526001808301549382019390935260029091015460ff161515928101929092526150fb91839189918691614d92565b95945050505050565b604051637b29b3d160e01b8152601a6004820152601960248201526044810183905260648101829052600090731608e8ad76a267adcfe2a1b4f342e24e832215e190637b29b3d190608401602060405180830381865af415801561516c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061219e9190615c70565b80158061520a5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa1580156151e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906152089190615c70565b155b6152755760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401613d7d565b6040516001600160a01b03831660248201526044810182905261100290849063095ea7b360e01b90606401614ad9565b816001600160a01b03166152b882613d14565b6001600160a01b0316146152ce576152ce615edb565b6000818152600f6020526040902080546001600160a01b03191690556152f48282615532565b6001600160a01b038216600090815260106020526040812080546001929061531d908490615c09565b90915550505050565b60405163690f66bf60e01b8152601860048201526021602482015260206044820152601f60648201526084810184905260a481018390526001600160a01b03821660c48201527396d5767c916bd13c89e25405f009260866f8b6909063690f66bf9060e401614cf7565b600061539b82613d14565b6001600160a01b0316146153b1576153b1615edb565b6000818152600f6020908152604080832080546001600160a01b0319166001600160a01b03871690811790915580845260108084528285208054601486528487208188528652848720889055878752601586529386209390935590845290915280546001929061531d908490615c1c565b6000615477826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166155f19092919063ffffffff16565b80519091501561100257808060200190518101906154959190615ef1565b6110025760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401613d7d565b6040516001600160a01b038085166024830152831660448201526064810182905261552c9085906323b872dd60e01b90608401614ad9565b50505050565b6001600160a01b03821660009081526010602052604081205461555790600190615c09565b6000838152601560205260409020549091508082036155a6576001600160a01b03841660009081526014602090815260408083208584528252808320839055858352601590915281205561552c565b6001600160a01b039390931660009081526014602090815260408083209383529281528282208054868452848420819055835260159091528282209490945592839055908252812055565b606061263d848460008585600080866001600160a01b031685876040516156189190615f0e565b60006040518083038185875af1925050503d8060008114615655576040519150601f19603f3d011682016040523d82523d6000602084013e61565a565b606091505b509150915061566b87838387615678565b925050505b949350505050565b606083156156e75782516000036156e0576001600160a01b0385163b6156e05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401613d7d565b5081615670565b61567083838151156156fc5781518083602001fd5b8060405162461bcd60e51b8152600401613d7d91906157ce565b6040518060a001604052806000600f0b81526020016000600f0b81526020016000815260200160008152602001600081525090565b6001600160e01b03198116811461132157600080fd5b60006020828403121561577357600080fd5b81356126408161574b565b60005b83811015615799578181015183820152602001615781565b50506000910152565b600081518084526157ba81602086016020860161577e565b601f01601f19169290920160200192915050565b60208152600061219e60208301846157a2565b6000602082840312156157f357600080fd5b5035919050565b6001600160a01b038116811461132157600080fd5b60006020828403121561582157600080fd5b8135612640816157fa565b6000806040838503121561583f57600080fd5b823561584a816157fa565b946020939093013593505050565b6000806040838503121561586b57600080fd5b50508035926020909101359150565b60008060006060848603121561588f57600080fd5b833561589a816157fa565b925060208401356158aa816157fa565b929592945050506040919091013590565b600080604083850312156158ce57600080fd5b82356158d9816157fa565b915060208301356158e9816157fa565b809150509250929050565b801515811461132157600080fd5b6000806040838503121561591557600080fd5b8235615920816157fa565b915060208301356158e9816158f4565b6000806040838503121561594357600080fd5b8235915060208301356158e9816158f4565b60a081016121a182848051600f0b82526020810151600f0b60208301526040810151604083015260608101516060830152608081015160808301525050565b6000806000606084860312156159a957600080fd5b83356159b4816157fa565b95602085013595506040909401359392505050565b634e487b7160e01b600052602160045260246000fd5b6020810160038310615a0157634e487b7160e01b600052602160045260246000fd5b91905290565b600080600080600080600060e0888a031215615a2257600080fd5b87359650602088013595506040880135945060608801359350608088013560ff81168114615a4f57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715615aab57615aab615a6c565b604052919050565b600067ffffffffffffffff821115615acd57615acd615a6c565b50601f01601f191660200190565b60008060008060808587031215615af157600080fd5b8435615afc816157fa565b93506020850135615b0c816157fa565b925060408501359150606085013567ffffffffffffffff811115615b2f57600080fd5b8501601f81018713615b4057600080fd5b8035615b53615b4e82615ab3565b615a82565b818152886020838501011115615b6857600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b600080600060608486031215615b9f57600080fd5b83359250602084013591506040840135615bb8816157fa565b809150509250925092565b60008060408385031215615bd657600080fd5b82359150602083013565ffffffffffff811681146158e957600080fd5b634e487b7160e01b600052601160045260246000fd5b818103818111156121a1576121a1615bf3565b808201808211156121a1576121a1615bf3565b634e487b7160e01b600052601260045260246000fd5b600082615c5457615c54615c2f565b500490565b80820281158282048414176121a1576121a1615bf3565b600060208284031215615c8257600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b6000604082018483526020604081850152818551808452606086019150828701935060005b81811015615ce95784516001600160a01b031683529383019391830191600101615cc4565b5090979650505050505050565b600f82810b9082900b0360016001607f1b0319811260016001607f1b03821317156121a1576121a1615bf3565b600060208284031215615d3557600080fd5b8151612640816157fa565b600060018201615d5257615d52615bf3565b5060010190565b60008060408385031215615d6c57600080fd5b8251615d77816157fa565b60208401519092506158e9816157fa565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090615dbb908301846157a2565b9695505050505050565b600060208284031215615dd757600080fd5b81516126408161574b565b600060208284031215615df457600080fd5b815167ffffffffffffffff811115615e0b57600080fd5b8201601f81018413615e1c57600080fd5b8051615e2a615b4e82615ab3565b818152856020838501011115615e3f57600080fd5b6150fb82602083016020860161577e565b600f81810b9083900b0160016001607f1b03811360016001607f1b0319821217156121a1576121a1615bf3565b600081600f0b83600f0b80615e9457615e94615c2f565b60016001607f1b0319821460001982141615615eb257615eb2615bf3565b90059392505050565b600082600f0b82600f0b0280600f0b9150808214614feb57614feb615bf3565b634e487b7160e01b600052600160045260246000fd5b600060208284031215615f0357600080fd5b8151612640816158f4565b60008251615f2081846020870161577e565b919091019291505056fef8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce7a2646970667358221220342a3d4fac96cd7da02e68caabdf31b571c3ba3bdc637c6ce296f4bdd9d364a864736f6c63430008130033ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef000000000000000000000000181ddd56fb5f6baee2a9c18927bd7b8eed37b77700000000000000000000000095f0c274bda9159dcd69fd0c778776bce265cc0a000000000000000000000000c33bfded710676b550f8fe1d180be0aec5cd7e3f
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106104805760003560e01c806370a0823111610257578063b45a3c0e11610146578063e58f5947116100c3578063ec32e6df11610087578063ec32e6df14610ca7578063f04cb3a814610cba578063f52a36f714610d09578063f645d4f914610d3f578063fc0c546a14610d6657600080fd5b8063e58f594714610bfe578063e75b1c2e14610c1e578063e7a324dc14610c31578063e7e242d414610c58578063e985e9c514610c6b57600080fd5b8063c87b56dd1161010a578063c87b56dd14610b9f578063d1c2babb14610bb2578063d9a3495214610bc5578063e0514aba14610bd8578063e0c11f9a14610beb57600080fd5b8063b45a3c0e14610ad6578063b52c05fe14610b5e578063b88d4fde14610b71578063bfe1092814610b84578063c2c4c5c114610b9757600080fd5b806391ddadf4116101d4578063a22cb46511610198578063a22cb46514610a44578063a738da8214610a57578063a899b36c14610a80578063b1548afc14610aa3578063b2383e5514610ac357600080fd5b806391ddadf414610a1857806395d89b41146104de578063981b24d0146109d95780639954a98914610a1e5780639d507b8b14610a3157600080fd5b80638ad4c4471161021b5780638ad4c4471461099b5780638bf9d84c146109ae5780638e539e8c146109d95780638fbb38ff146109ec578063900cf0cf14610a0f57600080fd5b806370a08231146108fc5780637c728000146109255780637ecebe0014610955578063834b0b691461097557806385f2aef21461098857600080fd5b8063370fb5fa116103735780634bf5d7e9116102f057806354fd4d50116102b457806354fd4d501461085f5780635594a04514610883578063572b6c05146108965780635a4f459a146108d65780636352211e146108e957600080fd5b80634bf5d7e9146107af5780634d01cb66146107d95780634d6fb775146107e257806350589793146107f5578063515857d41461083457600080fd5b806342842e0e1161033757806342842e0e1461072e578063430c20811461074157806344acb42a1461075457806346c96aac146107745780634b19becc1461078757600080fd5b8063370fb5fa146106ab57806337b1f500146106be5780633a6396a5146106d15780633bf0c9fb146106e45780633d085a371461070b57600080fd5b806320606b70116104015780632e720f7d116103c55780632e720f7d146106455780632f7f9ba914610658578063313ce5671461066b57806333230dc01461068557806335b0f6bd1461069857600080fd5b806320606b70146105bc57806323b872dd146105e357806327a6ee98146105f65780632d0485ec1461061f5780632e1a7d4d1461063257600080fd5b8063095ea7b311610448578063095ea7b3146105655780630ec84dda1461057857806317d70f7c1461058b57806318160ddd1461059457806319a0a9d51461059c57600080fd5b806301ffc9a714610485578063047fc9aa146104c757806306fdde03146104de578063081812fc1461050f578063095cf5c614610550575b600080fd5b6104b2610493366004615761565b6001600160e01b03191660009081526007602052604090205460ff1690565b60405190151581526020015b60405180910390f35b6104d060175481565b6040519081526020016104be565b610502604051806040016040528060058152602001641d9953919560da1b81525081565b6040516104be91906157ce565b61053861051d3660046157e1565b6000908152601160205260409020546001600160a01b031690565b6040516001600160a01b0390911681526020016104be565b61056361055e36600461580f565b610d8d565b005b61056361057336600461582c565b610e11565b610563610586366004615858565b610f52565b6104d060085481565b6104d0610fdf565b6104d06105aa3660046157e1565b600a6020526000908152604090205481565b6104d07f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6105636105f136600461587a565b610fef565b6105386106043660046157e1565b600e602052600090815260409020546001600160a01b031681565b61056361062d3660046158bb565b611007565b6105636106403660046157e1565b611070565b61056361065336600461580f565b611324565b600554610538906001600160a01b031681565b610673601281565b60405160ff90911681526020016104be565b610563610693366004615902565b6113b8565b6105636106a63660046157e1565b61141e565b6105636106b93660046157e1565b61168d565b6105636106cc366004615930565b611c92565b6104d06106df36600461580f565b611e78565b6105387f000000000000000000000000c33bfded710676b550f8fe1d180be0aec5cd7e3f81565b6104b261071936600461580f565b601c6020526000908152604090205460ff1681565b61056361073c36600461587a565b612177565b6104b261074f36600461582c565b612192565b610767610762366004615858565b6121a7565b6040516104be9190615955565b600254610538906001600160a01b031681565b61079a610795366004615858565b612225565b604080519283526020830191909152016104be565b60408051808201909152600e81526d06d6f64653d74696d657374616d760941b6020820152610502565b6104d0601d5481565b6104d06107f0366004615994565b6125a2565b61081d6108033660046157e1565b60216020526000908152604090205465ffffffffffff1681565b60405165ffffffffffff90911681526020016104be565b6104d0610842366004615858565b600b60209081526000928352604080842090915290825290205481565b610502604051806040016040528060058152602001640322e302e360dc1b81525081565b600454610538906001600160a01b031681565b6104b26108a436600461580f565b7f000000000000000000000000181ddd56fb5f6baee2a9c18927bd7b8eed37b7776001600160a01b0390811691161490565b6105636108e4366004615930565b612647565b6105386108f73660046157e1565b6126a2565b6104d061090a36600461580f565b6001600160a01b031660009081526010602052604090205490565b6109486109333660046157e1565b60096020526000908152604090205460ff1681565b6040516104be91906159df565b6104d061096336600461580f565b60226020526000908152604090205481565b610563610983366004615a07565b6126ad565b600354610538906001600160a01b031681565b6107676109a93660046157e1565b612987565b6104d06109bc36600461582c565b601460209081526000928352604080842090915290825290205481565b6104d06109e73660046157e1565b612a18565b6104b26109fa3660046157e1565b601e6020526000908152604090205460ff1681565b6104d060165481565b4261081d565b610563610a2c36600461580f565b612a23565b610563610a3f366004615858565b612b72565b610563610a52366004615902565b612d46565b610538610a653660046157e1565b600d602052600090815260409020546001600160a01b031681565b6104b2610a8e3660046157e1565b600c6020526000908152604090205460ff1681565b6104d0610ab13660046157e1565b6000908152601f602052604090205490565b610563610ad1366004615858565b612df1565b610b37610ae43660046157e1565b6040805160608082018352600080835260208084018290529284018190529384526018825292829020825193840183528054600f0b84526001810154918401919091526002015460ff1615159082015290565b604080518251600f0b815260208084015190820152918101511515908201526060016104be565b6104d0610b6c366004615858565b612e2d565b610563610b7f366004615adb565b612e55565b600154610538906001600160a01b031681565b610563612f78565b610502610bad3660046157e1565b612fca565b610563610bc0366004615858565b61306d565b610563610bd3366004615858565b6134cc565b6104d0610be6366004615858565b6134fe565b610563610bf9366004615858565b61350a565b6104d0610c0c3660046157e1565b601a6020526000908152604090205481565b610563610c2c3660046157e1565b6139c7565b6104d07f9947d5709c1682eaa3946b2d84115c9c0d1c946b149d76e69b457458b42ea29e81565b6104d0610c663660046157e1565b613bf6565b6104b2610c793660046158bb565b6001600160a01b03918216600090815260126020908152604080832093909416825291909152205460ff1690565b6104d0610cb5366004615b8a565b613c1e565b610ccd610cc8366004615bc3565b613c3f565b6040516104be9190815181526020808301516001600160a01b031690820152604080830151908201526060918201519181019190915260800190565b610d2c610d173660046157e1565b601b60205260009081526040902054600f0b81565b604051600f9190910b81526020016104be565b6105387f000000000000000000000000181ddd56fb5f6baee2a9c18927bd7b8eed37b77781565b6105387f00000000000000000000000095f0c274bda9159dcd69fd0c778776bce265cc0a81565b6003546001600160a01b0316610da1613cd0565b6001600160a01b031614610dc857604051633a7cfa5d60e21b815260040160405180910390fd5b6001600160a01b038116610def5760405163d92e233d60e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000610e1b613cd0565b90506000610e2883613d14565b90506001600160a01b038116610e515760405163d92e233d60e01b815260040160405180910390fd5b836001600160a01b0316816001600160a01b031603610e835760405163367558c360e01b815260040160405180910390fd5b6000826001600160a01b0316610e9885613d14565b6001600160a01b0384811660009081526012602090815260408083208985168452909152902054911691909114915060ff16811582610ed5575080155b15610ef35760405163390cdd9b60e21b815260040160405180910390fd5b60008581526011602052604080822080546001600160a01b0319166001600160a01b038a811691821790925591518893918716917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050505050565b610f5a613d2f565b600260008381526009602052604090205460ff166002811115610f7f57610f7f6159c9565b148015610fa757506001546001600160a01b0316610f9b613cd0565b6001600160a01b031614155b15610fc55760405163385296d560e01b815260040160405180910390fd5b610fd182826000613d8d565b610fdb6001600055565b5050565b6000610fea42613fd8565b905090565b611002838383610ffd613cd0565b614068565b505050565b6002546001600160a01b031661101b613cd0565b6001600160a01b0316146110425760405163c18384c160e01b815260040160405180910390fd5b600280546001600160a01b039384166001600160a01b03199182161790915560018054929093169116179055565b611078613d2f565b6000611082613cd0565b905061108e8183614196565b6110ab5760405163390cdd9b60e21b815260040160405180910390fd5b6000828152601e602052604090205460ff16156110db57604051637c9a1cf960e01b815260040160405180910390fd5b60008281526009602052604081205460ff1660028111156110fe576110fe6159c9565b1461111c576040516317a66f3760e01b815260040160405180910390fd5b60008281526018602090815260409182902082516060810184528154600f0b81526001820154928101929092526002015460ff161580159282019290925290611178576040516334d10f9560e11b815260040160405180910390fd5b806020015142101561119d5760405163342ad40160e11b815260040160405180910390fd5b60006111af8260000151600f0b614200565b90506111ba8461422c565b6040805160608101825260008082526020808301828152838501838152898452601890925293909120915182546001600160801b0319166001600160801b039091161782559151600182015590516002909101805460ff19169115159190911790556017546112298282615c09565b601755604080516060810182526000808252602082018190529181019190915261125690869085906142dc565b61128a6001600160a01b037f00000000000000000000000095f0c274bda9159dcd69fd0c778776bce265cc0a168584614aad565b6040805183815242602082015286916001600160a01b038716917f02f25270a4d87bea75db541cdfe559334a275b4a233520ed6c0a2429667cca94910160405180910390a37f5e2aa66efd74cce82b21852e317e5490d9ecc9e6bb953ae24d90851258cc2f5c816112fb8482615c09565b6040805192835260208301919091520160405180910390a1505050506113216001600055565b50565b6003546001600160a01b0316611338613cd0565b6001600160a01b03161461135f57604051633a7cfa5d60e21b815260040160405180910390fd5b600480546001600160a01b0319166001600160a01b038316179055604080516000815260001960208201527f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c910160405180910390a150565b6003546001600160a01b03166113cc613cd0565b6001600160a01b0316146113f357604051633a7cfa5d60e21b815260040160405180910390fd5b6001600160a01b03919091166000908152601c60205260409020805460ff1916911515919091179055565b6000611428613cd0565b90506114348183614196565b6114515760405163390cdd9b60e21b815260040160405180910390fd5b60008281526009602052604081205460ff166002811115611474576114746159c9565b14611492576040516317a66f3760e01b815260040160405180910390fd5b6000828152601e602052604090205460ff16156114c257604051637c9a1cf960e01b815260040160405180910390fd5b60008281526018602090815260409182902082516060810184528154600f0b81526001820154928101929092526002015460ff1615159181018290529061151c57604051632188f8ab60e01b815260040160405180910390fd5b600061152e8260000151600f0b614200565b905080601d60008282546115429190615c09565b9091555062093a8090508061155b630784ce0042615c1c565b6115659190615c45565b61156f9190615c59565b6020830152600060408301819052611588908590614b10565b60008481526018602090815260409182902082516060810184528154600f0b81526001820154928101929092526002015460ff161515918101919091526115d1908590846142dc565b600084815260186020908152604091829020845181546001600160801b0319166001600160801b03909116178155848201516001820155848301516002909101805460ff19169115159190911790558151838152429181019190915285916001600160a01b038616917f668d293c0a181c1f163fd0d3c757239a9c17bd26c5e483150e374455433b27fa91015b60405180910390a3604051848152600080516020615f2b8339815191529060200160405180910390a150505050565b611695613d2f565b6000818152600a60205260409020546002546001600160a01b03166116b8613cd0565b6001600160a01b0316146116df5760405163c18384c160e01b815260040160405180910390fd5b806000036117005760405163d7caa26160e01b815260040160405180910390fd5b600160008381526009602052604090205460ff166002811115611725576117256159c9565b1461174357604051630fd82f7760e11b815260040160405180910390fd5b6000818152600d6020908152604080832054600e835281842054868552600b8452828520868652909352818420549151633e491d4760e01b81526001600160a01b037f00000000000000000000000095f0c274bda9159dcd69fd0c778776bce265cc0a81166004830152602482018890529182169491909316928490633e491d4790604401602060405180830381865afa1580156117e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118099190615c70565b905060006118178284615c1c565b9050600062093a808061182e630784ce0042615c1c565b6118389190615c45565b6118429190615c59565b60408051600180825281830190925291925060009190602080830190803683370190505090507f00000000000000000000000095f0c274bda9159dcd69fd0c778776bce265cc0a8160008151811061189c5761189c615c89565b6001600160a01b03928316602091820292909201015260405163f5f8d36560e01b81529088169063f5f8d365906118d9908c908590600401615c9f565b600060405180830381600087803b1580156118f357600080fd5b505af1158015611907573d6000803e3d6000fd5b505050506000604051806060016040528061192186614c78565b600f90810b82526020808301879052600060409384018190528e8152601882528390208351606081018552815490930b83526001810154918301919091526002015460ff1615159181019190915290915061197e908b90836142dc565b60008a8152601860209081526040808320845181546001600160801b0319166001600160801b0390911617815584830151600180830191909155858301516002928301805460ff19169115159190911790558d85529382902082516060810184528154600f0b8082529582015494810194909452015460ff1615159082015290611a0786614c78565b600f0b12611a16578051611a1f565b611a1f85614c78565b81518290611a2e908390615cf6565b600f0b905250601d548510611a4557601d54611a47565b845b601d6000828254611a589190615c09565b909155505060008a8152601f6020526040812054611a77918790614ca6565b60008a81526018602090815260409182902082516060810184528154600f0b81526001820154928101929092526002015460ff16151591810191909152611ac0908b90836142dc565b60008a815260186020908152604091829020835181546001600160801b0319166001600160801b03909116178155908301516001820155828201516002909101805460ff19169115159190911790555163278afc8b60e21b815260048101889052602481018c90526001600160a01b038a1690639e2bf22c90604401600060405180830381600087803b158015611b5657600080fd5b505af1158015611b6a573d6000803e3d6000fd5b505060405163278afc8b60e21b8152600481018a9052602481018e90526001600160a01b038b169250639e2bf22c9150604401600060405180830381600087803b158015611bb757600080fd5b505af1158015611bcb573d6000803e3d6000fd5b50505060008c8152600a60209081526040808320839055600b82528083208e845282528083208390558e835260099091529020805460ff1916905550898b611c1281613d14565b6001600160a01b03167f5319474ec1e9d118585a40e615ea37be254007e6bb5b039756c3813c2d1354898842604051611c55929190918252602082015260400190565b60405180910390a46040518b8152600080516020615f2b8339815191529060200160405180910390a1505050505050505050506113216001600055565b600260009054906101000a90046001600160a01b03166001600160a01b0316637778960e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611ce5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d099190615d23565b6001600160a01b0316611d1a613cd0565b6001600160a01b031614158015611dc05750600260009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611da39190615d23565b6001600160a01b0316611db4613cd0565b6001600160a01b031614155b15611dde5760405163459d6a3f60e01b815260040160405180910390fd5b600260008381526009602052604090205460ff166002811115611e0357611e036159c9565b14611e215760405163054b1e0160e51b815260040160405180910390fd5b6000828152600c602052604090205481151560ff909116151503611e5857604051631490ad1160e01b815260040160405180910390fd5b6000918252600c6020526040909120805460ff1916911515919091179055565b6000611e82613d2f565b6000611e8c613cd0565b6005549091506001600160a01b03808316911614801590611f355750600260009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b8152600401602060405180830381865afa158015611efb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f1f9190615d23565b6001600160a01b0316816001600160a01b031614155b15611f5357604051633bc1d15f60e01b815260040160405180910390fd5b600860008154611f6290615d40565b91829055509150611f738383614d23565b50611fa58260008060405180606001604052806000600f0b815260200160008152602001600115158152506001614d92565b6000828152600960209081526040808320805460ff1916600217905580516301a15ccf60e31b8152905183926001600160a01b037f000000000000000000000000c33bfded710676b550f8fe1d180be0aec5cd7e3f1692630d0ae67892600480830193928290030181865afa158015612022573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120469190615d23565b60025460405163dabc8e8360e01b81526001600160a01b037f000000000000000000000000181ddd56fb5f6baee2a9c18927bd7b8eed37b77781166004830152918216602482015291169063dabc8e839060440160408051808303816000875af11580156120b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120dc9190615d59565b6000868152600d6020908152604080832080546001600160a01b038781166001600160a01b03199283168117909355600e8552948390208054878716921682179055825191825292810192909252939550919350858116928792918916917fae65a147ec014982132ce8b32019735e3c5f41457848d2ce2e2c3e0cbc9df7bc910160405180910390a45050506121726001600055565b919050565b61100283838360405180602001604052806000815250612e55565b600061219e8383614196565b90505b92915050565b6121af615716565b600083815260196020526040902082633b9aca0081106121d1576121d1615c89565b6040805160a081018252600492909202929092018054600f81810b8452600160801b909104900b60208301526001810154928201929092526002820154606082015260039091015460808201529392505050565b600080612230613d2f565b600061223a613cd0565b9050600061224786613d14565b90506001600160a01b03811661227057604051632c2151ef60e11b815260040160405180910390fd5b6001600160a01b0381166000908152601c602052604090205460ff161580156122c4575060008052601c6020527fb9c6de81004e18dedadca3e5eabaab449ca91dff6f58efc9461da635fe77f8495460ff16155b156122e257604051633df16fd960e21b815260040160405180910390fd5b60008681526009602052604081205460ff166002811115612305576123056159c9565b14612323576040516317a66f3760e01b815260040160405180910390fd5b6000868152601e602052604090205460ff161561235357604051637c9a1cf960e01b815260040160405180910390fd5b61235d8287614196565b61237a5760405163390cdd9b60e21b815260040160405180910390fd5b60008681526018602090815260409182902082516060810184528154600f0b8152600182015492810183905260029091015460ff1615159281019290925242108015906123c957508060400151155b156123e7576040516307b7d7dd60e51b815260040160405180910390fd5b60006123f287614c78565b905080600f0b60000361241857604051631f2a200560e01b815260040160405180910390fd5b80600f0b8260000151600f0b1361244257604051636b2f218360e01b815260040160405180910390fd5b61244b8861422c565b6040805160608082018352600080835260208084018281528486018381528e845260188352868420955186546001600160801b0319166001600160801b0390911617865590516001860155516002909401805460ff19169415159490941790935583519182018452808252918101829052918201526124cd90899084906142dc565b80826000018181516124df9190615cf6565b600f0b9052506124ef8383614f57565b600f82900b835295506125028383614f57565b600087815260186020526040902054909550859087908a907f8303de8187a6102fdc3fe20c756dddd68df0ae027b77e2391c19a855e0821f3390889061254a90600f0b614200565b61255687600f0b614200565b6020808a0151604080516001600160a01b03909616865291850193909352830152606082015242608082015260a00160405180910390a45050505061259b6001600055565b9250929050565b6040516332b53f5360e11b815260216004820152602060248201526001600160a01b038416604482015260648101839052608481018290526000907396d5767c916bd13c89e25405f009260866f8b6909063656a7ea69060a401602060405180830381865af4158015612619573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061263d9190615c70565b90505b9392505050565b6002546001600160a01b031661265b613cd0565b6001600160a01b0316146126825760405163c18384c160e01b815260040160405180910390fd5b6000918252601e6020526040909120805460ff1916911515919091179055565b60006121a182613d14565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08111156126ee576040516317e97eb760e31b815260040160405180910390fd5b6040805180820182526005808252641d9953919560da1b60209283015282518084018452908152640322e302e360dc1b9082015281517f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866818301527fc792e9874e7b42c234d1e8448cec020a0f065019c8cd6f7ccdb65b8c110157e9818401527fb4bcb154e38601c389396fa918314da42d4626f13ef6d0ceb07e5f5d26b2fbc360608201524660808201523060a0808301919091528351808303909101815260c0820184528051908301207f9947d5709c1682eaa3946b2d84115c9c0d1c946b149d76e69b457458b42ea29e60e083015261010082018b905261012082018a905261014082018990526101608083018990528451808403909101815261018083019094528351939092019290922061190160f01b6101a08401526101a283018290526101c2830181905290916000906101e20160408051601f198184030181528282528051602091820120600080855291840180845281905260ff8a169284019290925260608301889052608083018790529092509060019060a0016020604051602081039080840390855afa1580156128ad573d6000803e3d6000fd5b5050506020604051035190506128c3818c614196565b6128e05760405163390cdd9b60e21b815260040160405180910390fd5b6001600160a01b03811661290757604051638baa579f60e01b815260040160405180910390fd5b6001600160a01b038116600090815260226020526040812080549161292b83615d40565b91905055891461294e57604051633ab3447f60e11b815260040160405180910390fd5b8742111561296f57604051630819bdcd60e01b815260040160405180910390fd5b6129798b8b614b10565b505050505b50505050505050565b6129bf6040518060a001604052806000600f0b81526020016000600f0b81526020016000815260200160008152602001600081525090565b50600090815260066020908152604091829020825160a0810184528154600f81810b8352600160801b909104900b9281019290925260018101549282019290925260028201546060820152600390910154608082015290565b60006121a182613fd8565b600260009054906101000a90046001600160a01b03166001600160a01b0316630c340a246040518163ffffffff1660e01b8152600401602060405180830381865afa158015612a76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a9a9190615d23565b6001600160a01b0316612aab613cd0565b6001600160a01b031614612ad257604051633b8d9d7560e21b815260040160405180910390fd5b6005546001600160a01b0390811690821603612b015760405163367558c360e01b815260040160405180910390fd5b6001600160a01b038116612b285760405163d92e233d60e01b815260040160405180910390fd5b600580546001600160a01b0319166001600160a01b0383169081179091556040517f1a6ce72407c68def4b7d2e724c896070d89cf2b2a2dd56b6897b5febd88420f590600090a250565b612b7a613d2f565b612b8b612b85613cd0565b83614196565b612ba85760405163390cdd9b60e21b815260040160405180910390fd5b60008281526009602052604081205460ff166002811115612bcb57612bcb6159c9565b14612be9576040516317a66f3760e01b815260040160405180910390fd5b60008281526018602090815260409182902082516060810184528154600f0b81526001820154928101929092526002015460ff161580159282019290925290612c45576040516334d10f9560e11b815260040160405180910390fd5b600062093a8080612c568542615c1c565b612c609190615c45565b612c6a9190615c59565b905042826020015111612c90576040516307b7d7dd60e51b815260040160405180910390fd5b60008260000151600f0b13612cb85760405163f90e998d60e01b815260040160405180910390fd5b81602001518111612cdc57604051638e6b5b6760e01b815260040160405180910390fd5b612cea630784ce0042615c1c565b811115612d0a5760405163f761f1cd60e01b815260040160405180910390fd5b612d1984600083856003614d92565b604051848152600080516020615f2b8339815191529060200160405180910390a15050610fdb6001600055565b6000612d50613cd0565b9050806001600160a01b0316836001600160a01b031603612d845760405163367558c360e01b815260040160405180910390fd5b6001600160a01b03818116600081815260126020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612df9613d2f565b612e04612b85613cd0565b612e215760405163390cdd9b60e21b815260040160405180910390fd5b610fd182826002613d8d565b6000612e37613d2f565b612e498383612e44613cd0565b614ff2565b90506121a16001600055565b6000612e5f613cd0565b9050612e6d85858584614068565b833b15612f7157604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612ea6908490899088908890600401615d88565b6020604051808303816000875af1925050508015612ee1575060408051601f3d908101601f19168201909252612ede91810190615dc5565b60015b612f3e573d808015612f0f576040519150601f19603f3d011682016040523d82523d6000602084013e612f14565b606091505b508051600003612f3657604051626b5e2960e61b815260040160405180910390fd5b805181602001fd5b6001600160e01b03198116630a85bd0160e11b14612f6f5760405163279929b160e21b815260040160405180910390fd5b505b5050505050565b612f80613d2f565b604080516060808201835260008083526020808401829052838501829052845192830185528183528201819052928101839052612fbe9291906142dc565b612fc86001600055565b565b60606000612fd783613d14565b6001600160a01b031603612ffe57604051634a1850bf60e11b815260040160405180910390fd5b6004805460405163c87b56dd60e01b81529182018490526001600160a01b03169063c87b56dd90602401600060405180830381865afa158015613045573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526121a19190810190615de2565b613075613d2f565b600061307f613cd0565b6000848152601e602052604090205490915060ff16156130b257604051637c9a1cf960e01b815260040160405180910390fd5b60008381526009602052604081205460ff1660028111156130d5576130d56159c9565b146130f3576040516317a66f3760e01b815260040160405180910390fd5b60008281526009602052604081205460ff166002811115613116576131166159c9565b14613134576040516317a66f3760e01b815260040160405180910390fd5b818303613154576040516349da877960e11b815260040160405180910390fd5b61315e8184614196565b61317b5760405163390cdd9b60e21b815260040160405180910390fd5b6131858183614196565b6131a25760405163390cdd9b60e21b815260040160405180910390fd5b60008281526018602090815260409182902082516060810184528154600f0b8152600182015492810183905260029091015460ff1615159281019290925242108015906131f157508060400151155b1561320f576040516307b7d7dd60e51b815260040160405180910390fd5b60008481526018602090815260409182902082516060810184528154600f0b81526001820154928101929092526002015460ff16158015928201929092529061326b576040516334d10f9560e11b815260040160405180910390fd5b600082602001518260200151101561328757826020015161328d565b81602001515b90506132988661422c565b6040805160608082018352600080835260208084018281528486018381528c845260188352868420955186546001600160801b0319166001600160801b0390911617865590516001860155516002909401805460ff191694151594909417909355835191820184528082529181018290529182015261331a90879084906142dc565b6040805160608101825260008082526020820181905291810191909152825184516133459190615e50565b600f0b81526040808501511580159183019190915261338857825161336c90600f0b614200565b601d600082825461337d9190615c1c565b909155506133909050565b602081018290525b6000868152601f602052604090205483516133b991906133b290600f0b614200565b6001614ca6565b6133c48685836142dc565b600086815260186020908152604091829020835181546001600160801b0319166001600160801b03909116178155908301516001820155908201516002909101805460ff19169115159190911790558251869088906001600160a01b038816907f986e3c958e3bdf1f58c2150357fc94624dd4e77b08f9802d8e2e885fa0d6a1989061345290600f0b614200565b885161346090600f0b614200565b865161346e90600f0b614200565b6020808901516040805195865291850193909352830152606082015242608082015260a00160405180910390a4604051868152600080516020615f2b833981519152906020015b60405180910390a15050505050610fdb6001600055565b6134d7612b85613cd0565b6134f45760405163390cdd9b60e21b815260040160405180910390fd5b610fdb8282614b10565b600061219e8383615104565b613512613d2f565b6002546001600160a01b0316613526613cd0565b6001600160a01b03161461354d5760405163c18384c160e01b815260040160405180910390fd5b600260008281526009602052604090205460ff166002811115613572576135726159c9565b146135905760405163054b1e0160e51b815260040160405180910390fd5b60008281526009602052604081205460ff1660028111156135b3576135b36159c9565b146135d1576040516317a66f3760e01b815260040160405180910390fd5b6135db8242615104565b6000036135fb5760405163334ab3f560e11b815260040160405180910390fd5b60008281526018602052604090208054600290910154600f9190910b9060ff161561364e5761362c81600f0b614200565b601d600082825461363d9190615c09565b9091555061364e9050836000614b10565b60008381526018602090815260408083208151606080820184528254600f0b825260018301548286015260029092015460ff1615158184015282519182018352848252928101849052908101929092526136aa918591906142dc565b60408051606081018252600080825260208083018281528385018381528884526018909252938220925183546001600160801b0319166001600160801b039091161783559251600183015591516002909101805460ff1916911515919091179055613718600f83900b614200565b905080601d600082825461372c9190615c1c565b909155505060008381526018602090815260409182902082516060810184528154600f0b80825260018301549382019390935260029091015460ff1615159281019290925283908290613780908390615e50565b600f0b9052506000848152601f60205260409020546137a190836001614ca6565b60008481526018602090815260409182902082516060810184528154600f0b81526001820154928101929092526002015460ff161515918101919091526137ea908590836142dc565b6000848152601860209081526040808320845181546001600160801b0319166001600160801b0390911617815584830151600180830191909155858301516002909201805460ff19908116931515939093179055898552600b84528285208986528452828520879055898552600a8452828520899055600984528285208054909216179055868352600d9091529081902054905163f320772360e01b815260048101849052602481018790526001600160a01b0390911690819063f320772390604401600060405180830381600087803b1580156138c757600080fd5b505af11580156138db573d6000803e3d6000fd5b5050506000868152600e60205260409081902054905163f320772360e01b815260048101869052602481018990526001600160a01b039091169150819063f320772390604401600060405180830381600087803b15801561393b57600080fd5b505af115801561394f573d6000803e3d6000fd5b50505050858761395e89613d14565b6001600160a01b03167ff7757ce35992f4ee014dee2e0c97ed6245758960a6ecc9e124897a5fb7b0142387426040516139a1929190918252602082015260400190565b60405180910390a4604051878152600080516020615f2b833981519152906020016134b5565b60006139d1613cd0565b90506139dd8183614196565b6139fa5760405163390cdd9b60e21b815260040160405180910390fd5b60008281526009602052604081205460ff166002811115613a1d57613a1d6159c9565b14613a3b576040516317a66f3760e01b815260040160405180910390fd5b60008281526018602090815260409182902082516060810184528154600f0b81526001820154928101929092526002015460ff161580159282019290925290613a97576040516334d10f9560e11b815260040160405180910390fd5b42816020015111613abb576040516307b7d7dd60e51b815260040160405180910390fd5b60008160000151600f0b13613ae35760405163f90e998d60e01b815260040160405180910390fd5b6000613af58260000151600f0b614200565b905080601d6000828254613b099190615c1c565b90915550506000602080840182905260016040808601829052878452601883529283902083516060810185528154600f0b8152918101549282019290925260029091015460ff16151591810191909152613b65908590846142dc565b600084815260186020908152604091829020845181546001600160801b0319166001600160801b03909116178155848201516001820155848301516002909101805460ff19169115159190911790558151838152429181019190915285916001600160a01b038616917f793cb7a30a4bb8669ec607dfcbdc93f5a3e9d282f38191fddab43ccaf79efb80910161165e565b600081815260136020526040812054439003613c1457506000919050565b6121a18242615104565b6000613c28613d2f565b613c33848484614ff2565b90506126406001600055565b613c7360405180608001604052806000815260200160006001600160a01b0316815260200160008152602001600081525090565b5060009182526020808052604080842065ffffffffffff9390931684529181529181902081516080810183528154815260018201546001600160a01b03169381019390935260028101549183019190915260030154606082015290565b60007f000000000000000000000000181ddd56fb5f6baee2a9c18927bd7b8eed37b7776001600160a01b03163303613d0f575060131936013560601c90565b503390565b6000908152600f60205260409020546001600160a01b031690565b600260005403613d865760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002600055565b60008381526009602052604090205460ff166001816002811115613db357613db36159c9565b03613dd157604051635eb32db160e11b815260040160405180910390fd5b600084815260186020908152604080832081516060810183528154600f0b81526001820154938101939093526002015460ff1615159082015290849003613e2b57604051631f2a200560e01b815260040160405180910390fd5b60008160000151600f0b13613e535760405163f90e998d60e01b815260040160405180910390fd5b42816020015111158015613e6957508060400151155b15613e87576040516307b7d7dd60e51b815260040160405180910390fd5b806040015115613ea95783601d6000828254613ea39190615c1c565b90915550505b6000858152601f6020526040902054613ec490856001614ca6565b613ed2858560008487614d92565b6002826002811115613ee657613ee66159c9565b03613fb0576000858152600d60205260409020546001600160a01b03908116907f00000000000000000000000095f0c274bda9159dcd69fd0c778776bce265cc0a90613f359082168388615190565b60405163b66503cf60e01b81526001600160a01b0382811660048301526024820188905283169063b66503cf90604401600060405180830381600087803b158015613f7f57600080fd5b505af1158015613f93573d6000803e3d6000fd5b50613fad925050506001600160a01b038216836000615190565b50505b604051858152600080516020615f2b8339815191529060200160405180910390a15050505050565b601654604051637259b01960e01b8152601b600482015260066024820152604481019190915260648101829052600090731608e8ad76a267adcfe2a1b4f342e24e832215e190637259b01990608401602060405180830381865af4158015614044573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121a19190615c70565b600160008381526009602052604090205460ff16600281111561408d5761408d6159c9565b036140ab57604051635eb32db160e11b815260040160405180910390fd5b6140b58183614196565b6140d25760405163390cdd9b60e21b815260040160405180910390fd5b836001600160a01b03166140e583613d14565b6001600160a01b03161461410c576040516330cd747160e01b815260040160405180910390fd5b600082815260116020526040902080546001600160a01b031916905561413284836152a5565b61413e82600085615326565b6141488383615390565b6000828152601360205260408082204390555183916001600160a01b0380871692908816917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a450505050565b6000806141a283613d14565b6000848152601160209081526040808320546001600160a01b0380861680865260128552838620828c1680885295529290942054949550908214939216149060ff1682806141ed5750815b806141f55750805b979650505050505050565b60008082600f0b12156142255760405162406f5d60e21b815260040160405180910390fd5b50600f0b90565b6000614236613cd0565b90506142428183614196565b61425f5760405163390cdd9b60e21b815260040160405180910390fd5b600061426a83613d14565b600084815260116020526040812080546001600160a01b031916905590915061429590849080615326565b61429f81846152a5565b60405183906000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4505050565b6142e4615716565b6142ec615716565b6016546000908190871561443f57856040015161430a576000614318565b855161431890600f0b614200565b6080850152602087015142108015614337575060008760000151600f0b135b1561438557865161434d90630784ce0090615e7d565b600f0b6020808701919091528701516143709061436b904290615c09565b614c78565b856020015161437f9190615ebb565b600f0b85525b42866020015111801561439f575060008660000151600f0b135b156143e85785516143b590630784ce0090615e7d565b600f0b6020808601919091528601516143d39061436b904290615c09565b84602001516143e29190615ebb565b600f0b84525b6020808801516000908152601b8252604090205490870151600f9190910b93501561443f5786602001518660200151036144245782915061443f565b6020808701516000908152601b9091526040902054600f0b91505b6040805160a0810182526000808252602082018190524292820192909252436060820152608081019190915281156144c85750600081815260066020908152604091829020825160a0810184528154600f81810b8352600160801b909104900b928101929092526001810154928201929092526002820154606082015260039091015460808201525b60008160400151905060006040518060a001604052808460000151600f0b81526020018460200151600f0b8152602001846040015181526020018460600151815260200184608001518152509050600083604001514211156145615760408401516145339042615c09565b60608501516145429043615c09565b61455490670de0b6b3a7640000615c59565b61455e9190615c45565b90505b600062093a806145718186615c45565b61457b9190615c59565b905060005b60ff8110156147025761459662093a8083615c1c565b91506000428311156145aa574292506145be565b506000828152601b6020526040902054600f0b5b6145cb61436b8785615c09565b87602001516145da9190615ebb565b875188906145e9908390615cf6565b600f0b905250602087018051829190614603908390615e50565b600f90810b90915288516000910b1215905061461e57600087525b60008760200151600f0b121561463657600060208801525b60408088018490528501519295508592670de0b6b3a76400009061465a9085615c09565b6146649086615c59565b61466e9190615c45565b856060015161467d9190615c1c565b606088015261468d600189615c1c565b97504283036146a25750436060870152614702565b6000888152600660209081526040918290208951918a01516001600160801b03908116600160801b029216919091178155908801516001820155606088015160028201556080880151600390910155506146fb81615d40565b9050614580565b50508b15614791578860200151886020015161471e9190615cf6565b8460200181815161472f9190615e50565b600f0b905250885188516147439190615cf6565b84518590614752908390615e50565b600f90810b90915260208601516000910b1215905061477357600060208501525b60008460000151600f0b121561478857600084525b601d5460808501525b846001141580156147c1575042600660006147ad600189615c09565b815260200190815260200160002060010154145b1561482b5783600660006147d6600189615c09565b815260208082019290925260409081016000208351928401516001600160801b03908116600160801b029316929092178255820151600182015560608201516002820155608090910151600390910155614880565b60168590556000858152600660209081526040918290208651918701516001600160801b03908116600160801b0292169190911781559085015160018201556060850151600282015560808501516003909101555b8b15614a9f57428b6020015111156148f25760208901516148a19088615e50565b96508a602001518a60200151036148c45760208801516148c19088615cf6565b96505b60208b8101516000908152601b9091526040902080546001600160801b0319166001600160801b0389161790555b428a60200151111561494d578a602001518a60200151111561494d57602088015161491d9087615cf6565b60208b8101516000908152601b9091526040902080546001600160801b0319166001600160801b03831617905595505b426040808a01919091524360608a015260008d8152601a602052205480158015906149a1575060008d8152601960205260409020429082633b9aca00811061499757614997615c89565b6004020160010154145b15614a175760008d8152601960205260409020899082633b9aca0081106149ca576149ca615c89565b825160208401516001600160801b03908116600160801b02911617600491909102919091019081556040820151600182015560608201516002820155608090910151600390910155614a9d565b614a2081615d40565b60008e8152601a6020908152604080832084905560199091529020909150899082633b9aca008110614a5457614a54615c89565b825160208401516001600160801b03908116600160801b029116176004919091029190910190815560408201516001820155606082015160028201556080909101516003909101555b505b505050505050505050505050565b6040516001600160a01b03831660248201526044810182905261100290849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152615422565b60008281526018602090815260409182902082516060810184528154600f0b81526001820154928101929092526002015460ff16151591810182905290614b6a57604051632188f8ab60e01b815260040160405180910390fd5b8115801590614b8a57506000614b7f83613d14565b6001600160a01b0316145b15614ba857604051634a1850bf60e11b815260040160405180910390fd5b600083815260136020526040902054439003614bd7576040516342d6fce760e01b815260040160405180910390fd5b828203614be357600091505b6000838152601f6020526040902054828103614bff5750505050565b6000614c118360000151600f0b614200565b9050614c268585614c2188613d14565b615326565b614c3284826001614ca6565b8382614c3c613cd0565b6001600160a01b03167ff1aa2a9e40138176a3ee6099df056f5c175f8511a0d8b8275d94d1ea5de4677360405160405180910390a45050505050565b600060016001607f1b03821115614ca2576040516393dafdf160e01b815260040160405180910390fd5b5090565b6040516375f199b960e11b81526021600482015260206024820152604481018490526064810183905281151560848201527396d5767c916bd13c89e25405f009260866f8b6909063ebe333729060a4015b60006040518083038186803b158015614d0f57600080fd5b505af415801561297e573d6000803e3d6000fd5b60006001600160a01b038316614d3b57614d3b615edb565b614d458383615390565b614d5182600085615326565b60405182906001600160a01b038516906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a450600192915050565b601754614d9f8582615c1c565b6017556040805160608101825260008082526020808301828152838501928352875191880151948801511515909252929052600f9190910b8152614de286614c78565b81518290614df1908390615e50565b600f0b9052508415614e0557602081018590525b600087815260186020908152604091829020835181546001600160801b0319166001600160801b03909116178155908301516001820155908201516002909101805460ff1916911515919091179055614e5f8785836142dc565b6000614e69613cd0565b90508615614ea657614ea66001600160a01b037f00000000000000000000000095f0c274bda9159dcd69fd0c778776bce265cc0a1682308a6154f4565b836003811115614eb857614eb86159c9565b602083810151604080518b8152928301919091524282820152518a916001600160a01b038516917f8835c22a0c751188de86681e15904223c054bedd5c68ec8858945b78312902739181900360600190a47f5e2aa66efd74cce82b21852e317e5490d9ecc9e6bb953ae24d90851258cc2f5c83614f358982615c1c565b6040805192835260208301919091520160405180910390a15050505050505050565b6000600860008154614f6890615d40565b91829055506000818152601860209081526040808320865181546001600160801b0319166001600160801b03909116178155868301516001820155868201516002909101805460ff19169115159190911790558051606081018252838152918201839052810191909152909150614fe1908290846142dc565b614feb8382614d23565b5092915050565b60008062093a80806150048642615c1c565b61500e9190615c45565b6150189190615c59565b90508460000361503b57604051631f2a200560e01b815260040160405180910390fd5b42811161505b57604051638e6b5b6760e01b815260040160405180910390fd5b615069630784ce0042615c1c565b8111156150895760405163f761f1cd60e01b815260040160405180910390fd5b600060086000815461509a90615d40565b918290555090506150ab8482614d23565b5060008181526018602090815260409182902082516060810184528154600f0b81526001808301549382019390935260029091015460ff161515928101929092526150fb91839189918691614d92565b95945050505050565b604051637b29b3d160e01b8152601a6004820152601960248201526044810183905260648101829052600090731608e8ad76a267adcfe2a1b4f342e24e832215e190637b29b3d190608401602060405180830381865af415801561516c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061219e9190615c70565b80158061520a5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa1580156151e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906152089190615c70565b155b6152755760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401613d7d565b6040516001600160a01b03831660248201526044810182905261100290849063095ea7b360e01b90606401614ad9565b816001600160a01b03166152b882613d14565b6001600160a01b0316146152ce576152ce615edb565b6000818152600f6020526040902080546001600160a01b03191690556152f48282615532565b6001600160a01b038216600090815260106020526040812080546001929061531d908490615c09565b90915550505050565b60405163690f66bf60e01b8152601860048201526021602482015260206044820152601f60648201526084810184905260a481018390526001600160a01b03821660c48201527396d5767c916bd13c89e25405f009260866f8b6909063690f66bf9060e401614cf7565b600061539b82613d14565b6001600160a01b0316146153b1576153b1615edb565b6000818152600f6020908152604080832080546001600160a01b0319166001600160a01b03871690811790915580845260108084528285208054601486528487208188528652848720889055878752601586529386209390935590845290915280546001929061531d908490615c1c565b6000615477826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166155f19092919063ffffffff16565b80519091501561100257808060200190518101906154959190615ef1565b6110025760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401613d7d565b6040516001600160a01b038085166024830152831660448201526064810182905261552c9085906323b872dd60e01b90608401614ad9565b50505050565b6001600160a01b03821660009081526010602052604081205461555790600190615c09565b6000838152601560205260409020549091508082036155a6576001600160a01b03841660009081526014602090815260408083208584528252808320839055858352601590915281205561552c565b6001600160a01b039390931660009081526014602090815260408083209383529281528282208054868452848420819055835260159091528282209490945592839055908252812055565b606061263d848460008585600080866001600160a01b031685876040516156189190615f0e565b60006040518083038185875af1925050503d8060008114615655576040519150601f19603f3d011682016040523d82523d6000602084013e61565a565b606091505b509150915061566b87838387615678565b925050505b949350505050565b606083156156e75782516000036156e0576001600160a01b0385163b6156e05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401613d7d565b5081615670565b61567083838151156156fc5781518083602001fd5b8060405162461bcd60e51b8152600401613d7d91906157ce565b6040518060a001604052806000600f0b81526020016000600f0b81526020016000815260200160008152602001600081525090565b6001600160e01b03198116811461132157600080fd5b60006020828403121561577357600080fd5b81356126408161574b565b60005b83811015615799578181015183820152602001615781565b50506000910152565b600081518084526157ba81602086016020860161577e565b601f01601f19169290920160200192915050565b60208152600061219e60208301846157a2565b6000602082840312156157f357600080fd5b5035919050565b6001600160a01b038116811461132157600080fd5b60006020828403121561582157600080fd5b8135612640816157fa565b6000806040838503121561583f57600080fd5b823561584a816157fa565b946020939093013593505050565b6000806040838503121561586b57600080fd5b50508035926020909101359150565b60008060006060848603121561588f57600080fd5b833561589a816157fa565b925060208401356158aa816157fa565b929592945050506040919091013590565b600080604083850312156158ce57600080fd5b82356158d9816157fa565b915060208301356158e9816157fa565b809150509250929050565b801515811461132157600080fd5b6000806040838503121561591557600080fd5b8235615920816157fa565b915060208301356158e9816158f4565b6000806040838503121561594357600080fd5b8235915060208301356158e9816158f4565b60a081016121a182848051600f0b82526020810151600f0b60208301526040810151604083015260608101516060830152608081015160808301525050565b6000806000606084860312156159a957600080fd5b83356159b4816157fa565b95602085013595506040909401359392505050565b634e487b7160e01b600052602160045260246000fd5b6020810160038310615a0157634e487b7160e01b600052602160045260246000fd5b91905290565b600080600080600080600060e0888a031215615a2257600080fd5b87359650602088013595506040880135945060608801359350608088013560ff81168114615a4f57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715615aab57615aab615a6c565b604052919050565b600067ffffffffffffffff821115615acd57615acd615a6c565b50601f01601f191660200190565b60008060008060808587031215615af157600080fd5b8435615afc816157fa565b93506020850135615b0c816157fa565b925060408501359150606085013567ffffffffffffffff811115615b2f57600080fd5b8501601f81018713615b4057600080fd5b8035615b53615b4e82615ab3565b615a82565b818152886020838501011115615b6857600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b600080600060608486031215615b9f57600080fd5b83359250602084013591506040840135615bb8816157fa565b809150509250925092565b60008060408385031215615bd657600080fd5b82359150602083013565ffffffffffff811681146158e957600080fd5b634e487b7160e01b600052601160045260246000fd5b818103818111156121a1576121a1615bf3565b808201808211156121a1576121a1615bf3565b634e487b7160e01b600052601260045260246000fd5b600082615c5457615c54615c2f565b500490565b80820281158282048414176121a1576121a1615bf3565b600060208284031215615c8257600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b6000604082018483526020604081850152818551808452606086019150828701935060005b81811015615ce95784516001600160a01b031683529383019391830191600101615cc4565b5090979650505050505050565b600f82810b9082900b0360016001607f1b0319811260016001607f1b03821317156121a1576121a1615bf3565b600060208284031215615d3557600080fd5b8151612640816157fa565b600060018201615d5257615d52615bf3565b5060010190565b60008060408385031215615d6c57600080fd5b8251615d77816157fa565b60208401519092506158e9816157fa565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090615dbb908301846157a2565b9695505050505050565b600060208284031215615dd757600080fd5b81516126408161574b565b600060208284031215615df457600080fd5b815167ffffffffffffffff811115615e0b57600080fd5b8201601f81018413615e1c57600080fd5b8051615e2a615b4e82615ab3565b818152856020838501011115615e3f57600080fd5b6150fb82602083016020860161577e565b600f81810b9083900b0160016001607f1b03811360016001607f1b0319821217156121a1576121a1615bf3565b600081600f0b83600f0b80615e9457615e94615c2f565b60016001607f1b0319821460001982141615615eb257615eb2615bf3565b90059392505050565b600082600f0b82600f0b0280600f0b9150808214614feb57614feb615bf3565b634e487b7160e01b600052600160045260246000fd5b600060208284031215615f0357600080fd5b8151612640816158f4565b60008251615f2081846020870161577e565b919091019291505056fef8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce7a2646970667358221220342a3d4fac96cd7da02e68caabdf31b571c3ba3bdc637c6ce296f4bdd9d364a864736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000181ddd56fb5f6baee2a9c18927bd7b8eed37b77700000000000000000000000095f0c274bda9159dcd69fd0c778776bce265cc0a000000000000000000000000c33bfded710676b550f8fe1d180be0aec5cd7e3f
-----Decoded View---------------
Arg [0] : _forwarder (address): 0x181dDd56Fb5f6baEE2A9c18927BD7B8EEd37b777
Arg [1] : _token (address): 0x95F0c274BDa9159DCD69fD0C778776BCe265CC0A
Arg [2] : _factoryRegistry (address): 0xC33BfdeD710676b550f8fe1d180BE0AEc5Cd7e3f
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000181ddd56fb5f6baee2a9c18927bd7b8eed37b777
Arg [1] : 00000000000000000000000095f0c274bda9159dcd69fd0c778776bce265cc0a
Arg [2] : 000000000000000000000000c33bfded710676b550f8fe1d180be0aec5cd7e3f
Library Used
BalanceLogicLibrary : 0x1608e8ad76a267adcfe2a1b4f342e24e832215e1UnverifiedDelegationLogicLibrary : 0x96d5767c916bd13c89e25405f009260866f8b690Unverified
Deployed Bytecode Sourcemap
98160:53421:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;115542:136;;;;;;:::i;:::-;-1:-1:-1;;;;;;115637:33:0;115613:4;115637:33;;;:19;:33;;;;;;;;;115542:136;;;;565:14:1;;558:22;540:41;;528:2;513:18;115542:136:0;;;;;;;;120625:21;;;;;;;;;738:25:1;;;726:2;711:18;120625:21:0;592:177:1;107979:37:0;;;;;;;;;;;;;;;-1:-1:-1;;;107979:37:0;;;;;;;;;;;;:::i;110242:120::-;;;;;;:::i;:::-;110304:7;110331:23;;;:13;:23;;;;;;-1:-1:-1;;;;;110331:23:0;;110242:120;;;;-1:-1:-1;;;;;1879:32:1;;;1861:51;;1849:2;1834:18;110242:120:0;1715:203:1;108160:181:0;;;;;;:::i;:::-;;:::i;:::-;;111418:753;;;;;;:::i;:::-;;:::i;131774:274::-;;;;;;:::i;:::-;;:::i;99942:22::-;;;;;;144184:107;;;:::i;101295:46::-;;;;;;:::i;:::-;;;;;;;;;;;;;;145435:131;;145486:80;145435:131;;113574:145;;;;;;:::i;:::-;;:::i;101666:48::-;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;;;;;101666:48:0;;;144771:204;;;;;;:::i;:::-;;:::i;135935:1157::-;;;;;;:::i;:::-;;:::i;108349:192::-;;;;;;:::i;:::-;;:::i;99058:29::-;;;;;-1:-1:-1;;;;;99058:29:0;;;108116:35;;108149:2;108116:35;;;;;4092:4:1;4080:17;;;4062:36;;4050:2;4035:18;108116:35:0;3920:184:1;141081:158:0;;;;;;:::i;:::-;;:::i;142225:908::-;;;;;;:::i;:::-;;:::i;104635:2260::-;;;;;;:::i;:::-;;:::i;107356:425::-;;;;;;:::i;:::-;;:::i;101948:890::-;;;;;;:::i;:::-;;:::i;98648:40::-;;;;;120966;;;;;;:::i;:::-;;;;;;;;;;;;;;;;113762:142;;;;;;:::i;:::-;;:::i;110601:156::-;;;;;;:::i;:::-;;:::i;121292:158::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;98870:20::-;;;;;-1:-1:-1;;;;;98870:20:0;;;139082:1659;;;;;;:::i;:::-;;:::i;:::-;;;;5718:25:1;;;5774:2;5759:18;;5752:34;;;;5691:18;139082:1659:0;5544:248:1;151476:102:0;151547:23;;;;;;;;;;;;-1:-1:-1;;;151547:23:0;;;;151476:102;;121048:35;;;;;;146650:233;;;;;;:::i;:::-;;:::i;146118:48::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;6359:14:1;6347:27;;;6329:46;;6317:2;6302:18;146118:48:0;6185:196:1;101383:62:0;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;108069:40;;;;;;;;;;;;;;;-1:-1:-1;;;108069:40:0;;;;;98993:23;;;;;-1:-1:-1;;;;;98993:23:0;;;78407:138;;;;;;:::i;:::-;78520:17;-1:-1:-1;;;;;78507:30:0;;;;;;;78407:138;145018:154;;;;;;:::i;:::-;;:::i;109404:111::-;;;;;;:::i;:::-;;:::i;109558:120::-;;;;;;:::i;:::-;-1:-1:-1;;;;;109643:27:0;109616:7;109643:27;;;:19;:27;;;;;;;109558:120;101203:48;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;:::i;146210:41::-;;;;;;:::i;:::-;;;;;;;;;;;;;;149116:1990;;;;;;:::i;:::-;;:::i;98932:19::-;;;;;-1:-1:-1;;;;;98932:19:0;;;121493:124;;;;;;:::i;:::-;;:::i;115913:75::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;146926:127;;;;;;:::i;:::-;;:::i;144690:37::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;120563:20;;;;;;151336:97;151409:15;151336:97;;106938:375;;;;;;:::i;:::-;;:::i;134962:930::-;;;;;;:::i;:::-;;:::i;112214:347::-;;;;;;:::i;:::-;;:::i;101574:50::-;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;;;;;101574:50:0;;;101487:43;;;;;;:::i;:::-;;;;;;;;;;;;;;;;146295:117;;;;;;:::i;:::-;146356:7;146383:21;;;:10;:21;;;;;;;146295:117;134663:256;;;;;;:::i;:::-;;:::i;121127:122::-;;;;;;:::i;:::-;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;121224:17:0;;;:7;:17;;;;;;121217:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;121127:122;;;;;8050:13:1;;8046:2;8035:29;8017:48;;8121:4;8109:17;;;8103:24;8081:20;;;8074:54;8186:17;;;8180:24;8173:32;8166:40;8144:20;;;8137:70;8005:2;7990:18;121127:122:0;7811:402:1;132991:173:0;;;;;;:::i;:::-;;:::i;114341:972::-;;;;;;:::i;:::-;;:::i;98802:26::-;;;;;-1:-1:-1;;;;;98802:26:0;;;131598:133;;;:::i;108584:214::-;;;;;;:::i;:::-;;:::i;137135:1904::-;;;;;;:::i;:::-;;:::i;148863:210::-;;;;;;:::i;:::-;;:::i;144000:141::-;;;;;;:::i;:::-;;:::i;102881:1711::-;;;;;;:::i;:::-;;:::i;120787:49::-;;;;;;:::i;:::-;;;;;;;;;;;;;;141282:900;;;;;;:::i;:::-;;:::i;145660:144::-;;145715:89;145660:144;;143753:204;;;;;;:::i;:::-;;:::i;110405:153::-;;;;;;:::i;:::-;-1:-1:-1;;;;;110514:24:0;;;110489:4;110514:24;;;:16;:24;;;;;;;;110513:37;;;;;;;;;;;;;;;110405:153;133207:180;;;;;;:::i;:::-;;:::i;146455:152::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;10802:13:1;;10784:32;;10876:4;10864:17;;;10858:24;-1:-1:-1;;;;;10854:50:1;10832:20;;;10825:80;10961:4;10949:17;;;10943:24;10921:20;;;10914:54;11024:4;11012:17;;;11006:24;10984:20;;;10977:54;;;;10771:3;10756:19;;10583:454;120878:46:0;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;11215:2:1;11204:22;;;;11186:41;;11174:2;11159:18;120878:46:0;11042:191:1;98572:34:0;;;;;98730:30;;;;;108160:181;108232:4;;-1:-1:-1;;;;;108232:4:0;108216:12;:10;:12::i;:::-;-1:-1:-1;;;;;108216:20:0;;108212:42;;108245:9;;-1:-1:-1;;;108245:9:0;;;;;;;;;;;108212:42;-1:-1:-1;;;;;108269:19:0;;108265:45;;108297:13;;-1:-1:-1;;;108297:13:0;;;;;;;;;;;108265:45;108321:4;:12;;-1:-1:-1;;;;;;108321:12:0;-1:-1:-1;;;;;108321:12:0;;;;;;;;;;108160:181::o;111418:753::-;111492:14;111509:12;:10;:12::i;:::-;111492:29;;111532:13;111548:18;111557:8;111548;:18::i;:::-;111532:34;-1:-1:-1;;;;;;111633:19:0;;111629:45;;111661:13;;-1:-1:-1;;;111661:13:0;;;;;;;;;;;111629:45;111753:9;-1:-1:-1;;;;;111744:18:0;:5;-1:-1:-1;;;;;111744:18:0;;111740:44;;111771:13;;-1:-1:-1;;;111771:13:0;;;;;;;;;;;111740:44;111826:18;111870:6;-1:-1:-1;;;;;111848:28:0;:18;111857:8;111848;:18::i;:::-;-1:-1:-1;;;;;111919:23:0;;;111888:27;111919:23;;;:16;:23;;;;;;;;111918:33;;;;;;;;;;;111848:28;;;;;;;-1:-1:-1;111918:33:0;;111966:14;;111848:28;111966:41;;;111985:22;111984:23;111966:41;111962:74;;;112016:20;;-1:-1:-1;;;112016:20:0;;;;;;;;;;;111962:74;112076:23;;;;:13;:23;;;;;;:35;;-1:-1:-1;;;;;;112076:35:0;-1:-1:-1;;;;;112076:35:0;;;;;;;;;112127:36;;112076:23;;112127:36;;;;;;;111481:690;;;;111418:753;;:::o;131774:274::-;81528:21;:19;:21::i;:::-;131889:18:::1;131865:20;::::0;;;:10:::1;:20;::::0;;;;;::::1;;:42;::::0;::::1;;;;;;:::i;:::-;;:73;;;;-1:-1:-1::0;131927:11:0::1;::::0;-1:-1:-1;;;;;131927:11:0::1;131911:12;:10;:12::i;:::-;-1:-1:-1::0;;;;;131911:27:0::1;;;131865:73;131861:102;;;131947:16;;-1:-1:-1::0;;;131947:16:0::1;;;;;;;;;;;131861:102;131974:66;131993:8;132003:6;132011:28;131974:18;:66::i;:::-;81572:20:::0;80966:1;82092:7;:22;81909:213;81572:20;131774:274;;:::o;144184:107::-;144230:7;144257:26;144267:15;144257:9;:26::i;:::-;144250:33;;144184:107;:::o;113574:145::-;113662:49;113676:5;113683:3;113688:8;113698:12;:10;:12::i;:::-;113662:13;:49::i;:::-;113574:145;;;:::o;144771:204::-;144881:5;;-1:-1:-1;;;;;144881:5:0;144865:12;:10;:12::i;:::-;-1:-1:-1;;;;;144865:21:0;;144861:44;;144895:10;;-1:-1:-1;;;144895:10:0;;;;;;;;;;;144861:44;144916:5;:14;;-1:-1:-1;;;;;144916:14:0;;;-1:-1:-1;;;;;;144916:14:0;;;;;;;;144941:26;;;;;;;;;;;144771:204::o;135935:1157::-;81528:21;:19;:21::i;:::-;136004:14:::1;136021:12;:10;:12::i;:::-;136004:29;;136049:36;136068:6;136076:8;136049:18;:36::i;:::-;136044:70;;136094:20;;-1:-1:-1::0;;;136094:20:0::1;;;;;;;;;;;136044:70;136129:15;::::0;;;:5:::1;:15;::::0;;;;;::::1;;136125:42;;;136153:14;;-1:-1:-1::0;;;136153:14:0::1;;;;;;;;;;;136125:42;136206:17;136182:20:::0;;;:10:::1;:20;::::0;;;;;::::1;;:41;::::0;::::1;;;;;;:::i;:::-;;136178:68;;136232:14;;-1:-1:-1::0;;;136232:14:0::1;;;;;;;;;;;136178:68;136259:30;136292:17:::0;;;:7:::1;:17;::::0;;;;;;;;136259:50;;::::1;::::0;::::1;::::0;;;;::::1;;::::0;;;;::::1;::::0;;;::::1;::::0;;;;::::1;;::::0;::::1;;;::::0;::::1;::::0;;;;;;;;136320:49:::1;;136354:15;;-1:-1:-1::0;;;136354:15:0::1;;;;;;;;;;;136320:49;136402:9;:13;;;136384:15;:31;136380:60;;;136424:16;;-1:-1:-1::0;;;136424:16:0::1;;;;;;;;;;;136380:60;136451:13;136467:28;:9;:16;;;:26;;;:28::i;:::-;136451:44;;136533:15;136539:8;136533:5;:15::i;:::-;136579:26;::::0;;::::1;::::0;::::1;::::0;;-1:-1:-1;136579:26:0;;;::::1;::::0;;::::1;::::0;;;;;;;;;136559:17;;;:7:::1;:17:::0;;;;;;;:46;;;;-1:-1:-1;;;;;;136559:46:0::1;-1:-1:-1::0;;;;;136559:46:0;;;::::1;::::0;;;;-1:-1:-1;136559:46:0;::::1;::::0;;;::::1;::::0;;::::1;::::0;;-1:-1:-1;;136559:46:0::1;::::0;::::1;;::::0;;;::::1;::::0;;136639:6:::1;::::0;136665:20:::1;136680:5:::0;136639:6;136665:20:::1;:::i;:::-;136656:6;:29:::0;136877:26:::1;::::0;;::::1;::::0;::::1;::::0;;-1:-1:-1;136877:26:0;;;::::1;::::0;::::1;::::0;;;;;;;;;;136844:60:::1;::::0;136856:8;;136866:9;;136844:11:::1;:60::i;:::-;136917:41;-1:-1:-1::0;;;;;136924:5:0::1;136917:26;136944:6:::0;136952:5;136917:26:::1;:41::i;:::-;136976:50;::::0;;5718:25:1;;;137010:15:0::1;5774:2:1::0;5759:18;;5752:34;136993:8:0;;-1:-1:-1;;;;;136976:50:0;::::1;::::0;::::1;::::0;5691:18:1;136976:50:0::1;;;;;;;137042:42;137049:12:::0;137063:20:::1;137078:5:::0;137049:12;137063:20:::1;:::i;:::-;137042:42;::::0;;5718:25:1;;;5774:2;5759:18;;5752:34;;;;5691:18;137042:42:0::1;;;;;;;135993:1099;;;;81572:20:::0;80966:1;82092:7;:22;81909:213;81572:20;135935:1157;:::o;108349:192::-;108426:4;;-1:-1:-1;;;;;108426:4:0;108410:12;:10;:12::i;:::-;-1:-1:-1;;;;;108410:20:0;;108406:42;;108439:9;;-1:-1:-1;;;108439:9:0;;;;;;;;;;;108406:42;108459:8;:17;;-1:-1:-1;;;;;;108459:17:0;-1:-1:-1;;;;;108459:17:0;;;;;108492:41;;;-1:-1:-1;5718:25:1;;-1:-1:-1;;5774:2:1;5759:18;;5752:34;108492:41:0;;5691:18:1;108492:41:0;;;;;;;108349:192;:::o;141081:158::-;141172:4;;-1:-1:-1;;;;;141172:4:0;141156:12;:10;:12::i;:::-;-1:-1:-1;;;;;141156:20:0;;141152:42;;141185:9;;-1:-1:-1;;;141185:9:0;;;;;;;;;;;141152:42;-1:-1:-1;;;;;141205:18:0;;;;;;;;:8;:18;;;;;:26;;-1:-1:-1;;141205:26:0;;;;;;;;;;141081:158::o;142225:908::-;142288:14;142305:12;:10;:12::i;:::-;142288:29;;142333:36;142352:6;142360:8;142333:18;:36::i;:::-;142328:70;;142378:20;;-1:-1:-1;;;142378:20:0;;;;;;;;;;;142328:70;142437:17;142413:20;;;:10;:20;;;;;;;;:41;;;;;;;;:::i;:::-;;142409:68;;142463:14;;-1:-1:-1;;;142463:14:0;;;;;;;;;;;142409:68;142492:15;;;;:5;:15;;;;;;;;142488:42;;;142516:14;;-1:-1:-1;;;142516:14:0;;;;;;;;;;;142488:42;142541:31;142575:17;;;:7;:17;;;;;;;;;142541:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;142603:54;;142639:18;;-1:-1:-1;;;142639:18:0;;;;;;;;;;;142603:54;142670:15;142688:29;:10;:17;;;:27;;;:29::i;:::-;142670:47;;142752:7;142728:20;;:31;;;;;;;:::i;:::-;;;;-1:-1:-1;120343:7:0;;-1:-1:-1;120343:7:0;142789:25;120393:15;142789;:25;:::i;:::-;142788:34;;;;:::i;:::-;142787:43;;;;:::i;:::-;142770:14;;;:60;142866:5;142841:22;;;:30;;;142882:22;;142892:8;;142882:9;:22::i;:::-;142937:17;;;;:7;:17;;;;;;;;;142915:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;142927:8;;142956:10;142915:11;:52::i;:::-;142978:17;;;;:7;:17;;;;;;;;;:30;;;;-1:-1:-1;;;;;;142978:30:0;-1:-1:-1;;;;;142978:30:0;;;;;;;;;;-1:-1:-1;142978:30:0;;;;;;;;;;;;;-1:-1:-1;;142978:30:0;;;;;;;;;;143026:59;;5718:25:1;;;143069:15:0;5759:18:1;;;5752:34;;;;142978:17:0;;-1:-1:-1;;;;;143026:59:0;;;;;5691:18:1;143026:59:0;;;;;;;;143101:24;;738:25:1;;;-1:-1:-1;;;;;;;;;;;143101:24:0;726:2:1;711:18;143101:24:0;;;;;;;142277:856;;;142225:908;:::o;104635:2260::-;81528:21;:19;:21::i;:::-;104711:17:::1;104731:21:::0;;;:11:::1;:21;::::0;;;;;104783:5:::1;::::0;-1:-1:-1;;;;;104783:5:0::1;104767:12;:10;:12::i;:::-;-1:-1:-1::0;;;;;104767:21:0::1;;104763:44;;104797:10;;-1:-1:-1::0;;;104797:10:0::1;;;;;;;;;;;104763:44;104822:9;104835:1;104822:14:::0;104818:48:::1;;104845:21;;-1:-1:-1::0;;;104845:21:0::1;;;;;;;;;;;104818:48;104905:17;104881:20;::::0;;;:10:::1;:20;::::0;;;;;::::1;;:41;::::0;::::1;;;;;;:::i;:::-;;104877:68;;104931:14;;-1:-1:-1::0;;;104931:14:0::1;;;;;;;;;;;104877:68;104993:28;105024:26:::0;;;:15:::1;:26;::::0;;;;;;;;105090:13:::1;:24:::0;;;;;;105143:17;;;:7:::1;:17:::0;;;;;:28;;;;;;;;;;105200:62;;-1:-1:-1;;;105200:62:0;;-1:-1:-1;;;;;105245:5:0::1;12516:32:1::0;;105200:62:0::1;::::0;::::1;12498:51:1::0;12565:18;;;12558:34;;;105024:26:0;;::::1;::::0;105090:24;;;::::1;::::0;105024:26;;105200:36:::1;::::0;12471:18:1;;105200:62:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;105182:80:::0;-1:-1:-1;105273:14:0::1;105290:17;105182:80:::0;105290:7;:17:::1;:::i;:::-;105273:34:::0;-1:-1:-1;105318:19:0::1;120343:7;::::0;105342:25:::1;120393:15;105342;:25;:::i;:::-;105341:34;;;;:::i;:::-;105340:43;;;;:::i;:::-;105486:16;::::0;;105500:1:::1;105486:16:::0;;;;;::::1;::::0;;;105318:65;;-1:-1:-1;105459:24:0::1;::::0;105486:16;::::1;::::0;;::::1;::::0;;::::1;::::0;::::1;;::::0;-1:-1:-1;105486:16:0::1;105459:43;;105534:5;105513:7;105521:1;105513:10;;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;105513:27:0;;::::1;:10;::::0;;::::1;::::0;;;;;:27;105551:58:::1;::::0;-1:-1:-1;;;105551:58:0;;:39;;::::1;::::0;::::1;::::0;:58:::1;::::0;105591:8;;105601:7;;105551:58:::1;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;105650:36;105689:52;;;;;;;;105703:17;:6;:15;:17::i;:::-;105689:52;::::0;;::::1;::::0;;::::1;::::0;;::::1;::::0;;;-1:-1:-1;105689:52:0;;;;;;;105774:17;;;:7:::1;:17:::0;;;;;105752:57;;::::1;::::0;::::1;::::0;;;;;;::::1;::::0;;105689:52;105752:57;::::1;::::0;;;::::1;::::0;;;;::::1;;::::0;::::1;;;;::::0;;;;;;;105650:91;;-1:-1:-1;105752:57:0::1;::::0;105764:8;;105650:91;105752:11:::1;:57::i;:::-;105820:17;::::0;;;:7:::1;:17;::::0;;;;;;;:35;;;;-1:-1:-1;;;;;;105820:35:0::1;-1:-1:-1::0;;;;;105820:35:0;;;::::1;::::0;;;;::::1;::::0;-1:-1:-1;105820:35:0;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;::::1;::::0;;-1:-1:-1;;105820:35:0::1;::::0;::::1;;::::0;;;::::1;::::0;;105939:18;;;;;;;105899:58;;::::1;::::0;::::1;::::0;;;;105820:35:::1;105899:58;::::0;;;;;::::1;::::0;;;::::1;::::0;;;;::::1;::::0;105820:35:::1;105899:58;;;::::0;;;;;106099:17:::1;:6:::0;:15:::1;:17::i;:::-;:43;;;:89;;106165:23:::0;;106099:89:::1;;;106145:17;:6;:15;:17::i;:::-;106057:142:::0;;:16;;:142:::1;::::0;;;::::1;:::i;:::-;;;::::0;;-1:-1:-1;106244:20:0::1;::::0;106235:29;::::1;:61;;106276:20;;106235:61;;;106267:6;106235:61;106210:20;;:87;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;106329:21:0::1;::::0;;;:10:::1;:21;::::0;;;;;106308:58:::1;::::0;106352:6;;106308:20:::1;:58::i;:::-;106400:18;::::0;;;:7:::1;:18;::::0;;;;;;;;106377:60;;::::1;::::0;::::1;::::0;;;;::::1;;::::0;;;;::::1;::::0;;;::::1;::::0;;;;::::1;;::::0;::::1;;;;::::0;;;;;;;::::1;::::0;106389:9;;106420:16;106377:11:::1;:60::i;:::-;106448:18;::::0;;;:7:::1;:18;::::0;;;;;;;;:37;;;;-1:-1:-1;;;;;;106448:37:0::1;-1:-1:-1::0;;;;;106448:37:0;;;::::1;::::0;;;;::::1;::::0;-1:-1:-1;106448:37:0;::::1;::::0;;;::::1;::::0;::::1;::::0;;::::1;::::0;;-1:-1:-1;;106448:37:0::1;::::0;::::1;;::::0;;;::::1;::::0;;106498:58;-1:-1:-1;;;106498:58:0;;::::1;::::0;::::1;5718:25:1::0;;;5759:18;;;5752:34;;;-1:-1:-1;;;;;106498:39:0;::::1;::::0;::::1;::::0;5691:18:1;;106498:58:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;106567:56:0::1;::::0;-1:-1:-1;;;106567:56:0;;::::1;::::0;::::1;5718:25:1::0;;;5759:18;;;5752:34;;;-1:-1:-1;;;;;106567:37:0;::::1;::::0;-1:-1:-1;106567:37:0::1;::::0;-1:-1:-1;5691:18:1;;106567:56:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;;106643:21:0::1;::::0;;;:11:::1;:21;::::0;;;;;;;106636:28;;;106682:7:::1;:17:::0;;;;;:28;;;;;;;;106675:35;;;106728:20;;;:10:::1;:20:::0;;;;;106721:27;;-1:-1:-1;;106721:27:0::1;::::0;;-1:-1:-1;106700:9:0;106655:8;106782:18:::1;106655:8:::0;106782::::1;:18::i;:::-;-1:-1:-1::0;;;;;106766:81:0::1;;106823:6;106831:15;106766:81;;;;;;5718:25:1::0;;;5774:2;5759:18;;5752:34;5706:2;5691:18;;5544:248;106766:81:0::1;;;;;;;;106863:24;::::0;738:25:1;;;-1:-1:-1;;;;;;;;;;;106863:24:0;726:2:1;711:18;106863:24:0::1;;;;;;;104700:2195;;;;;;;;;;81572:20:::0;80966:1;82092:7;:22;81909:213;107356:425;107460:5;;;;;;;;;-1:-1:-1;;;;;107460:5:0;-1:-1:-1;;;;;107453:30:0;;:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;107437:48:0;:12;:10;:12::i;:::-;-1:-1:-1;;;;;107437:48:0;;;:92;;;;;107512:5;;;;;;;;;-1:-1:-1;;;;;107512:5:0;-1:-1:-1;;;;;107505:22:0;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;107489:40:0;:12;:10;:12::i;:::-;-1:-1:-1;;;;;107489:40:0;;;107437:92;107433:149;;;107551:31;;-1:-1:-1;;;107551:31:0;;;;;;;;;;;107433:149;107622:18;107597:21;;;;:10;:21;;;;;;;;:43;;;;;;;;:::i;:::-;;107593:71;;107649:15;;-1:-1:-1;;;107649:15:0;;;;;;;;;;;107593:71;107679:22;;;;:11;:22;;;;;;:32;;;:22;;;;:32;;;107675:56;;107720:11;;-1:-1:-1;;;107720:11:0;;;;;;;;;;;107675:56;107742:22;;;;:11;:22;;;;;;:31;;-1:-1:-1;;107742:31:0;;;;;;;;;;107356:425::o;101948:890::-;102022:17;81528:21;:19;:21::i;:::-;102052:14:::1;102069:12;:10;:12::i;:::-;102106:14;::::0;102052:29;;-1:-1:-1;;;;;;102096:24:0;;::::1;102106:14:::0;::::1;102096:24;::::0;::::1;::::0;:62:::1;;;102141:5;;;;;;;;;-1:-1:-1::0;;;;;102141:5:0::1;-1:-1:-1::0;;;;;102134:22:0::1;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;102124:34:0::1;:6;-1:-1:-1::0;;;;;102124:34:0::1;;;102096:62;102092:97;;;102167:22;;-1:-1:-1::0;;;102167:22:0::1;;;;;;;;;;;102092:97;102216:7;;102214:9;;;;;:::i;:::-;::::0;;;;-1:-1:-1;102214:9:0;-1:-1:-1;102234:21:0::1;102240:3:::0;102214:9;102234:5:::1;:21::i;:::-;;102266:85;102278:9;102289:1;102292::::0;102295:25:::1;;;;;;;;102309:1;102295:25;;;;;;102312:1;102295:25;;;;102315:4;102295:25;;;;::::0;102322:28:::1;102266:11;:85::i;:::-;102364:21;::::0;;;:10:::1;:21;::::0;;;;;;;:42;;-1:-1:-1;;102364:42:0::1;102388:18;102364:42;::::0;;102517:57;;-1:-1:-1;;;102517:57:0;;;;102364:21;;-1:-1:-1;;;;;102534:15:0::1;102517:55;::::0;::::1;::::0;:57:::1;::::0;;::::1;::::0;102364:21;102517:57;;;;;:55;:57:::1;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;102611:5;::::0;102480:137:::1;::::0;-1:-1:-1;;;102480:137:0;;-1:-1:-1;;;;;102600:9:0::1;14538:15:1::0;;102480:137:0::1;::::0;::::1;14520:34:1::0;102611:5:0;;::::1;14570:18:1::0;;;14563:43;102480:119:0;::::1;::::0;::::1;::::0;14455:18:1;;102480:137:0::1;::::0;::::1;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;102628:26;::::0;;;:15:::1;:26;::::0;;;;;;;:49;;-1:-1:-1;;;;;102628:49:0;;::::1;-1:-1:-1::0;;;;;;102628:49:0;;::::1;::::0;::::1;::::0;;;102688:13:::1;:24:::0;;;;;;:45;;;;::::1;::::0;::::1;::::0;::::1;::::0;;102751:79;;14520:34:1;;;14570:18;;;14563:43;;;;102628:49:0;;-1:-1:-1;102688:45:0;;-1:-1:-1;102751:79:0;;::::1;::::0;102628:26;;102751:79;;::::1;::::0;::::1;::::0;14455:18:1;102751:79:0::1;;;;;;;102041:797;;;81572:20:::0;80966:1;82092:7;:22;81909:213;81572:20;101948:890;;;:::o;113762:142::-;113854:42;113871:5;113878:3;113883:8;113854:42;;;;;;;;;;;;:16;:42::i;110601:156::-;110687:4;110711:38;110730:8;110740;110711:18;:38::i;:::-;110704:45;;110601:156;;;;;:::o;121292:158::-;121373:16;;:::i;:::-;121409:27;;;;:17;:27;;;;;121437:4;121409:33;;;;;;;:::i;:::-;121402:40;;;;;;;;121409:33;;;;;;;;;121402:40;;;;;;;;-1:-1:-1;;;121402:40:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;121292:158;-1:-1:-1;;;121292:158:0:o;139082:1659::-;139185:17;139204;81528:21;:19;:21::i;:::-;139234:14:::1;139251:12;:10;:12::i;:::-;139234:29;;139274:13;139290:15;139299:5;139290:8;:15::i;:::-;139274:31:::0;-1:-1:-1;;;;;;139320:19:0;::::1;139316:46;;139348:14;;-1:-1:-1::0;;;139348:14:0::1;;;;;;;;;;;139316:46;-1:-1:-1::0;;;;;139378:15:0;::::1;;::::0;;;:8:::1;:15;::::0;;;;;::::1;;139377:16;:41:::0;::::1;;;-1:-1:-1::0;139398:20:0::1;::::0;;:8:::1;:20;::::0;;;::::1;;139397:21;139377:41;139373:71;;;139427:17;;-1:-1:-1::0;;;139427:17:0::1;;;;;;;;;;;139373:71;139480:17;139459::::0;;;:10:::1;:17;::::0;;;;;::::1;;:38;::::0;::::1;;;;;;:::i;:::-;;139455:65;;139506:14;;-1:-1:-1::0;;;139506:14:0::1;;;;;;;;;;;139455:65;139535:12;::::0;;;:5:::1;:12;::::0;;;;;::::1;;139531:39;;;139556:14;;-1:-1:-1::0;;;139556:14:0::1;;;;;;;;;;;139531:39;139586:33;139605:6;139613:5;139586:18;:33::i;:::-;139581:67;;139628:20;;-1:-1:-1::0;;;139628:20:0::1;;;;;;;;;;;139581:67;139659:30;139692:14:::0;;;:7:::1;:14;::::0;;;;;;;;139659:47;;::::1;::::0;::::1;::::0;;;;::::1;;::::0;;;;::::1;::::0;;;::::1;::::0;;;::::1;::::0;;::::1;::::0;::::1;;;;::::0;;;;;;;139738:15:::1;-1:-1:-1::0;139721:32:0;::::1;::::0;:58:::1;;;139758:9;:21;;;139757:22;139721:58;139717:84;;;139788:13;;-1:-1:-1::0;;;139788:13:0::1;;;;;;;;;;;139717:84;139812:19;139834:18;:7;:16;:18::i;:::-;139812:40;;139867:12;:17;;139883:1;139867:17:::0;139863:42:::1;;139893:12;;-1:-1:-1::0;;;139893:12:0::1;;;;;;;;;;;139863:42;139940:12;139920:32;;:9;:16;;;:32;;;139916:59;;139961:14;;-1:-1:-1::0;;;139961:14:0::1;;;;;;;;;;;139916:59;140028:12;140034:5;140028;:12::i;:::-;140068:26;::::0;;::::1;::::0;;::::1;::::0;;-1:-1:-1;140068:26:0;;;::::1;::::0;;::::1;::::0;;;;;;;;;140051:14;;;:7:::1;:14:::0;;;;;:43;;;;-1:-1:-1;;;;;;140051:43:0::1;-1:-1:-1::0;;;;;140051:43:0;;;::::1;::::0;;;;-1:-1:-1;140051:43:0;::::1;::::0;;::::1;::::0;;::::1;::::0;;-1:-1:-1;;140051:43:0::1;::::0;::::1;;::::0;;;::::1;::::0;;;140135:26;;;;::::1;::::0;;;;;;;::::1;::::0;;;;;;;140105:57:::1;::::0;140051:14;;140124:9;;140105:11:::1;:57::i;:::-;140251:12;140231:9;:16;;:32;;;;;;;:::i;:::-;;;::::0;;-1:-1:-1;140286:33:0::1;140302:5:::0;140309:9;140286:15:::1;:33::i;:::-;140374:31;::::0;;::::1;::::0;;140274:45;-1:-1:-1;140428:33:0::1;140444:5:::0;140374:9;140428:15:::1;:33::i;:::-;140588:18;::::0;;;:7:::1;:18;::::0;;;;:25;140416:45;;-1:-1:-1;140416:45:0;;140519:9;;140499:5;;140479:254:::1;::::0;140567:6;;140588:37:::1;::::0;:25:::1;;:35;:37::i;:::-;140640:24;:12;:22;;;:24::i;:::-;140679:13;::::0;;::::1;::::0;140479:254:::1;::::0;;-1:-1:-1;;;;;15284:32:1;;;15266:51;;15333:18;;;15326:34;;;;15376:18;;15369:34;15434:2;15419:18;;15412:34;140707:15:0::1;15477:3:1::0;15462:19;;15455:35;15253:3;15238:19;140479:254:0::1;;;;;;;139223:1518;;;;81572:20:::0;80966:1;82092:7;:22;81909:213;81572:20;139082:1659;;;;;:::o;146650:233::-;146778:97;;-1:-1:-1;;;146778:97:0;;146814:14;146778:97;;;15865:25:1;146830:12:0;15906:18:1;;;15899:34;-1:-1:-1;;;;;15969:32:1;;15949:18;;;15942:60;16018:18;;;16011:34;;;16061:19;;;16054:35;;;146751:7:0;;146778:22;;:35;;15837:19:1;;146778:97:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;146771:104;;146650:233;;;;;;:::o;145018:154::-;145105:5;;-1:-1:-1;;;;;145105:5:0;145089:12;:10;:12::i;:::-;-1:-1:-1;;;;;145089:21:0;;145085:44;;145119:10;;-1:-1:-1;;;145119:10:0;;;;;;;;;;;145085:44;145140:15;;;;:5;:15;;;;;;:24;;-1:-1:-1;;145140:24:0;;;;;;;;;;145018:154::o;109404:111::-;109462:7;109489:18;109498:8;109489;:18::i;149116:1990::-;150229:66;150216:79;;150212:111;;;150304:19;;-1:-1:-1;;;150304:19:0;;;;;;;;;;;150212:111;150428:4;;;;;;;;;;;;-1:-1:-1;;;150428:4:0;;;;;150452:7;;;;;;;;;;-1:-1:-1;;;150452:7:0;;;;150384:108;;145486:80;150384:108;;;16359:25:1;150412:22:0;16400:18:1;;;16393:34;150436:25:0;16443:18:1;;;16436:34;150463:13:0;16486:18:1;;;16479:34;150486:4:0;16529:19:1;;;;16522:61;;;;150384:108:0;;;;;;;;;;16331:19:1;;;150384:108:0;;150360:143;;;;;;145715:89;150545:68;;;16853:25:1;16894:18;;;16887:34;;;16937:18;;;16930:34;;;16980:18;;;16973:34;;;17023:19;;;;17016:35;;;150545:68:0;;;;;;;;;;16825:19:1;;;150545:68:0;;;150535:79;;;;;;;;;;-1:-1:-1;;;150652:57:0;;;17320:27:1;17363:11;;;17356:27;;;17399:12;;;17392:28;;;150360:143:0;;-1:-1:-1;;17436:12:1;;150652:57:0;;;-1:-1:-1;;150652:57:0;;;;;;;;;150642:68;;150652:57;150642:68;;;;150721:17;150741:26;;;;;;;;;17686:25:1;;;17759:4;17747:17;;17727:18;;;17720:45;;;;17781:18;;;17774:34;;;17824:18;;;17817:34;;;150642:68:0;;-1:-1:-1;150721:17:0;150741:26;;17658:19:1;;150741:26:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;150721:46;;150783:40;150802:9;150813;150783:18;:40::i;:::-;150778:74;;150832:20;;-1:-1:-1;;;150832:20:0;;;;;;;;;;;150778:74;-1:-1:-1;;;;;150867:23:0;;150863:54;;150899:18;;-1:-1:-1;;;150899:18:0;;;;;;;;;;;150863:54;-1:-1:-1;;;;;150941:17:0;;;;;;:6;:17;;;;;:19;;;;;;:::i;:::-;;;;;150932:5;:28;150928:55;;150969:14;;-1:-1:-1;;;150969:14:0;;;;;;;;;;;150928:55;151016:6;150998:15;:24;150994:55;;;151031:18;;-1:-1:-1;;;151031:18:0;;;;;;;;;;;150994:55;151067:31;151077:9;151088;151067;:31::i;:::-;151060:38;;;;149116:1990;;;;;;;;:::o;121493:124::-;121552:18;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;121552:18:0;-1:-1:-1;121590:19:0;;;;:13;:19;;;;;;;;;121583:26;;;;;;;;;;;;;;;-1:-1:-1;;;121583:26:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;121493:124::o;146926:127::-;146997:7;147024:21;147034:10;147024:9;:21::i;106938:375::-;107037:5;;;;;;;;;-1:-1:-1;;;;;107037:5:0;-1:-1:-1;;;;;107030:22:0;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;107014:40:0;:12;:10;:12::i;:::-;-1:-1:-1;;;;;107014:40:0;;107010:66;;107063:13;;-1:-1:-1;;;107063:13:0;;;;;;;;;;;107010:66;107110:14;;-1:-1:-1;;;;;107110:14:0;;;107091:33;;;;107087:59;;107133:13;;-1:-1:-1;;;107133:13:0;;;;;;;;;;;107087:59;-1:-1:-1;;;;;107161:29:0;;107157:55;;107199:13;;-1:-1:-1;;;107199:13:0;;;;;;;;;;;107157:55;107223:14;:32;;-1:-1:-1;;;;;;107223:32:0;-1:-1:-1;;;;;107223:32:0;;;;;;;;107271:34;;;;-1:-1:-1;;107271:34:0;106938:375;:::o;134962:930::-;81528:21;:19;:21::i;:::-;135069:42:::1;135088:12;:10;:12::i;:::-;135102:8;135069:18;:42::i;:::-;135064:76;;135120:20;;-1:-1:-1::0;;;135120:20:0::1;;;;;;;;;;;135064:76;135179:17;135155:20:::0;;;:10:::1;:20;::::0;;;;;::::1;;:41;::::0;::::1;;;;;;:::i;:::-;;135151:68;;135205:14;;-1:-1:-1::0;;;135205:14:0::1;;;;;;;;;;;135151:68;135232:30;135265:17:::0;;;:7:::1;:17;::::0;;;;;;;;135232:50;;::::1;::::0;::::1;::::0;;;;::::1;;::::0;;;;::::1;::::0;;;::::1;::::0;;;;::::1;;::::0;::::1;;;::::0;::::1;::::0;;;;;;;;135293:49:::1;;135327:15;;-1:-1:-1::0;;;135327:15:0::1;;;;;;;;;;;135293:49;135353:18;120343:7;::::0;135376:31:::1;135394:13:::0;135376:15:::1;:31;:::i;:::-;135375:40;;;;:::i;:::-;135374:49;;;;:::i;:::-;135353:70;;135494:15;135477:9;:13;;;:32;135473:58;;135518:13;;-1:-1:-1::0;;;135518:13:0::1;;;;;;;;;;;135473:58;135566:1;135546:9;:16;;;:21;;;135542:47;;135576:13;;-1:-1:-1::0;;;135576:13:0::1;;;;;;;;;;;135542:47;135618:9;:13;;;135604:10;:27;135600:65;;135640:25;;-1:-1:-1::0;;;135640:25:0::1;;;;;;;;;;;135600:65;135693:25;120393:15;135693;:25;:::i;:::-;135680:10;:38;135676:72;;;135727:21;;-1:-1:-1::0;;;135727:21:0::1;;;;;;;;;;;135676:72;135761:81;135773:8;135783:1;135786:10;135798:9;135809:32;135761:11;:81::i;:::-;135860:24;::::0;738:25:1;;;-1:-1:-1;;;;;;;;;;;135860:24:0;726:2:1;711:18;135860:24:0::1;;;;;;;135053:839;;81572:20:::0;80966:1;82092:7;:22;81909:213;112214:347;112296:14;112313:12;:10;:12::i;:::-;112296:29;;112407:6;-1:-1:-1;;;;;112394:19:0;:9;-1:-1:-1;;;;;112394:19:0;;112390:45;;112422:13;;-1:-1:-1;;;112422:13:0;;;;;;;;;;;112390:45;-1:-1:-1;;;;;112446:24:0;;;;;;;:16;:24;;;;;;;;:35;;;;;;;;;;;;;:47;;-1:-1:-1;;112446:47:0;;;;;;;;;;112509:44;;540:41:1;;;112509:44:0;;513:18:1;112509:44:0;;;;;;;112285:276;112214:347;;:::o;134663:256::-;81528:21;:19;:21::i;:::-;134759:42:::1;134778:12;:10;:12::i;134759:42::-;134754:76;;134810:20;;-1:-1:-1::0;;;134810:20:0::1;;;;;;;;;;;134754:76;134841:70;134860:8;134870:6;134878:32;134841:18;:70::i;132991:173::-:0;133081:7;81528:21;:19;:21::i;:::-;133108:48:::1;133120:6;133128:13;133143:12;:10;:12::i;:::-;133108:11;:48::i;:::-;133101:55;;81572:20:::0;80966:1;82092:7;:22;81909:213;114341:972;114451:14;114468:12;:10;:12::i;:::-;114451:29;;114491:43;114505:5;114512:3;114517:8;114527:6;114491:13;:43::i;:::-;114234:20;;114282:8;114547:759;;114693:69;;-1:-1:-1;;;114693:69:0;;-1:-1:-1;;;;;114693:37:0;;;;;:69;;114731:6;;114739:5;;114746:8;;114756:5;;114693:69;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;-1:-1:-1;114693:69:0;;;;;;;;-1:-1:-1;;114693:69:0;;;;;;;;;;;;:::i;:::-;;;114689:606;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;115019:6;:13;115036:1;115019:18;115015:265;;115069:46;;-1:-1:-1;;;115069:46:0;;;;;;;;;;;115015:265;115230:6;115224:13;115215:6;115211:2;115207:15;115200:38;114689:606;-1:-1:-1;;;;;;114812:58:0;;-1:-1:-1;;;114812:58:0;114808:144;;114902:30;;-1:-1:-1;;;114902:30:0;;;;;;;;;;;114808:144;114763:204;114689:606;114440:873;114341:972;;;;:::o;131598:133::-;81528:21;:19;:21::i;:::-;131668:26:::1;::::0;;::::1;::::0;;::::1;::::0;;131665:1:::1;131668:26:::0;;;::::1;::::0;;::::1;::::0;;;;;;;;;131696;;;;::::1;::::0;;;;;;::::1;::::0;;;;;;;;;131653:70:::1;::::0;131665:1;131668:26;131653:11:::1;:70::i;:::-;81572:20:::0;80966:1;82092:7;:22;81909:213;81572:20;131598:133::o;108584:214::-;108643:13;108703:1;108673:18;108682:8;108673;:18::i;:::-;-1:-1:-1;;;;;108673:32:0;;108669:63;;108714:18;;-1:-1:-1;;;108714:18:0;;;;;;;;;;;108669:63;108762:8;;;108750:40;;-1:-1:-1;;;108750:40:0;;;;;738:25:1;;;-1:-1:-1;;;;;108762:8:0;;108750:30;;711:18:1;;108750:40:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;108750:40:0;;;;;;;;;;;;:::i;137135:1904::-;81528:21;:19;:21::i;:::-;137211:14:::1;137228:12;:10;:12::i;:::-;137255;::::0;;;:5:::1;:12;::::0;;;;;137211:29;;-1:-1:-1;137255:12:0::1;;137251:39;;;137276:14;;-1:-1:-1::0;;;137276:14:0::1;;;;;;;;;;;137251:39;137326:17;137305::::0;;;:10:::1;:17;::::0;;;;;::::1;;:38;::::0;::::1;;;;;;:::i;:::-;;137301:65;;137352:14;;-1:-1:-1::0;;;137352:14:0::1;;;;;;;;;;;137301:65;137400:17;137381:15:::0;;;:10:::1;:15;::::0;;;;;::::1;;:36;::::0;::::1;;;;;;:::i;:::-;;137377:63;;137426:14;;-1:-1:-1::0;;;137426:14:0::1;;;;;;;;;;;137377:63;137464:3;137455:5;:12:::0;137451:34:::1;;137476:9;;-1:-1:-1::0;;;137476:9:0::1;;;;;;;;;;;137451:34;137501:33;137520:6;137528:5;137501:18;:33::i;:::-;137496:67;;137543:20;;-1:-1:-1::0;;;137543:20:0::1;;;;;;;;;;;137496:67;137579:31;137598:6;137606:3;137579:18;:31::i;:::-;137574:65;;137619:20;;-1:-1:-1::0;;;137619:20:0::1;;;;;;;;;;;137574:65;137650:32;137685:12:::0;;;:7:::1;:12;::::0;;;;;;;;137650:47;;::::1;::::0;::::1;::::0;;;;::::1;;::::0;;;;::::1;::::0;;;::::1;::::0;;;::::1;::::0;;::::1;::::0;::::1;;;;::::0;;;;;;;137731:15:::1;-1:-1:-1::0;137712:34:0;::::1;::::0;:62:::1;;;137751:11;:23;;;137750:24;137712:62;137708:88;;;137783:13;;-1:-1:-1::0;;;137783:13:0::1;;;;;;;;;;;137708:88;137809:34;137846:14:::0;;;:7:::1;:14;::::0;;;;;;;;137809:51;;::::1;::::0;::::1;::::0;;;;::::1;;::::0;;;;::::1;::::0;;;::::1;::::0;;;;::::1;;::::0;::::1;;;::::0;::::1;::::0;;;;;;;;137871:53:::1;;137909:15;;-1:-1:-1::0;;;137909:15:0::1;;;;;;;;;;;137871:53;137935:11;137970;:15;;;137949:13;:17;;;:36;;:74;;138008:11;:15;;;137949:74;;;137988:13;:17;;;137949:74;137935:88;;138036:12;138042:5;138036;:12::i;:::-;138076:26;::::0;;::::1;::::0;;::::1;::::0;;-1:-1:-1;138076:26:0;;;::::1;::::0;;::::1;::::0;;;;;;;;;138059:14;;;:7:::1;:14:::0;;;;;:43;;;;-1:-1:-1;;;;;;138059:43:0::1;-1:-1:-1::0;;;;;138059:43:0;;;::::1;::::0;;;;-1:-1:-1;138059:43:0;::::1;::::0;;::::1;::::0;;::::1;::::0;;-1:-1:-1;;138059:43:0::1;::::0;::::1;;::::0;;;::::1;::::0;;;138147:26;;;;::::1;::::0;;;;;;;::::1;::::0;;;;;;;138113:61:::1;::::0;138059:14;;138132:13;;138113:11:::1;:61::i;:::-;-1:-1:-1::0;;;;;;;;;;;;;;;;;;;;;;;;;138272:20:0;;138251:18;;:41:::1;::::0;138272:20;138251:41:::1;:::i;:::-;138230:62;;::::0;;138329:23:::1;::::0;;::::1;::::0;138303:49:::1;::::0;::::1;:23:::0;;::::1;:49:::0;;;;138363:166:::1;;138431:20:::0;;:32:::1;::::0;:30:::1;;;:32::i;:::-;138407:20;;:56;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;138363:166:0::1;::::0;-1:-1:-1;138363:166:0::1;;138496:15;::::0;::::1;:21:::0;;;138363:166:::1;138560:15;::::0;;;:10:::1;:15;::::0;;;;;138577:20;;138539:77:::1;::::0;138560:15;138577:32:::1;::::0;:30:::1;;;:32::i;:::-;138611:4;138539:20;:77::i;:::-;138627:42;138639:3;138644:11;138657;138627;:42::i;:::-;138680:12;::::0;;;:7:::1;:12;::::0;;;;;;;;:26;;;;-1:-1:-1;;;;;;138680:26:0::1;-1:-1:-1::0;;;;;138680:26:0;;;::::1;::::0;;;;::::1;::::0;-1:-1:-1;138680:26:0;::::1;::::0;;;::::1;::::0;::::1;::::0;;::::1;::::0;;-1:-1:-1;;138680:26:0::1;::::0;::::1;;::::0;;;::::1;::::0;;138803:20;;138680:12;;138765:5;;-1:-1:-1;;;;;138724:272:0;::::1;::::0;::::1;::::0;138803:32:::1;::::0;138680:26:::1;138803:30;;:32::i;:::-;138850:18:::0;;:30:::1;::::0;:28:::1;;;:30::i;:::-;138895:18:::0;;:30:::1;::::0;:28:::1;;;:30::i;:::-;138940:15;::::0;;::::1;::::0;138724:272:::1;::::0;;16853:25:1;;;16894:18;;;16887:34;;;;16937:18;;16930:34;16995:2;16980:18;;16973:34;138970:15:0::1;17038:3:1::0;17023:19;;17016:35;16840:3;16825:19;138724:272:0::1;;;;;;;139012:19;::::0;738:25:1;;;-1:-1:-1;;;;;;;;;;;139012:19:0;726:2:1;711:18;139012:19:0::1;;;;;;;;137200:1839;;;;;81572:20:::0;80966:1;82092:7;:22;81909:213;148863:210;148944:43;148963:12;:10;:12::i;148944:43::-;148939:77;;148996:20;;-1:-1:-1;;;148996:20:0;;;;;;;;;;;148939:77;149034:31;149044:9;149055;149034;:31::i;144000:141::-;144077:7;144104:29;144120:8;144130:2;144104:15;:29::i;102881:1711::-;81528:21;:19;:21::i;:::-;102995:5:::1;::::0;-1:-1:-1;;;;;102995:5:0::1;102979:12;:10;:12::i;:::-;-1:-1:-1::0;;;;;102979:21:0::1;;102975:44;;103009:10;;-1:-1:-1::0;;;103009:10:0::1;;;;;;;;;;;102975:44;103059:18;103034:21;::::0;;;:10:::1;:21;::::0;;;;;::::1;;:43;::::0;::::1;;;;;;:::i;:::-;;103030:71;;103086:15;;-1:-1:-1::0;;;103086:15:0::1;;;;;;;;;;;103030:71;103140:17;103116:20:::0;;;:10:::1;:20;::::0;;;;;::::1;;:41;::::0;::::1;;;;;;:::i;:::-;;103112:68;;103166:14;;-1:-1:-1::0;;;103166:14:0::1;;;;;;;;;;;103112:68;103195:42;103211:8;103221:15;103195;:42::i;:::-;103241:1;103195:47:::0;103191:73:::1;;103251:13;;-1:-1:-1::0;;;103251:13:0::1;;;;;;;;;;;103191:73;103305:14;103322:17:::0;;;:7:::1;:17;::::0;;;;:24;;103361:29:::1;::::0;;::::1;::::0;103322:24:::1;::::0;;;::::1;::::0;103361:29:::1;;103357:142;;;103431:19;:7;:17;;;:19::i;:::-;103407:20;;:43;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;103465:22:0::1;::::0;-1:-1:-1;103475:8:0;103485:1:::1;103465:9;:22::i;:::-;103531:17;::::0;;;:7:::1;:17;::::0;;;;;;;103509:68;;::::1;::::0;;::::1;::::0;;;;::::1;;::::0;;;;::::1;::::0;;;::::1;::::0;::::1;::::0;;::::1;::::0;::::1;;;;::::0;;;;103550:26;;;;::::1;::::0;;;;;;;::::1;::::0;;;;;;;;;;103509:68:::1;::::0;103521:8;;103509:68;:11:::1;:68::i;:::-;103608:26;::::0;;::::1;::::0;::::1;::::0;;-1:-1:-1;103608:26:0;;;::::1;::::0;;::::1;::::0;;;;;;;;;103588:17;;;:7:::1;:17:::0;;;;;;:46;;;;-1:-1:-1;;;;;;103588:46:0::1;-1:-1:-1::0;;;;;103588:46:0;;;::::1;::::0;;;;-1:-1:-1;103588:46:0;::::1;::::0;;;::::1;::::0;;::::1;::::0;;-1:-1:-1;;103588:46:0::1;::::0;::::1;;::::0;;;::::1;::::0;;103696:19:::1;103608:26;103696:17:::0;;::::1;;:19::i;:::-;103678:37;;103750:7;103726:20;;:31;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;103768:30:0::1;103801:18:::0;;;:7:::1;:18;::::0;;;;;;;;103768:51;;::::1;::::0;::::1;::::0;;;;::::1;;::::0;;;;;::::1;::::0;;;::::1;::::0;;;;::::1;::::0;;::::1;::::0;::::1;;;;::::0;;;;;;;103850:7;;103768:51;;103830:27:::1;::::0;103850:7;;103830:27:::1;:::i;:::-;;;::::0;;-1:-1:-1;103889:21:0::1;::::0;;;:10:::1;:21;::::0;;;;;103868:58:::1;::::0;103912:7;103921:4:::1;103868:20;:58::i;:::-;103960:18;::::0;;;:7:::1;:18;::::0;;;;;;;;103937:53;;::::1;::::0;::::1;::::0;;;;::::1;;::::0;;;;::::1;::::0;;;::::1;::::0;;;;::::1;;::::0;::::1;;;;::::0;;;;;;;::::1;::::0;103949:9;;103980;103937:11:::1;:53::i;:::-;104001:18;::::0;;;:7:::1;:18;::::0;;;;;;;:30;;;;-1:-1:-1;;;;;;104001:30:0::1;-1:-1:-1::0;;;;;104001:30:0;;;::::1;::::0;;;;::::1;::::0;-1:-1:-1;104001:30:0;;::::1;::::0;;;;;;::::1;::::0;::::1;::::0;;::::1;::::0;;-1:-1:-1;;104001:30:0;;::::1;::::0;::::1;;::::0;;;::::1;::::0;;104044:17;;;:7:::1;:17:::0;;;;;:28;;;;;;;;:38;;;104093:21;;;:11:::1;:21:::0;;;;;:33;;;104137:10:::1;:20:::0;;;;;:40;;;;::::1;;::::0;;104221:26;;;:15:::1;:26:::0;;;;;;;;104258:57;;-1:-1:-1;;;104258:57:0;;::::1;::::0;::::1;5718:25:1::0;;;5759:18;;;5752:34;;;-1:-1:-1;;;;;104221:26:0;;::::1;::::0;;;104258:38:::1;::::0;5691:18:1;;104258:57:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;;104326:26:0::1;104355:24:::0;;;:13:::1;:24;::::0;;;;;;;104390:55;;-1:-1:-1;;;104390:55:0;;::::1;::::0;::::1;5718:25:1::0;;;5759:18;;;5752:34;;;-1:-1:-1;;;;;104355:24:0;;::::1;::::0;-1:-1:-1;104355:24:0;;104390:36:::1;::::0;5691:18:1;;104390:55:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;104508:9;104498:8;104478:18;104487:8;104478;:18::i;:::-;-1:-1:-1::0;;;;;104463:81:0::1;;104519:7;104528:15;104463:81;;;;;;5718:25:1::0;;;5774:2;5759:18;;5752:34;5706:2;5691:18;;5544:248;104463:81:0::1;;;;;;;;104560:24;::::0;738:25:1;;;-1:-1:-1;;;;;;;;;;;104560:24:0;726:2:1;711:18;104560:24:0::1;592:177:1::0;141282:900:0;141343:14;141360:12;:10;:12::i;:::-;141343:29;;141388:36;141407:6;141415:8;141388:18;:36::i;:::-;141383:70;;141433:20;;-1:-1:-1;;;141433:20:0;;;;;;;;;;;141383:70;141492:17;141468:20;;;:10;:20;;;;;;;;:41;;;;;;;;:::i;:::-;;141464:68;;141518:14;;-1:-1:-1;;;141518:14:0;;;;;;;;;;;141464:68;141543:31;141577:17;;;:7;:17;;;;;;;;;141543:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;141605:50;;141640:15;;-1:-1:-1;;;141640:15:0;;;;;;;;;;;141605:50;141688:15;141670:10;:14;;;:33;141666:59;;141712:13;;-1:-1:-1;;;141712:13:0;;;;;;;;;;;141666:59;141761:1;141740:10;:17;;;:22;;;141736:48;;141771:13;;-1:-1:-1;;;141771:13:0;;;;;;;;;;;141736:48;141797:15;141815:29;:10;:17;;;:27;;;:29::i;:::-;141797:47;;141879:7;141855:20;;:31;;;;;;;:::i;:::-;;;;-1:-1:-1;;141914:1:0;141897:14;;;;:18;;;141951:4;141926:22;;;;:29;;;141988:17;;;:7;:17;;;;;;141966:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;141978:8;;141897:10;141966:11;:52::i;:::-;142029:17;;;;:7;:17;;;;;;;;;:30;;;;-1:-1:-1;;;;;;142029:30:0;-1:-1:-1;;;;;142029:30:0;;;;;;;;;;-1:-1:-1;142029:30:0;;;;;;;;;;;;;-1:-1:-1;;142029:30:0;;;;;;;;;;142077:57;;5718:25:1;;;142118:15:0;5759:18:1;;;5752:34;;;;142029:17:0;;-1:-1:-1;;;;;142077:57:0;;;;;5691:18:1;142077:57:0;5544:248:1;143753:204:0;143814:7;143838:25;;;:15;:25;;;;;;143867:12;143838:41;;143834:55;;-1:-1:-1;143888:1:0;;143753:204;-1:-1:-1;143753:204:0:o;143834:55::-;143907:42;143923:8;143933:15;143907;:42::i;133207:180::-;133313:7;81528:21;:19;:21::i;:::-;133340:39:::1;133352:6;133360:13;133375:3;133340:11;:39::i;:::-;133333:46;;81572:20:::0;80966:1;82092:7;:22;81909:213;146455:152;146532:17;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;146532:17:0;-1:-1:-1;146569:22:0;;;;:12;:22;;;;;;;:30;;;;;;;;;;;;;;146562:37;;;;;;;;;;;;;;;-1:-1:-1;;;;;146562:37:0;;;;;;;;;;;;;;;;;;;;;;;;;;;146455:152::o;78553:458::-;78615:14;78520:17;-1:-1:-1;;;;;78507:30:0;78665:10;78507:30;78642:362;;-1:-1:-1;;;78899:14:0;78895:23;78882:37;78878:2;78874:46;78553:458;:::o;78642:362::-;-1:-1:-1;77891:10:0;;144184:107::o;109248:113::-;109307:7;109334:19;;;:9;:19;;;;;;-1:-1:-1;;;;;109334:19:0;;109248:113::o;81608:293::-;81010:1;81742:7;;:19;81734:63;;;;-1:-1:-1;;;81734:63:0;;20183:2:1;81734:63:0;;;20165:21:1;20222:2;20202:18;;;20195:30;20261:33;20241:18;;;20234:61;20312:18;;81734:63:0;;;;;;;;;81010:1;81875:7;:18;81608:293::o;133395:1225::-;133503:22;133528:20;;;:10;:20;;;;;;;;;133563:11;:32;;;;;;;;:::i;:::-;;133559:68;;133604:23;;-1:-1:-1;;;133604:23:0;;;;;;;;;;;133559:68;133640:30;133673:17;;;:7;:17;;;;;;;;133640:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;133707:11;;;133703:36;;133727:12;;-1:-1:-1;;;133727:12:0;;;;;;;;;;;133703:36;133774:1;133754:9;:16;;;:21;;;133750:47;;133784:13;;-1:-1:-1;;;133784:13:0;;;;;;;;;;;133750:47;133829:15;133812:9;:13;;;:32;;:58;;;;;133849:9;:21;;;133848:22;133812:58;133808:84;;;133879:13;;-1:-1:-1;;;133879:13:0;;;;;;;;;;;133808:84;133909:9;:21;;;133905:57;;;133956:6;133932:20;;:30;;;;;;;:::i;:::-;;;;-1:-1:-1;;133905:57:0;133994:20;;;;:10;:20;;;;;;133973:56;;134016:6;134024:4;133973:20;:56::i;:::-;134040:57;134052:8;134062:6;134070:1;134073:9;134084:12;134040:11;:57::i;:::-;134129:18;134114:11;:33;;;;;;;;:::i;:::-;;134110:461;;134250:28;134281:25;;;:15;:25;;;;;;-1:-1:-1;;;;;134281:25:0;;;;134338:5;;134358:56;;:26;;134281:25;134407:6;134358:26;:56::i;:::-;134429:64;;-1:-1:-1;;;134429:64:0;;-1:-1:-1;;;;;12516:32:1;;;134429:64:0;;;12498:51:1;12565:18;;;12558:34;;;134429:48:0;;;;;12471:18:1;;134429:64:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;134508:51:0;;-1:-1:-1;;;;;;;;134508:26:0;;134535:20;134557:1;134508:26;:51::i;:::-;134149:422;;134110:461;134588:24;;738:25:1;;;-1:-1:-1;;;;;;;;;;;134588:24:0;726:2:1;711:18;134588:24:0;;;;;;;133492:1128;;133395:1225;;;:::o;143537:173::-;143684:5;;143626:76;;-1:-1:-1;;;143626:76:0;;143655:12;143626:76;;;20654:25:1;143669:13:0;20695:18:1;;;20688:34;20738:18;;;20731:34;;;;20781:18;;;20774:34;;;143599:7:0;;143626:19;;:28;;20626:19:1;;143626:76:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;112601:930::-;112735:17;112711:20;;;;:10;:20;;;;;;;;:41;;;;;;;;:::i;:::-;;112707:77;;112761:23;;-1:-1:-1;;;112761:23:0;;;;;;;;;;;112707:77;112831:37;112850:7;112859:8;112831:18;:37::i;:::-;112826:71;;112877:20;;-1:-1:-1;;;112877:20:0;;;;;;;;;;;112826:71;113005:5;-1:-1:-1;;;;;112983:27:0;:18;112992:8;112983;:18::i;:::-;-1:-1:-1;;;;;112983:27:0;;112979:50;;113019:10;;-1:-1:-1;;;113019:10:0;;;;;;;;;;;112979:50;113047:23;;;;:13;:23;;;;;113040:30;;-1:-1:-1;;;;;;113040:30:0;;;113145:33;113162:5;113061:8;113145:16;:33::i;:::-;113227:38;113248:8;113258:1;113261:3;113227:20;:38::i;:::-;113296:26;113308:3;113313:8;113296:11;:26::i;:::-;113408:25;;;;:15;:25;;;;;;113436:12;113408:40;;113493:30;113424:8;;-1:-1:-1;;;;;113493:30:0;;;;;;;;;;;112601:930;;;;:::o;110765:424::-;110852:4;110869:13;110885:18;110894:8;110885;:18::i;:::-;110914:19;111001:23;;;:13;:23;;;;;;;;;-1:-1:-1;;;;;110936:17:0;;;111067:23;;;:16;:23;;;;;110936:17;;;111066:35;;;;;;;;;;110869:34;;-1:-1:-1;110936:17:0;;;;111001:23;;110989:35;;111066;;110936:17;;111119:35;;;111137:17;111119:35;:62;;;;111158:23;111119:62;111112:69;110765:424;-1:-1:-1;;;;;;;110765:424:0:o;82954:165::-;83010:7;83042:1;83034:5;:9;;;83030:41;;;83052:19;;-1:-1:-1;;;83052:19:0;;;;;;;;;;;83030:41;-1:-1:-1;83097:13:0;;;82954:165::o;119613:502::-;119666:14;119683:12;:10;:12::i;:::-;119666:29;;119711:36;119730:6;119738:8;119711:18;:36::i;:::-;119706:70;;119756:20;;-1:-1:-1;;;119756:20:0;;;;;;;;;;;119706:70;119787:13;119803:18;119812:8;119803;:18::i;:::-;119868:23;;;;:13;:23;;;;;119861:30;;-1:-1:-1;;;;;;119861:30:0;;;119787:34;;-1:-1:-1;119940:45:0;;119882:8;;119868:23;119940:20;:45::i;:::-;120021:33;120038:5;120045:8;120021:16;:33::i;:::-;120070:37;;120098:8;;120094:1;;-1:-1:-1;;;;;120070:37:0;;;;;120094:1;;120070:37;119655:460;;119613:502;:::o;122120:7589::-;122245:21;;:::i;:::-;122277;;:::i;:::-;122388:5;;122309:16;;;;122410:13;;122406:1242;;122457:10;:22;;;:58;;122514:1;122457:58;;;122482:17;;:29;;:27;;;:29::i;:::-;122440:14;;;:75;122625:14;;;;122642:15;-1:-1:-1;122625:57:0;;;;;122681:1;122661:10;:17;;;:21;;;122625:57;122621:228;;;122716:17;;:28;;120451:15;;122716:28;:::i;:::-;122703:41;;:10;;;;:41;;;;122789:14;;;122788:45;;122789:32;;122806:15;;122789:32;:::i;:::-;122788:43;:45::i;:::-;122775:4;:10;;;:58;;;;:::i;:::-;122763:70;;;;122621:228;122884:15;122867:10;:14;;;:32;:57;;;;;122923:1;122903:10;:17;;;:21;;;122867:57;122863:228;;;122958:17;;:28;;120451:15;;122958:28;:::i;:::-;122945:41;;:10;;;;:41;;;;123031:14;;;123030:45;;123031:32;;123048:15;;123031:32;:::i;123030:45::-;123017:4;:10;;;:58;;;;:::i;:::-;123005:70;;;;122863:228;123357:14;;;;;123344:28;;;;:12;:28;;;;;;123391:14;;;;123344:28;;;;;;-1:-1:-1;123391:19:0;123387:250;;123453:10;:14;;;123435:10;:14;;;:32;123431:191;;123504:9;123492:21;;123431:191;;;123587:14;;;;;123574:28;;;;:12;:28;;;;;;;;;;-1:-1:-1;123431:191:0;123691:173;;;;;;;;123660:28;123691:173;;;;;;;;;123767:15;123691:173;;;;;;;123802:12;123691:173;;;;;;;;;;;123879:10;;123875:76;;-1:-1:-1;123918:21:0;;;;:13;:21;;;;;;;;;123906:33;;;;;;;;;;;;;;;-1:-1:-1;;;123906:33:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;123875:76;123961:22;123986:9;:12;;;123961:37;;124223:35;124261:227;;;;;;;;124294:9;:14;;;124261:227;;;;;;124330:9;:15;;;124261:227;;;;;;124364:9;:12;;;124261:227;;;;124396:9;:13;;;124261:227;;;;124446:9;:30;;;124261:227;;;124223:265;;124499:18;124567:9;:12;;;124549:15;:30;124545:156;;;124676:12;;;;124658:30;;:15;:30;:::i;:::-;124639:13;;;;124624:28;;:12;:28;:::i;:::-;124610:43;;120512:7;124610:43;:::i;:::-;124609:80;;;;:::i;:::-;124596:93;;124545:156;124940:11;120343:7;124955:21;120343:7;124955:14;:21;:::i;:::-;124954:30;;;;:::i;:::-;124940:44;;125004:9;124999:1435;125023:3;125019:1;:7;124999:1435;;;125229:11;120343:7;125229:11;;:::i;:::-;;;125330:14;125377:15;125371:3;:21;125367:167;;;125423:15;125417:21;;125367:167;;;-1:-1:-1;125497:17:0;;;;:12;:17;;;;;;;;125367:167;125588:33;125589:20;125595:14;125589:3;:20;:::i;125588:33::-;125570:9;:15;;;:51;;;;:::i;:::-;125552:69;;:9;;:69;;;;;:::i;:::-;;;;;-1:-1:-1;125640:15:0;;;:26;;125659:7;;125640:15;:26;;125659:7;;125640:26;:::i;:::-;;;;;;;;125689:14;;125706:1;125689:18;;;125685:125;;-1:-1:-1;125685:125:0;;125789:1;125772:18;;125685:125;125850:1;125832:9;:15;;;:19;;;125828:145;;;125952:1;125934:15;;;:19;125828:145;126030:12;;;;:18;;;126127:19;;;126008:3;;-1:-1:-1;126008:3:0;;120512:7;;126121:25;;126008:3;126121:25;:::i;:::-;126107:40;;:10;:40;:::i;:::-;126106:55;;;;:::i;:::-;126083:16;:20;;;:78;;;;:::i;:::-;126067:13;;;:94;126180:11;126190:1;126180:11;;:::i;:::-;;;126221:15;126214:3;:22;126210:209;;-1:-1:-1;126277:12:0;126261:13;;;:28;126312:5;;126210:209;126366:21;;;;:13;:21;;;;;;;;;:33;;;;;;-1:-1:-1;;;;;126366:33:0;;;-1:-1:-1;;;126366:33:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;125028:3:0;;;:::i;:::-;;;124999:1435;;;-1:-1:-1;;126461:13:0;;126457:541;;126667:4;:10;;;126654:4;:10;;;:23;;;;:::i;:::-;126634:9;:15;;:44;;;;;;;:::i;:::-;;;;;-1:-1:-1;126724:9:0;;126712;;:21;;126724:9;126712:21;:::i;:::-;126693:41;;:9;;:41;;;;;:::i;:::-;;;;;;;;126753:15;;;;126771:1;126753:19;;;126749:79;;-1:-1:-1;126749:79:0;;126811:1;126793:15;;;:19;126749:79;126863:1;126846:9;:14;;;:18;;;126842:77;;;126902:1;126885:18;;126842:77;126966:20;;126933:30;;;:53;126457:541;127572:6;127582:1;127572:11;;:62;;;;-1:-1:-1;127619:15:0;127587:13;:25;127601:10;127610:1;127601:6;:10;:::i;:::-;127587:25;;;;;;;;;;;:28;;;:47;127572:62;127568:377;;;127744:9;127716:13;:25;127730:10;127739:1;127730:6;:10;:::i;:::-;127716:25;;;;;;;;;;;;;;-1:-1:-1;127716:25:0;:37;;;;;;-1:-1:-1;;;;;127716:37:0;;;-1:-1:-1;;;127716:37:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;127568:377;;;127871:5;:14;;;127900:21;;;;:13;:21;;;;;;;;;:33;;;;;;-1:-1:-1;;;;;127900:33:0;;;-1:-1:-1;;;127900:33:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;127568:377;127961:13;;127957:1745;;128201:15;128184:10;:14;;;:32;128180:394;;;128328:10;;;;128315:23;;;;:::i;:::-;;;128379:10;:14;;;128361:10;:14;;;:32;128357:143;;128431:10;;;;128418:23;;;;:::i;:::-;;;128357:143;128531:14;;;;;128518:28;;;;:12;:28;;;;;;:40;;-1:-1:-1;;;;;;128518:40:0;-1:-1:-1;;;;;128518:40:0;;;;;128180:394;128611:15;128594:10;:14;;;:32;128590:460;;;128788:10;:14;;;128771:10;:14;;;:31;128766:207;;;128841:10;;;;128828:23;;;;:::i;:::-;128926:14;;;;;128913:28;;;;:12;:28;;;;;;:40;;-1:-1:-1;;;;;;128913:40:0;-1:-1:-1;;;;;128913:40:0;;;;;;-1:-1:-1;128766:207:0;129257:15;129247:7;;;;:25;;;;129298:12;129287:8;;;:23;-1:-1:-1;129345:24:0;;;:14;:24;;;;129388:14;;;;;:78;;-1:-1:-1;129406:27:0;;;;:17;:27;;;;;129451:15;;129434:9;129406:38;;;;;;;:::i;:::-;;;;:41;;;:60;129388:78;129384:307;;;129487:27;;;;:17;:27;;;;;129528:4;;129515:9;129487:38;;;;;;;:::i;:::-;:45;;;;;;-1:-1:-1;;;;;129487:45:0;;;-1:-1:-1;;;129487:45:0;;;;:38;;;;;;;;;:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;129384:307;;;129600:11;;;:::i;:::-;129573:24;;;;:14;:24;;;;;;;;:38;;;129630:17;:27;;;;;129600:11;;-1:-1:-1;129671:4:0;;129600:11;129630:38;;;;;;;:::i;:::-;:45;;;;;;-1:-1:-1;;;;;129630:45:0;;;-1:-1:-1;;;129630:45:0;;;;:38;;;;;;;;;:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;129384:307;127976:1726;127957:1745;122234:7475;;;;;;;;;122120:7589;;;:::o;64276:177::-;64386:58;;-1:-1:-1;;;;;12516:32:1;;64386:58:0;;;12498:51:1;12565:18;;;12558:34;;;64359:86:0;;64379:5;;-1:-1:-1;;;64409:23:0;12471:18:1;;64386:58:0;;;;-1:-1:-1;;64386:58:0;;;;;;;;;;;;;;-1:-1:-1;;;;;64386:58:0;-1:-1:-1;;;;;;64386:58:0;;;;;;;;;;64359:19;:86::i;147969:851::-;148048:35;148086:19;;;:7;:19;;;;;;;;;148048:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;148116:58;;148156:18;;-1:-1:-1;;;148156:18:0;;;;;;;;;;;148116:58;148189:15;;;;;:53;;-1:-1:-1;148240:1:0;148208:20;148217:10;148208:8;:20::i;:::-;-1:-1:-1;;;;;148208:34:0;;148189:53;148185:84;;;148251:18;;-1:-1:-1;;;148251:18:0;;;;;;;;;;;148185:84;148284:27;;;;:15;:27;;;;;;148315:12;148284:43;;148280:73;;148336:17;;-1:-1:-1;;;148336:17:0;;;;;;;;;;;148280:73;148382:10;148368;:24;148364:44;;148407:1;148394:14;;148364:44;148419:23;148445:22;;;:10;:22;;;;;;148482:29;;;148478:42;;148513:7;;147969:851;;:::o;148478:42::-;148532:24;148559:33;:14;:21;;;:31;;;:33::i;:::-;148532:60;;148603:66;148624:10;148636;148648:20;148657:10;148648:8;:20::i;:::-;148603;:66::i;:::-;148680:56;148701:10;148713:16;148731:4;148680:20;:56::i;:::-;148801:10;148784:15;148770:12;:10;:12::i;:::-;-1:-1:-1;;;;;148754:58:0;;;;;;;;;;;148037:783;;;147969:851;;:::o;82712:187::-;82768:6;-1:-1:-1;;;;;82791:33:0;;82787:64;;;82833:18;;-1:-1:-1;;;82833:18:0;;;;;;;;;;;82787:64;-1:-1:-1;82884:5:0;82712:187::o;147600:217::-;147704:105;;-1:-1:-1;;;147704:105:0;;147747:14;147704:105;;;21733:25:1;147763:12:0;21774:18:1;;;21767:34;21817:18;;;21810:34;;;21860:18;;;21853:34;;;21931:14;;21924:22;21903:19;;;21896:51;147704:22:0;;:42;;21705:19:1;;147704:105:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;117380:417;117444:4;-1:-1:-1;;;;;117512:17:0;;117505:25;;;;:::i;:::-;117603:26;117615:3;117620:8;117603:11;:26::i;:::-;117678:38;117699:8;117709:1;117712:3;117678:20;:38::i;:::-;117732:35;;117758:8;;-1:-1:-1;;;;;117732:35:0;;;117749:1;;117732:35;;117749:1;;117732:35;-1:-1:-1;117785:4:0;117380:417;;;;:::o;130048:1507::-;130278:6;;130304:21;130319:6;130278;130304:21;:::i;:::-;130295:6;:30;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;130517:17:0;;130549:14;;;;130578:22;;;;130443:168;;;;;;;;;;;;;;;130726:17;:6;:15;:17::i;:::-;130706:37;;:9;;:37;;;;;:::i;:::-;;;;;-1:-1:-1;130758:16:0;;130754:76;;130791:13;;;:27;;;130754:76;130840:17;;;;:7;:17;;;;;;;;;:29;;;;-1:-1:-1;;;;;;130840:29:0;-1:-1:-1;;;;;130840:29:0;;;;;;;;;;-1:-1:-1;130840:29:0;;;;;;;;;;;;;-1:-1:-1;;130840:29:0;;;;;;;;;;131196:44;130840:17;131218:10;130840:29;131196:11;:44::i;:::-;131253:12;131268;:10;:12::i;:::-;131253:27;-1:-1:-1;131295:11:0;;131291:103;;131323:59;-1:-1:-1;;;;;131330:5:0;131323:30;131354:4;131368;131375:6;131323:30;:59::i;:::-;131435:12;131411:77;;;;;;;;:::i;:::-;131457:13;;;;;131411:77;;;22292:25:1;;;22333:18;;;22326:34;;;;131472:15:0;22376:18:1;;;22369:34;131411:77:0;131425:8;;-1:-1:-1;;;;;131411:77:0;;;;;;;;22280:2:1;131411:77:0;;;131504:43;131511:12;131525:21;131540:6;131511:12;131525:21;:::i;:::-;131504:43;;;5718:25:1;;;5774:2;5759:18;;5752:34;;;;5691:18;131504:43:0;;;;;;;130244:1311;;;130048:1507;;;;;:::o;140749:289::-;140837:16;140879:7;;140877:9;;;;;:::i;:::-;;;;;-1:-1:-1;140897:17:0;;;;:7;:17;;;;;;;;:30;;;;-1:-1:-1;;;;;;140897:30:0;-1:-1:-1;;;;;140897:30:0;;;;;;;;;;-1:-1:-1;140897:30:0;;;;;;;;;;;;;-1:-1:-1;;140897:30:0;;;;;;;;;;140960:26;;;;;;;;;;;;;;;;;;;;;;140877:9;;-1:-1:-1;140938:61:0;;140877:9;;140897:30;140938:11;:61::i;:::-;141010:20;141016:3;141021:8;141010:5;:20::i;:::-;;140749:289;;;;:::o;132311:637::-;132402:7;;120343;;132445:31;132463:13;132445:15;:31;:::i;:::-;132444:40;;;;:::i;:::-;132443:49;;;;:::i;:::-;132422:70;;132546:6;132556:1;132546:11;132542:36;;132566:12;;-1:-1:-1;;;132566:12:0;;;;;;;;;;;132542:36;132607:15;132593:10;:29;132589:67;;132631:25;;-1:-1:-1;;;132631:25:0;;;;;;;;;;;132589:67;132684:25;120393:15;132684;:25;:::i;:::-;132671:10;:38;132667:72;;;132718:21;;-1:-1:-1;;;132718:21:0;;;;;;;;;;;132667:72;132752:16;132773:7;;132771:9;;;;;:::i;:::-;;;;;-1:-1:-1;132771:9:0;-1:-1:-1;132791:20:0;132797:3;132771:9;132791:5;:20::i;:::-;-1:-1:-1;132866:17:0;;;;:7;:17;;;;;;;;;132824:90;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;132836:8;;132846:6;;132854:10;;132824:11;:90::i;:::-;132932:8;132311:637;-1:-1:-1;;;;;132311:637:0:o;143333:196::-;143438:83;;-1:-1:-1;;;143438:83:0;;143473:14;143438:83;;;20654:25:1;143489:17:0;20695:18:1;;;20688:34;20738:18;;;20731:34;;;20781:18;;;20774:34;;;143411:7:0;;143438:19;;:34;;20626:19:1;;143438:83:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;64935:582::-;65265:10;;;65264:62;;-1:-1:-1;65281:39:0;;-1:-1:-1;;;65281:39:0;;65305:4;65281:39;;;14520:34:1;-1:-1:-1;;;;;14590:15:1;;;14570:18;;;14563:43;65281:15:0;;;;;14455:18:1;;65281:39:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:44;65264:62;65242:166;;;;-1:-1:-1;;;65242:166:0;;23122:2:1;65242:166:0;;;23104:21:1;23161:2;23141:18;;;23134:30;23200:34;23180:18;;;23173:62;-1:-1:-1;;;23251:18:1;;;23244:52;23313:19;;65242:166:0;22920:418:1;65242:166:0;65446:62;;-1:-1:-1;;;;;12516:32:1;;65446:62:0;;;12498:51:1;12565:18;;;12558:34;;;65419:90:0;;65439:5;;-1:-1:-1;;;65469:22:0;12471:18:1;;65446:62:0;12324:274:1;119118:424:0;119281:5;-1:-1:-1;;;;;119259:27:0;:18;119268:8;119259;:18::i;:::-;-1:-1:-1;;;;;119259:27:0;;119252:35;;;;:::i;:::-;119357:1;119327:19;;;:9;:19;;;;;:32;;-1:-1:-1;;;;;;119327:32:0;;;119416:42;119442:5;119337:8;119416:25;:42::i;:::-;-1:-1:-1;;;;;119503:26:0;;;;;;:19;:26;;;;;:31;;119533:1;;119503:26;:31;;119533:1;;119503:31;:::i;:::-;;;;-1:-1:-1;;;;119118:424:0:o;147251:341::-;147357:227;;-1:-1:-1;;;147357:227:0;;147414:7;147357:227;;;23840:25:1;147436:14:0;23881:18:1;;;23874:34;147465:12:0;23924:18:1;;;23917:34;147492:10:0;23967:18:1;;;23960:34;24010:19;;;24003:35;;;24054:19;;;24047:35;;;-1:-1:-1;;;;;24119:32:1;;24098:19;;;24091:61;147357:22:0;;:42;;23812:19:1;;147357:227:0;23343:815:1;116636:404:0;116798:1;116768:18;116777:8;116768;:18::i;:::-;-1:-1:-1;;;;;116768:32:0;;116761:40;;;;:::i;:::-;116841:19;;;;:9;:19;;;;;;;;:25;;-1:-1:-1;;;;;;116841:25:0;-1:-1:-1;;;;;116841:25:0;;;;;;;;116381:24;;;:19;:24;;;;;;;;116418:20;:25;;;;;:39;;;;;;;;:50;;;116479:27;;;:17;:27;;;;;:42;;;;117003:24;;;;;;:29;;-1:-1:-1;;116841:19:0;117003:29;;-1:-1:-1;;117003:29:0;:::i;67164:716::-;67588:23;67614:69;67642:4;67614:69;;;;;;;;;;;;;;;;;67622:5;-1:-1:-1;;;;;67614:27:0;;;:69;;;;;:::i;:::-;67698:17;;67588:95;;-1:-1:-1;67698:21:0;67694:179;;67795:10;67784:30;;;;;;;;;;;;:::i;:::-;67776:85;;;;-1:-1:-1;;;67776:85:0;;24615:2:1;67776:85:0;;;24597:21:1;24654:2;24634:18;;;24627:30;24693:34;24673:18;;;24666:62;-1:-1:-1;;;24744:18:1;;;24737:40;24794:19;;67776:85:0;24413:406:1;64461:205:0;64589:68;;-1:-1:-1;;;;;25082:15:1;;;64589:68:0;;;25064:34:1;25134:15;;25114:18;;;25107:43;25166:18;;;25159:34;;;64562:96:0;;64582:5;;-1:-1:-1;;;64612:27:0;24999:18:1;;64589:68:0;24824:375:1;64562:96:0;64461:205;;;;:::o;117977:1027::-;-1:-1:-1;;;;;118107:26:0;;118084:20;118107:26;;;:19;:26;;;;;;:30;;118136:1;;118107:30;:::i;:::-;118148:20;118171:27;;;:17;:27;;;;;;118084:53;;-1:-1:-1;118215:28:0;;;118211:786;;-1:-1:-1;;;;;118304:27:0;;118348:1;118304:27;;;:20;:27;;;;;;;;:41;;;;;;;;:45;;;118405:27;;;:17;:27;;;;;:31;118211:786;;;-1:-1:-1;;;;;118491:27:0;;;;118469:19;118491:27;;;:20;:27;;;;;;;;:41;;;;;;;;;;;118613;;;;;;:55;;;118724:30;;:17;:30;;;;;;:45;;;;118853;;;;118954:27;;;;;:31;117977:1027::o;58346:229::-;58483:12;58515:52;58537:6;58545:4;58551:1;58554:12;58483;59720;59734:23;59761:6;-1:-1:-1;;;;;59761:11:0;59780:5;59787:4;59761:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;59719:73;;;;59810:69;59837:6;59845:7;59854:10;59866:12;59810:26;:69::i;:::-;59803:76;;;;59432:455;;;;;;;:::o;62005:644::-;62190:12;62219:7;62215:427;;;62247:10;:17;62268:1;62247:22;62243:290;;-1:-1:-1;;;;;55885:19:0;;;62457:60;;;;-1:-1:-1;;;62457:60:0;;26105:2:1;62457:60:0;;;26087:21:1;26144:2;26124:18;;;26117:30;26183:31;26163:18;;;26156:59;26232:18;;62457:60:0;25903:353:1;62457:60:0;-1:-1:-1;62554:10:0;62547:17;;62215:427;62597:33;62605:10;62617:12;63352:17;;:21;63348:388;;63584:10;63578:17;63641:15;63628:10;63624:2;63620:19;63613:44;63348:388;63711:12;63704:20;;-1:-1:-1;;;63704:20:0;;;;;;;;:::i;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;14:131:1:-;-1:-1:-1;;;;;;88:32:1;;78:43;;68:71;;135:1;132;125:12;150:245;208:6;261:2;249:9;240:7;236:23;232:32;229:52;;;277:1;274;267:12;229:52;316:9;303:23;335:30;359:5;335:30;:::i;774:250::-;859:1;869:113;883:6;880:1;877:13;869:113;;;959:11;;;953:18;940:11;;;933:39;905:2;898:10;869:113;;;-1:-1:-1;;1016:1:1;998:16;;991:27;774:250::o;1029:271::-;1071:3;1109:5;1103:12;1136:6;1131:3;1124:19;1152:76;1221:6;1214:4;1209:3;1205:14;1198:4;1191:5;1187:16;1152:76;:::i;:::-;1282:2;1261:15;-1:-1:-1;;1257:29:1;1248:39;;;;1289:4;1244:50;;1029:271;-1:-1:-1;;1029:271:1:o;1305:220::-;1454:2;1443:9;1436:21;1417:4;1474:45;1515:2;1504:9;1500:18;1492:6;1474:45;:::i;1530:180::-;1589:6;1642:2;1630:9;1621:7;1617:23;1613:32;1610:52;;;1658:1;1655;1648:12;1610:52;-1:-1:-1;1681:23:1;;1530:180;-1:-1:-1;1530:180:1:o;1923:131::-;-1:-1:-1;;;;;1998:31:1;;1988:42;;1978:70;;2044:1;2041;2034:12;2059:247;2118:6;2171:2;2159:9;2150:7;2146:23;2142:32;2139:52;;;2187:1;2184;2177:12;2139:52;2226:9;2213:23;2245:31;2270:5;2245:31;:::i;2311:315::-;2379:6;2387;2440:2;2428:9;2419:7;2415:23;2411:32;2408:52;;;2456:1;2453;2446:12;2408:52;2495:9;2482:23;2514:31;2539:5;2514:31;:::i;:::-;2564:5;2616:2;2601:18;;;;2588:32;;-1:-1:-1;;;2311:315:1:o;2631:248::-;2699:6;2707;2760:2;2748:9;2739:7;2735:23;2731:32;2728:52;;;2776:1;2773;2766:12;2728:52;-1:-1:-1;;2799:23:1;;;2869:2;2854:18;;;2841:32;;-1:-1:-1;2631:248:1:o;3066:456::-;3143:6;3151;3159;3212:2;3200:9;3191:7;3187:23;3183:32;3180:52;;;3228:1;3225;3218:12;3180:52;3267:9;3254:23;3286:31;3311:5;3286:31;:::i;:::-;3336:5;-1:-1:-1;3393:2:1;3378:18;;3365:32;3406:33;3365:32;3406:33;:::i;:::-;3066:456;;3458:7;;-1:-1:-1;;;3512:2:1;3497:18;;;;3484:32;;3066:456::o;3527:388::-;3595:6;3603;3656:2;3644:9;3635:7;3631:23;3627:32;3624:52;;;3672:1;3669;3662:12;3624:52;3711:9;3698:23;3730:31;3755:5;3730:31;:::i;:::-;3780:5;-1:-1:-1;3837:2:1;3822:18;;3809:32;3850:33;3809:32;3850:33;:::i;:::-;3902:7;3892:17;;;3527:388;;;;;:::o;4109:118::-;4195:5;4188:13;4181:21;4174:5;4171:32;4161:60;;4217:1;4214;4207:12;4232:382;4297:6;4305;4358:2;4346:9;4337:7;4333:23;4329:32;4326:52;;;4374:1;4371;4364:12;4326:52;4413:9;4400:23;4432:31;4457:5;4432:31;:::i;:::-;4482:5;-1:-1:-1;4539:2:1;4524:18;;4511:32;4552:30;4511:32;4552:30;:::i;4619:309::-;4684:6;4692;4745:2;4733:9;4724:7;4720:23;4716:32;4713:52;;;4761:1;4758;4751:12;4713:52;4797:9;4784:23;4774:33;;4857:2;4846:9;4842:18;4829:32;4870:28;4892:5;4870:28;:::i;5288:251::-;5474:3;5459:19;;5487:46;5463:9;5515:6;5029:5;5023:12;5019:2;5008:28;5003:3;4996:41;5101:4;5094:5;5090:16;5084:23;5080:2;5069:39;5062:4;5057:3;5053:14;5046:63;5158:4;5151:5;5147:16;5141:23;5134:4;5129:3;5125:14;5118:47;5214:4;5207:5;5203:16;5197:23;5190:4;5185:3;5181:14;5174:47;5270:4;5263:5;5259:16;5253:23;5246:4;5241:3;5237:14;5230:47;;;4933:350;5797:383;5874:6;5882;5890;5943:2;5931:9;5922:7;5918:23;5914:32;5911:52;;;5959:1;5956;5949:12;5911:52;5998:9;5985:23;6017:31;6042:5;6017:31;:::i;:::-;6067:5;6119:2;6104:18;;6091:32;;-1:-1:-1;6170:2:1;6155:18;;;6142:32;;5797:383;-1:-1:-1;;;5797:383:1:o;6386:127::-;6447:10;6442:3;6438:20;6435:1;6428:31;6478:4;6475:1;6468:15;6502:4;6499:1;6492:15;6518:342;6664:2;6649:18;;6697:1;6686:13;;6676:144;;6742:10;6737:3;6733:20;6730:1;6723:31;6777:4;6774:1;6767:15;6805:4;6802:1;6795:15;6676:144;6829:25;;;6518:342;:::o;6865:681::-;6976:6;6984;6992;7000;7008;7016;7024;7077:3;7065:9;7056:7;7052:23;7048:33;7045:53;;;7094:1;7091;7084:12;7045:53;7130:9;7117:23;7107:33;;7187:2;7176:9;7172:18;7159:32;7149:42;;7238:2;7227:9;7223:18;7210:32;7200:42;;7289:2;7278:9;7274:18;7261:32;7251:42;;7343:3;7332:9;7328:19;7315:33;7388:4;7381:5;7377:16;7370:5;7367:27;7357:55;;7408:1;7405;7398:12;7357:55;6865:681;;;;-1:-1:-1;6865:681:1;;;;7431:5;7483:3;7468:19;;7455:33;;-1:-1:-1;7535:3:1;7520:19;;;7507:33;;6865:681;-1:-1:-1;;6865:681:1:o;8218:127::-;8279:10;8274:3;8270:20;8267:1;8260:31;8310:4;8307:1;8300:15;8334:4;8331:1;8324:15;8350:275;8421:2;8415:9;8486:2;8467:13;;-1:-1:-1;;8463:27:1;8451:40;;8521:18;8506:34;;8542:22;;;8503:62;8500:88;;;8568:18;;:::i;:::-;8604:2;8597:22;8350:275;;-1:-1:-1;8350:275:1:o;8630:186::-;8678:4;8711:18;8703:6;8700:30;8697:56;;;8733:18;;:::i;:::-;-1:-1:-1;8799:2:1;8778:15;-1:-1:-1;;8774:29:1;8805:4;8770:40;;8630:186::o;8821:1016::-;8916:6;8924;8932;8940;8993:3;8981:9;8972:7;8968:23;8964:33;8961:53;;;9010:1;9007;9000:12;8961:53;9049:9;9036:23;9068:31;9093:5;9068:31;:::i;:::-;9118:5;-1:-1:-1;9175:2:1;9160:18;;9147:32;9188:33;9147:32;9188:33;:::i;:::-;9240:7;-1:-1:-1;9294:2:1;9279:18;;9266:32;;-1:-1:-1;9349:2:1;9334:18;;9321:32;9376:18;9365:30;;9362:50;;;9408:1;9405;9398:12;9362:50;9431:22;;9484:4;9476:13;;9472:27;-1:-1:-1;9462:55:1;;9513:1;9510;9503:12;9462:55;9549:2;9536:16;9574:48;9590:31;9618:2;9590:31;:::i;:::-;9574:48;:::i;:::-;9645:2;9638:5;9631:17;9685:7;9680:2;9675;9671;9667:11;9663:20;9660:33;9657:53;;;9706:1;9703;9696:12;9657:53;9761:2;9756;9752;9748:11;9743:2;9736:5;9732:14;9719:45;9805:1;9800:2;9795;9788:5;9784:14;9780:23;9773:34;9826:5;9816:15;;;;;8821:1016;;;;;;;:::o;9842:383::-;9919:6;9927;9935;9988:2;9976:9;9967:7;9963:23;9959:32;9956:52;;;10004:1;10001;9994:12;9956:52;10040:9;10027:23;10017:33;;10097:2;10086:9;10082:18;10069:32;10059:42;;10151:2;10140:9;10136:18;10123:32;10164:31;10189:5;10164:31;:::i;:::-;10214:5;10204:15;;;9842:383;;;;;:::o;10230:348::-;10297:6;10305;10358:2;10346:9;10337:7;10333:23;10329:32;10326:52;;;10374:1;10371;10364:12;10326:52;10410:9;10397:23;10387:33;;10470:2;10459:9;10455:18;10442:32;10514:14;10507:5;10503:26;10496:5;10493:37;10483:65;;10544:1;10541;10534:12;11238:127;11299:10;11294:3;11290:20;11287:1;11280:31;11330:4;11327:1;11320:15;11354:4;11351:1;11344:15;11370:128;11437:9;;;11458:11;;;11455:37;;;11472:18;;:::i;11764:125::-;11829:9;;;11850:10;;;11847:36;;;11863:18;;:::i;11894:127::-;11955:10;11950:3;11946:20;11943:1;11936:31;11986:4;11983:1;11976:15;12010:4;12007:1;12000:15;12026:120;12066:1;12092;12082:35;;12097:18;;:::i;:::-;-1:-1:-1;12131:9:1;;12026:120::o;12151:168::-;12224:9;;;12255;;12272:15;;;12266:22;;12252:37;12242:71;;12293:18;;:::i;12603:184::-;12673:6;12726:2;12714:9;12705:7;12701:23;12697:32;12694:52;;;12742:1;12739;12732:12;12694:52;-1:-1:-1;12765:16:1;;12603:184;-1:-1:-1;12603:184:1:o;12792:127::-;12853:10;12848:3;12844:20;12841:1;12834:31;12884:4;12881:1;12874:15;12908:4;12905:1;12898:15;12924:729;13094:4;13142:2;13131:9;13127:18;13172:6;13161:9;13154:25;13198:2;13236;13231;13220:9;13216:18;13209:30;13259:6;13294;13288:13;13325:6;13317;13310:22;13363:2;13352:9;13348:18;13341:25;;13401:2;13393:6;13389:15;13375:29;;13422:1;13432:195;13446:6;13443:1;13440:13;13432:195;;;13511:13;;-1:-1:-1;;;;;13507:39:1;13495:52;;13602:15;;;;13567:12;;;;13543:1;13461:9;13432:195;;;-1:-1:-1;13644:3:1;;12924:729;-1:-1:-1;;;;;;;12924:729:1:o;13658:249::-;13758:2;13747:17;;;13728;;;;13724:41;-1:-1:-1;;;;;;13780:50:1;;-1:-1:-1;;;;;13832:45:1;;13777:101;13774:127;;;13881:18;;:::i;13912:251::-;13982:6;14035:2;14023:9;14014:7;14010:23;14006:32;14003:52;;;14051:1;14048;14041:12;14003:52;14083:9;14077:16;14102:31;14127:5;14102:31;:::i;14168:135::-;14207:3;14228:17;;;14225:43;;14248:18;;:::i;:::-;-1:-1:-1;14295:1:1;14284:13;;14168:135::o;14617:385::-;14696:6;14704;14757:2;14745:9;14736:7;14732:23;14728:32;14725:52;;;14773:1;14770;14763:12;14725:52;14805:9;14799:16;14824:31;14849:5;14824:31;:::i;:::-;14924:2;14909:18;;14903:25;14874:5;;-1:-1:-1;14937:33:1;14903:25;14937:33;:::i;17862:489::-;-1:-1:-1;;;;;18131:15:1;;;18113:34;;18183:15;;18178:2;18163:18;;18156:43;18230:2;18215:18;;18208:34;;;18278:3;18273:2;18258:18;;18251:31;;;18056:4;;18299:46;;18325:19;;18317:6;18299:46;:::i;:::-;18291:54;17862:489;-1:-1:-1;;;;;;17862:489:1:o;18356:249::-;18425:6;18478:2;18466:9;18457:7;18453:23;18449:32;18446:52;;;18494:1;18491;18484:12;18446:52;18526:9;18520:16;18545:30;18569:5;18545:30;:::i;18610:648::-;18690:6;18743:2;18731:9;18722:7;18718:23;18714:32;18711:52;;;18759:1;18756;18749:12;18711:52;18792:9;18786:16;18825:18;18817:6;18814:30;18811:50;;;18857:1;18854;18847:12;18811:50;18880:22;;18933:4;18925:13;;18921:27;-1:-1:-1;18911:55:1;;18962:1;18959;18952:12;18911:55;18991:2;18985:9;19016:48;19032:31;19060:2;19032:31;:::i;19016:48::-;19087:2;19080:5;19073:17;19127:7;19122:2;19117;19113;19109:11;19105:20;19102:33;19099:53;;;19148:1;19145;19138:12;19099:53;19161:67;19225:2;19220;19213:5;19209:14;19204:2;19200;19196:11;19161:67;:::i;19263:245::-;19361:2;19331:17;;;19350;;;;19327:41;-1:-1:-1;;;;;19383:44:1;;-1:-1:-1;;;;;;19429:49:1;;19380:99;19377:125;;;19482:18;;:::i;20819:305::-;20858:1;20900;20896:2;20885:17;20937:1;20933:2;20922:17;20958:3;20948:37;;20965:18;;:::i;:::-;-1:-1:-1;;;;;;21001:48:1;;-1:-1:-1;;21051:15:1;;20997:70;20994:96;;;21070:18;;:::i;:::-;21104:14;;;20819:305;-1:-1:-1;;;20819:305:1:o;21129:241::-;21168:7;21247:1;21243:2;21232:17;21228:1;21224:2;21213:17;21209:41;21285:11;21281:2;21270:27;21259:38;;21328:11;21319:7;21316:24;21306:58;;21344:18;;:::i;21958:127::-;22019:10;22014:3;22010:20;22007:1;22000:31;22050:4;22047:1;22040:15;22074:4;22071:1;22064:15;24163:245;24230:6;24283:2;24271:9;24262:7;24258:23;24254:32;24251:52;;;24299:1;24296;24289:12;24251:52;24331:9;24325:16;24350:28;24372:5;24350:28;:::i;25611:287::-;25740:3;25778:6;25772:13;25794:66;25853:6;25848:3;25841:4;25833:6;25829:17;25794:66;:::i;:::-;25876:16;;;;;25611:287;-1:-1:-1;;25611:287:1:o
Swarm Source
ipfs://342a3d4fac96cd7da02e68caabdf31b571c3ba3bdc637c6ce296f4bdd9d364a8
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.