Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Latest 25 from a total of 294 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Submit Report | 397625 | 1 hr ago | IN | 0 ETH | 0.00010536 | ||||
Submit Report | 397620 | 1 hr ago | IN | 0 ETH | 0.00007674 | ||||
Submit Report | 397619 | 1 hr ago | IN | 0 ETH | 0.00006881 | ||||
Submit Report | 397614 | 1 hr ago | IN | 0 ETH | 0.00007897 | ||||
Submit Report | 397614 | 1 hr ago | IN | 0 ETH | 0.00007897 | ||||
Submit Report | 397611 | 1 hr ago | IN | 0 ETH | 0.00008286 | ||||
Submit Report | 390650 | 25 hrs ago | IN | 0 ETH | 0.00006639 | ||||
Submit Report | 390643 | 25 hrs ago | IN | 0 ETH | 0.00010315 | ||||
Submit Report | 390638 | 25 hrs ago | IN | 0 ETH | 0.0000735 | ||||
Submit Report | 390636 | 25 hrs ago | IN | 0 ETH | 0.0000769 | ||||
Submit Report | 390631 | 25 hrs ago | IN | 0 ETH | 0.00006983 | ||||
Submit Report | 390631 | 25 hrs ago | IN | 0 ETH | 0.00006983 | ||||
Submit Report | 390626 | 25 hrs ago | IN | 0 ETH | 0.00007098 | ||||
Submit Report | 383857 | 2 days ago | IN | 0 ETH | 0.00007997 | ||||
Submit Report | 383857 | 2 days ago | IN | 0 ETH | 0.00007997 | ||||
Submit Report | 383849 | 2 days ago | IN | 0 ETH | 0.00010186 | ||||
Submit Report | 383843 | 2 days ago | IN | 0 ETH | 0.00007233 | ||||
Submit Report | 383842 | 2 days ago | IN | 0 ETH | 0.00007302 | ||||
Submit Report | 383837 | 2 days ago | IN | 0 ETH | 0.00007343 | ||||
Submit Report | 383837 | 2 days ago | IN | 0 ETH | 0.00007343 | ||||
Submit Report | 383833 | 2 days ago | IN | 0 ETH | 0.00008565 | ||||
Submit Report | 376942 | 3 days ago | IN | 0 ETH | 0.00007943 | ||||
Submit Report | 376942 | 3 days ago | IN | 0 ETH | 0.00010375 | ||||
Submit Report | 376935 | 3 days ago | IN | 0 ETH | 0.00007645 | ||||
Submit Report | 376929 | 3 days ago | IN | 0 ETH | 0.00007823 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Method | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|---|
Get Is Member | 397633 | 1 hr ago | 0 ETH | ||||
Submit Consensus... | 397625 | 1 hr ago | 0 ETH | ||||
Get Last Process... | 397625 | 1 hr ago | 0 ETH | ||||
Get Consensus Ve... | 397625 | 1 hr ago | 0 ETH | ||||
Get Last Process... | 397620 | 1 hr ago | 0 ETH | ||||
Get Consensus Ve... | 397620 | 1 hr ago | 0 ETH | ||||
Get Last Process... | 397619 | 1 hr ago | 0 ETH | ||||
Get Consensus Ve... | 397619 | 1 hr ago | 0 ETH | ||||
Get Last Process... | 397614 | 1 hr ago | 0 ETH | ||||
Get Consensus Ve... | 397614 | 1 hr ago | 0 ETH | ||||
Get Last Process... | 397614 | 1 hr ago | 0 ETH | ||||
Get Consensus Ve... | 397614 | 1 hr ago | 0 ETH | ||||
Get Last Process... | 397611 | 1 hr ago | 0 ETH | ||||
Get Consensus Ve... | 397611 | 1 hr ago | 0 ETH | ||||
Get Is Member | 390657 | 25 hrs ago | 0 ETH | ||||
Get Last Process... | 390650 | 25 hrs ago | 0 ETH | ||||
Get Consensus Ve... | 390650 | 25 hrs ago | 0 ETH | ||||
Submit Consensus... | 390643 | 25 hrs ago | 0 ETH | ||||
Get Last Process... | 390643 | 25 hrs ago | 0 ETH | ||||
Get Consensus Ve... | 390643 | 25 hrs ago | 0 ETH | ||||
Get Last Process... | 390638 | 25 hrs ago | 0 ETH | ||||
Get Consensus Ve... | 390638 | 25 hrs ago | 0 ETH | ||||
Get Last Process... | 390636 | 25 hrs ago | 0 ETH | ||||
Get Consensus Ve... | 390636 | 25 hrs ago | 0 ETH | ||||
Get Last Process... | 390631 | 25 hrs ago | 0 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
HashConsensus
Compiler Version
v0.8.24+commit.e11b9ed9
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-FileCopyrightText: 2024 Lido <[email protected]> // SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.24; import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol"; import { AccessControlEnumerableUpgradeable } from "@openzeppelin/contracts-upgradeable/access/extensions/AccessControlEnumerableUpgradeable.sol"; import { IReportAsyncProcessor } from "./interfaces/IReportAsyncProcessor.sol"; import { IConsensusContract } from "./interfaces/IConsensusContract.sol"; /// @notice A contract managing oracle members committee and allowing the members to reach /// consensus on a hash for each reporting frame. /// /// Time is divided in frames of equal length, each having reference slot and processing /// deadline. Report data must be gathered by looking at the world state at the moment of /// the frame's reference slot (including any state changes made in that slot), and must /// be processed before the frame's processing deadline. /// /// Frame length is defined in Ethereum consensus layer epochs. Reference slot for each /// frame is set to the last slot of the epoch preceding the frame's first epoch. The /// processing deadline is set to the last slot of the last epoch of the frame. /// /// This means that all state changes a report processing could entail are guaranteed to be /// observed while gathering data for the next frame's report. This is an important property /// given that oracle reports sometimes have to contain diffs instead of the full state which /// might be impractical or even impossible to transmit and process. /// // solhint-disable ordering contract HashConsensus is IConsensusContract, AccessControlEnumerableUpgradeable { using SafeCast for uint256; struct FrameConfig { uint64 initialEpoch; uint64 epochsPerFrame; uint64 fastLaneLengthSlots; } /// @dev Oracle reporting is divided into frames, each lasting the same number of slots. /// /// The start slot of the next frame is always the next slot after the end slot of the previous /// frame. /// /// Each frame also has a reference slot: if the oracle report contains any data derived from /// onchain data, the onchain data should be sampled at the reference slot. /// struct ConsensusFrame { // frame index; increments by 1 with each frame but resets to zero on frame size change uint256 index; // the slot at which to read the state around which consensus is being reached; // if the slot contains a block, the state should include all changes from that block uint256 refSlot; // the last slot at which a report can be reported and processed uint256 reportProcessingDeadlineSlot; } struct ReportingState { // the last reference slot any report was received for uint64 lastReportRefSlot; // the last reference slot a consensus was reached for uint64 lastConsensusRefSlot; // the last consensus variant index uint64 lastConsensusVariantIndex; } struct MemberState { // the last reference slot a report from this member was received for uint64 lastReportRefSlot; // the variant index of the last report from this member uint64 lastReportVariantIndex; } struct ReportVariant { // the reported hash bytes32 hash; // how many unique members from the current set reported this hash in the current frame uint64 support; } /// @notice An ACL role granting the permission to modify members list members and /// change the quorum by calling addMember, removeMember, and setQuorum functions. bytes32 public constant MANAGE_MEMBERS_AND_QUORUM_ROLE = keccak256("MANAGE_MEMBERS_AND_QUORUM_ROLE"); /// @notice An ACL role granting the permission to disable the consensus by calling /// the disableConsensus function. Enabling the consensus back requires the possession /// of the MANAGE_QUORUM_ROLE. bytes32 public constant DISABLE_CONSENSUS_ROLE = keccak256("DISABLE_CONSENSUS_ROLE"); /// @notice An ACL role granting the permission to change reporting interval duration /// and fast lane reporting interval length by calling setFrameConfig. bytes32 public constant MANAGE_FRAME_CONFIG_ROLE = keccak256("MANAGE_FRAME_CONFIG_ROLE"); /// @notice An ACL role granting the permission to change fast lane reporting interval /// length by calling setFastLaneLengthSlots. bytes32 public constant MANAGE_FAST_LANE_CONFIG_ROLE = keccak256("MANAGE_FAST_LANE_CONFIG_ROLE"); /// @notice An ACL role granting the permission to change the report processor /// contract by calling setReportProcessor. bytes32 public constant MANAGE_REPORT_PROCESSOR_ROLE = keccak256("MANAGE_REPORT_PROCESSOR_ROLE"); /// @dev A quorum value that effectively disables the oracle. uint256 internal constant UNREACHABLE_QUORUM = type(uint256).max; bytes32 internal constant ZERO_HASH = bytes32(0); /// @dev An offset from the processing deadline slot of the previous frame (i.e. the last slot /// at which a report for the prev. frame can be submitted and its processing started) to the /// reference slot of the next frame (equal to the last slot of the previous frame). /// frame[i].reportProcessingDeadlineSlot := frame[i + 1].refSlot - DEADLINE_SLOT_OFFSET uint256 internal constant DEADLINE_SLOT_OFFSET = 0; /// Chain specification uint64 internal immutable SLOTS_PER_EPOCH; uint64 internal immutable SECONDS_PER_SLOT; uint64 internal immutable GENESIS_TIME; /// @dev Reporting frame configuration FrameConfig internal _frameConfig; /// @dev Oracle committee members states array MemberState[] internal _memberStates; /// @dev Oracle committee members' addresses array address[] internal _memberAddresses; /// @dev Mapping from an oracle committee member address to the 1-based index in the /// members array mapping(address => uint256) internal _memberIndices1b; /// @dev A structure containing the last reference slot any report was received for, the last /// reference slot consensus report was achieved for, and the last consensus variant index ReportingState internal _reportingState; /// @dev Oracle committee members quorum value, must be larger than totalMembers // 2 uint256 internal _quorum; /// @dev Mapping from a report variant index to the ReportVariant structure mapping(uint256 => ReportVariant) internal _reportVariants; /// @dev The number of report variants uint256 internal _reportVariantsLength; /// @dev The address of the report processor contract address internal _reportProcessor; event FrameConfigSet(uint256 newInitialEpoch, uint256 newEpochsPerFrame); event FastLaneConfigSet(uint256 fastLaneLengthSlots); event MemberAdded( address indexed addr, uint256 newTotalMembers, uint256 newQuorum ); event MemberRemoved( address indexed addr, uint256 newTotalMembers, uint256 newQuorum ); event QuorumSet( uint256 newQuorum, uint256 totalMembers, uint256 prevQuorum ); event ReportReceived( uint256 indexed refSlot, address indexed member, bytes32 report ); event ConsensusReached( uint256 indexed refSlot, bytes32 report, uint256 support ); event ConsensusLost(uint256 indexed refSlot); event ReportProcessorSet( address indexed processor, address indexed prevProcessor ); error InvalidChainConfig(); error NumericOverflow(); error AdminCannotBeZero(); error ReportProcessorCannotBeZero(); error DuplicateMember(); error AddressCannotBeZero(); error InitialEpochIsYetToArrive(); error InitialEpochAlreadyArrived(); error InitialEpochRefSlotCannotBeEarlierThanProcessingSlot(); error EpochsPerFrameCannotBeZero(); error NonMember(); error UnexpectedConsensusVersion(uint256 expected, uint256 received); error QuorumTooSmall(uint256 minQuorum, uint256 receivedQuorum); error InvalidSlot(); error DuplicateReport(); error EmptyReport(); error StaleReport(); error NonFastLaneMemberCannotReportWithinFastLaneInterval(); error NewProcessorCannotBeTheSame(); error ConsensusReportAlreadyProcessing(); error FastLanePeriodCannotBeLongerThanFrame(); /// /// Initialization /// constructor( uint256 slotsPerEpoch, uint256 secondsPerSlot, uint256 genesisTime, uint256 epochsPerFrame, uint256 fastLaneLengthSlots, address admin, address reportProcessor ) { if (slotsPerEpoch == 0) revert InvalidChainConfig(); if (secondsPerSlot == 0) revert InvalidChainConfig(); SLOTS_PER_EPOCH = slotsPerEpoch.toUint64(); SECONDS_PER_SLOT = secondsPerSlot.toUint64(); GENESIS_TIME = genesisTime.toUint64(); if (admin == address(0)) revert AdminCannotBeZero(); if (reportProcessor == address(0)) revert ReportProcessorCannotBeZero(); _grantRole(DEFAULT_ADMIN_ROLE, admin); uint256 farFutureEpoch = _computeEpochAtTimestamp(type(uint64).max); _setFrameConfig( farFutureEpoch, epochsPerFrame, fastLaneLengthSlots, FrameConfig(0, 0, 0) ); _reportProcessor = reportProcessor; } /// /// Time /// /// @notice Returns the immutable chain parameters required to calculate epoch and slot /// given a timestamp. /// function getChainConfig() external view returns ( uint256 slotsPerEpoch, uint256 secondsPerSlot, uint256 genesisTime ) { return (SLOTS_PER_EPOCH, SECONDS_PER_SLOT, GENESIS_TIME); } /// @notice Returns the time-related configuration. /// /// @return initialEpoch Epoch of the frame with zero index. /// @return epochsPerFrame Length of a frame in epochs. /// @return fastLaneLengthSlots Length of the fast lane interval in slots; see `getIsFastLaneMember`. /// function getFrameConfig() external view returns ( uint256 initialEpoch, uint256 epochsPerFrame, uint256 fastLaneLengthSlots ) { FrameConfig memory config = _frameConfig; return ( config.initialEpoch, config.epochsPerFrame, config.fastLaneLengthSlots ); } /// @notice Returns the current reporting frame. /// /// @return refSlot The frame's reference slot: if the data the consensus is being reached upon /// includes or depends on any onchain state, this state should be queried at the /// reference slot. If the slot contains a block, the state should include all changes /// from that block. /// /// @return reportProcessingDeadlineSlot The last slot at which the report can be processed by /// the report processor contract. /// function getCurrentFrame() external view returns (uint256 refSlot, uint256 reportProcessingDeadlineSlot) { ConsensusFrame memory frame = _getCurrentFrame(); return (frame.refSlot, frame.reportProcessingDeadlineSlot); } /// @notice Returns the earliest possible reference slot, i.e. the reference slot of the /// reporting frame with zero index. /// function getInitialRefSlot() external view returns (uint256) { return _getInitialFrame().refSlot; } /// @notice Sets a new initial epoch given that the current initial epoch is in the future. /// /// @param initialEpoch The new initial epoch. /// function updateInitialEpoch( uint256 initialEpoch ) external onlyRole(DEFAULT_ADMIN_ROLE) { FrameConfig memory prevConfig = _frameConfig; if (_computeEpochAtTimestamp(_getTime()) >= prevConfig.initialEpoch) { revert InitialEpochAlreadyArrived(); } _setFrameConfig( initialEpoch, prevConfig.epochsPerFrame, prevConfig.fastLaneLengthSlots, prevConfig ); if (_getInitialFrame().refSlot < _getLastProcessingRefSlot()) { revert InitialEpochRefSlotCannotBeEarlierThanProcessingSlot(); } } /// @notice Updates the time-related configuration. /// /// @param epochsPerFrame Length of a frame in epochs. /// @param fastLaneLengthSlots Length of the fast lane interval in slots; see `getIsFastLaneMember`. /// function setFrameConfig( uint256 epochsPerFrame, uint256 fastLaneLengthSlots ) external onlyRole(MANAGE_FRAME_CONFIG_ROLE) { // Updates epochsPerFrame in a way that either keeps the current reference slot the same // or increases it by at least the minimum of old and new frame sizes. uint256 timestamp = _getTime(); uint256 currentFrameStartEpoch = _computeFrameStartEpoch( timestamp, _frameConfig ); _setFrameConfig( currentFrameStartEpoch, epochsPerFrame, fastLaneLengthSlots, _frameConfig ); } /// /// Members /// /// @notice Returns whether the given address is currently a member of the consensus. /// function getIsMember(address addr) external view returns (bool) { return _isMember(addr); } /// @notice Returns whether the given address is a fast lane member for the current reporting /// frame. /// /// Fast lane members is a subset of all members that changes each reporting frame. These /// members can, and are expected to, submit a report during the first part of the frame called /// the "fast lane interval" and defined via `setFrameConfig` or `setFastLaneLengthSlots`. Under /// regular circumstances, all other members are only allowed to submit a report after the fast /// lane interval passes. /// /// The fast lane subset consists of `quorum` members; selection is implemented as a sliding /// window of the `quorum` width over member indices (mod total members). The window advances /// by one index each reporting frame. /// /// This is done to encourage each member from the full set to participate in reporting on a /// regular basis, and identify any malfunctioning members. /// /// With the fast lane mechanism active, it's sufficient for the monitoring to check that /// consensus is consistently reached during the fast lane part of each frame to conclude that /// all members are active and share the same consensus rules. /// /// However, there is no guarantee that, at any given time, it holds true that only the current /// fast lane members can or were able to report during the currently-configured fast lane /// interval of the current frame. In particular, this assumption can be violated in any frame /// during which the members set, initial epoch, or the quorum number was changed, or the fast /// lane interval length was increased. Thus, the fast lane mechanism should not be used for any /// purpose other than monitoring of the members liveness, and monitoring tools should take into /// consideration the potential irregularities within frames with any configuration changes. /// function getIsFastLaneMember(address addr) external view returns (bool) { uint256 index1b = _memberIndices1b[addr]; unchecked { return index1b > 0 && _isFastLaneMember(index1b - 1, _getCurrentFrame().index); } } /// @notice Returns all current members, together with the last reference slot each member /// submitted a report for. /// function getMembers() external view returns ( address[] memory addresses, uint256[] memory lastReportedRefSlots ) { return _getMembers(false); } /// @notice Returns the subset of the oracle committee members (consisting of `quorum` items) /// that changes each frame. /// /// See `getIsFastLaneMember`. /// function getFastLaneMembers() external view returns ( address[] memory addresses, uint256[] memory lastReportedRefSlots ) { return _getMembers(true); } /// @notice Sets the duration of the fast lane interval of the reporting frame. /// /// See `getIsFastLaneMember`. /// /// @param fastLaneLengthSlots The length of the fast lane reporting interval in slots. Setting /// it to zero disables the fast lane subset, allowing any oracle to report starting from /// the first slot of a frame and until the frame's reporting deadline. /// function setFastLaneLengthSlots( uint256 fastLaneLengthSlots ) external onlyRole(MANAGE_FAST_LANE_CONFIG_ROLE) { _setFastLaneLengthSlots(fastLaneLengthSlots); } function addMember( address addr, uint256 quorum ) external onlyRole(MANAGE_MEMBERS_AND_QUORUM_ROLE) { _addMember(addr, quorum); } function removeMember( address addr, uint256 quorum ) external onlyRole(MANAGE_MEMBERS_AND_QUORUM_ROLE) { _removeMember(addr, quorum); } function getQuorum() external view returns (uint256) { return _quorum; } function setQuorum(uint256 quorum) external { // access control is performed inside the next call _setQuorumAndCheckConsensus(quorum, _memberStates.length); } /// @notice Disables the oracle by setting the quorum to an unreachable value. /// function disableConsensus() external { // access control is performed inside the next call _setQuorumAndCheckConsensus(UNREACHABLE_QUORUM, _memberStates.length); } /// /// Report processor /// function getReportProcessor() external view returns (address) { return _reportProcessor; } function setReportProcessor( address newProcessor ) external onlyRole(MANAGE_REPORT_PROCESSOR_ROLE) { _setReportProcessor(newProcessor); } /// /// Consensus /// /// @notice Returns info about the current frame and consensus state in that frame. /// /// @return refSlot Reference slot of the current reporting frame. /// /// @return consensusReport Consensus report for the current frame, if any. /// Zero bytes otherwise. /// /// @return isReportProcessing If consensus report for the current frame is already /// being processed. Consensus can be changed before the processing starts. /// function getConsensusState() external view returns ( uint256 refSlot, bytes32 consensusReport, bool isReportProcessing ) { refSlot = _getCurrentFrame().refSlot; (consensusReport, , ) = _getConsensusReport(refSlot, _quorum); isReportProcessing = _getLastProcessingRefSlot() == refSlot; } /// @notice Returns report variants and their support for the current reference slot. /// function getReportVariants() external view returns (bytes32[] memory variants, uint256[] memory support) { if (_reportingState.lastReportRefSlot != _getCurrentFrame().refSlot) { return (variants, support); } uint256 variantsLength = _reportVariantsLength; variants = new bytes32[](variantsLength); support = new uint256[](variantsLength); for (uint256 i = 0; i < variantsLength; ++i) { ReportVariant memory variant = _reportVariants[i]; variants[i] = variant.hash; support[i] = variant.support; } } struct MemberConsensusState { /// @notice Current frame's reference slot. uint256 currentFrameRefSlot; /// @notice Consensus report for the current frame, if any. Zero bytes otherwise. bytes32 currentFrameConsensusReport; /// @notice Whether the provided address is a member of the oracle committee. bool isMember; /// @notice Whether the oracle committee member is in the fast lane members subset /// of the current reporting frame. See `getIsFastLaneMember`. bool isFastLane; /// @notice Whether the oracle committee member is allowed to submit a report at /// the moment of the call. bool canReport; /// @notice The last reference slot for which the member submitted a report. uint256 lastMemberReportRefSlot; /// @notice The hash reported by the member for the current frame, if any. /// Zero bytes otherwise. bytes32 currentFrameMemberReport; } /// @notice Returns the extended information related to an oracle committee member with the /// given address and the current consensus state. Provides all the information needed for /// an oracle daemon to decide if it needs to submit a report. /// /// @param addr The member address. /// @return result See the docs for `MemberConsensusState`. /// function getConsensusStateForMember( address addr ) external view returns (MemberConsensusState memory result) { ConsensusFrame memory frame = _getCurrentFrame(); result.currentFrameRefSlot = frame.refSlot; (result.currentFrameConsensusReport, , ) = _getConsensusReport( frame.refSlot, _quorum ); uint256 index = _memberIndices1b[addr]; result.isMember = index != 0; if (index != 0) { unchecked { --index; } // convert to 0-based MemberState memory memberState = _memberStates[index]; result.lastMemberReportRefSlot = memberState.lastReportRefSlot; result.currentFrameMemberReport = result.lastMemberReportRefSlot == frame.refSlot ? _reportVariants[memberState.lastReportVariantIndex].hash : ZERO_HASH; uint256 slot = _computeSlotAtTimestamp(_getTime()); result.canReport = slot <= frame.reportProcessingDeadlineSlot && frame.refSlot > _getLastProcessingRefSlot(); result.isFastLane = _isFastLaneMember(index, frame.index); if (!result.isFastLane && result.canReport) { result.canReport = slot > frame.refSlot + _frameConfig.fastLaneLengthSlots; } } } /// @notice Used by oracle members to submit hash of the data calculated for the given /// reference slot. /// /// @param slot The reference slot the data was calculated for. Reverts if doesn't match /// the current reference slot. /// /// @param report Hash of the data calculated for the given reference slot. /// /// @param consensusVersion Version of the oracle consensus rules. Reverts if doesn't /// match the version returned by the currently set consensus report processor, /// or zero if no report processor is set. /// function submitReport( uint256 slot, bytes32 report, uint256 consensusVersion ) external { _submitReport(slot, report, consensusVersion); } /// /// Implementation: time /// function _setFrameConfig( uint256 initialEpoch, uint256 epochsPerFrame, uint256 fastLaneLengthSlots, FrameConfig memory prevConfig ) internal { if (epochsPerFrame == 0) revert EpochsPerFrameCannotBeZero(); if (fastLaneLengthSlots > epochsPerFrame * SLOTS_PER_EPOCH) { revert FastLanePeriodCannotBeLongerThanFrame(); } _frameConfig = FrameConfig( initialEpoch.toUint64(), epochsPerFrame.toUint64(), fastLaneLengthSlots.toUint64() ); if ( initialEpoch != prevConfig.initialEpoch || epochsPerFrame != prevConfig.epochsPerFrame ) { emit FrameConfigSet(initialEpoch, epochsPerFrame); } if (fastLaneLengthSlots != prevConfig.fastLaneLengthSlots) { emit FastLaneConfigSet(fastLaneLengthSlots); } } function _getCurrentFrame() internal view returns (ConsensusFrame memory) { return _getFrameAtTimestamp(_getTime(), _frameConfig); } function _getInitialFrame() internal view returns (ConsensusFrame memory) { return _getFrameAtIndex(0, _frameConfig); } function _getFrameAtTimestamp( uint256 timestamp, FrameConfig memory config ) internal view returns (ConsensusFrame memory) { return _getFrameAtIndex(_computeFrameIndex(timestamp, config), config); } function _getFrameAtIndex( uint256 frameIndex, FrameConfig memory config ) internal view returns (ConsensusFrame memory) { uint256 frameStartEpoch = _computeStartEpochOfFrameWithIndex( frameIndex, config ); uint256 frameStartSlot = _computeStartSlotAtEpoch(frameStartEpoch); uint256 nextFrameStartSlot = frameStartSlot + config.epochsPerFrame * SLOTS_PER_EPOCH; return ConsensusFrame({ index: frameIndex, refSlot: uint64(frameStartSlot - 1), reportProcessingDeadlineSlot: uint64( nextFrameStartSlot - 1 - DEADLINE_SLOT_OFFSET ) }); } function _computeFrameStartEpoch( uint256 timestamp, FrameConfig memory config ) internal view returns (uint256) { return _computeStartEpochOfFrameWithIndex( _computeFrameIndex(timestamp, config), config ); } function _computeStartEpochOfFrameWithIndex( uint256 frameIndex, FrameConfig memory config ) internal pure returns (uint256) { return config.initialEpoch + frameIndex * config.epochsPerFrame; } function _computeFrameIndex( uint256 timestamp, FrameConfig memory config ) internal view returns (uint256) { uint256 epoch = _computeEpochAtTimestamp(timestamp); if (epoch < config.initialEpoch) { revert InitialEpochIsYetToArrive(); } return (epoch - config.initialEpoch) / config.epochsPerFrame; } function _computeTimestampAtSlot( uint256 slot ) internal view returns (uint256) { // See: github.com/ethereum/consensus-specs/blob/dev/specs/bellatrix/beacon-chain.md#compute_timestamp_at_slot return GENESIS_TIME + slot * SECONDS_PER_SLOT; } function _computeSlotAtTimestamp( uint256 timestamp ) internal view returns (uint256) { return (timestamp - GENESIS_TIME) / SECONDS_PER_SLOT; } function _computeEpochAtSlot(uint256 slot) internal view returns (uint256) { // See: github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#compute_epoch_at_slot return slot / SLOTS_PER_EPOCH; } function _computeEpochAtTimestamp( uint256 timestamp ) internal view returns (uint256) { return _computeEpochAtSlot(_computeSlotAtTimestamp(timestamp)); } function _computeStartSlotAtEpoch( uint256 epoch ) internal view returns (uint256) { // See: github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#compute_start_slot_at_epoch return epoch * SLOTS_PER_EPOCH; } function _getTime() internal view virtual returns (uint256) { return block.timestamp; // solhint-disable-line not-rely-on-time } /// /// Implementation: members /// function _isMember(address addr) internal view returns (bool) { return _memberIndices1b[addr] != 0; } function _getMemberIndex(address addr) internal view returns (uint256) { uint256 index1b = _memberIndices1b[addr]; if (index1b == 0) { revert NonMember(); } unchecked { return uint256(index1b - 1); } } function _addMember(address addr, uint256 quorum) internal { if (_isMember(addr)) revert DuplicateMember(); if (addr == address(0)) revert AddressCannotBeZero(); _memberStates.push(MemberState(0, 0)); _memberAddresses.push(addr); uint256 newTotalMembers = _memberStates.length; _memberIndices1b[addr] = newTotalMembers; emit MemberAdded(addr, newTotalMembers, quorum); _setQuorumAndCheckConsensus(quorum, newTotalMembers); } function _removeMember(address addr, uint256 quorum) internal { uint256 index = _getMemberIndex(addr); uint256 newTotalMembers = _memberStates.length - 1; assert(index <= newTotalMembers); MemberState memory memberState = _memberStates[index]; if (index != newTotalMembers) { address addrToMove = _memberAddresses[newTotalMembers]; _memberAddresses[index] = addrToMove; _memberStates[index] = _memberStates[newTotalMembers]; _memberIndices1b[addrToMove] = index + 1; } _memberStates.pop(); _memberAddresses.pop(); _memberIndices1b[addr] = 0; emit MemberRemoved(addr, newTotalMembers, quorum); if (memberState.lastReportRefSlot > 0) { // member reported at least once ConsensusFrame memory frame = _getCurrentFrame(); if ( memberState.lastReportRefSlot == frame.refSlot && _getLastProcessingRefSlot() < frame.refSlot ) { // member reported for the current ref. slot and the consensus report // is not processing yet => need to cancel the member's report --_reportVariants[memberState.lastReportVariantIndex].support; } } _setQuorumAndCheckConsensus(quorum, newTotalMembers); } function _setFastLaneLengthSlots(uint256 fastLaneLengthSlots) internal { FrameConfig memory frameConfig = _frameConfig; if ( fastLaneLengthSlots > frameConfig.epochsPerFrame * SLOTS_PER_EPOCH ) { revert FastLanePeriodCannotBeLongerThanFrame(); } if (fastLaneLengthSlots != frameConfig.fastLaneLengthSlots) { _frameConfig.fastLaneLengthSlots = fastLaneLengthSlots.toUint64(); emit FastLaneConfigSet(fastLaneLengthSlots); } } /// @dev Returns start and past-end indices (mod totalMembers) of the fast lane members subset. /// function _getFastLaneSubset( uint256 frameIndex, uint256 totalMembers ) internal view returns (uint256 startIndex, uint256 pastEndIndex) { uint256 quorum = _quorum; if (quorum >= totalMembers) { startIndex = 0; pastEndIndex = totalMembers; } else { startIndex = frameIndex % totalMembers; pastEndIndex = startIndex + quorum; } } /// @dev Tests whether the member with the given `index` is in the fast lane subset for the /// given reporting `frameIndex`. /// function _isFastLaneMember( uint256 index, uint256 frameIndex ) internal view returns (bool) { uint256 totalMembers = _memberStates.length; (uint256 flLeft, uint256 flPastRight) = _getFastLaneSubset( frameIndex, totalMembers ); unchecked { return (flPastRight != 0 && pointInClosedIntervalModN( index, flLeft, flPastRight - 1, totalMembers )); } } function _getMembers( bool fastLane ) internal view returns ( address[] memory addresses, uint256[] memory lastReportedRefSlots ) { uint256 totalMembers = _memberStates.length; uint256 left; uint256 right; if (fastLane) { (left, right) = _getFastLaneSubset( _getCurrentFrame().index, totalMembers ); } else { right = totalMembers; } addresses = new address[](right - left); lastReportedRefSlots = new uint256[](addresses.length); for (uint256 i = left; i < right; ++i) { uint256 iModTotal = i % totalMembers; MemberState memory memberState = _memberStates[iModTotal]; uint256 k = i - left; addresses[k] = _memberAddresses[iModTotal]; lastReportedRefSlots[k] = memberState.lastReportRefSlot; } } /// /// Implementation: consensus /// function _submitReport( uint256 slot, bytes32 report, uint256 consensusVersion ) internal { if (slot == 0) revert InvalidSlot(); if (slot > type(uint64).max) revert NumericOverflow(); if (report == ZERO_HASH) revert EmptyReport(); uint256 memberIndex = _getMemberIndex(_msgSender()); MemberState memory memberState = _memberStates[memberIndex]; uint256 expectedConsensusVersion = _getConsensusVersion(); if (consensusVersion != expectedConsensusVersion) { revert UnexpectedConsensusVersion( expectedConsensusVersion, consensusVersion ); } uint256 timestamp = _getTime(); uint256 currentSlot = _computeSlotAtTimestamp(timestamp); FrameConfig memory config = _frameConfig; ConsensusFrame memory frame = _getFrameAtTimestamp(timestamp, config); if (slot != frame.refSlot) revert InvalidSlot(); if (currentSlot > frame.reportProcessingDeadlineSlot) revert StaleReport(); if ( currentSlot <= frame.refSlot + config.fastLaneLengthSlots && !_isFastLaneMember(memberIndex, frame.index) ) { revert NonFastLaneMemberCannotReportWithinFastLaneInterval(); } if (slot <= _getLastProcessingRefSlot()) { // consensus for the ref. slot was already reached and consensus report is processing if (slot == memberState.lastReportRefSlot) { // member sends a report for the same slot => let them know via a revert revert ConsensusReportAlreadyProcessing(); } else { // member hasn't sent a report for this slot => normal operation, do nothing return; } } uint256 variantsLength; if (_reportingState.lastReportRefSlot != slot) { // first report for a new slot => clear report variants _reportingState.lastReportRefSlot = uint64(slot); variantsLength = 0; } else { variantsLength = _reportVariantsLength; } uint64 varIndex = 0; bool prevConsensusLost = false; while ( varIndex < variantsLength && _reportVariants[varIndex].hash != report ) { ++varIndex; } if (slot == memberState.lastReportRefSlot) { uint64 prevVarIndex = memberState.lastReportVariantIndex; assert(prevVarIndex < variantsLength); if (varIndex == prevVarIndex) { revert DuplicateReport(); } else { uint256 support = --_reportVariants[prevVarIndex].support; if (support == _quorum - 1) { prevConsensusLost = true; } } } uint256 support; if (varIndex < variantsLength) { support = ++_reportVariants[varIndex].support; } else { support = 1; _reportVariants[varIndex] = ReportVariant({ hash: report, support: 1 }); _reportVariantsLength = ++variantsLength; } _memberStates[memberIndex] = MemberState({ lastReportRefSlot: uint64(slot), lastReportVariantIndex: varIndex }); emit ReportReceived(slot, _msgSender(), report); if (support >= _quorum) { _consensusReached(frame, report, varIndex, support); } else if (prevConsensusLost) { _consensusNotReached(frame); } } function _consensusReached( ConsensusFrame memory frame, bytes32 report, uint256 variantIndex, uint256 support ) internal { if ( _reportingState.lastConsensusRefSlot != frame.refSlot || _reportingState.lastConsensusVariantIndex != variantIndex ) { _reportingState.lastConsensusRefSlot = uint64(frame.refSlot); _reportingState.lastConsensusVariantIndex = uint64(variantIndex); emit ConsensusReached(frame.refSlot, report, support); _submitReportForProcessing(frame, report); } } function _consensusNotReached(ConsensusFrame memory frame) internal { if (_reportingState.lastConsensusRefSlot == frame.refSlot) { _reportingState.lastConsensusRefSlot = 0; emit ConsensusLost(frame.refSlot); _cancelReportProcessing(frame); } } function _setQuorumAndCheckConsensus( uint256 quorum, uint256 totalMembers ) internal { if (quorum <= totalMembers / 2) { revert QuorumTooSmall(totalMembers / 2 + 1, quorum); } // we're explicitly allowing quorum values greater than the number of members to // allow effectively disabling the oracle in case something unpredictable happens uint256 prevQuorum = _quorum; if (quorum != prevQuorum) { _checkRole( quorum == UNREACHABLE_QUORUM ? DISABLE_CONSENSUS_ROLE : MANAGE_MEMBERS_AND_QUORUM_ROLE, _msgSender() ); _quorum = quorum; emit QuorumSet(quorum, totalMembers, prevQuorum); } if (_computeEpochAtTimestamp(_getTime()) >= _frameConfig.initialEpoch) { _checkConsensus(quorum); } } function _checkConsensus(uint256 quorum) internal { uint256 timestamp = _getTime(); ConsensusFrame memory frame = _getFrameAtTimestamp( timestamp, _frameConfig ); if ( _computeSlotAtTimestamp(timestamp) > frame.reportProcessingDeadlineSlot ) { // a report for the current ref. slot cannot be processed anymore return; } if (_getLastProcessingRefSlot() >= frame.refSlot) { // a consensus report for the current ref. slot is already being processed return; } ( bytes32 consensusReport, int256 consensusVariantIndex, uint256 support ) = _getConsensusReport(frame.refSlot, quorum); if (consensusVariantIndex >= 0) { _consensusReached( frame, consensusReport, uint256(consensusVariantIndex), support ); } else { _consensusNotReached(frame); } } function _getConsensusReport( uint256 currentRefSlot, uint256 quorum ) internal view returns (bytes32 report, int256 variantIndex, uint256 support) { if (_reportingState.lastReportRefSlot != currentRefSlot) { // there were no reports for the current ref. slot return (ZERO_HASH, -1, 0); } uint256 variantsLength = _reportVariantsLength; variantIndex = -1; report = ZERO_HASH; support = 0; for (uint256 i = 0; i < variantsLength; ++i) { uint256 iSupport = _reportVariants[i].support; if (iSupport >= quorum) { variantIndex = int256(i); report = _reportVariants[i].hash; support = iSupport; break; } } return (report, variantIndex, support); } /// /// Implementation: report processing /// function _setReportProcessor(address newProcessor) internal { address prevProcessor = _reportProcessor; if (newProcessor == address(0)) revert ReportProcessorCannotBeZero(); if (newProcessor == prevProcessor) revert NewProcessorCannotBeTheSame(); _reportProcessor = newProcessor; emit ReportProcessorSet(newProcessor, prevProcessor); ConsensusFrame memory frame = _getCurrentFrame(); uint256 lastConsensusRefSlot = _reportingState.lastConsensusRefSlot; uint256 processingRefSlotPrev = IReportAsyncProcessor(prevProcessor) .getLastProcessingRefSlot(); uint256 processingRefSlotNext = IReportAsyncProcessor(newProcessor) .getLastProcessingRefSlot(); if ( processingRefSlotPrev < frame.refSlot && processingRefSlotNext < frame.refSlot && lastConsensusRefSlot == frame.refSlot ) { bytes32 report = _reportVariants[ _reportingState.lastConsensusVariantIndex ].hash; _submitReportForProcessing(frame, report); } } function _getLastProcessingRefSlot() internal view returns (uint256) { return IReportAsyncProcessor(_reportProcessor).getLastProcessingRefSlot(); } function _submitReportForProcessing( ConsensusFrame memory frame, bytes32 report ) internal { IReportAsyncProcessor(_reportProcessor).submitConsensusReport( report, frame.refSlot, _computeTimestampAtSlot(frame.reportProcessingDeadlineSlot) ); } function _cancelReportProcessing(ConsensusFrame memory frame) internal { IReportAsyncProcessor(_reportProcessor).discardConsensusReport( frame.refSlot ); } function _getConsensusVersion() internal view returns (uint256) { return IReportAsyncProcessor(_reportProcessor).getConsensusVersion(); } } function pointInClosedIntervalModN( uint256 x, uint256 a, uint256 b, uint256 n ) pure returns (bool) { return (x + n - a) % n <= (b - a) % n; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SafeCast.sol) // This file was procedurally generated from scripts/generate/templates/SafeCast.js. pragma solidity ^0.8.20; /** * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` restores this intuition by * reverting the transaction when such an operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeCast { /** * @dev Value doesn't fit in an uint of `bits` size. */ error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value); /** * @dev An int value doesn't fit in an uint of `bits` size. */ error SafeCastOverflowedIntToUint(int256 value); /** * @dev Value doesn't fit in an int of `bits` size. */ error SafeCastOverflowedIntDowncast(uint8 bits, int256 value); /** * @dev An uint value doesn't fit in an int of `bits` size. */ error SafeCastOverflowedUintToInt(uint256 value); /** * @dev Returns the downcasted uint248 from uint256, reverting on * overflow (when the input is greater than largest uint248). * * Counterpart to Solidity's `uint248` operator. * * Requirements: * * - input must fit into 248 bits */ function toUint248(uint256 value) internal pure returns (uint248) { if (value > type(uint248).max) { revert SafeCastOverflowedUintDowncast(248, value); } return uint248(value); } /** * @dev Returns the downcasted uint240 from uint256, reverting on * overflow (when the input is greater than largest uint240). * * Counterpart to Solidity's `uint240` operator. * * Requirements: * * - input must fit into 240 bits */ function toUint240(uint256 value) internal pure returns (uint240) { if (value > type(uint240).max) { revert SafeCastOverflowedUintDowncast(240, value); } return uint240(value); } /** * @dev Returns the downcasted uint232 from uint256, reverting on * overflow (when the input is greater than largest uint232). * * Counterpart to Solidity's `uint232` operator. * * Requirements: * * - input must fit into 232 bits */ function toUint232(uint256 value) internal pure returns (uint232) { if (value > type(uint232).max) { revert SafeCastOverflowedUintDowncast(232, value); } return uint232(value); } /** * @dev Returns the downcasted uint224 from uint256, reverting on * overflow (when the input is greater than largest uint224). * * Counterpart to Solidity's `uint224` operator. * * Requirements: * * - input must fit into 224 bits */ function toUint224(uint256 value) internal pure returns (uint224) { if (value > type(uint224).max) { revert SafeCastOverflowedUintDowncast(224, value); } return uint224(value); } /** * @dev Returns the downcasted uint216 from uint256, reverting on * overflow (when the input is greater than largest uint216). * * Counterpart to Solidity's `uint216` operator. * * Requirements: * * - input must fit into 216 bits */ function toUint216(uint256 value) internal pure returns (uint216) { if (value > type(uint216).max) { revert SafeCastOverflowedUintDowncast(216, value); } return uint216(value); } /** * @dev Returns the downcasted uint208 from uint256, reverting on * overflow (when the input is greater than largest uint208). * * Counterpart to Solidity's `uint208` operator. * * Requirements: * * - input must fit into 208 bits */ function toUint208(uint256 value) internal pure returns (uint208) { if (value > type(uint208).max) { revert SafeCastOverflowedUintDowncast(208, value); } return uint208(value); } /** * @dev Returns the downcasted uint200 from uint256, reverting on * overflow (when the input is greater than largest uint200). * * Counterpart to Solidity's `uint200` operator. * * Requirements: * * - input must fit into 200 bits */ function toUint200(uint256 value) internal pure returns (uint200) { if (value > type(uint200).max) { revert SafeCastOverflowedUintDowncast(200, value); } return uint200(value); } /** * @dev Returns the downcasted uint192 from uint256, reverting on * overflow (when the input is greater than largest uint192). * * Counterpart to Solidity's `uint192` operator. * * Requirements: * * - input must fit into 192 bits */ function toUint192(uint256 value) internal pure returns (uint192) { if (value > type(uint192).max) { revert SafeCastOverflowedUintDowncast(192, value); } return uint192(value); } /** * @dev Returns the downcasted uint184 from uint256, reverting on * overflow (when the input is greater than largest uint184). * * Counterpart to Solidity's `uint184` operator. * * Requirements: * * - input must fit into 184 bits */ function toUint184(uint256 value) internal pure returns (uint184) { if (value > type(uint184).max) { revert SafeCastOverflowedUintDowncast(184, value); } return uint184(value); } /** * @dev Returns the downcasted uint176 from uint256, reverting on * overflow (when the input is greater than largest uint176). * * Counterpart to Solidity's `uint176` operator. * * Requirements: * * - input must fit into 176 bits */ function toUint176(uint256 value) internal pure returns (uint176) { if (value > type(uint176).max) { revert SafeCastOverflowedUintDowncast(176, value); } return uint176(value); } /** * @dev Returns the downcasted uint168 from uint256, reverting on * overflow (when the input is greater than largest uint168). * * Counterpart to Solidity's `uint168` operator. * * Requirements: * * - input must fit into 168 bits */ function toUint168(uint256 value) internal pure returns (uint168) { if (value > type(uint168).max) { revert SafeCastOverflowedUintDowncast(168, value); } return uint168(value); } /** * @dev Returns the downcasted uint160 from uint256, reverting on * overflow (when the input is greater than largest uint160). * * Counterpart to Solidity's `uint160` operator. * * Requirements: * * - input must fit into 160 bits */ function toUint160(uint256 value) internal pure returns (uint160) { if (value > type(uint160).max) { revert SafeCastOverflowedUintDowncast(160, value); } return uint160(value); } /** * @dev Returns the downcasted uint152 from uint256, reverting on * overflow (when the input is greater than largest uint152). * * Counterpart to Solidity's `uint152` operator. * * Requirements: * * - input must fit into 152 bits */ function toUint152(uint256 value) internal pure returns (uint152) { if (value > type(uint152).max) { revert SafeCastOverflowedUintDowncast(152, value); } return uint152(value); } /** * @dev Returns the downcasted uint144 from uint256, reverting on * overflow (when the input is greater than largest uint144). * * Counterpart to Solidity's `uint144` operator. * * Requirements: * * - input must fit into 144 bits */ function toUint144(uint256 value) internal pure returns (uint144) { if (value > type(uint144).max) { revert SafeCastOverflowedUintDowncast(144, value); } return uint144(value); } /** * @dev Returns the downcasted uint136 from uint256, reverting on * overflow (when the input is greater than largest uint136). * * Counterpart to Solidity's `uint136` operator. * * Requirements: * * - input must fit into 136 bits */ function toUint136(uint256 value) internal pure returns (uint136) { if (value > type(uint136).max) { revert SafeCastOverflowedUintDowncast(136, value); } return uint136(value); } /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */ function toUint128(uint256 value) internal pure returns (uint128) { if (value > type(uint128).max) { revert SafeCastOverflowedUintDowncast(128, value); } return uint128(value); } /** * @dev Returns the downcasted uint120 from uint256, reverting on * overflow (when the input is greater than largest uint120). * * Counterpart to Solidity's `uint120` operator. * * Requirements: * * - input must fit into 120 bits */ function toUint120(uint256 value) internal pure returns (uint120) { if (value > type(uint120).max) { revert SafeCastOverflowedUintDowncast(120, value); } return uint120(value); } /** * @dev Returns the downcasted uint112 from uint256, reverting on * overflow (when the input is greater than largest uint112). * * Counterpart to Solidity's `uint112` operator. * * Requirements: * * - input must fit into 112 bits */ function toUint112(uint256 value) internal pure returns (uint112) { if (value > type(uint112).max) { revert SafeCastOverflowedUintDowncast(112, value); } return uint112(value); } /** * @dev Returns the downcasted uint104 from uint256, reverting on * overflow (when the input is greater than largest uint104). * * Counterpart to Solidity's `uint104` operator. * * Requirements: * * - input must fit into 104 bits */ function toUint104(uint256 value) internal pure returns (uint104) { if (value > type(uint104).max) { revert SafeCastOverflowedUintDowncast(104, value); } return uint104(value); } /** * @dev Returns the downcasted uint96 from uint256, reverting on * overflow (when the input is greater than largest uint96). * * Counterpart to Solidity's `uint96` operator. * * Requirements: * * - input must fit into 96 bits */ function toUint96(uint256 value) internal pure returns (uint96) { if (value > type(uint96).max) { revert SafeCastOverflowedUintDowncast(96, value); } return uint96(value); } /** * @dev Returns the downcasted uint88 from uint256, reverting on * overflow (when the input is greater than largest uint88). * * Counterpart to Solidity's `uint88` operator. * * Requirements: * * - input must fit into 88 bits */ function toUint88(uint256 value) internal pure returns (uint88) { if (value > type(uint88).max) { revert SafeCastOverflowedUintDowncast(88, value); } return uint88(value); } /** * @dev Returns the downcasted uint80 from uint256, reverting on * overflow (when the input is greater than largest uint80). * * Counterpart to Solidity's `uint80` operator. * * Requirements: * * - input must fit into 80 bits */ function toUint80(uint256 value) internal pure returns (uint80) { if (value > type(uint80).max) { revert SafeCastOverflowedUintDowncast(80, value); } return uint80(value); } /** * @dev Returns the downcasted uint72 from uint256, reverting on * overflow (when the input is greater than largest uint72). * * Counterpart to Solidity's `uint72` operator. * * Requirements: * * - input must fit into 72 bits */ function toUint72(uint256 value) internal pure returns (uint72) { if (value > type(uint72).max) { revert SafeCastOverflowedUintDowncast(72, value); } return uint72(value); } /** * @dev Returns the downcasted uint64 from uint256, reverting on * overflow (when the input is greater than largest uint64). * * Counterpart to Solidity's `uint64` operator. * * Requirements: * * - input must fit into 64 bits */ function toUint64(uint256 value) internal pure returns (uint64) { if (value > type(uint64).max) { revert SafeCastOverflowedUintDowncast(64, value); } return uint64(value); } /** * @dev Returns the downcasted uint56 from uint256, reverting on * overflow (when the input is greater than largest uint56). * * Counterpart to Solidity's `uint56` operator. * * Requirements: * * - input must fit into 56 bits */ function toUint56(uint256 value) internal pure returns (uint56) { if (value > type(uint56).max) { revert SafeCastOverflowedUintDowncast(56, value); } return uint56(value); } /** * @dev Returns the downcasted uint48 from uint256, reverting on * overflow (when the input is greater than largest uint48). * * Counterpart to Solidity's `uint48` operator. * * Requirements: * * - input must fit into 48 bits */ function toUint48(uint256 value) internal pure returns (uint48) { if (value > type(uint48).max) { revert SafeCastOverflowedUintDowncast(48, value); } return uint48(value); } /** * @dev Returns the downcasted uint40 from uint256, reverting on * overflow (when the input is greater than largest uint40). * * Counterpart to Solidity's `uint40` operator. * * Requirements: * * - input must fit into 40 bits */ function toUint40(uint256 value) internal pure returns (uint40) { if (value > type(uint40).max) { revert SafeCastOverflowedUintDowncast(40, value); } return uint40(value); } /** * @dev Returns the downcasted uint32 from uint256, reverting on * overflow (when the input is greater than largest uint32). * * Counterpart to Solidity's `uint32` operator. * * Requirements: * * - input must fit into 32 bits */ function toUint32(uint256 value) internal pure returns (uint32) { if (value > type(uint32).max) { revert SafeCastOverflowedUintDowncast(32, value); } return uint32(value); } /** * @dev Returns the downcasted uint24 from uint256, reverting on * overflow (when the input is greater than largest uint24). * * Counterpart to Solidity's `uint24` operator. * * Requirements: * * - input must fit into 24 bits */ function toUint24(uint256 value) internal pure returns (uint24) { if (value > type(uint24).max) { revert SafeCastOverflowedUintDowncast(24, value); } return uint24(value); } /** * @dev Returns the downcasted uint16 from uint256, reverting on * overflow (when the input is greater than largest uint16). * * Counterpart to Solidity's `uint16` operator. * * Requirements: * * - input must fit into 16 bits */ function toUint16(uint256 value) internal pure returns (uint16) { if (value > type(uint16).max) { revert SafeCastOverflowedUintDowncast(16, value); } return uint16(value); } /** * @dev Returns the downcasted uint8 from uint256, reverting on * overflow (when the input is greater than largest uint8). * * Counterpart to Solidity's `uint8` operator. * * Requirements: * * - input must fit into 8 bits */ function toUint8(uint256 value) internal pure returns (uint8) { if (value > type(uint8).max) { revert SafeCastOverflowedUintDowncast(8, value); } return uint8(value); } /** * @dev Converts a signed int256 into an unsigned uint256. * * Requirements: * * - input must be greater than or equal to 0. */ function toUint256(int256 value) internal pure returns (uint256) { if (value < 0) { revert SafeCastOverflowedIntToUint(value); } return uint256(value); } /** * @dev Returns the downcasted int248 from int256, reverting on * overflow (when the input is less than smallest int248 or * greater than largest int248). * * Counterpart to Solidity's `int248` operator. * * Requirements: * * - input must fit into 248 bits */ function toInt248(int256 value) internal pure returns (int248 downcasted) { downcasted = int248(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(248, value); } } /** * @dev Returns the downcasted int240 from int256, reverting on * overflow (when the input is less than smallest int240 or * greater than largest int240). * * Counterpart to Solidity's `int240` operator. * * Requirements: * * - input must fit into 240 bits */ function toInt240(int256 value) internal pure returns (int240 downcasted) { downcasted = int240(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(240, value); } } /** * @dev Returns the downcasted int232 from int256, reverting on * overflow (when the input is less than smallest int232 or * greater than largest int232). * * Counterpart to Solidity's `int232` operator. * * Requirements: * * - input must fit into 232 bits */ function toInt232(int256 value) internal pure returns (int232 downcasted) { downcasted = int232(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(232, value); } } /** * @dev Returns the downcasted int224 from int256, reverting on * overflow (when the input is less than smallest int224 or * greater than largest int224). * * Counterpart to Solidity's `int224` operator. * * Requirements: * * - input must fit into 224 bits */ function toInt224(int256 value) internal pure returns (int224 downcasted) { downcasted = int224(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(224, value); } } /** * @dev Returns the downcasted int216 from int256, reverting on * overflow (when the input is less than smallest int216 or * greater than largest int216). * * Counterpart to Solidity's `int216` operator. * * Requirements: * * - input must fit into 216 bits */ function toInt216(int256 value) internal pure returns (int216 downcasted) { downcasted = int216(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(216, value); } } /** * @dev Returns the downcasted int208 from int256, reverting on * overflow (when the input is less than smallest int208 or * greater than largest int208). * * Counterpart to Solidity's `int208` operator. * * Requirements: * * - input must fit into 208 bits */ function toInt208(int256 value) internal pure returns (int208 downcasted) { downcasted = int208(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(208, value); } } /** * @dev Returns the downcasted int200 from int256, reverting on * overflow (when the input is less than smallest int200 or * greater than largest int200). * * Counterpart to Solidity's `int200` operator. * * Requirements: * * - input must fit into 200 bits */ function toInt200(int256 value) internal pure returns (int200 downcasted) { downcasted = int200(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(200, value); } } /** * @dev Returns the downcasted int192 from int256, reverting on * overflow (when the input is less than smallest int192 or * greater than largest int192). * * Counterpart to Solidity's `int192` operator. * * Requirements: * * - input must fit into 192 bits */ function toInt192(int256 value) internal pure returns (int192 downcasted) { downcasted = int192(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(192, value); } } /** * @dev Returns the downcasted int184 from int256, reverting on * overflow (when the input is less than smallest int184 or * greater than largest int184). * * Counterpart to Solidity's `int184` operator. * * Requirements: * * - input must fit into 184 bits */ function toInt184(int256 value) internal pure returns (int184 downcasted) { downcasted = int184(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(184, value); } } /** * @dev Returns the downcasted int176 from int256, reverting on * overflow (when the input is less than smallest int176 or * greater than largest int176). * * Counterpart to Solidity's `int176` operator. * * Requirements: * * - input must fit into 176 bits */ function toInt176(int256 value) internal pure returns (int176 downcasted) { downcasted = int176(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(176, value); } } /** * @dev Returns the downcasted int168 from int256, reverting on * overflow (when the input is less than smallest int168 or * greater than largest int168). * * Counterpart to Solidity's `int168` operator. * * Requirements: * * - input must fit into 168 bits */ function toInt168(int256 value) internal pure returns (int168 downcasted) { downcasted = int168(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(168, value); } } /** * @dev Returns the downcasted int160 from int256, reverting on * overflow (when the input is less than smallest int160 or * greater than largest int160). * * Counterpart to Solidity's `int160` operator. * * Requirements: * * - input must fit into 160 bits */ function toInt160(int256 value) internal pure returns (int160 downcasted) { downcasted = int160(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(160, value); } } /** * @dev Returns the downcasted int152 from int256, reverting on * overflow (when the input is less than smallest int152 or * greater than largest int152). * * Counterpart to Solidity's `int152` operator. * * Requirements: * * - input must fit into 152 bits */ function toInt152(int256 value) internal pure returns (int152 downcasted) { downcasted = int152(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(152, value); } } /** * @dev Returns the downcasted int144 from int256, reverting on * overflow (when the input is less than smallest int144 or * greater than largest int144). * * Counterpart to Solidity's `int144` operator. * * Requirements: * * - input must fit into 144 bits */ function toInt144(int256 value) internal pure returns (int144 downcasted) { downcasted = int144(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(144, value); } } /** * @dev Returns the downcasted int136 from int256, reverting on * overflow (when the input is less than smallest int136 or * greater than largest int136). * * Counterpart to Solidity's `int136` operator. * * Requirements: * * - input must fit into 136 bits */ function toInt136(int256 value) internal pure returns (int136 downcasted) { downcasted = int136(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(136, value); } } /** * @dev Returns the downcasted int128 from int256, reverting on * overflow (when the input is less than smallest int128 or * greater than largest int128). * * Counterpart to Solidity's `int128` operator. * * Requirements: * * - input must fit into 128 bits */ function toInt128(int256 value) internal pure returns (int128 downcasted) { downcasted = int128(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(128, value); } } /** * @dev Returns the downcasted int120 from int256, reverting on * overflow (when the input is less than smallest int120 or * greater than largest int120). * * Counterpart to Solidity's `int120` operator. * * Requirements: * * - input must fit into 120 bits */ function toInt120(int256 value) internal pure returns (int120 downcasted) { downcasted = int120(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(120, value); } } /** * @dev Returns the downcasted int112 from int256, reverting on * overflow (when the input is less than smallest int112 or * greater than largest int112). * * Counterpart to Solidity's `int112` operator. * * Requirements: * * - input must fit into 112 bits */ function toInt112(int256 value) internal pure returns (int112 downcasted) { downcasted = int112(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(112, value); } } /** * @dev Returns the downcasted int104 from int256, reverting on * overflow (when the input is less than smallest int104 or * greater than largest int104). * * Counterpart to Solidity's `int104` operator. * * Requirements: * * - input must fit into 104 bits */ function toInt104(int256 value) internal pure returns (int104 downcasted) { downcasted = int104(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(104, value); } } /** * @dev Returns the downcasted int96 from int256, reverting on * overflow (when the input is less than smallest int96 or * greater than largest int96). * * Counterpart to Solidity's `int96` operator. * * Requirements: * * - input must fit into 96 bits */ function toInt96(int256 value) internal pure returns (int96 downcasted) { downcasted = int96(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(96, value); } } /** * @dev Returns the downcasted int88 from int256, reverting on * overflow (when the input is less than smallest int88 or * greater than largest int88). * * Counterpart to Solidity's `int88` operator. * * Requirements: * * - input must fit into 88 bits */ function toInt88(int256 value) internal pure returns (int88 downcasted) { downcasted = int88(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(88, value); } } /** * @dev Returns the downcasted int80 from int256, reverting on * overflow (when the input is less than smallest int80 or * greater than largest int80). * * Counterpart to Solidity's `int80` operator. * * Requirements: * * - input must fit into 80 bits */ function toInt80(int256 value) internal pure returns (int80 downcasted) { downcasted = int80(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(80, value); } } /** * @dev Returns the downcasted int72 from int256, reverting on * overflow (when the input is less than smallest int72 or * greater than largest int72). * * Counterpart to Solidity's `int72` operator. * * Requirements: * * - input must fit into 72 bits */ function toInt72(int256 value) internal pure returns (int72 downcasted) { downcasted = int72(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(72, value); } } /** * @dev Returns the downcasted int64 from int256, reverting on * overflow (when the input is less than smallest int64 or * greater than largest int64). * * Counterpart to Solidity's `int64` operator. * * Requirements: * * - input must fit into 64 bits */ function toInt64(int256 value) internal pure returns (int64 downcasted) { downcasted = int64(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(64, value); } } /** * @dev Returns the downcasted int56 from int256, reverting on * overflow (when the input is less than smallest int56 or * greater than largest int56). * * Counterpart to Solidity's `int56` operator. * * Requirements: * * - input must fit into 56 bits */ function toInt56(int256 value) internal pure returns (int56 downcasted) { downcasted = int56(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(56, value); } } /** * @dev Returns the downcasted int48 from int256, reverting on * overflow (when the input is less than smallest int48 or * greater than largest int48). * * Counterpart to Solidity's `int48` operator. * * Requirements: * * - input must fit into 48 bits */ function toInt48(int256 value) internal pure returns (int48 downcasted) { downcasted = int48(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(48, value); } } /** * @dev Returns the downcasted int40 from int256, reverting on * overflow (when the input is less than smallest int40 or * greater than largest int40). * * Counterpart to Solidity's `int40` operator. * * Requirements: * * - input must fit into 40 bits */ function toInt40(int256 value) internal pure returns (int40 downcasted) { downcasted = int40(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(40, value); } } /** * @dev Returns the downcasted int32 from int256, reverting on * overflow (when the input is less than smallest int32 or * greater than largest int32). * * Counterpart to Solidity's `int32` operator. * * Requirements: * * - input must fit into 32 bits */ function toInt32(int256 value) internal pure returns (int32 downcasted) { downcasted = int32(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(32, value); } } /** * @dev Returns the downcasted int24 from int256, reverting on * overflow (when the input is less than smallest int24 or * greater than largest int24). * * Counterpart to Solidity's `int24` operator. * * Requirements: * * - input must fit into 24 bits */ function toInt24(int256 value) internal pure returns (int24 downcasted) { downcasted = int24(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(24, value); } } /** * @dev Returns the downcasted int16 from int256, reverting on * overflow (when the input is less than smallest int16 or * greater than largest int16). * * Counterpart to Solidity's `int16` operator. * * Requirements: * * - input must fit into 16 bits */ function toInt16(int256 value) internal pure returns (int16 downcasted) { downcasted = int16(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(16, value); } } /** * @dev Returns the downcasted int8 from int256, reverting on * overflow (when the input is less than smallest int8 or * greater than largest int8). * * Counterpart to Solidity's `int8` operator. * * Requirements: * * - input must fit into 8 bits */ function toInt8(int256 value) internal pure returns (int8 downcasted) { downcasted = int8(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(8, value); } } /** * @dev Converts an unsigned uint256 into a signed int256. * * Requirements: * * - input must be less than or equal to maxInt256. */ function toInt256(uint256 value) internal pure returns (int256) { // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive if (value > uint256(type(int256).max)) { revert SafeCastOverflowedUintToInt(value); } return int256(value); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/extensions/AccessControlEnumerable.sol) pragma solidity ^0.8.20; import {IAccessControlEnumerable} from "@openzeppelin/contracts/access/extensions/IAccessControlEnumerable.sol"; import {AccessControlUpgradeable} from "../AccessControlUpgradeable.sol"; import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import {Initializable} from "../../proxy/utils/Initializable.sol"; /** * @dev Extension of {AccessControl} that allows enumerating the members of each role. */ abstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerable, AccessControlUpgradeable { using EnumerableSet for EnumerableSet.AddressSet; /// @custom:storage-location erc7201:openzeppelin.storage.AccessControlEnumerable struct AccessControlEnumerableStorage { mapping(bytes32 role => EnumerableSet.AddressSet) _roleMembers; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.AccessControlEnumerable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant AccessControlEnumerableStorageLocation = 0xc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e82371705932000; function _getAccessControlEnumerableStorage() private pure returns (AccessControlEnumerableStorage storage $) { assembly { $.slot := AccessControlEnumerableStorageLocation } } function __AccessControlEnumerable_init() internal onlyInitializing { } function __AccessControlEnumerable_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view virtual returns (address) { AccessControlEnumerableStorage storage $ = _getAccessControlEnumerableStorage(); return $._roleMembers[role].at(index); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view virtual returns (uint256) { AccessControlEnumerableStorage storage $ = _getAccessControlEnumerableStorage(); return $._roleMembers[role].length(); } /** * @dev Overload {AccessControl-_grantRole} to track enumerable memberships */ function _grantRole(bytes32 role, address account) internal virtual override returns (bool) { AccessControlEnumerableStorage storage $ = _getAccessControlEnumerableStorage(); bool granted = super._grantRole(role, account); if (granted) { $._roleMembers[role].add(account); } return granted; } /** * @dev Overload {AccessControl-_revokeRole} to track enumerable memberships */ function _revokeRole(bytes32 role, address account) internal virtual override returns (bool) { AccessControlEnumerableStorage storage $ = _getAccessControlEnumerableStorage(); bool revoked = super._revokeRole(role, account); if (revoked) { $._roleMembers[role].remove(account); } return revoked; } }
// SPDX-FileCopyrightText: 2024 Lido <[email protected]> // SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.24; /// @notice A contract that gets consensus reports (i.e. hashes) pushed to and processes them /// asynchronously. /// /// HashConsensus doesn't expect any specific behavior from a report processor, and guarantees /// the following: /// /// 1. HashConsensus won't submit reports via `IReportAsyncProcessor.submitConsensusReport` or ask /// to discard reports via `IReportAsyncProcessor.discardConsensusReport` for any slot up to (and /// including) the slot returned from `IReportAsyncProcessor.getLastProcessingRefSlot`. /// /// 2. HashConsensus won't accept member reports (and thus won't include such reports in calculating /// the consensus) that have `consensusVersion` argument of the `HashConsensus.submitReport` call /// holding a diff. value than the one returned from `IReportAsyncProcessor.getConsensusVersion()` /// at the moment of the `HashConsensus.submitReport` call. /// interface IReportAsyncProcessor { /// @notice Submits a consensus report for processing. /// /// Note that submitting the report doesn't require the processor to start processing it right /// away, this can happen later (see `getLastProcessingRefSlot`). Until processing is started, /// HashConsensus is free to reach consensus on another report for the same reporting frame an /// submit it using this same function, or to lose the consensus on the submitted report, /// notifying the processor via `discardConsensusReport`. /// function submitConsensusReport( bytes32 report, uint256 refSlot, uint256 deadline ) external; /// @notice Notifies that the report for the given ref. slot is not a consensus report anymore /// and should be discarded. This can happen when a member changes their report, is removed /// from the set, or when the quorum value gets increased. /// /// Only called when, for the given reference slot: /// /// 1. there previously was a consensus report; AND /// 2. processing of the consensus report hasn't started yet; AND /// 3. report processing deadline is not expired yet; AND /// 4. there's no consensus report now (otherwise, `submitConsensusReport` is called instead). /// /// Can be called even when there's no submitted non-discarded consensus report for the current /// reference slot, i.e. can be called multiple times in succession. /// function discardConsensusReport(uint256 refSlot) external; /// @notice Returns the last reference slot for which processing of the report was started. /// /// HashConsensus won't submit reports for any slot less than or equal to this slot. /// function getLastProcessingRefSlot() external view returns (uint256); /// @notice Returns the current consensus version. /// /// Consensus version must change every time consensus rules change, meaning that /// an oracle looking at the same reference slot would calculate a different hash. /// /// HashConsensus won't accept member reports any consensus version different form the /// one returned from this function. /// function getConsensusVersion() external view returns (uint256); }
// SPDX-FileCopyrightText: 2024 Lido <[email protected]> // SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.24; interface IConsensusContract { function getIsMember(address addr) external view returns (bool); function getCurrentFrame() external view returns (uint256 refSlot, uint256 reportProcessingDeadlineSlot); function getChainConfig() external view returns ( uint256 slotsPerEpoch, uint256 secondsPerSlot, uint256 genesisTime ); function getInitialRefSlot() external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/extensions/IAccessControlEnumerable.sol) pragma solidity ^0.8.20; import {IAccessControl} from "../IAccessControl.sol"; /** * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. */ interface IAccessControlEnumerable is IAccessControl { /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) external view returns (address); /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol) pragma solidity ^0.8.20; import {IAccessControl} from "@openzeppelin/contracts/access/IAccessControl.sol"; import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol"; import {ERC165Upgradeable} from "../utils/introspection/ERC165Upgradeable.sol"; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ```solidity * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ```solidity * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules} * to enforce additional security measures for this role. */ abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControl, ERC165Upgradeable { struct RoleData { mapping(address account => bool) hasRole; bytes32 adminRole; } bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /// @custom:storage-location erc7201:openzeppelin.storage.AccessControl struct AccessControlStorage { mapping(bytes32 role => RoleData) _roles; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.AccessControl")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant AccessControlStorageLocation = 0x02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800; function _getAccessControlStorage() private pure returns (AccessControlStorage storage $) { assembly { $.slot := AccessControlStorageLocation } } /** * @dev Modifier that checks that an account has a specific role. Reverts * with an {AccessControlUnauthorizedAccount} error including the required role. */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } function __AccessControl_init() internal onlyInitializing { } function __AccessControl_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual returns (bool) { AccessControlStorage storage $ = _getAccessControlStorage(); return $._roles[role].hasRole[account]; } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()` * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier. */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account` * is missing `role`. */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert AccessControlUnauthorizedAccount(account, role); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) { AccessControlStorage storage $ = _getAccessControlStorage(); return $._roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `callerConfirmation`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address callerConfirmation) public virtual { if (callerConfirmation != _msgSender()) { revert AccessControlBadConfirmation(); } _revokeRole(role, callerConfirmation); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { AccessControlStorage storage $ = _getAccessControlStorage(); bytes32 previousAdminRole = getRoleAdmin(role); $._roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual returns (bool) { AccessControlStorage storage $ = _getAccessControlStorage(); if (!hasRole(role, account)) { $._roles[role].hasRole[account] = true; emit RoleGranted(role, account, _msgSender()); return true; } else { return false; } } /** * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual returns (bool) { AccessControlStorage storage $ = _getAccessControlStorage(); if (hasRole(role, account)) { $._roles[role].hasRole[account] = false; emit RoleRevoked(role, account, _msgSender()); return true; } else { return false; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.20; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ```solidity * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position is the index of the value in the `values` array plus 1. // Position 0 is used to mean a value is not in the set. mapping(bytes32 value => uint256) _positions; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._positions[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We cache the value's position to prevent multiple reads from the same storage slot uint256 position = set._positions[value]; if (position != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 valueIndex = position - 1; uint256 lastIndex = set._values.length - 1; if (valueIndex != lastIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the lastValue to the index where the value to delete is set._values[valueIndex] = lastValue; // Update the tracked position of the lastValue (that was just moved) set._positions[lastValue] = position; } // Delete the slot where the moved value was stored set._values.pop(); // Delete the tracked position for the deleted slot delete set._positions[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._positions[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values in the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.20; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ```solidity * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Storage of the initializable contract. * * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions * when using with upgradeable contracts. * * @custom:storage-location erc7201:openzeppelin.storage.Initializable */ struct InitializableStorage { /** * @dev Indicates that the contract has been initialized. */ uint64 _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool _initializing; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00; /** * @dev The contract is already initialized. */ error InvalidInitialization(); /** * @dev The contract is not initializing. */ error NotInitializing(); /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint64 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in * production. * * Emits an {Initialized} event. */ modifier initializer() { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); // Cache values to avoid duplicated sloads bool isTopLevelCall = !$._initializing; uint64 initialized = $._initialized; // Allowed calls: // - initialSetup: the contract is not in the initializing state and no previous version was // initialized // - construction: the contract is initialized at version 1 (no reininitialization) and the // current contract is just being deployed bool initialSetup = initialized == 0 && isTopLevelCall; bool construction = initialized == 1 && address(this).code.length == 0; if (!initialSetup && !construction) { revert InvalidInitialization(); } $._initialized = 1; if (isTopLevelCall) { $._initializing = true; } _; if (isTopLevelCall) { $._initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint64 version) { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing || $._initialized >= version) { revert InvalidInitialization(); } $._initialized = version; $._initializing = true; _; $._initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { _checkInitializing(); _; } /** * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}. */ function _checkInitializing() internal view virtual { if (!_isInitializing()) { revert NotInitializing(); } } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing) { revert InvalidInitialization(); } if ($._initialized != type(uint64).max) { $._initialized = type(uint64).max; emit Initialized(type(uint64).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint64) { return _getInitializableStorage()._initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _getInitializableStorage()._initializing; } /** * @dev Returns a pointer to the storage namespace. */ // solhint-disable-next-line var-name-mixedcase function _getInitializableStorage() private pure returns (InitializableStorage storage $) { assembly { $.slot := INITIALIZABLE_STORAGE } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol) pragma solidity ^0.8.20; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev The `account` is missing a role. */ error AccessControlUnauthorizedAccount(address account, bytes32 neededRole); /** * @dev The caller of a function is not the expected one. * * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}. */ error AccessControlBadConfirmation(); /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `callerConfirmation`. */ function renounceRole(bytes32 role, address callerConfirmation) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; import {Initializable} from "../proxy/utils/Initializable.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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import {Initializable} from "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` */ abstract contract ERC165Upgradeable is Initializable, IERC165 { function __ERC165_init() internal onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @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); }
{ "remappings": [ "@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/", "@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/", "forge-std/=node_modules/forge-std/src/", "ds-test/=node_modules/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "openzeppelin-contracts-v4.4/=lib/openzeppelin-contracts-v4.4/contracts/", "openzeppelin-contracts/=lib/openzeppelin-contracts/" ], "optimizer": { "enabled": true, "runs": 250 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "none", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "evmVersion": "cancun", "viaIR": false, "libraries": { "src/lib/AssetRecovererLib.sol": { "AssetRecovererLib": "0xA0513a7e28dAc4C31b5cCbF9A5F474B759257985" }, "src/lib/NOAddresses.sol": { "NOAddresses": "0x479244Bac2ae1D64841753307a0552183642c121" }, "src/lib/QueueLib.sol": { "QueueLib": "0x6FB7aF5aDDB044182caa27db35e394Ed3451A4da" } } }
Contract ABI
API[{"inputs":[{"internalType":"uint256","name":"slotsPerEpoch","type":"uint256"},{"internalType":"uint256","name":"secondsPerSlot","type":"uint256"},{"internalType":"uint256","name":"genesisTime","type":"uint256"},{"internalType":"uint256","name":"epochsPerFrame","type":"uint256"},{"internalType":"uint256","name":"fastLaneLengthSlots","type":"uint256"},{"internalType":"address","name":"admin","type":"address"},{"internalType":"address","name":"reportProcessor","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[],"name":"AddressCannotBeZero","type":"error"},{"inputs":[],"name":"AdminCannotBeZero","type":"error"},{"inputs":[],"name":"ConsensusReportAlreadyProcessing","type":"error"},{"inputs":[],"name":"DuplicateMember","type":"error"},{"inputs":[],"name":"DuplicateReport","type":"error"},{"inputs":[],"name":"EmptyReport","type":"error"},{"inputs":[],"name":"EpochsPerFrameCannotBeZero","type":"error"},{"inputs":[],"name":"FastLanePeriodCannotBeLongerThanFrame","type":"error"},{"inputs":[],"name":"InitialEpochAlreadyArrived","type":"error"},{"inputs":[],"name":"InitialEpochIsYetToArrive","type":"error"},{"inputs":[],"name":"InitialEpochRefSlotCannotBeEarlierThanProcessingSlot","type":"error"},{"inputs":[],"name":"InvalidChainConfig","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"InvalidSlot","type":"error"},{"inputs":[],"name":"NewProcessorCannotBeTheSame","type":"error"},{"inputs":[],"name":"NonFastLaneMemberCannotReportWithinFastLaneInterval","type":"error"},{"inputs":[],"name":"NonMember","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[],"name":"NumericOverflow","type":"error"},{"inputs":[{"internalType":"uint256","name":"minQuorum","type":"uint256"},{"internalType":"uint256","name":"receivedQuorum","type":"uint256"}],"name":"QuorumTooSmall","type":"error"},{"inputs":[],"name":"ReportProcessorCannotBeZero","type":"error"},{"inputs":[{"internalType":"uint8","name":"bits","type":"uint8"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"SafeCastOverflowedUintDowncast","type":"error"},{"inputs":[],"name":"StaleReport","type":"error"},{"inputs":[{"internalType":"uint256","name":"expected","type":"uint256"},{"internalType":"uint256","name":"received","type":"uint256"}],"name":"UnexpectedConsensusVersion","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"refSlot","type":"uint256"}],"name":"ConsensusLost","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"refSlot","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"report","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"support","type":"uint256"}],"name":"ConsensusReached","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fastLaneLengthSlots","type":"uint256"}],"name":"FastLaneConfigSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newInitialEpoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newEpochsPerFrame","type":"uint256"}],"name":"FrameConfigSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"addr","type":"address"},{"indexed":false,"internalType":"uint256","name":"newTotalMembers","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newQuorum","type":"uint256"}],"name":"MemberAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"addr","type":"address"},{"indexed":false,"internalType":"uint256","name":"newTotalMembers","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newQuorum","type":"uint256"}],"name":"MemberRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newQuorum","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalMembers","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"prevQuorum","type":"uint256"}],"name":"QuorumSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"processor","type":"address"},{"indexed":true,"internalType":"address","name":"prevProcessor","type":"address"}],"name":"ReportProcessorSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"refSlot","type":"uint256"},{"indexed":true,"internalType":"address","name":"member","type":"address"},{"indexed":false,"internalType":"bytes32","name":"report","type":"bytes32"}],"name":"ReportReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DISABLE_CONSENSUS_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MANAGE_FAST_LANE_CONFIG_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MANAGE_FRAME_CONFIG_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MANAGE_MEMBERS_AND_QUORUM_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MANAGE_REPORT_PROCESSOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"quorum","type":"uint256"}],"name":"addMember","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"disableConsensus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getChainConfig","outputs":[{"internalType":"uint256","name":"slotsPerEpoch","type":"uint256"},{"internalType":"uint256","name":"secondsPerSlot","type":"uint256"},{"internalType":"uint256","name":"genesisTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getConsensusState","outputs":[{"internalType":"uint256","name":"refSlot","type":"uint256"},{"internalType":"bytes32","name":"consensusReport","type":"bytes32"},{"internalType":"bool","name":"isReportProcessing","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"getConsensusStateForMember","outputs":[{"components":[{"internalType":"uint256","name":"currentFrameRefSlot","type":"uint256"},{"internalType":"bytes32","name":"currentFrameConsensusReport","type":"bytes32"},{"internalType":"bool","name":"isMember","type":"bool"},{"internalType":"bool","name":"isFastLane","type":"bool"},{"internalType":"bool","name":"canReport","type":"bool"},{"internalType":"uint256","name":"lastMemberReportRefSlot","type":"uint256"},{"internalType":"bytes32","name":"currentFrameMemberReport","type":"bytes32"}],"internalType":"struct HashConsensus.MemberConsensusState","name":"result","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentFrame","outputs":[{"internalType":"uint256","name":"refSlot","type":"uint256"},{"internalType":"uint256","name":"reportProcessingDeadlineSlot","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFastLaneMembers","outputs":[{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256[]","name":"lastReportedRefSlots","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFrameConfig","outputs":[{"internalType":"uint256","name":"initialEpoch","type":"uint256"},{"internalType":"uint256","name":"epochsPerFrame","type":"uint256"},{"internalType":"uint256","name":"fastLaneLengthSlots","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getInitialRefSlot","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"getIsFastLaneMember","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"getIsMember","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMembers","outputs":[{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256[]","name":"lastReportedRefSlots","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getQuorum","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReportProcessor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReportVariants","outputs":[{"internalType":"bytes32[]","name":"variants","type":"bytes32[]"},{"internalType":"uint256[]","name":"support","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"quorum","type":"uint256"}],"name":"removeMember","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"fastLaneLengthSlots","type":"uint256"}],"name":"setFastLaneLengthSlots","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"epochsPerFrame","type":"uint256"},{"internalType":"uint256","name":"fastLaneLengthSlots","type":"uint256"}],"name":"setFrameConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quorum","type":"uint256"}],"name":"setQuorum","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newProcessor","type":"address"}],"name":"setReportProcessor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"slot","type":"uint256"},{"internalType":"bytes32","name":"report","type":"bytes32"},{"internalType":"uint256","name":"consensusVersion","type":"uint256"}],"name":"submitReport","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"initialEpoch","type":"uint256"}],"name":"updateInitialEpoch","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60e060405234801562000010575f80fd5b506040516200369d3803806200369d8339810160408190526200003391620005aa565b865f03620000545760405163fb305deb60e01b815260040160405180910390fd5b855f03620000755760405163fb305deb60e01b815260040160405180910390fd5b6200008087620001a3565b6001600160401b03166080526200009786620001a3565b6001600160401b031660a052620000ae85620001a3565b6001600160401b031660c0526001600160a01b038216620000e257604051636b35b1b760e01b815260040160405180910390fd5b6001600160a01b0381166200010a5760405163154f6dd160e31b815260040160405180910390fd5b620001165f83620001e1565b505f6200012a6001600160401b036200023e565b90506200017581868660405180606001604052805f6001600160401b031681526020015f6001600160401b031681526020015f6001600160401b03168152506200025460201b60201c565b50600880546001600160a01b0319166001600160a01b03929092169190911790555062000671945050505050565b5f6001600160401b03821115620001dd57604080516306dfcc6560e41b815260048101919091526024810183905260440160405180910390fd5b5090565b5f7fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e823717059320008162000210858562000406565b9050801562000234575f858152602083905260409020620002329085620004d6565b505b9150505b92915050565b5f620002386200024e83620004f3565b62000525565b825f03620002755760405163ef3d10c160e01b815260040160405180910390fd5b6080516200028d906001600160401b03168462000621565b821115620002ae576040516385b552e160e01b815260040160405180910390fd5b6040518060600160405280620002ca86620001a360201b60201c565b6001600160401b03168152602001620002e385620001a3565b6001600160401b03168152602001620002fc84620001a3565b6001600160401b0390811690915281515f805460208501516040909501518416600160801b02600160801b600160c01b031995851668010000000000000000026001600160801b0319909216938516939093171793909316179091558151168414158062000377575080602001516001600160401b03168314155b15620003b75760408051858152602081018590527fe343afa5219eaf28c50ce9cd658acd69cbe28b34fa773eb3a523e28007f64afc910160405180910390a15b80604001516001600160401b0316821462000400576040518281527fab8b22776606cc75c47792d32af7e63ed9ca74e85c9780a7fc7994fdbd6fde2b9060200160405180910390a15b50505050565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602081815260408084206001600160a01b038616855290915282205460ff16620004cc575f848152602082815260408083206001600160a01b03871684529091529020805460ff19166001179055620004813390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4600191505062000238565b5f91505062000238565b5f620004ec836001600160a01b0384166200053f565b9392505050565b5f60a0516001600160401b031660c0516001600160401b0316836200051991906200063b565b62000238919062000651565b5f6080516001600160401b03168262000238919062000651565b5f8181526001830160205260408120546200058657508154600181810184555f84815260208082209093018490558454848252828601909352604090209190915562000238565b505f62000238565b80516001600160a01b0381168114620005a5575f80fd5b919050565b5f805f805f805f60e0888a031215620005c1575f80fd5b8751965060208801519550604088015194506060880151935060808801519250620005ef60a089016200058e565b9150620005ff60c089016200058e565b905092959891949750929550565b634e487b7160e01b5f52601160045260245ffd5b80820281158282048414176200023857620002386200060d565b818103818111156200023857620002386200060d565b5f826200066c57634e487b7160e01b5f52601260045260245ffd5b500490565b60805160a05160c051612fc2620006db5f395f81816103d1015281816117cc0152612c2901525f81816103ad015281816117a20152612bf501525f81816103890152818161128f015281816119cc015281816124f10152818161258d0152612a870152612fc25ff3fe608060405234801561000f575f80fd5b5060043610610213575f3560e01c80636fb1bf661161011f578063ad231cb2116100a9578063d547741f11610079578063d547741f146105e8578063e33a8d39146105fb578063e76cd4e01461060e578063ea87627d14610621578063fb4209ac14610646575f80fd5b8063ad231cb2146105b2578063c1ba4e59146105ba578063c26c12eb146105cd578063ca15c873146105d5575f80fd5b806398041ea3116100ef57806398041ea31461055657806399229f58146105695780639eab52531461057c578063a1e07cac14610584578063a217fddf146105ab575f80fd5b80636fb1bf66146104d157806372f79b13146105135780639010d07c1461053057806391d1485414610543575f80fd5b8063323a41f6116101a0578063606c0c9411610170578063606c0c941461037c5780636095012f1461040f57806360a50a5c1461041757806360e618011461043e5780636d058268146104ac575f80fd5b8063323a41f61461032d57806334aa67531461034057806336568abe14610353578063433ab1f314610366575f80fd5b806320b4d751116101e657806320b4d7511461029c578063239c327f146102af578063248a9ca3146102d65780632f2ff15d146103045780632fd2d75014610317575f80fd5b806301ffc9a714610217578063115a57c41461023f57806316f6f03e146102745780631951c03714610289575b5f80fd5b61022a610225366004612c4e565b61066d565b60405190151581526020015b60405180910390f35b6102667f921f40f434e049d23969cbe68d9cf3ac1013fbe8945da07963af6f3142de6afe81565b604051908152602001610236565b610287610282366004612c90565b610697565b005b61022a610297366004612cb8565b6106d0565b61022a6102aa366004612cb8565b6106ef565b6102667f4af6faa30fabb2c4d8d567d06168f9be8adb583156c1ecb424b4832a7e4d671781565b6102666102e4366004612cd1565b5f9081525f80516020612f96833981519152602052604090206001015490565b610287610312366004612ce8565b61072d565b61031f610763565b604051610236929190612d4c565b61028761033b366004612cd1565b6108aa565b61028761034e366004612d99565b61096d565b610287610361366004612ce8565b610a2d565b61036e610a60565b604051610236929190612db9565b6103f46001600160401b037f00000000000000000000000000000000000000000000000000000000000000008116917f00000000000000000000000000000000000000000000000000000000000000008216917f00000000000000000000000000000000000000000000000000000000000000001690565b60408051938452602084019290925290820152606001610236565b610266610a75565b6102667f10b016346186602d93fc7a27ace09ba944baf9453611b186d36acd3d3d667dc081565b61045161044c366004612cb8565b610a87565b60405161023691905f60e082019050825182526020830151602083015260408301511515604083015260608301511515606083015260808301511515608083015260a083015160a083015260c083015160c083015292915050565b6008546001600160a01b03165b6040516001600160a01b039091168152602001610236565b604080516060810182525f546001600160401b03808216808452600160401b8304821660208501819052600160801b90930490911692909301829052906103f4565b61051b610c28565b60408051928352602083019190915201610236565b6104b961053e366004612d99565b610c48565b61022a610551366004612ce8565b610c88565b610287610564366004612c90565b610cbe565b610287610577366004612cd1565b610cf2565b61036e610d29565b6102667f66a484cf1a3c6ef8dfd59d24824943d2853a29d96f34a01271efc55774452a5181565b6102665f81565b610287610d35565b6102876105c8366004612cd1565b610d46565b600554610266565b6102666105e3366004612cd1565b610d57565b6102876105f6366004612ce8565b610d8e565b610287610609366004612dfa565b610dbe565b61028761061c366004612cb8565b610dc9565b610629610dfc565b604080519384526020840192909252151590820152606001610236565b6102667fc5219a8d2d0107a57aad00b22081326d173df87bad251126f070df2659770c3e81565b5f6001600160e01b03198216635a05180f60e01b1480610691575061069182610e30565b92915050565b7f66a484cf1a3c6ef8dfd59d24824943d2853a29d96f34a01271efc55774452a516106c181610e64565b6106cb8383610e6e565b505050565b6001600160a01b0381165f908152600360205260408120541515610691565b6001600160a01b0381165f90815260036020526040812054801580159061072657506107266001820361072061115c565b516111c2565b9392505050565b5f8281525f80516020612f96833981519152602052604090206001015461075381610e64565b61075d83836111fb565b50505050565b60608061076e61115c565b602001516004546001600160401b031614610787579091565b600754806001600160401b038111156107a2576107a2612e23565b6040519080825280602002602001820160405280156107cb578160200160208202803683370190505b509250806001600160401b038111156107e6576107e6612e23565b60405190808252806020026020018201604052801561080f578160200160208202803683370190505b5091505f5b818110156108a4575f81815260066020908152604091829020825180840190935280548084526001909101546001600160401b031691830191909152855186908490811061086457610864612e37565b60200260200101818152505080602001516001600160401b031684838151811061089057610890612e37565b602090810291909101015250600101610814565b50509091565b5f6108b481610e64565b604080516060810182525f546001600160401b03808216808452600160401b830482166020850152600160801b9092041692820192909252906108f642611250565b10610914576040516329d1e0ff60e01b815260040160405180910390fd5b61093a8382602001516001600160401b031683604001516001600160401b031684611262565b610942611419565b61094a611484565b6020015110156106cb576040516323ca23a760e21b815260040160405180910390fd5b7f921f40f434e049d23969cbe68d9cf3ac1013fbe8945da07963af6f3142de6afe61099781610e64565b604080516060810182525f80546001600160401b038082168452600160401b820481166020850152600160801b90910416928201929092524291906109dd9083906114e7565b604080516060810182525f546001600160401b038082168352600160401b820481166020840152600160801b9091041691810191909152909150610a2690829087908790611262565b5050505050565b6001600160a01b0381163314610a565760405163334bd91960e11b815260040160405180910390fd5b6106cb82826114fb565b606080610a6d6001611547565b915091509091565b5f610a7e611484565b60200151905090565b6040805160e0810182525f80825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905290610ac761115c565b602081018051845251600554919250610adf91611713565b50506020808401919091526001600160a01b0384165f908152600390915260409081902054801580159285019290925290610c2157806001900390505f60018281548110610b2f57610b2f612e37565b5f918252602091829020604080518082019091529101546001600160401b03808216808452600160401b909204168284015260a087018190529185015190925014610b7a575f610b98565b6020808201516001600160401b03165f908152600690915260409020545b60c08501525f610ba74261179f565b905083604001518111158015610bc75750610bc0611419565b8460200151115b151560808601528351610bdb9084906111c2565b15801560608701819052610bf0575084608001515b15610c1e575f546020850151610c1691600160801b90046001600160401b031690612e5f565b811160808601525b50505b5050919050565b5f805f610c3361115c565b90508060200151816040015192509250509091565b5f8281527fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e82371705932000602081905260408220610c809084611809565b949350505050565b5f9182525f80516020612f96833981519152602090815260408084206001600160a01b0393909316845291905290205460ff1690565b7f66a484cf1a3c6ef8dfd59d24824943d2853a29d96f34a01271efc55774452a51610ce881610e64565b6106cb8383611814565b7f4af6faa30fabb2c4d8d567d06168f9be8adb583156c1ecb424b4832a7e4d6717610d1c81610e64565b610d258261198c565b5050565b606080610a6d5f611547565b600154610d44905f1990611a99565b565b600154610d54908290611a99565b50565b5f8181527fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e8237170593200060208190526040822061072690611bb5565b5f8281525f80516020612f968339815191526020526040902060010154610db481610e64565b61075d83836114fb565b6106cb838383611bbe565b7fc5219a8d2d0107a57aad00b22081326d173df87bad251126f070df2659770c3e610df381610e64565b610d2582612106565b5f805f610e0761115c565b602001519250610e1983600554611713565b50909250839050610e28611419565b149050909192565b5f6001600160e01b03198216637965db0b60e01b148061069157506301ffc9a760e01b6001600160e01b0319831614610691565b610d548133612305565b5f610e788361233e565b600180549192505f91610e8b9190612e72565b905080821115610e9d57610e9d612e85565b5f60018381548110610eb157610eb1612e37565b5f918252602091829020604080518082019091529101546001600160401b038082168352600160401b90910416918101919091529050828214610ffb575f60028381548110610f0257610f02612e37565b5f91825260209091200154600280546001600160a01b039092169250829186908110610f3057610f30612e37565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555060018381548110610f6e57610f6e612e37565b905f5260205f200160018581548110610f8957610f89612e37565b5f91825260209091208254910180546001600160401b0392831667ffffffffffffffff1982168117835593546001600160801b0319909116909317600160401b93849004909216909202179055610fe1846001612e5f565b6001600160a01b039091165f908152600360205260409020555b600180548061100c5761100c612e99565b5f8281526020902081015f1990810180546001600160801b0319169055019055600280548061103d5761103d612e99565b5f82815260208082205f19908401810180546001600160a01b03191690559092019092556001600160a01b038716808352600382526040808420939093558251858152918201879052917fa182730913550d27dc6c5813fad297cb0785871bec3d0152c5650e59c5d39d60910160405180910390a280516001600160401b031615611152575f6110cb61115c565b90508060200151825f01516001600160401b03161480156110f6575080602001516110f4611419565b105b15611150576020808301516001600160401b039081165f908152600690925260408220600101805490929161112b9116612ead565b91906101000a8154816001600160401b0302191690836001600160401b031602179055505b505b610a268483611a99565b61117d60405180606001604052805f81526020015f81526020015f81525090565b6111bd42604080516060810182525f546001600160401b038082168352600160401b820481166020840152600160801b909104169181019190915261237f565b905090565b6001545f9081806111d385846123b3565b91509150805f141580156111f157506111f1868360018403866123ed565b9695505050505050565b5f7fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e8237170593200081611228858561242e565b90508015610c80575f85815260208390526040902061124790856124cf565b50949350505050565b5f61069161125d8361179f565b6124e3565b825f036112825760405163ef3d10c160e01b815260040160405180910390fd5b6112b56001600160401b037f00000000000000000000000000000000000000000000000000000000000000001684612ec5565b8211156112d5576040516385b552e160e01b815260040160405180910390fd5b60405180606001604052806112e986612517565b6001600160401b0316815260200161130085612517565b6001600160401b0316815260200161131784612517565b6001600160401b0390811690915281515f805460208501516040909501518416600160801b0267ffffffffffffffff60801b19958516600160401b026001600160801b0319909216938516939093171793909316179091558151168414158061138d575080602001516001600160401b03168314155b156113cc5760408051858152602081018590527fe343afa5219eaf28c50ce9cd658acd69cbe28b34fa773eb3a523e28007f64afc910160405180910390a15b80604001516001600160401b0316821461075d576040518281527fab8b22776606cc75c47792d32af7e63ed9ca74e85c9780a7fc7994fdbd6fde2b9060200160405180910390a150505050565b60085460408051630d61356760e21b815290515f926001600160a01b031691633584d59c9160048083019260209291908290030181865afa158015611460573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111bd9190612edc565b6114a560405180606001604052805f81526020015f81526020015f81525090565b604080516060810182525f80546001600160401b038082168452600160401b820481166020850152600160801b90910416928201929092526111bd9190612550565b5f6107266114f58484612627565b83612688565b5f7fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e823717059320008161152885856126b7565b90508015610c80575f8581526020839052604090206112479085612730565b60015460609081905f8085156115735761156961156261115c565b51846123b3565b9092509050611576565b50815b6115808282612e72565b6001600160401b0381111561159757611597612e23565b6040519080825280602002602001820160405280156115c0578160200160208202803683370190505b50945084516001600160401b038111156115dc576115dc612e23565b604051908082528060200260200182016040528015611605578160200160208202803683370190505b509350815b8181101561170a575f61161d8583612f07565b90505f6001828154811061163357611633612e37565b5f9182526020808320604080518082019091529201546001600160401b038082168452600160401b9091041690820152915061166f8685612e72565b90506002838154811061168457611684612e37565b905f5260205f20015f9054906101000a90046001600160a01b03168982815181106116b1576116b1612e37565b60200260200101906001600160a01b031690816001600160a01b031681525050815f01516001600160401b03168882815181106116f0576116f0612e37565b60200260200101818152505050505080600101905061160a565b50505050915091565b6004545f90819081906001600160401b0316851461173957505f91505f19905081611798565b50506007545f91505f19908290815b81811015611795575f818152600660205260409020600101546001600160401b031686811061178c575f828152600660205260409020549550909350915082611795565b50600101611748565b50505b9250925092565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160401b03167f00000000000000000000000000000000000000000000000000000000000000006001600160401b0316836117ff9190612e72565b6106919190612f1a565b5f6107268383612744565b6001600160a01b0382165f908152600360205260409020541561184a57604051637670720160e11b815260040160405180910390fd5b6001600160a01b038216611871576040516303988b8160e61b815260040160405180910390fd5b6040805180820182525f808252602080830182815260018054808201825581855294517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6909501805492516001600160401b03908116600160401b026001600160801b031990941696169590951791909117909355600280548085019091557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b0388166001600160a01b03199091168117909155925483835260039091529083902081905591517fe17e0e2cd88e2144dd54f3d823c30d4569092bcac1aabaec1129883e9cc12d2e9061197a9084908690918252602082015260400190565b60405180910390a26106cb8282611a99565b604080516060810182525f546001600160401b038082168352600160401b8204811660208401819052600160801b9092041692820192909252906119f1907f000000000000000000000000000000000000000000000000000000000000000090612f2d565b6001600160401b0316821115611a1a576040516385b552e160e01b815260040160405180910390fd5b80604001516001600160401b03168214610d2557611a3782612517565b5f80546001600160401b0392909216600160801b0267ffffffffffffffff60801b199092169190911790556040518281527fab8b22776606cc75c47792d32af7e63ed9ca74e85c9780a7fc7994fdbd6fde2b9060200160405180910390a15050565b611aa4600282612f1a565b8211611ae957611ab5600282612f1a565b611ac0906001612e5f565b604051632b2dd84d60e01b81526004810191909152602481018390526044015b60405180910390fd5b600554828114611b9357611b4c5f198414611b24577f66a484cf1a3c6ef8dfd59d24824943d2853a29d96f34a01271efc55774452a51611b46565b7f10b016346186602d93fc7a27ace09ba944baf9453611b186d36acd3d3d667dc05b33612305565b600583905560408051848152602081018490529081018290527f9f40cfd22fe91777c78f252bd21a710f3fb007dc2f321876891e7644ba0ae1759060600160405180910390a15b5f546001600160401b0316611ba742611250565b106106cb576106cb8361276a565b5f610691825490565b825f03611bde57604051631258e44360e01b815260040160405180910390fd5b6001600160401b03831115611c065760405163aac8f00960e01b815260040160405180910390fd5b81611c235760405162bf199760e01b815260040160405180910390fd5b5f611c2d3361233e565b90505f60018281548110611c4357611c43612e37565b5f9182526020808320604080518082019091529201546001600160401b038082168452600160401b90910416908201529150611c7d61281a565b9050808414611ca957604051632a37dd3d60e11b81526004810182905260248101859052604401611ae0565b425f611cb48261179f565b604080516060810182525f80546001600160401b038082168452600160401b820481166020850152600160801b9091041692820192909252919250611cf9848361237f565b905080602001518a14611d1f57604051631258e44360e01b815260040160405180910390fd5b8060400151831115611d4457604051637c01d16560e11b815260040160405180910390fd5b81604001516001600160401b03168160200151611d619190612e5f565b8311158015611d7a5750611d7887825f01516111c2565b155b15611d9857604051633e1ca93d60e01b815260040160405180910390fd5b611da0611419565b8a11611ddc5785516001600160401b03168a03611dd057604051631cf7e8a160e31b815260040160405180910390fd5b50505050505050505050565b6004545f906001600160401b03168b14611e1357506004805467ffffffffffffffff19166001600160401b038c161790555f611e18565b506007545b5f805b82826001600160401b0316108015611e4a57506001600160401b0382165f908152600660205260409020548c14155b15611e5f57611e5882612f58565b9150611e1b565b88516001600160401b03168d03611f375760208901516001600160401b0381168411611e8d57611e8d612e85565b806001600160401b0316836001600160401b031603611ebf5760405163fd10cf7360e01b815260040160405180910390fd5b6001600160401b038082165f9081526006602052604081206001018054919290918391611eec9116612ead565b91906101000a8154816001600160401b0302191690836001600160401b0316021790556001600160401b031690506001600554611f299190612e72565b8103611f3457600192505b50505b5f83836001600160401b03161015611fa5576001600160401b038084165f90815260066020526040812060010180549092611f729116612f58565b91906101000a8154816001600160401b0302191690836001600160401b0316021790556001600160401b03169050612005565b506040805180820182528d8152600160208083018281526001600160401b038781165f9081526006909352949091209251835551918101805467ffffffffffffffff19169290931691909117909155611ffd84612f7d565b600781905593505b60405180604001604052808f6001600160401b03168152602001846001600160401b031681525060018c8154811061203f5761203f612e37565b5f91825260209182902083519101805493909201516001600160401b03908116600160401b026001600160801b03199094169116179190911790556120813390565b6001600160a01b03168e7f92f77576dabd7bad26f75c36abb3021b5bbb66a3e5688570a0355daddd4174888f6040516120bc91815260200190565b60405180910390a360055481106120e7576120e2858e856001600160401b031684612861565b6120f6565b81156120f6576120f685612942565b5050505050505050505050505050565b6008546001600160a01b039081169082166121345760405163154f6dd160e31b815260040160405180910390fd5b806001600160a01b0316826001600160a01b0316036121665760405163f1b3699f60e01b815260040160405180910390fd5b600880546001600160a01b0319166001600160a01b03848116918217909255604051918316917f3b59429457a41af89ea682ac9ed8abb8e99eb5c7d3363d5eedfc6bff6271a81e905f90a35f6121ba61115c565b90505f60045f0160089054906101000a90046001600160401b03166001600160401b031690505f836001600160a01b0316633584d59c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561221d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122419190612edc565b90505f856001600160a01b0316633584d59c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612280573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122a49190612edc565b90508360200151821080156122bc5750836020015181105b80156122cb5750836020015183145b156122fd57600454600160801b90046001600160401b03165f908152600660205260409020546122fb85826129ae565b505b505050505050565b61230f8282610c88565b610d255760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401611ae0565b6001600160a01b0381165f9081526003602052604081205480820361237657604051638d35f2ed60e01b815260040160405180910390fd5b5f190192915050565b6123a060405180606001604052805f81526020015f81526020015f81525090565b6107266123ad8484612627565b83612550565b6005545f9081908381106123cc575f92508391506123e5565b6123d68486612f07565b92506123e28184612e5f565b91505b509250929050565b5f816123f98585612e72565b6124039190612f07565b828561240f8289612e5f565b6124199190612e72565b6124239190612f07565b111595945050505050565b5f5f80516020612f968339815191526124478484610c88565b6124c6575f848152602082815260408083206001600160a01b03871684529091529020805460ff1916600117905561247c3390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001915050610691565b5f915050610691565b5f610726836001600160a01b038416612a2d565b5f6106916001600160401b037f00000000000000000000000000000000000000000000000000000000000000001683612f1a565b5f6001600160401b0382111561254c57604080516306dfcc6560e41b8152600481019190915260248101839052604401611ae0565b5090565b61257160405180606001604052805f81526020015f81526020015f81525090565b5f61257c8484612688565b90505f61258882612a79565b90505f7f000000000000000000000000000000000000000000000000000000000000000085602001516125bb9190612f2d565b6125ce906001600160401b031683612e5f565b905060405180606001604052808781526020016001846125ee9190612e72565b6001600160401b031681526020015f612608600185612e72565b6126129190612e72565b6001600160401b031690529695505050505050565b5f8061263284611250565b83519091506001600160401b03168110156126605760405163668441f560e11b815260040160405180910390fd5b602083015183516001600160401b039182169161267e911683612e72565b610c809190612f1a565b5f81602001516001600160401b0316836126a29190612ec5565b825161072691906001600160401b0316612e5f565b5f5f80516020612f968339815191526126d08484610c88565b156124c6575f848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a46001915050610691565b5f610726836001600160a01b038416612aad565b5f825f01828154811061275957612759612e37565b905f5260205f200154905092915050565b604080516060810182525f80546001600160401b038082168452600160401b820481166020850152600160801b90910416928201929092524291906127b090839061237f565b905080604001516127c08361179f565b11156127cb57505050565b80602001516127d8611419565b106127e257505050565b5f805f6127f3846020015187611713565b9250925092505f82126128115761280c84848484612861565b6122fd565b6122fd84612942565b60085460408051635be2042560e01b815290515f926001600160a01b031691635be204259160048083019260209291908290030181865afa158015611460573d5f803e3d5ffd5b6020840151600454600160401b90046001600160401b03161415806128985750600454600160801b90046001600160401b03168214155b1561075d576020840151600480546001600160401b03858116600160801b0267ffffffffffffffff60801b19918516600160401b029190911677ffffffffffffffffffffffffffffffff000000000000000019909216919091171790556040517f2b6bc782c916fa763822f1e50c6db0f95dade36d6541a8a4cbe070735b8b226d906129309086908590918252602082015260400190565b60405180910390a261075d84846129ae565b6020810151600454600160401b90046001600160401b031603610d5457600480546fffffffffffffffff00000000000000001916905560208101516040517fde3f4ea5aa67881831e8fad2b0855d47e75aa63a2fae6ef657ffd5f856c4a613905f90a2610d5481612b87565b600854602083015160408401516001600160a01b039092169163063f36ad9184916129d890612be7565b6040516001600160e01b031960e086901b1681526004810193909352602483019190915260448201526064015f604051808303815f87803b158015612a1b575f80fd5b505af11580156122fd573d5f803e3d5ffd5b5f818152600183016020526040812054612a7257508154600181810184555f848152602080822090930184905584548482528286019093526040902091909155610691565b505f610691565b5f6106916001600160401b037f00000000000000000000000000000000000000000000000000000000000000001683612ec5565b5f81815260018301602052604081205480156124c6575f612acf600183612e72565b85549091505f90612ae290600190612e72565b9050808214612b41575f865f018281548110612b0057612b00612e37565b905f5260205f200154905080875f018481548110612b2057612b20612e37565b5f918252602080832090910192909255918252600188019052604090208390555b8554869080612b5257612b52612e99565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f905560019350505050610691565b600854602082015160405163d438121760e01b81526001600160a01b039092169163d438121791612bbe9160040190815260200190565b5f604051808303815f87803b158015612bd5575f80fd5b505af1158015610a26573d5f803e3d5ffd5b5f612c1b6001600160401b037f00000000000000000000000000000000000000000000000000000000000000001683612ec5565b610691906001600160401b037f000000000000000000000000000000000000000000000000000000000000000016612e5f565b5f60208284031215612c5e575f80fd5b81356001600160e01b031981168114610726575f80fd5b80356001600160a01b0381168114612c8b575f80fd5b919050565b5f8060408385031215612ca1575f80fd5b612caa83612c75565b946020939093013593505050565b5f60208284031215612cc8575f80fd5b61072682612c75565b5f60208284031215612ce1575f80fd5b5035919050565b5f8060408385031215612cf9575f80fd5b82359150612d0960208401612c75565b90509250929050565b5f815180845260208085019450602084015f5b83811015612d4157815187529582019590820190600101612d25565b509495945050505050565b604080825283519082018190525f906020906060840190828701845b82811015612d8457815184529284019290840190600101612d68565b50505083810360208501526111f18186612d12565b5f8060408385031215612daa575f80fd5b50508035926020909101359150565b604080825283519082018190525f906020906060840190828701845b82811015612d845781516001600160a01b031684529284019290840190600101612dd5565b5f805f60608486031215612e0c575f80fd5b505081359360208301359350604090920135919050565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b8082018082111561069157610691612e4b565b8181038181111561069157610691612e4b565b634e487b7160e01b5f52600160045260245ffd5b634e487b7160e01b5f52603160045260245ffd5b5f6001600160401b0382168061237657612376612e4b565b808202811582820484141761069157610691612e4b565b5f60208284031215612eec575f80fd5b5051919050565b634e487b7160e01b5f52601260045260245ffd5b5f82612f1557612f15612ef3565b500690565b5f82612f2857612f28612ef3565b500490565b6001600160401b03818116838216028082169190828114612f5057612f50612e4b565b505092915050565b5f6001600160401b03808316818103612f7357612f73612e4b565b6001019392505050565b5f60018201612f8e57612f8e612e4b565b506001019056fe02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800a164736f6c6343000818000a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000067d81118000000000000000000000000000000000000000000000000000000000000062700000000000000000000000000000000000000000000000000000000000000000000000000000000000000008c92472e51efcf126f5bdbc39d7023b95c746c95000000000000000000000000e7314f561b2e72f9543f1004e741bab6fc51028b
Deployed Bytecode
0x608060405234801561000f575f80fd5b5060043610610213575f3560e01c80636fb1bf661161011f578063ad231cb2116100a9578063d547741f11610079578063d547741f146105e8578063e33a8d39146105fb578063e76cd4e01461060e578063ea87627d14610621578063fb4209ac14610646575f80fd5b8063ad231cb2146105b2578063c1ba4e59146105ba578063c26c12eb146105cd578063ca15c873146105d5575f80fd5b806398041ea3116100ef57806398041ea31461055657806399229f58146105695780639eab52531461057c578063a1e07cac14610584578063a217fddf146105ab575f80fd5b80636fb1bf66146104d157806372f79b13146105135780639010d07c1461053057806391d1485414610543575f80fd5b8063323a41f6116101a0578063606c0c9411610170578063606c0c941461037c5780636095012f1461040f57806360a50a5c1461041757806360e618011461043e5780636d058268146104ac575f80fd5b8063323a41f61461032d57806334aa67531461034057806336568abe14610353578063433ab1f314610366575f80fd5b806320b4d751116101e657806320b4d7511461029c578063239c327f146102af578063248a9ca3146102d65780632f2ff15d146103045780632fd2d75014610317575f80fd5b806301ffc9a714610217578063115a57c41461023f57806316f6f03e146102745780631951c03714610289575b5f80fd5b61022a610225366004612c4e565b61066d565b60405190151581526020015b60405180910390f35b6102667f921f40f434e049d23969cbe68d9cf3ac1013fbe8945da07963af6f3142de6afe81565b604051908152602001610236565b610287610282366004612c90565b610697565b005b61022a610297366004612cb8565b6106d0565b61022a6102aa366004612cb8565b6106ef565b6102667f4af6faa30fabb2c4d8d567d06168f9be8adb583156c1ecb424b4832a7e4d671781565b6102666102e4366004612cd1565b5f9081525f80516020612f96833981519152602052604090206001015490565b610287610312366004612ce8565b61072d565b61031f610763565b604051610236929190612d4c565b61028761033b366004612cd1565b6108aa565b61028761034e366004612d99565b61096d565b610287610361366004612ce8565b610a2d565b61036e610a60565b604051610236929190612db9565b6103f46001600160401b037f00000000000000000000000000000000000000000000000000000000000000208116917f000000000000000000000000000000000000000000000000000000000000000c8216917f0000000000000000000000000000000000000000000000000000000067d811181690565b60408051938452602084019290925290820152606001610236565b610266610a75565b6102667f10b016346186602d93fc7a27ace09ba944baf9453611b186d36acd3d3d667dc081565b61045161044c366004612cb8565b610a87565b60405161023691905f60e082019050825182526020830151602083015260408301511515604083015260608301511515606083015260808301511515608083015260a083015160a083015260c083015160c083015292915050565b6008546001600160a01b03165b6040516001600160a01b039091168152602001610236565b604080516060810182525f546001600160401b03808216808452600160401b8304821660208501819052600160801b90930490911692909301829052906103f4565b61051b610c28565b60408051928352602083019190915201610236565b6104b961053e366004612d99565b610c48565b61022a610551366004612ce8565b610c88565b610287610564366004612c90565b610cbe565b610287610577366004612cd1565b610cf2565b61036e610d29565b6102667f66a484cf1a3c6ef8dfd59d24824943d2853a29d96f34a01271efc55774452a5181565b6102665f81565b610287610d35565b6102876105c8366004612cd1565b610d46565b600554610266565b6102666105e3366004612cd1565b610d57565b6102876105f6366004612ce8565b610d8e565b610287610609366004612dfa565b610dbe565b61028761061c366004612cb8565b610dc9565b610629610dfc565b604080519384526020840192909252151590820152606001610236565b6102667fc5219a8d2d0107a57aad00b22081326d173df87bad251126f070df2659770c3e81565b5f6001600160e01b03198216635a05180f60e01b1480610691575061069182610e30565b92915050565b7f66a484cf1a3c6ef8dfd59d24824943d2853a29d96f34a01271efc55774452a516106c181610e64565b6106cb8383610e6e565b505050565b6001600160a01b0381165f908152600360205260408120541515610691565b6001600160a01b0381165f90815260036020526040812054801580159061072657506107266001820361072061115c565b516111c2565b9392505050565b5f8281525f80516020612f96833981519152602052604090206001015461075381610e64565b61075d83836111fb565b50505050565b60608061076e61115c565b602001516004546001600160401b031614610787579091565b600754806001600160401b038111156107a2576107a2612e23565b6040519080825280602002602001820160405280156107cb578160200160208202803683370190505b509250806001600160401b038111156107e6576107e6612e23565b60405190808252806020026020018201604052801561080f578160200160208202803683370190505b5091505f5b818110156108a4575f81815260066020908152604091829020825180840190935280548084526001909101546001600160401b031691830191909152855186908490811061086457610864612e37565b60200260200101818152505080602001516001600160401b031684838151811061089057610890612e37565b602090810291909101015250600101610814565b50509091565b5f6108b481610e64565b604080516060810182525f546001600160401b03808216808452600160401b830482166020850152600160801b9092041692820192909252906108f642611250565b10610914576040516329d1e0ff60e01b815260040160405180910390fd5b61093a8382602001516001600160401b031683604001516001600160401b031684611262565b610942611419565b61094a611484565b6020015110156106cb576040516323ca23a760e21b815260040160405180910390fd5b7f921f40f434e049d23969cbe68d9cf3ac1013fbe8945da07963af6f3142de6afe61099781610e64565b604080516060810182525f80546001600160401b038082168452600160401b820481166020850152600160801b90910416928201929092524291906109dd9083906114e7565b604080516060810182525f546001600160401b038082168352600160401b820481166020840152600160801b9091041691810191909152909150610a2690829087908790611262565b5050505050565b6001600160a01b0381163314610a565760405163334bd91960e11b815260040160405180910390fd5b6106cb82826114fb565b606080610a6d6001611547565b915091509091565b5f610a7e611484565b60200151905090565b6040805160e0810182525f80825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905290610ac761115c565b602081018051845251600554919250610adf91611713565b50506020808401919091526001600160a01b0384165f908152600390915260409081902054801580159285019290925290610c2157806001900390505f60018281548110610b2f57610b2f612e37565b5f918252602091829020604080518082019091529101546001600160401b03808216808452600160401b909204168284015260a087018190529185015190925014610b7a575f610b98565b6020808201516001600160401b03165f908152600690915260409020545b60c08501525f610ba74261179f565b905083604001518111158015610bc75750610bc0611419565b8460200151115b151560808601528351610bdb9084906111c2565b15801560608701819052610bf0575084608001515b15610c1e575f546020850151610c1691600160801b90046001600160401b031690612e5f565b811160808601525b50505b5050919050565b5f805f610c3361115c565b90508060200151816040015192509250509091565b5f8281527fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e82371705932000602081905260408220610c809084611809565b949350505050565b5f9182525f80516020612f96833981519152602090815260408084206001600160a01b0393909316845291905290205460ff1690565b7f66a484cf1a3c6ef8dfd59d24824943d2853a29d96f34a01271efc55774452a51610ce881610e64565b6106cb8383611814565b7f4af6faa30fabb2c4d8d567d06168f9be8adb583156c1ecb424b4832a7e4d6717610d1c81610e64565b610d258261198c565b5050565b606080610a6d5f611547565b600154610d44905f1990611a99565b565b600154610d54908290611a99565b50565b5f8181527fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e8237170593200060208190526040822061072690611bb5565b5f8281525f80516020612f968339815191526020526040902060010154610db481610e64565b61075d83836114fb565b6106cb838383611bbe565b7fc5219a8d2d0107a57aad00b22081326d173df87bad251126f070df2659770c3e610df381610e64565b610d2582612106565b5f805f610e0761115c565b602001519250610e1983600554611713565b50909250839050610e28611419565b149050909192565b5f6001600160e01b03198216637965db0b60e01b148061069157506301ffc9a760e01b6001600160e01b0319831614610691565b610d548133612305565b5f610e788361233e565b600180549192505f91610e8b9190612e72565b905080821115610e9d57610e9d612e85565b5f60018381548110610eb157610eb1612e37565b5f918252602091829020604080518082019091529101546001600160401b038082168352600160401b90910416918101919091529050828214610ffb575f60028381548110610f0257610f02612e37565b5f91825260209091200154600280546001600160a01b039092169250829186908110610f3057610f30612e37565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555060018381548110610f6e57610f6e612e37565b905f5260205f200160018581548110610f8957610f89612e37565b5f91825260209091208254910180546001600160401b0392831667ffffffffffffffff1982168117835593546001600160801b0319909116909317600160401b93849004909216909202179055610fe1846001612e5f565b6001600160a01b039091165f908152600360205260409020555b600180548061100c5761100c612e99565b5f8281526020902081015f1990810180546001600160801b0319169055019055600280548061103d5761103d612e99565b5f82815260208082205f19908401810180546001600160a01b03191690559092019092556001600160a01b038716808352600382526040808420939093558251858152918201879052917fa182730913550d27dc6c5813fad297cb0785871bec3d0152c5650e59c5d39d60910160405180910390a280516001600160401b031615611152575f6110cb61115c565b90508060200151825f01516001600160401b03161480156110f6575080602001516110f4611419565b105b15611150576020808301516001600160401b039081165f908152600690925260408220600101805490929161112b9116612ead565b91906101000a8154816001600160401b0302191690836001600160401b031602179055505b505b610a268483611a99565b61117d60405180606001604052805f81526020015f81526020015f81525090565b6111bd42604080516060810182525f546001600160401b038082168352600160401b820481166020840152600160801b909104169181019190915261237f565b905090565b6001545f9081806111d385846123b3565b91509150805f141580156111f157506111f1868360018403866123ed565b9695505050505050565b5f7fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e8237170593200081611228858561242e565b90508015610c80575f85815260208390526040902061124790856124cf565b50949350505050565b5f61069161125d8361179f565b6124e3565b825f036112825760405163ef3d10c160e01b815260040160405180910390fd5b6112b56001600160401b037f00000000000000000000000000000000000000000000000000000000000000201684612ec5565b8211156112d5576040516385b552e160e01b815260040160405180910390fd5b60405180606001604052806112e986612517565b6001600160401b0316815260200161130085612517565b6001600160401b0316815260200161131784612517565b6001600160401b0390811690915281515f805460208501516040909501518416600160801b0267ffffffffffffffff60801b19958516600160401b026001600160801b0319909216938516939093171793909316179091558151168414158061138d575080602001516001600160401b03168314155b156113cc5760408051858152602081018590527fe343afa5219eaf28c50ce9cd658acd69cbe28b34fa773eb3a523e28007f64afc910160405180910390a15b80604001516001600160401b0316821461075d576040518281527fab8b22776606cc75c47792d32af7e63ed9ca74e85c9780a7fc7994fdbd6fde2b9060200160405180910390a150505050565b60085460408051630d61356760e21b815290515f926001600160a01b031691633584d59c9160048083019260209291908290030181865afa158015611460573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111bd9190612edc565b6114a560405180606001604052805f81526020015f81526020015f81525090565b604080516060810182525f80546001600160401b038082168452600160401b820481166020850152600160801b90910416928201929092526111bd9190612550565b5f6107266114f58484612627565b83612688565b5f7fc1f6fe24621ce81ec5827caf0253cadb74709b061630e6b55e823717059320008161152885856126b7565b90508015610c80575f8581526020839052604090206112479085612730565b60015460609081905f8085156115735761156961156261115c565b51846123b3565b9092509050611576565b50815b6115808282612e72565b6001600160401b0381111561159757611597612e23565b6040519080825280602002602001820160405280156115c0578160200160208202803683370190505b50945084516001600160401b038111156115dc576115dc612e23565b604051908082528060200260200182016040528015611605578160200160208202803683370190505b509350815b8181101561170a575f61161d8583612f07565b90505f6001828154811061163357611633612e37565b5f9182526020808320604080518082019091529201546001600160401b038082168452600160401b9091041690820152915061166f8685612e72565b90506002838154811061168457611684612e37565b905f5260205f20015f9054906101000a90046001600160a01b03168982815181106116b1576116b1612e37565b60200260200101906001600160a01b031690816001600160a01b031681525050815f01516001600160401b03168882815181106116f0576116f0612e37565b60200260200101818152505050505080600101905061160a565b50505050915091565b6004545f90819081906001600160401b0316851461173957505f91505f19905081611798565b50506007545f91505f19908290815b81811015611795575f818152600660205260409020600101546001600160401b031686811061178c575f828152600660205260409020549550909350915082611795565b50600101611748565b50505b9250925092565b5f7f000000000000000000000000000000000000000000000000000000000000000c6001600160401b03167f0000000000000000000000000000000000000000000000000000000067d811186001600160401b0316836117ff9190612e72565b6106919190612f1a565b5f6107268383612744565b6001600160a01b0382165f908152600360205260409020541561184a57604051637670720160e11b815260040160405180910390fd5b6001600160a01b038216611871576040516303988b8160e61b815260040160405180910390fd5b6040805180820182525f808252602080830182815260018054808201825581855294517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6909501805492516001600160401b03908116600160401b026001600160801b031990941696169590951791909117909355600280548085019091557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b0388166001600160a01b03199091168117909155925483835260039091529083902081905591517fe17e0e2cd88e2144dd54f3d823c30d4569092bcac1aabaec1129883e9cc12d2e9061197a9084908690918252602082015260400190565b60405180910390a26106cb8282611a99565b604080516060810182525f546001600160401b038082168352600160401b8204811660208401819052600160801b9092041692820192909252906119f1907f000000000000000000000000000000000000000000000000000000000000002090612f2d565b6001600160401b0316821115611a1a576040516385b552e160e01b815260040160405180910390fd5b80604001516001600160401b03168214610d2557611a3782612517565b5f80546001600160401b0392909216600160801b0267ffffffffffffffff60801b199092169190911790556040518281527fab8b22776606cc75c47792d32af7e63ed9ca74e85c9780a7fc7994fdbd6fde2b9060200160405180910390a15050565b611aa4600282612f1a565b8211611ae957611ab5600282612f1a565b611ac0906001612e5f565b604051632b2dd84d60e01b81526004810191909152602481018390526044015b60405180910390fd5b600554828114611b9357611b4c5f198414611b24577f66a484cf1a3c6ef8dfd59d24824943d2853a29d96f34a01271efc55774452a51611b46565b7f10b016346186602d93fc7a27ace09ba944baf9453611b186d36acd3d3d667dc05b33612305565b600583905560408051848152602081018490529081018290527f9f40cfd22fe91777c78f252bd21a710f3fb007dc2f321876891e7644ba0ae1759060600160405180910390a15b5f546001600160401b0316611ba742611250565b106106cb576106cb8361276a565b5f610691825490565b825f03611bde57604051631258e44360e01b815260040160405180910390fd5b6001600160401b03831115611c065760405163aac8f00960e01b815260040160405180910390fd5b81611c235760405162bf199760e01b815260040160405180910390fd5b5f611c2d3361233e565b90505f60018281548110611c4357611c43612e37565b5f9182526020808320604080518082019091529201546001600160401b038082168452600160401b90910416908201529150611c7d61281a565b9050808414611ca957604051632a37dd3d60e11b81526004810182905260248101859052604401611ae0565b425f611cb48261179f565b604080516060810182525f80546001600160401b038082168452600160401b820481166020850152600160801b9091041692820192909252919250611cf9848361237f565b905080602001518a14611d1f57604051631258e44360e01b815260040160405180910390fd5b8060400151831115611d4457604051637c01d16560e11b815260040160405180910390fd5b81604001516001600160401b03168160200151611d619190612e5f565b8311158015611d7a5750611d7887825f01516111c2565b155b15611d9857604051633e1ca93d60e01b815260040160405180910390fd5b611da0611419565b8a11611ddc5785516001600160401b03168a03611dd057604051631cf7e8a160e31b815260040160405180910390fd5b50505050505050505050565b6004545f906001600160401b03168b14611e1357506004805467ffffffffffffffff19166001600160401b038c161790555f611e18565b506007545b5f805b82826001600160401b0316108015611e4a57506001600160401b0382165f908152600660205260409020548c14155b15611e5f57611e5882612f58565b9150611e1b565b88516001600160401b03168d03611f375760208901516001600160401b0381168411611e8d57611e8d612e85565b806001600160401b0316836001600160401b031603611ebf5760405163fd10cf7360e01b815260040160405180910390fd5b6001600160401b038082165f9081526006602052604081206001018054919290918391611eec9116612ead565b91906101000a8154816001600160401b0302191690836001600160401b0316021790556001600160401b031690506001600554611f299190612e72565b8103611f3457600192505b50505b5f83836001600160401b03161015611fa5576001600160401b038084165f90815260066020526040812060010180549092611f729116612f58565b91906101000a8154816001600160401b0302191690836001600160401b0316021790556001600160401b03169050612005565b506040805180820182528d8152600160208083018281526001600160401b038781165f9081526006909352949091209251835551918101805467ffffffffffffffff19169290931691909117909155611ffd84612f7d565b600781905593505b60405180604001604052808f6001600160401b03168152602001846001600160401b031681525060018c8154811061203f5761203f612e37565b5f91825260209182902083519101805493909201516001600160401b03908116600160401b026001600160801b03199094169116179190911790556120813390565b6001600160a01b03168e7f92f77576dabd7bad26f75c36abb3021b5bbb66a3e5688570a0355daddd4174888f6040516120bc91815260200190565b60405180910390a360055481106120e7576120e2858e856001600160401b031684612861565b6120f6565b81156120f6576120f685612942565b5050505050505050505050505050565b6008546001600160a01b039081169082166121345760405163154f6dd160e31b815260040160405180910390fd5b806001600160a01b0316826001600160a01b0316036121665760405163f1b3699f60e01b815260040160405180910390fd5b600880546001600160a01b0319166001600160a01b03848116918217909255604051918316917f3b59429457a41af89ea682ac9ed8abb8e99eb5c7d3363d5eedfc6bff6271a81e905f90a35f6121ba61115c565b90505f60045f0160089054906101000a90046001600160401b03166001600160401b031690505f836001600160a01b0316633584d59c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561221d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122419190612edc565b90505f856001600160a01b0316633584d59c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612280573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122a49190612edc565b90508360200151821080156122bc5750836020015181105b80156122cb5750836020015183145b156122fd57600454600160801b90046001600160401b03165f908152600660205260409020546122fb85826129ae565b505b505050505050565b61230f8282610c88565b610d255760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401611ae0565b6001600160a01b0381165f9081526003602052604081205480820361237657604051638d35f2ed60e01b815260040160405180910390fd5b5f190192915050565b6123a060405180606001604052805f81526020015f81526020015f81525090565b6107266123ad8484612627565b83612550565b6005545f9081908381106123cc575f92508391506123e5565b6123d68486612f07565b92506123e28184612e5f565b91505b509250929050565b5f816123f98585612e72565b6124039190612f07565b828561240f8289612e5f565b6124199190612e72565b6124239190612f07565b111595945050505050565b5f5f80516020612f968339815191526124478484610c88565b6124c6575f848152602082815260408083206001600160a01b03871684529091529020805460ff1916600117905561247c3390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001915050610691565b5f915050610691565b5f610726836001600160a01b038416612a2d565b5f6106916001600160401b037f00000000000000000000000000000000000000000000000000000000000000201683612f1a565b5f6001600160401b0382111561254c57604080516306dfcc6560e41b8152600481019190915260248101839052604401611ae0565b5090565b61257160405180606001604052805f81526020015f81526020015f81525090565b5f61257c8484612688565b90505f61258882612a79565b90505f7f000000000000000000000000000000000000000000000000000000000000002085602001516125bb9190612f2d565b6125ce906001600160401b031683612e5f565b905060405180606001604052808781526020016001846125ee9190612e72565b6001600160401b031681526020015f612608600185612e72565b6126129190612e72565b6001600160401b031690529695505050505050565b5f8061263284611250565b83519091506001600160401b03168110156126605760405163668441f560e11b815260040160405180910390fd5b602083015183516001600160401b039182169161267e911683612e72565b610c809190612f1a565b5f81602001516001600160401b0316836126a29190612ec5565b825161072691906001600160401b0316612e5f565b5f5f80516020612f968339815191526126d08484610c88565b156124c6575f848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a46001915050610691565b5f610726836001600160a01b038416612aad565b5f825f01828154811061275957612759612e37565b905f5260205f200154905092915050565b604080516060810182525f80546001600160401b038082168452600160401b820481166020850152600160801b90910416928201929092524291906127b090839061237f565b905080604001516127c08361179f565b11156127cb57505050565b80602001516127d8611419565b106127e257505050565b5f805f6127f3846020015187611713565b9250925092505f82126128115761280c84848484612861565b6122fd565b6122fd84612942565b60085460408051635be2042560e01b815290515f926001600160a01b031691635be204259160048083019260209291908290030181865afa158015611460573d5f803e3d5ffd5b6020840151600454600160401b90046001600160401b03161415806128985750600454600160801b90046001600160401b03168214155b1561075d576020840151600480546001600160401b03858116600160801b0267ffffffffffffffff60801b19918516600160401b029190911677ffffffffffffffffffffffffffffffff000000000000000019909216919091171790556040517f2b6bc782c916fa763822f1e50c6db0f95dade36d6541a8a4cbe070735b8b226d906129309086908590918252602082015260400190565b60405180910390a261075d84846129ae565b6020810151600454600160401b90046001600160401b031603610d5457600480546fffffffffffffffff00000000000000001916905560208101516040517fde3f4ea5aa67881831e8fad2b0855d47e75aa63a2fae6ef657ffd5f856c4a613905f90a2610d5481612b87565b600854602083015160408401516001600160a01b039092169163063f36ad9184916129d890612be7565b6040516001600160e01b031960e086901b1681526004810193909352602483019190915260448201526064015f604051808303815f87803b158015612a1b575f80fd5b505af11580156122fd573d5f803e3d5ffd5b5f818152600183016020526040812054612a7257508154600181810184555f848152602080822090930184905584548482528286019093526040902091909155610691565b505f610691565b5f6106916001600160401b037f00000000000000000000000000000000000000000000000000000000000000201683612ec5565b5f81815260018301602052604081205480156124c6575f612acf600183612e72565b85549091505f90612ae290600190612e72565b9050808214612b41575f865f018281548110612b0057612b00612e37565b905f5260205f200154905080875f018481548110612b2057612b20612e37565b5f918252602080832090910192909255918252600188019052604090208390555b8554869080612b5257612b52612e99565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f905560019350505050610691565b600854602082015160405163d438121760e01b81526001600160a01b039092169163d438121791612bbe9160040190815260200190565b5f604051808303815f87803b158015612bd5575f80fd5b505af1158015610a26573d5f803e3d5ffd5b5f612c1b6001600160401b037f000000000000000000000000000000000000000000000000000000000000000c1683612ec5565b610691906001600160401b037f0000000000000000000000000000000000000000000000000000000067d8111816612e5f565b5f60208284031215612c5e575f80fd5b81356001600160e01b031981168114610726575f80fd5b80356001600160a01b0381168114612c8b575f80fd5b919050565b5f8060408385031215612ca1575f80fd5b612caa83612c75565b946020939093013593505050565b5f60208284031215612cc8575f80fd5b61072682612c75565b5f60208284031215612ce1575f80fd5b5035919050565b5f8060408385031215612cf9575f80fd5b82359150612d0960208401612c75565b90509250929050565b5f815180845260208085019450602084015f5b83811015612d4157815187529582019590820190600101612d25565b509495945050505050565b604080825283519082018190525f906020906060840190828701845b82811015612d8457815184529284019290840190600101612d68565b50505083810360208501526111f18186612d12565b5f8060408385031215612daa575f80fd5b50508035926020909101359150565b604080825283519082018190525f906020906060840190828701845b82811015612d845781516001600160a01b031684529284019290840190600101612dd5565b5f805f60608486031215612e0c575f80fd5b505081359360208301359350604090920135919050565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b8082018082111561069157610691612e4b565b8181038181111561069157610691612e4b565b634e487b7160e01b5f52600160045260245ffd5b634e487b7160e01b5f52603160045260245ffd5b5f6001600160401b0382168061237657612376612e4b565b808202811582820484141761069157610691612e4b565b5f60208284031215612eec575f80fd5b5051919050565b634e487b7160e01b5f52601260045260245ffd5b5f82612f1557612f15612ef3565b500690565b5f82612f2857612f28612ef3565b500490565b6001600160401b03818116838216028082169190828114612f5057612f50612e4b565b505092915050565b5f6001600160401b03808316818103612f7357612f73612e4b565b6001019392505050565b5f60018201612f8e57612f8e612e4b565b506001019056fe02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800a164736f6c6343000818000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000067d81118000000000000000000000000000000000000000000000000000000000000062700000000000000000000000000000000000000000000000000000000000000000000000000000000000000008c92472e51efcf126f5bdbc39d7023b95c746c95000000000000000000000000e7314f561b2e72f9543f1004e741bab6fc51028b
-----Decoded View---------------
Arg [0] : slotsPerEpoch (uint256): 32
Arg [1] : secondsPerSlot (uint256): 12
Arg [2] : genesisTime (uint256): 1742213400
Arg [3] : epochsPerFrame (uint256): 1575
Arg [4] : fastLaneLengthSlots (uint256): 0
Arg [5] : admin (address): 0x8C92472e51EFCf126f5BdbC39d7023B95c746c95
Arg [6] : reportProcessor (address): 0xe7314f561B2e72f9543F1004e741bab6Fc51028B
-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [1] : 000000000000000000000000000000000000000000000000000000000000000c
Arg [2] : 0000000000000000000000000000000000000000000000000000000067d81118
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000627
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [5] : 0000000000000000000000008c92472e51efcf126f5bdbc39d7023b95c746c95
Arg [6] : 000000000000000000000000e7314f561b2e72f9543f1004e741bab6fc51028b
Deployed Bytecode Sourcemap
1604:41308:10:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1695:212:1;;;;;;:::i;:::-;;:::i;:::-;;;470:14:13;;463:22;445:41;;433:2;418:18;1695:212:1;;;;;;;;4288:96:10;;4347:37;4288:96;;;;;643:25:13;;;631:2;616:18;4288:96:10;497:177:13;17507:168:10;;;;;;:::i;:::-;;:::i;:::-;;13619:103;;;;;;:::i;:::-;;:::i;15665:283::-;;;;;;:::i;:::-;;:::i;4532:104::-;;4595:41;4532:104;;4759:191:0;;;;;;:::i;:::-;4824:7;4919:14;;;-1:-1:-1;;;;;;;;;;;4919:14:0;;;;;:24;;;;4759:191;5246:136;;;;;;:::i;:::-;;:::i;19563:636:10:-;;;:::i;:::-;;;;;;;;:::i;11962:629::-;;;;;;:::i;:::-;;:::i;12833:649::-;;;;;;:::i;:::-;;:::i;6348:245:0:-;;;;;;:::i;:::-;;:::i;16493:223:10:-;;;:::i;:::-;;;;;;;;:::i;9750:264::-;;-1:-1:-1;;;;;9959:15:10;9951:56;;;9976:16;9951:56;;;9994:12;9951:56;;9750:264;;;;;4537:25:13;;;4593:2;4578:18;;4571:34;;;;4621:18;;;4614:34;4525:2;4510:18;9750:264:10;4335:319:13;11682:111:10;;;:::i;4024:92::-;;4081:35;4024:92;;21578:1414;;;;;;:::i;:::-;;:::i;:::-;;;;;;5009:4:13;5051:3;5040:9;5036:19;5028:27;;5088:6;5082:13;5071:9;5064:32;5152:4;5144:6;5140:17;5134:24;5127:4;5116:9;5112:20;5105:54;5229:4;5221:6;5217:17;5211:24;5204:32;5197:40;5190:4;5179:9;5175:20;5168:70;5308:4;5300:6;5296:17;5290:24;5283:32;5276:40;5269:4;5258:9;5254:20;5247:70;5387:4;5379:6;5375:17;5369:24;5362:32;5355:40;5348:4;5337:9;5333:20;5326:70;5452:4;5444:6;5440:17;5434:24;5427:4;5416:9;5412:20;5405:54;5515:4;5507:6;5503:17;5497:24;5490:4;5479:9;5475:20;5468:54;4841:687;;;;;18277:102:10;18356:16;;-1:-1:-1;;;;;18356:16:10;18277:102;;;-1:-1:-1;;;;;5697:55:13;;;5679:74;;5667:2;5652:18;18277:102:10;5533:226:13;10323:390:10;10531:40;;;;;;;;-1:-1:-1;10531:40:10;-1:-1:-1;;;;;10531:40:10;;;;;;-1:-1:-1;;;10531:40:10;;;;;;;;;;-1:-1:-1;;;10531:40:10;;;;;;;;;;;;;;10323:390;;11268:266;;;:::i;:::-;;;;5938:25:13;;;5994:2;5979:18;;5972:34;;;;5911:18;11268:266:10;5764:248:13;2492:233:1;;;;;;:::i;:::-;;:::i;3732:207:0:-;;;;;;:::i;:::-;;:::i;17339:162:10:-;;;;;;:::i;:::-;;:::i;17149:184::-;;;;;;:::i;:::-;;:::i;16089:216::-;;;:::i;3695:108::-;;3760:43;3695:108;;2317:49:0;;2362:4;2317:49;;18046:183:10;;;:::i;17771:178::-;;;;;;:::i;:::-;;:::i;17681:84::-;17751:7;;17681:84;;2893:222:1;;;;;;:::i;:::-;;:::i;5662:138:0:-;;;;;;:::i;:::-;;:::i;23596:179:10:-;;;;;;:::i;:::-;;:::i;18385:162::-;;;;;;:::i;:::-;;:::i;19073:386::-;;;:::i;:::-;;;;6787:25:13;;;6843:2;6828:18;;6821:34;;;;6898:14;6891:22;6871:18;;;6864:50;6775:2;6760:18;19073:386:10;6591:329:13;4774:104:10;;4837:41;4774:104;;1695:212:1;1780:4;-1:-1:-1;;;;;;1803:57:1;;-1:-1:-1;;;1803:57:1;;:97;;;1864:36;1888:11;1864:23;:36::i;:::-;1796:104;1695:212;-1:-1:-1;;1695:212:1:o;17507:168:10:-;3760:43;3191:16:0;3202:4;3191:10;:16::i;:::-;17641:27:10::1;17655:4;17661:6;17641:13;:27::i;:::-;17507:168:::0;;;:::o;13619:103::-;-1:-1:-1;;;;;28349:22:10;;13677:4;28349:22;;;:16;:22;;;;;;:27;;13700:15;28270:113;15665:283;-1:-1:-1;;;;;15765:22:10;;15731:4;15765:22;;;:16;:22;;;;;;15844:11;;;;;:87;;;15875:56;15903:1;15893:7;:11;15906:18;:16;:18::i;:::-;:24;15875:17;:56::i;:::-;15821:110;15665:283;-1:-1:-1;;;15665:283:10:o;5246:136:0:-;4824:7;4919:14;;;-1:-1:-1;;;;;;;;;;;4919:14:0;;;;;:24;;;3191:16;3202:4;3191:10;:16::i;:::-;5350:25:::1;5361:4;5367:7;5350:10;:25::i;:::-;;5246:136:::0;;;:::o;19563:636:10:-;19639:25;19666:24;19747:18;:16;:18::i;:::-;:26;;;19710:15;:33;-1:-1:-1;;;;;19710:33:10;:63;19706:120;;19563:636;;:::o;19706:120::-;19861:21;;;-1:-1:-1;;;;;19903:29:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;19903:29:10;;19892:40;;19966:14;-1:-1:-1;;;;;19952:29:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;19952:29:10;;19942:39;;19997:9;19992:201;20016:14;20012:1;:18;19992:201;;;20051:28;20082:18;;;:15;:18;;;;;;;;;20051:49;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;20051:49:10;;;;;;;;20114:11;;:8;;20098:1;;20114:11;;;;;;:::i;:::-;;;;;;:26;;;;;20167:7;:15;;;-1:-1:-1;;;;;20154:28:10;:7;20162:1;20154:10;;;;;;;;:::i;:::-;;;;;;;;;;:28;-1:-1:-1;20032:3:10;;19992:201;;;;19696:503;19563:636;;:::o;11962:629::-;2362:4:0;3191:16;2362:4;3191:10;:16::i;:::-;12074:44:10::1;::::0;;::::1;::::0;::::1;::::0;;-1:-1:-1;12074:44:10;-1:-1:-1;;;;;12074:44:10;;::::1;::::0;;;-1:-1:-1;;;12074:44:10;::::1;::::0;::::1;;::::0;::::1;::::0;-1:-1:-1;;;12074:44:10;;::::1;;::::0;;;;;;;;12133:36:::1;28152:15:::0;12133:24:::1;:36::i;:::-;:63;12129:129;;12219:28;;-1:-1:-1::0;;;12219:28:10::1;;;;;;;;;;;12129:129;12268:158;12297:12;12323:10;:25;;;-1:-1:-1::0;;;;;12268:158:10::1;12362:10;:30;;;-1:-1:-1::0;;;;;12268:158:10::1;12406:10;12268:15;:158::i;:::-;12470:27;:25;:27::i;:::-;12441:18;:16;:18::i;:::-;:26;;;:56;12437:148;;;12520:54;;-1:-1:-1::0;;;12520:54:10::1;;;;;;;;;;;12833:649:::0;4347:37;3191:16:0;3202:4;3191:10;:16::i;:::-;13235:82:10::1;::::0;;::::1;::::0;::::1;::::0;;13162:17:::1;13235:82:::0;;-1:-1:-1;;;;;13235:82:10;;::::1;::::0;;-1:-1:-1;;;13235:82:10;::::1;::::0;::::1;;::::0;::::1;::::0;-1:-1:-1;;;13235:82:10;;::::1;;::::0;;;;;;;28152:15;;13162:17;13235:82:::1;::::0;28152:15;;13235:23:::1;:82::i;:::-;13327:148;::::0;;::::1;::::0;::::1;::::0;;13453:12:::1;13327:148:::0;-1:-1:-1;;;;;13327:148:10;;::::1;::::0;;-1:-1:-1;;;13327:148:10;::::1;::::0;::::1;;::::0;::::1;::::0;-1:-1:-1;;;13327:148:10;;::::1;;::::0;;;;;;;13202:115;;-1:-1:-1;13327:148:10::1;::::0;13202:115;;13392:14;;13420:19;;13327:15:::1;:148::i;:::-;12976:506;;12833:649:::0;;;:::o;6348:245:0:-;-1:-1:-1;;;;;6441:34:0;;966:10:3;6441:34:0;6437:102;;6498:30;;-1:-1:-1;;;6498:30:0;;;;;;;;;;;6437:102;6549:37;6561:4;6567:18;6549:11;:37::i;16493:223:10:-;16583:26;16623:37;16692:17;16704:4;16692:11;:17::i;:::-;16685:24;;;;16493:223;;:::o;11682:111::-;11734:7;11760:18;:16;:18::i;:::-;:26;;;11753:33;;11682:111;:::o;21578:1414::-;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21741:18:10;:16;:18::i;:::-;21798:13;;;;;21769:42;;21897:13;21924:7;;21711:48;;-1:-1:-1;21864:77:10;;:19;:77::i;:::-;-1:-1:-1;;21822:34:10;;;;21821:120;;;;-1:-1:-1;;;;;21968:22:10;;21952:13;21968:22;;;:16;:22;;;;;;;;;22018:10;;;;22000:15;;;:28;;;;21968:22;22039:947;;22097:7;;;;;;22154:30;22187:13;22201:5;22187:20;;;;;;;;:::i;:::-;;;;;;;;;;22154:53;;;;;;;;;22187:20;;22154:53;-1:-1:-1;;;;;22154:53:10;;;;;;-1:-1:-1;;;22154:53:10;;;;;;;;22222:30;;;:62;;;22382:13;;;;22154:53;;-1:-1:-1;22332:63:10;:166;;5067:1;22332:166;;;22430:34;;;;;-1:-1:-1;;;;;22414:51:10;;;;;:15;:51;;;;;;:56;22332:166;22298:31;;;:200;22513:12;22528:35;28152:15;22528:23;:35::i;:::-;22513:50;;22621:5;:34;;;22613:4;:42;;:105;;;;;22691:27;:25;:27::i;:::-;22675:5;:13;;;:43;22613:105;22578:140;;:16;;;:140;22778:11;;22753:37;;22771:5;;22753:17;:37::i;:::-;22733:57;;;:17;;;:57;;;22809:38;;;22831:6;:16;;;22809:38;22805:171;;;22929:12;:32;22913:13;;;;:48;;-1:-1:-1;;;22929:32:10;;-1:-1:-1;;;;;22929:32:10;;22913:48;:::i;:::-;22906:55;;22867:16;;;:94;22805:171;22055:931;;22039:947;21701:1291;;21578:1414;;;:::o;11268:266::-;11342:15;11359:36;11411:27;11441:18;:16;:18::i;:::-;11411:48;;11477:5;:13;;;11492:5;:34;;;11469:58;;;;;11268:266;;:::o;2492:233:1:-;2573:7;2688:20;;;1403:38;2688:20;;;;;;;:30;;2712:5;2688:23;:30::i;:::-;2681:37;2492:233;-1:-1:-1;;;;2492:233:1:o;3732:207:0:-;3809:4;3901:14;;;-1:-1:-1;;;;;;;;;;;3901:14:0;;;;;;;;-1:-1:-1;;;;;3901:31:0;;;;;;;;;;;;;;;3732:207::o;17339:162:10:-;3760:43;3191:16:0;3202:4;3191:10;:16::i;:::-;17470:24:10::1;17481:4;17487:6;17470:10;:24::i;17149:184::-:0;4595:41;3191:16:0;3202:4;3191:10;:16::i;:::-;17282:44:10::1;17306:19;17282:23;:44::i;:::-;17149:184:::0;;:::o;16089:216::-;16171:26;16211:37;16280:18;16292:5;16280:11;:18::i;18046:183::-;18201:13;:20;18153:69;;-1:-1:-1;;4998:17:10;18153:27;:69::i;:::-;18046:183::o;17771:178::-;17921:13;:20;17885:57;;17913:6;;17885:27;:57::i;:::-;17771:178;:::o;2893:222:1:-;2964:7;3079:20;;;1403:38;3079:20;;;;;;;:29;;:27;:29::i;5662:138:0:-;4824:7;4919:14;;;-1:-1:-1;;;;;;;;;;;4919:14:0;;;;;:24;;;3191:16;3202:4;3191:10;:16::i;:::-;5767:26:::1;5779:4;5785:7;5767:11;:26::i;23596:179:10:-:0;23723:45;23737:4;23743:6;23751:16;23723:13;:45::i;18385:162::-;4837:41;3191:16:0;3202:4;3191:10;:16::i;:::-;18507:33:10::1;18527:12;18507:19;:33::i;19073:386::-:0;19162:15;19191:23;19228;19286:18;:16;:18::i;:::-;:26;;;19276:36;;19346:37;19366:7;19375;;19346:19;:37::i;:::-;-1:-1:-1;19322:61:10;;-1:-1:-1;19445:7:10;;-1:-1:-1;19414:27:10;:25;:27::i;:::-;:38;19393:59;;19073:386;;;:::o;3443:202:0:-;3528:4;-1:-1:-1;;;;;;3551:47:0;;-1:-1:-1;;;3551:47:0;;:87;;-1:-1:-1;;;;;;;;;;1133:40:4;;;3602:36:0;1034:146:4;4148:103:0;4214:30;4225:4;966:10:3;4214::0;:30::i;29166:1378:10:-;29238:13;29254:21;29270:4;29254:15;:21::i;:::-;29334:1;29311:20;;29238:37;;-1:-1:-1;29285:23:10;;29311:24;;29334:1;29311:24;:::i;:::-;29285:50;;29362:15;29353:5;:24;;29346:32;;;;:::i;:::-;29388:30;29421:13;29435:5;29421:20;;;;;;;;:::i;:::-;;;;;;;;;;29388:53;;;;;;;;;29421:20;;29388:53;-1:-1:-1;;;;;29388:53:10;;;;;-1:-1:-1;;;29388:53:10;;;;;;;;;;;;-1:-1:-1;29456:24:10;;;29452:280;;29496:18;29517:16;29534:15;29517:33;;;;;;;;:::i;:::-;;;;;;;;;;;29564:16;:23;;-1:-1:-1;;;;;29517:33:10;;;;-1:-1:-1;29517:33:10;;29581:5;;29564:23;;;;;;:::i;:::-;;;;;;;;;:36;;;;;-1:-1:-1;;;;;29564:36:10;;;;;-1:-1:-1;;;;;29564:36:10;;;;;;29637:13;29651:15;29637:30;;;;;;;;:::i;:::-;;;;;;;;29614:13;29628:5;29614:20;;;;;;;;:::i;:::-;;;;;;;;;:53;;:20;;:53;;-1:-1:-1;;;;;29614:53:10;;;-1:-1:-1;;29614:53:10;;;;;;;;-1:-1:-1;;;;;;29614:53:10;;;;;;-1:-1:-1;;;29614:53:10;;;;;;;;;;;;;29712:9;:5;-1:-1:-1;29712:9:10;:::i;:::-;-1:-1:-1;;;;;29681:28:10;;;;;;;:16;:28;;;;;:40;29452:280;29742:13;:19;;;;;;;:::i;:::-;;;;;;;;;;-1:-1:-1;;29742:19:10;;;;;-1:-1:-1;;;;;;29742:19:10;;;;;;29771:16;:22;;;;;;;:::i;:::-;;;;;;;;;-1:-1:-1;;29771:22:10;;;;;;;-1:-1:-1;;;;;;29771:22:10;;;;;;;;;-1:-1:-1;;;;;29803:22:10;;;;;:16;:22;;;;;;:26;;;;29845:44;;5938:25:13;;;5979:18;;;5972:34;;;29803:22:10;29845:44;;5911:18:13;29845:44:10;;;;;;;29904:29;;-1:-1:-1;;;;;29904:33:10;;29900:575;;29998:27;30028:18;:16;:18::i;:::-;29998:48;;30115:5;:13;;;30082:11;:29;;;-1:-1:-1;;;;;30082:46:10;;:109;;;;;30178:5;:13;;;30148:27;:25;:27::i;:::-;:43;30082:109;30061:404;;;30407:34;;;;;-1:-1:-1;;;;;30391:51:10;;;;;;;:15;:51;;;;;;:59;;30389:61;;30391:59;;:51;30389:61;;;;:::i;:::-;;;;;;;;-1:-1:-1;;;;;30389:61:10;;;;;-1:-1:-1;;;;;30389:61:10;;;;;;30061:404;29939:536;29900:575;30485:52;30513:6;30521:15;30485:27;:52::i;24743:144::-;24794:21;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;24794:21:10;24834:46;28152:15;24834:46;;;;;;;;24867:12;24834:46;-1:-1:-1;;;;;24834:46:10;;;;;-1:-1:-1;;;24834:46:10;;;;;;;;-1:-1:-1;;;24834:46:10;;;;;;;;;;;:20;:46::i;:::-;24827:53;;24743:144;:::o;31767:559::-;31913:13;:20;31874:4;;;;31983:78;32015:10;31913:20;31983:18;:78::i;:::-;31943:118;;;;32103:11;32118:1;32103:16;;:205;;;;;32139:169;32186:5;32213:6;32255:1;32241:11;:15;32278:12;32139:25;:169::i;:::-;32095:214;31767:559;-1:-1:-1;;;;;;31767:559:10:o;3217:348:1:-;3303:4;1403:38;3303:4;3423:31;3440:4;3446:7;3423:16;:31::i;:::-;3408:46;;3468:7;3464:71;;;3491:14;:20;;;;;;;;;;:33;;3516:7;3491:24;:33::i;:::-;;3551:7;3217:348;-1:-1:-1;;;;3217:348:1:o;27625:178:10:-;27715:7;27741:55;27761:34;27785:9;27761:23;:34::i;:::-;27741:19;:55::i;23827:910::-;24019:14;24037:1;24019:19;24015:60;;24047:28;;-1:-1:-1;;;24047:28:10;;;;;;;;;;;24015:60;24112:32;-1:-1:-1;;;;;24129:15:10;24112:32;:14;:32;:::i;:::-;24090:19;:54;24086:131;;;24167:39;;-1:-1:-1;;;24167:39:10;;;;;;;;;;;24086:131;24242:141;;;;;;;;24267:23;:12;:21;:23::i;:::-;-1:-1:-1;;;;;24242:141:10;;;;;24304:25;:14;:23;:25::i;:::-;-1:-1:-1;;;;;24242:141:10;;;;;24343:30;:19;:28;:30::i;:::-;-1:-1:-1;;;;;24242:141:10;;;;;;24227:156;;:12;:156;;;;;;;;;;;;;-1:-1:-1;;;24227:156:10;-1:-1:-1;;;;24227:156:10;;;-1:-1:-1;;;24227:156:10;-1:-1:-1;;;;;;24227:156:10;;;;;;;;;;;;;;;;;;;24427:23;;24411:39;;;;;:98;;;24484:10;:25;;;-1:-1:-1;;;;;24466:43:10;:14;:43;;24411:98;24394:200;;;24539:44;;;5938:25:13;;;5994:2;5979:18;;5972:34;;;24539:44:10;;5911:18:13;24539:44:10;;;;;;;24394:200;24631:10;:30;;;-1:-1:-1;;;;;24608:53:10;:19;:53;24604:127;;24682:38;;643:25:13;;;24682:38:10;;631:2:13;616:18;24682:38:10;;;;;;;23827:910;;;;:::o;42065:171::-;42185:16;;42163:66;;;-1:-1:-1;;;42163:66:10;;;;42125:7;;-1:-1:-1;;;;;42185:16:10;;42163:64;;:66;;;;;;;;;;;;;;42185:16;42163:66;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;24893:131::-;24944:21;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;24944:21:10;24984:33;;;;;;;;25001:1;24984:33;;-1:-1:-1;;;;;24984:33:10;;;;;-1:-1:-1;;;24984:33:10;;;;;;;;-1:-1:-1;;;24984:33:10;;;;;;;;;;;;;25001:1;24984:16;:33::i;26027:296::-;26151:7;26189:127;26241:37;26260:9;26271:6;26241:18;:37::i;:::-;26296:6;26189:34;:127::i;3668:353:1:-;3755:4;1403:38;3755:4;3875:32;3893:4;3899:7;3875:17;:32::i;:::-;3860:47;;3921:7;3917:74;;;3944:14;:20;;;;;;;;;;:36;;3972:7;3944:27;:36::i;32332:981:10:-;32567:13;:20;32442:26;;;;32544:20;;32643:210;;;;32687:104;32723:18;:16;:18::i;:::-;:24;32765:12;32687:18;:104::i;:::-;32671:120;;-1:-1:-1;32671:120:10;-1:-1:-1;32643:210:10;;;-1:-1:-1;32830:12:10;32643:210;32889:12;32897:4;32889:5;:12;:::i;:::-;-1:-1:-1;;;;;32875:27:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32875:27:10;;32863:39;;32949:9;:16;-1:-1:-1;;;;;32935:31:10;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32935:31:10;-1:-1:-1;32912:54:10;-1:-1:-1;32994:4:10;32977:330;33004:5;33000:1;:9;32977:330;;;33030:17;33050:16;33054:12;33050:1;:16;:::i;:::-;33030:36;;33080:30;33113:13;33127:9;33113:24;;;;;;;;:::i;:::-;;;;;;;;;33080:57;;;;;;;;;33113:24;;33080:57;-1:-1:-1;;;;;33080:57:10;;;;;-1:-1:-1;;;33080:57:10;;;;;;;;;-1:-1:-1;33163:8:10;33167:4;33163:1;:8;:::i;:::-;33151:20;;33200:16;33217:9;33200:27;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;33200:27:10;33185:9;33195:1;33185:12;;;;;;;;:::i;:::-;;;;;;:42;-1:-1:-1;;;;;33185:42:10;;;-1:-1:-1;;;;;33185:42:10;;;;;33267:11;:29;;;-1:-1:-1;;;;;33241:55:10;:20;33262:1;33241:23;;;;;;;;:::i;:::-;;;;;;:55;;;;;33016:291;;;33011:3;;;;;32977:330;;;;32534:779;;;32332:981;;;:::o;39979:892::-;40189:15;:33;40117:14;;;;;;-1:-1:-1;;;;;40189:33:10;:51;;40185:170;;-1:-1:-1;5067:1:10;;-1:-1:-1;;;40338:2:10;-1:-1:-1;5067:1:10;40319:25;;40185:170;-1:-1:-1;;40390:21:10;;40365:22;;-1:-1:-1;;;40436:2:10;40365:22;;;40498:318;40522:14;40518:1;:18;40498:318;;;40557:16;40576:18;;;:15;:18;;;;;:26;;;-1:-1:-1;;;;;40576:26:10;40620:18;;;40616:190;;40709:18;;;;:15;:18;;;;;:23;;-1:-1:-1;40680:1:10;;-1:-1:-1;40760:8:10;-1:-1:-1;40680:1:10;40786:5;;40616:190;-1:-1:-1;40538:3:10;;40498:318;;;;40826:38;39979:892;;;;;;:::o;27213:167::-;27302:7;27357:16;-1:-1:-1;;;;;27328:45:10;27341:12;-1:-1:-1;;;;;27329:24:10;:9;:24;;;;:::i;:::-;27328:45;;;;:::i;9574:156:9:-;9648:7;9698:22;9702:3;9714:5;9698:3;:22::i;28664:496:10:-;-1:-1:-1;;;;;28349:22:10;;28326:4;28349:22;;;:16;:22;;;;;;:27;28733:45;;28761:17;;-1:-1:-1;;;28761:17:10;;;;;;;;;;;28733:45;-1:-1:-1;;;;;28792:18:10;;28788:52;;28819:21;;-1:-1:-1;;;28819:21:10;;;;;;;;;;;28788:52;28870:17;;;;;;;;-1:-1:-1;28870:17:10;;;;;;;;;;28851:13;:37;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;28851:37:10;;;-1:-1:-1;;;28851:37:10;-1:-1:-1;;;;;;28851:37:10;;;;;;;;;;;;;;;;28898:16;:27;;;;;;;;;;;;-1:-1:-1;;;;;28898:27:10;;-1:-1:-1;;;;;;28898:27:10;;;;;;;;28962:20;;28992:22;;;:16;:22;;;;;;;:40;;;29048:42;;;;;;28962:20;;29083:6;;5938:25:13;;;5994:2;5979:18;;5972:34;5926:2;5911:18;;5764:248;29048:42:10;;;;;;;;29101:52;29129:6;29137:15;29101:27;:52::i;30550:523::-;30631:45;;;;;;;;:30;:45;-1:-1:-1;;;;;30631:45:10;;;;;-1:-1:-1;;;30631:45:10;;;;;;;;;;-1:-1:-1;;;30631:45:10;;;;;;;;;;;;30725:44;;30754:15;;30725:44;:::i;:::-;-1:-1:-1;;;;;30703:66:10;:19;:66;30686:165;;;30801:39;;-1:-1:-1;;;30801:39:10;;;;;;;;;;;30686:165;30887:11;:31;;;-1:-1:-1;;;;;30864:54:10;:19;:54;30860:207;;30969:30;:19;:28;:30::i;:::-;30934:12;:65;;-1:-1:-1;;;;;30934:65:10;;;;-1:-1:-1;;;30934:65:10;-1:-1:-1;;;;30934:65:10;;;;;;;;;31018:38;;643:25:13;;;31018:38:10;;631:2:13;616:18;31018:38:10;;;;;;;30621:452;30550:523;:::o;37956:928::-;38086:16;38101:1;38086:12;:16;:::i;:::-;38076:6;:26;38072:108;;38140:16;38155:1;38140:12;:16;:::i;:::-;:20;;38159:1;38140:20;:::i;:::-;38125:44;;-1:-1:-1;;;38125:44:10;;;;;5938:25:13;;;;5979:18;;;5972:34;;;5911:18;;38125:44:10;;;;;;;;38072:108;38391:7;;38412:20;;;38408:341;;38448:198;-1:-1:-1;;38476:6:10;:28;:126;;3760:43;38476:126;;;4081:35;38476:126;966:10:3;4214::0;:30::i;38448:198:10:-;38660:7;:16;;;38695:43;;;4537:25:13;;;4593:2;4578:18;;4571:34;;;4621:18;;;4614:34;;;38695:43:10;;4525:2:13;4510:18;38695:43:10;;;;;;;38408:341;38803:12;:25;-1:-1:-1;;;;;38803:25:10;38763:36;28152:15;12133:24:::1;:36::i;38763:::-:0;:65;38759:119;;38844:23;38860:6;38844:15;:23::i;9117:115:9:-;9180:7;9206:19;9214:3;4556:18;;4474:107;33370:3656:10;33502:4;33510:1;33502:9;33498:35;;33520:13;;-1:-1:-1;;;33520:13:10;;;;;;;;;;;33498:35;-1:-1:-1;;;;;33547:23:10;;33543:53;;;33579:17;;-1:-1:-1;;;33579:17:10;;;;;;;;;;;33543:53;33610:6;33606:45;;33638:13;;-1:-1:-1;;;33638:13:10;;;;;;;;;;;33606:45;33662:19;33684:29;966:10:3;33684:15:10;:29::i;:::-;33662:51;;33723:30;33756:13;33770:11;33756:26;;;;;;;;:::i;:::-;;;;;;;;;33723:59;;;;;;;;;33756:26;;33723:59;-1:-1:-1;;;;;33723:59:10;;;;;-1:-1:-1;;;33723:59:10;;;;;;;;;-1:-1:-1;33828:22:10;:20;:22::i;:::-;33793:57;;33884:24;33864:16;:44;33860:198;;33931:116;;-1:-1:-1;;;33931:116:10;;;;;5938:25:13;;;5979:18;;;5972:34;;;5911:18;;33931:116:10;5764:248:13;33860:198:10;28152:15;34068:17;34130:34;28152:15;34130:23;:34::i;:::-;34174:40;;;;;;;;:25;:40;;-1:-1:-1;;;;;34174:40:10;;;;;-1:-1:-1;;;34174:40:10;;;;;;;;-1:-1:-1;;;34174:40:10;;;;;;;;;;;34108:56;;-1:-1:-1;34254:39:10;34275:9;34174:40;34254:20;:39::i;:::-;34224:69;;34316:5;:13;;;34308:4;:21;34304:47;;34338:13;;-1:-1:-1;;;34338:13:10;;;;;;;;;;;34304:47;34379:5;:34;;;34365:11;:48;34361:86;;;34434:13;;-1:-1:-1;;;34434:13:10;;;;;;;;;;;34361:86;34506:6;:26;;;-1:-1:-1;;;;;34490:42:10;:5;:13;;;:42;;;;:::i;:::-;34475:11;:57;;:117;;;;;34549:43;34567:11;34580:5;:11;;;34549:17;:43::i;:::-;34548:44;34475:117;34458:230;;;34624:53;;-1:-1:-1;;;34624:53:10;;;;;;;;;;;34458:230;34710:27;:25;:27::i;:::-;34702:4;:35;34698:507;;34863:29;;-1:-1:-1;;;;;34855:37:10;;;34851:344;;35008:34;;-1:-1:-1;;;35008:34:10;;;;;;;;;;;34851:344;35174:7;;;;;;;33370:3656;;;:::o;34851:344::-;35252:15;:33;35215:22;;-1:-1:-1;;;;;35252:33:10;:41;;35248:289;;-1:-1:-1;35377:15:10;:48;;-1:-1:-1;;35377:48:10;-1:-1:-1;;;;;35377:48:10;;;;;-1:-1:-1;35248:289:10;;;-1:-1:-1;35505:21:10;;35248:289;35547:15;35576:22;35617:147;35648:14;35637:8;-1:-1:-1;;;;;35637:25:10;;:81;;;;-1:-1:-1;;;;;;35678:25:10;;;;;;:15;:25;;;;;:30;:40;;;35637:81;35617:147;;;35743:10;;;:::i;:::-;;;35617:147;;;35786:29;;-1:-1:-1;;;;;35778:37:10;;;35774:481;;35853:34;;;;-1:-1:-1;;;;;35908:29:10;;;-1:-1:-1;35901:37:10;;;;:::i;:::-;35968:12;-1:-1:-1;;;;;35956:24:10;:8;-1:-1:-1;;;;;35956:24:10;;35952:293;;36007:17;;-1:-1:-1;;;36007:17:10;;;;;;;;;;;35952:293;-1:-1:-1;;;;;36083:29:10;;;36063:15;36083:29;;;:15;:29;;;;;:37;;36081:39;;36063:15;;36083:37;;36063:15;;36081:39;;;;:::i;:::-;;;;;;;;-1:-1:-1;;;;;36081:39:10;;;;;-1:-1:-1;;;;;36081:39:10;;;;;-1:-1:-1;;;;;36063:57:10;;;36163:1;36153:7;;:11;;;;:::i;:::-;36142:7;:22;36138:93;;36208:4;36188:24;;36138:93;36045:200;35817:438;35774:481;36265:15;36306:14;36295:8;-1:-1:-1;;;;;36295:25:10;;36291:326;;;-1:-1:-1;;;;;36348:25:10;;;;;;;:15;:25;;;;;:33;;36346:35;;36348:33;;36346:35;;;;:::i;:::-;;;;;;;;-1:-1:-1;;;;;36346:35:10;;;;;-1:-1:-1;;;;;36346:35:10;;;;;-1:-1:-1;;;;;36336:45:10;;;36291:326;;;-1:-1:-1;36465:87:10;;;;;;;;;;;36422:1;36465:87;;;;;;;-1:-1:-1;;;;;36437:25:10;;;-1:-1:-1;36437:25:10;;;:15;:25;;;;;;;:115;;;;;;;;;;-1:-1:-1;;36437:115:10;;;;;;;;;;;;36590:16;;;:::i;:::-;36566:21;:40;;;36590:16;-1:-1:-1;36291:326:10;36656:114;;;;;;;;36708:4;-1:-1:-1;;;;;36656:114:10;;;;;36751:8;-1:-1:-1;;;;;36656:114:10;;;;36627:13;36641:11;36627:26;;;;;;;;:::i;:::-;;;;;;;;;;:143;;:26;;:143;;;;;;;-1:-1:-1;;;;;36627:143:10;;;-1:-1:-1;;;36627:143:10;-1:-1:-1;;;;;;36627:143:10;;;;;;;;;;;;36807:12;966:10:3;;887:96;36807:12:10;-1:-1:-1;;;;;36786:42:10;36801:4;36786:42;36821:6;36786:42;;;;643:25:13;;631:2;616:18;;497:177;36786:42:10;;;;;;;;36854:7;;36843;:18;36839:181;;36877:51;36895:5;36902:6;36910:8;-1:-1:-1;;;;;36877:51:10;36920:7;36877:17;:51::i;:::-;36839:181;;;36949:17;36945:75;;;36982:27;37003:5;36982:20;:27::i;:::-;33488:3538;;;;;;;;;;;33370:3656;;;:::o;40936:1123::-;41030:16;;-1:-1:-1;;;;;41030:16:10;;;;41060:26;;41056:68;;41095:29;;-1:-1:-1;;;41095:29:10;;;;;;;;;;;41056:68;41154:13;-1:-1:-1;;;;;41138:29:10;:12;-1:-1:-1;;;;;41138:29:10;;41134:71;;41176:29;;-1:-1:-1;;;41176:29:10;;;;;;;;;;;41134:71;41216:16;:31;;-1:-1:-1;;;;;;41216:31:10;-1:-1:-1;;;;;41216:31:10;;;;;;;;;41262:47;;;;;;;;-1:-1:-1;;41262:47:10;41320:27;41350:18;:16;:18::i;:::-;41320:48;;41378:28;41409:15;:36;;;;;;;;;;-1:-1:-1;;;;;41409:36:10;-1:-1:-1;;;;;41378:67:10;;;41456:29;41510:13;-1:-1:-1;;;;;41488:74:10;;:76;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;41456:108;;41574:29;41628:12;-1:-1:-1;;;;;41606:73:10;;:75;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;41574:107;;41733:5;:13;;;41709:21;:37;:90;;;;;41786:5;:13;;;41762:21;:37;41709:90;:143;;;;;41839:5;:13;;;41815:20;:37;41709:143;41692:361;;;41927:15;:41;-1:-1:-1;;;41927:41:10;;-1:-1:-1;;;;;41927:41:10;41877:14;41894:88;;;:15;:88;;;;;:93;42001:41;42028:5;41894:93;42001:26;:41::i;:::-;41863:190;41692:361;40996:1063;;;;;40936:1123;:::o;4381:197:0:-;4469:22;4477:4;4483:7;4469;:22::i;:::-;4464:108;;4514:47;;-1:-1:-1;;;4514:47:0;;-1:-1:-1;;;;;9590:55:13;;4514:47:0;;;9572:74:13;9662:18;;;9655:34;;;9545:18;;4514:47:0;9398:297:13;28389:269:10;-1:-1:-1;;;;;28488:22:10;;28451:7;28488:22;;;:16;:22;;;;;;28524:12;;;28520:61;;28559:11;;-1:-1:-1;;;28559:11:10;;;;;;;;;;;28520:61;-1:-1:-1;;28629:11:10;;28389:269;-1:-1:-1;;28389:269:10:o;25030:231::-;25151:21;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;25151:21:10;25191:63;25208:37;25227:9;25238:6;25208:18;:37::i;:::-;25247:6;25191:16;:63::i;31187:432::-;31371:7;;31302:18;;;;31392:22;;;31388:225;;31443:1;31430:14;;31473:12;31458:27;;31388:225;;;31529:25;31542:12;31529:10;:25;:::i;:::-;31516:38;-1:-1:-1;31583:19:10;31596:6;31516:38;31583:19;:::i;:::-;31568:34;;31388:225;31344:275;31187:432;;;;;:::o;42914:163::-;43025:4;43073:1;43064:5;43068:1;43064;:5;:::i;:::-;43063:11;;;;:::i;:::-;43058:1;43053;43045:5;43058:1;43045;:5;:::i;:::-;:9;;;;:::i;:::-;43044:15;;;;:::i;:::-;:30;;;42914:163;-1:-1:-1;;;;;42914:163:10:o;7270:387:0:-;7347:4;-1:-1:-1;;;;;;;;;;;7437:22:0;7445:4;7451:7;7437;:22::i;:::-;7432:219;;7475:8;:14;;;;;;;;;;;-1:-1:-1;;;;;7475:31:0;;;;;;;;;:38;;-1:-1:-1;;7475:38:0;7509:4;7475:38;;;7559:12;966:10:3;;887:96;7559:12:0;-1:-1:-1;;;;;7532:40:0;7550:7;-1:-1:-1;;;;;7532:40:0;7544:4;7532:40;;;;;;;;;;7593:4;7586:11;;;;;7432:219;7635:5;7628:12;;;;;8316:150:9;8386:4;8409:50;8414:3;-1:-1:-1;;;;;8434:23:9;;8409:4;:50::i;27386:233:10:-;27452:7;27590:22;-1:-1:-1;;;;;27597:15:10;27590:22;:4;:22;:::i;13291:213:8:-;13347:6;-1:-1:-1;;;;;13369:24:8;;13365:103;;;13447:2;13416:41;;-1:-1:-1;;;13416:41:8;;;;;9881:36:13;;;;9933:18;;;9926:34;;;9854:18;;13416:41:8;9700:266:13;13365:103:8;-1:-1:-1;13491:5:8;13291:213::o;25267:754:10:-;25385:21;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;25385:21:10;25418:23;25444:88;25492:10;25516:6;25444:34;:88::i;:::-;25418:114;;25542:22;25567:41;25592:15;25567:24;:41::i;:::-;25542:66;;25618:26;25712:15;25676:6;:21;;;:51;;;;:::i;:::-;25647:80;;-1:-1:-1;;;;;25647:80:10;:14;:80;:::i;:::-;25618:109;;25757:257;;;;;;;;25797:10;25757:257;;;;25858:1;25841:14;:18;;;;:::i;:::-;-1:-1:-1;;;;;25757:257:10;;;;;5504:1;25936:22;25957:1;25936:18;:22;:::i;:::-;:45;;;;:::i;:::-;-1:-1:-1;;;;;25757:257:10;;;25738:276;25267:754;-1:-1:-1;;;;;;25267:754:10:o;26560:367::-;26679:7;26698:13;26714:35;26739:9;26714:24;:35::i;:::-;26771:19;;26698:51;;-1:-1:-1;;;;;;26763:27:10;;;26759:92;;;26813:27;;-1:-1:-1;;;26813:27:10;;;;;;;;;;;26759:92;26899:21;;;;26876:19;;-1:-1:-1;;;;;26867:53:10;;;;26868:27;;;:5;:27;:::i;:::-;26867:53;;;;:::i;26329:225::-;26465:7;26526:6;:21;;;-1:-1:-1;;;;;26513:34:10;:10;:34;;;;:::i;:::-;26491:19;;:56;;;-1:-1:-1;;;;;26491:56:10;;:::i;7892:388:0:-;7970:4;-1:-1:-1;;;;;;;;;;;8059:22:0;8067:4;8073:7;8059;:22::i;:::-;8055:219;;;8131:5;8097:14;;;;;;;;;;;-1:-1:-1;;;;;8097:31:0;;;;;;;;;;:39;;-1:-1:-1;;8097:39:0;;;8155:40;966:10:3;;8097:14:0;;8155:40;;8131:5;8155:40;8216:4;8209:11;;;;;8634:156:9;8707:4;8730:53;8738:3;-1:-1:-1;;;;;8758:23:9;;8730:7;:53::i;4923:118::-;4990:7;5016:3;:11;;5028:5;5016:18;;;;;;;;:::i;:::-;;;;;;;;;5009:25;;4923:118;;;;:::o;38890:1083:10:-;39020:79;;;;;;;;38950:17;39020:79;;-1:-1:-1;;;;;39020:79:10;;;;;-1:-1:-1;;;39020:79:10;;;;;;;;-1:-1:-1;;;39020:79:10;;;;;;;;;;;28152:15;;38950:17;39020:79;;28152:15;;39020:20;:79::i;:::-;38990:109;;39176:5;:34;;;39127;39151:9;39127:23;:34::i;:::-;:83;39110:220;;;39313:7;;38890:1083;:::o;39110:220::-;39375:5;:13;;;39344:27;:25;:27::i;:::-;:44;39340:168;;39491:7;;38890:1083;:::o;39340:168::-;39532:23;39569:28;39611:15;39639:42;39659:5;:13;;;39674:6;39639:19;:42::i;:::-;39518:163;;;;;;39721:1;39696:21;:26;39692:275;;39738:160;39773:5;39796:15;39837:21;39877:7;39738:17;:160::i;:::-;39692:275;;;39929:27;39950:5;39929:20;:27::i;42761:149::-;42864:16;;42842:61;;;-1:-1:-1;;;42842:61:10;;;;42816:7;;-1:-1:-1;;;;;42864:16:10;;42842:59;;:61;;;;;;;;;;;;;;42864:16;42842:61;;;;;;;;;;;;;;37032:613;37257:13;;;;37217:15;:36;-1:-1:-1;;;37217:36:10;;-1:-1:-1;;;;;37217:36:10;:53;;;:126;;-1:-1:-1;37286:15:10;:41;-1:-1:-1;;;37286:41:10;;-1:-1:-1;;;;;37286:41:10;:57;;;37217:126;37200:439;;;37414:13;;;;37368:15;:60;;-1:-1:-1;;;;;37442:64:10;;;-1:-1:-1;;;37442:64:10;-1:-1:-1;;;;37368:60:10;;;-1:-1:-1;;;37368:60:10;37442:64;;;;-1:-1:-1;;37442:64:10;;;;;;;;;;37525:48;;;;;;37557:6;;37565:7;;5938:25:13;;;5994:2;5979:18;;5972:34;5926:2;5911:18;;5764:248;37525:48:10;;;;;;;;37587:41;37614:5;37621:6;37587:26;:41::i;37651:299::-;37773:13;;;;37733:15;:36;-1:-1:-1;;;37733:36:10;;-1:-1:-1;;;;;37733:36:10;:53;37729:215;;37802:15;:40;;-1:-1:-1;;37802:40:10;;;37875:13;;;;37861:28;;;;37841:1;;37861:28;37903:30;37927:5;37903:23;:30::i;42242:320::-;42386:16;;42459:13;;;;42510:34;;;;-1:-1:-1;;;;;42386:16:10;;;;42364:61;;42439:6;;42486:59;;:23;:59::i;:::-;42364:191;;-1:-1:-1;;;;;;42364:191:10;;;;;;;;;;4537:25:13;;;;4578:18;;;4571:34;;;;4621:18;;;4614:34;4510:18;;42364:191:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2241:406:9;2304:4;4360:21;;;:14;;;:21;;;;;;2320:321;;-1:-1:-1;2362:23:9;;;;;;;;:11;:23;;;;;;;;;;;;;2544:18;;2520:21;;;:14;;;:21;;;;;;:42;;;;2576:11;;2320:321;-1:-1:-1;2625:5:9;2618:12;;27809:260:10;27895:7;28039:23;-1:-1:-1;;;;;28047:15:10;28039:23;:5;:23;:::i;2815:1368:9:-;2881:4;3010:21;;;:14;;;:21;;;;;;3046:13;;3042:1135;;3413:18;3434:12;3445:1;3434:8;:12;:::i;:::-;3480:18;;3413:33;;-1:-1:-1;3460:17:9;;3480:22;;3501:1;;3480:22;:::i;:::-;3460:42;;3535:9;3521:10;:23;3517:378;;3564:17;3584:3;:11;;3596:9;3584:22;;;;;;;;:::i;:::-;;;;;;;;;3564:42;;3731:9;3705:3;:11;;3717:10;3705:23;;;;;;;;:::i;:::-;;;;;;;;;;;;:35;;;;3844:25;;;:14;;;:25;;;;;:36;;;3517:378;3973:17;;:3;;:17;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;4076:3;:14;;:21;4091:5;4076:21;;;;;;;;;;;4069:28;;;4119:4;4112:11;;;;;;;42568:187:10;42671:16;;42725:13;;;;42649:99;;-1:-1:-1;;;42649:99:10;;-1:-1:-1;;;;;42671:16:10;;;;42649:62;;:99;;;;643:25:13;;;631:2;616:18;;497:177;42649:99:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26933:274;27017:7;27177:23;-1:-1:-1;;;;;27184:16:10;27177:23;:4;:23;:::i;:::-;27162:38;;-1:-1:-1;;;;;27162:12:10;:38;;:::i;14:286:13:-;72:6;125:2;113:9;104:7;100:23;96:32;93:52;;;141:1;138;131:12;93:52;167:23;;-1:-1:-1;;;;;;219:32:13;;209:43;;199:71;;266:1;263;256:12;679:196;747:20;;-1:-1:-1;;;;;796:54:13;;786:65;;776:93;;865:1;862;855:12;776:93;679:196;;;:::o;880:254::-;948:6;956;1009:2;997:9;988:7;984:23;980:32;977:52;;;1025:1;1022;1015:12;977:52;1048:29;1067:9;1048:29;:::i;:::-;1038:39;1124:2;1109:18;;;;1096:32;;-1:-1:-1;;;880:254:13:o;1139:186::-;1198:6;1251:2;1239:9;1230:7;1226:23;1222:32;1219:52;;;1267:1;1264;1257:12;1219:52;1290:29;1309:9;1290:29;:::i;1330:180::-;1389:6;1442:2;1430:9;1421:7;1417:23;1413:32;1410:52;;;1458:1;1455;1448:12;1410:52;-1:-1:-1;1481:23:13;;1330:180;-1:-1:-1;1330:180:13:o;1515:254::-;1583:6;1591;1644:2;1632:9;1623:7;1619:23;1615:32;1612:52;;;1660:1;1657;1650:12;1612:52;1696:9;1683:23;1673:33;;1725:38;1759:2;1748:9;1744:18;1725:38;:::i;:::-;1715:48;;1515:254;;;;;:::o;1774:439::-;1827:3;1865:5;1859:12;1892:6;1887:3;1880:19;1918:4;1947;1942:3;1938:14;1931:21;;1986:4;1979:5;1975:16;2009:1;2019:169;2033:6;2030:1;2027:13;2019:169;;;2094:13;;2082:26;;2128:12;;;;2163:15;;;;2055:1;2048:9;2019:169;;;-1:-1:-1;2204:3:13;;1774:439;-1:-1:-1;;;;;1774:439:13:o;2218:810::-;2486:2;2498:21;;;2568:13;;2471:18;;;2590:22;;;2438:4;;2665;;2643:2;2628:18;;;2692:17;;;2438:4;2737:169;2751:6;2748:1;2745:13;2737:169;;;2812:13;;2800:26;;2846:12;;;;2881:15;;;;2773:1;2766:9;2737:169;;;2741:3;;;2953:9;2948:3;2944:19;2937:4;2926:9;2922:20;2915:49;2981:41;3018:3;3010:6;2981:41;:::i;3218:248::-;3286:6;3294;3347:2;3335:9;3326:7;3322:23;3318:32;3315:52;;;3363:1;3360;3353:12;3315:52;-1:-1:-1;;3386:23:13;;;3456:2;3441:18;;;3428:32;;-1:-1:-1;3218:248:13:o;3471:859::-;3739:2;3751:21;;;3821:13;;3724:18;;;3843:22;;;3691:4;;3918;;3896:2;3881:18;;;3945:17;;;3691:4;3990:218;4004:6;4001:1;3998:13;3990:218;;;4069:13;;-1:-1:-1;;;;;4065:62:13;4053:75;;4148:12;;;;4183:15;;;;4026:1;4019:9;3990:218;;6270:316;6347:6;6355;6363;6416:2;6404:9;6395:7;6391:23;6387:32;6384:52;;;6432:1;6429;6422:12;6384:52;-1:-1:-1;;6455:23:13;;;6525:2;6510:18;;6497:32;;-1:-1:-1;6576:2:13;6561:18;;;6548:32;;6270:316;-1:-1:-1;6270:316:13:o;6925:127::-;6986:10;6981:3;6977:20;6974:1;6967:31;7017:4;7014:1;7007:15;7041:4;7038:1;7031:15;7057:127;7118:10;7113:3;7109:20;7106:1;7099:31;7149:4;7146:1;7139:15;7173:4;7170:1;7163:15;7189:127;7250:10;7245:3;7241:20;7238:1;7231:31;7281:4;7278:1;7271:15;7305:4;7302:1;7295:15;7321:125;7386:9;;;7407:10;;;7404:36;;;7420:18;;:::i;7451:128::-;7518:9;;;7539:11;;;7536:37;;;7553:18;;:::i;7584:127::-;7645:10;7640:3;7636:20;7633:1;7626:31;7676:4;7673:1;7666:15;7700:4;7697:1;7690:15;7716:127;7777:10;7772:3;7768:20;7765:1;7758:31;7808:4;7805:1;7798:15;7832:4;7829:1;7822:15;7848:193;7886:3;-1:-1:-1;;;;;7923:5:13;7919:30;7968:7;7958:41;;7979:18;;:::i;8046:168::-;8119:9;;;8150;;8167:15;;;8161:22;;8147:37;8137:71;;8188:18;;:::i;8219:184::-;8289:6;8342:2;8330:9;8321:7;8317:23;8313:32;8310:52;;;8358:1;8355;8348:12;8310:52;-1:-1:-1;8381:16:13;;8219:184;-1:-1:-1;8219:184:13:o;8408:127::-;8469:10;8464:3;8460:20;8457:1;8450:31;8500:4;8497:1;8490:15;8524:4;8521:1;8514:15;8540:112;8572:1;8598;8588:35;;8603:18;;:::i;:::-;-1:-1:-1;8637:9:13;;8540:112::o;8657:120::-;8697:1;8723;8713:35;;8728:18;;:::i;:::-;-1:-1:-1;8762:9:13;;8657:120::o;8782:257::-;-1:-1:-1;;;;;8903:10:13;;;8915;;;8899:27;8946:20;;;;8853:18;8985:24;;;8975:58;;9013:18;;:::i;:::-;8975:58;;8782:257;;;;:::o;9044:209::-;9082:3;-1:-1:-1;;;;;9163:2:13;9156:5;9152:14;9190:2;9181:7;9178:15;9175:41;;9196:18;;:::i;:::-;9245:1;9232:15;;9044:209;-1:-1:-1;;;9044:209:13:o;9258:135::-;9297:3;9318:17;;;9315:43;;9338:18;;:::i;:::-;-1:-1:-1;9385:1:13;9374:13;;9258:135::o
Swarm Source
none
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.