Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Source Code Verified (Exact Match)
Contract Name:
HeklaInbox
Compiler Version
v0.8.27+commit.40a35a09
Optimization Enabled:
Yes with 200 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import "../based/TaikoInbox.sol"; /// @title HeklaInbox /// @dev Labeled in address resolver as "taiko" /// @custom:security-contact [email protected] contract HeklaInbox is TaikoInbox { /// @notice Emitted when a transition is written to the state by the owner. /// @param batchId The ID of the batch containing the transition. /// @param tid The ID of the transition within the batch. /// @param ts The transition state written. event TransitionWritten(uint64 batchId, uint24 tid, TransitionState ts); constructor( address _wrapper, address _verifier, address _bondToken, address _signalService ) TaikoInbox(_wrapper, _verifier, _bondToken, _signalService) { } /// @notice Manually write a transition for a batch. /// @dev This function is supposed to be used by the owner to force prove a transition for a /// block that has not been verified. function writeTransition( uint64 _batchId, bytes32 _parentHash, bytes32 _blockHash, bytes32 _stateRoot, address _prover, bool _inProvingWindow ) external onlyOwner { require(_blockHash != 0, InvalidParams()); require(_parentHash != 0, InvalidParams()); require(_stateRoot != 0, InvalidParams()); require(_batchId > state.stats2.lastVerifiedBatchId, BatchVerified()); Config memory config = pacayaConfig(); uint256 slot = _batchId % config.batchRingBufferSize; Batch storage batch = state.batches[slot]; require(batch.batchId == _batchId, BatchNotFound()); uint24 tid = state.transitionIds[_batchId][_parentHash]; if (tid == 0) { tid = batch.nextTransitionId++; } TransitionState storage ts = state.transitions[slot][tid]; ts.stateRoot = _batchId % config.stateRootSyncInternal == 0 ? _stateRoot : bytes32(0); ts.blockHash = _blockHash; ts.prover = _prover; ts.inProvingWindow = _inProvingWindow; ts.createdAt = uint48(block.timestamp); if (tid == 1) { ts.parentHash = _parentHash; } else { state.transitionIds[_batchId][_parentHash] = tid; } emit TransitionWritten( _batchId, tid, TransitionState( _parentHash, _blockHash, _stateRoot, _prover, _inProvingWindow, uint48(block.timestamp) ) ); } function pacayaConfig() public pure override returns (ITaikoInbox.Config memory) { return ITaikoInbox.Config({ chainId: LibNetwork.TAIKO_HEKLA, // Never change this value as ring buffer is being reused!!! maxUnverifiedBatches: 324_000, // Never change this value as ring buffer is being reused!!! batchRingBufferSize: 324_512, maxBatchesToVerify: 8, blockMaxGasLimit: 240_000_000, livenessBondBase: 125e18, // 125 Taiko token per batch livenessBondPerBlock: 0, // deprecated stateRootSyncInternal: 4, maxAnchorHeightOffset: 96, baseFeeConfig: LibSharedData.BaseFeeConfig({ adjustmentQuotient: 8, sharingPctg: 50, gasIssuancePerSecond: 5_000_000, minGasExcess: 1_344_899_430, // 0.01 gwei maxGasIssuancePerBlock: 600_000_000 // two minutes }), provingWindow: 2 hours, cooldownWindow: 2 hours, maxSignalsToReceive: 16, maxBlocksPerBatch: 768, forkHeights: ITaikoInbox.ForkHeights({ ontake: 840_512, pacaya: 1_299_888, shasta: 0, unzen: 0 }) }); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "src/shared/common/EssentialContract.sol"; import "src/shared/based/ITaiko.sol"; import "src/shared/libs/LibAddress.sol"; import "src/shared/libs/LibMath.sol"; import "src/shared/libs/LibNetwork.sol"; import "src/shared/libs/LibStrings.sol"; import "src/shared/signal/ISignalService.sol"; import "src/layer1/verifiers/IVerifier.sol"; import "./ITaikoInbox.sol"; import "./IProposeBatch.sol"; /// @title TaikoInbox /// @notice Acts as the inbox for the Taiko Alethia protocol, a simplified version of the /// original Taiko-Based Contestable Rollup (BCR). The tier-based proof system and /// contestation mechanisms have been removed. /// /// Key assumptions of this protocol: /// - Block proposals and proofs are asynchronous. Proofs are not available at proposal time, /// unlike Taiko Gwyneth, which assumes synchronous composability. /// - Proofs are presumed error-free and thoroughly validated, with subproofs/multiproofs management /// delegated to IVerifier contracts. /// /// @dev Registered in the address resolver as "taiko". /// @custom:security-contact [email protected] abstract contract TaikoInbox is EssentialContract, ITaikoInbox, IProposeBatch, ITaiko { using LibMath for uint256; using SafeERC20 for IERC20; address public immutable inboxWrapper; address public immutable verifier; address public immutable bondToken; ISignalService public immutable signalService; State public state; // storage layout much match Ontake fork uint256[50] private __gap; // External functions ------------------------------------------------------------------------ constructor( address _inboxWrapper, address _verifier, address _bondToken, address _signalService ) nonZeroAddr(_verifier) nonZeroAddr(_signalService) EssentialContract(address(0)) { inboxWrapper = _inboxWrapper; verifier = _verifier; bondToken = _bondToken; signalService = ISignalService(_signalService); } function init(address _owner, bytes32 _genesisBlockHash) external initializer { __Taiko_init(_owner, _genesisBlockHash); } /// @notice Proposes a batch of blocks. /// @param _params ABI-encoded BlockParams. /// @param _txList Transaction list in calldata. If the txList is empty, blob will be used for /// data availability. /// @return info_ Information of the proposed batch, which is used for constructing blocks /// offchain. /// @return meta_ Metadata of the proposed batch, which is used for proving the batch. function proposeBatch( bytes calldata _params, bytes calldata _txList ) public override(ITaikoInbox, IProposeBatch) nonReentrant returns (BatchInfo memory info_, BatchMetadata memory meta_) { Stats2 memory stats2 = state.stats2; Config memory config = pacayaConfig(); require(stats2.numBatches >= config.forkHeights.pacaya, ForkNotActivated()); unchecked { require( stats2.numBatches <= stats2.lastVerifiedBatchId + config.maxUnverifiedBatches, TooManyBatches() ); BatchParams memory params = abi.decode(_params, (BatchParams)); { if (inboxWrapper == address(0)) { require(params.proposer == address(0), CustomProposerNotAllowed()); params.proposer = msg.sender; // blob hashes are only accepted if the caller is trusted. require(params.blobParams.blobHashes.length == 0, InvalidBlobParams()); require(params.blobParams.createdIn == 0, InvalidBlobCreatedIn()); } else { require(params.proposer != address(0), CustomProposerMissing()); require(msg.sender == inboxWrapper, NotInboxWrapper()); } // In the upcoming Shasta fork, we might need to enforce the coinbase address as the // preconfer address. This will allow us to implement preconfirmation features in L2 // anchor transactions. if (params.coinbase == address(0)) { params.coinbase = params.proposer; } if (params.revertIfNotFirstProposal) { require(state.stats2.lastProposedIn != block.number, NotFirstProposal()); } } bool calldataUsed = _txList.length != 0; if (calldataUsed) { // calldata is used for data availability require(params.blobParams.firstBlobIndex == 0, InvalidBlobParams()); require(params.blobParams.numBlobs == 0, InvalidBlobParams()); require(params.blobParams.createdIn == 0, InvalidBlobCreatedIn()); require(params.blobParams.blobHashes.length == 0, InvalidBlobParams()); } else if (params.blobParams.blobHashes.length == 0) { // this is a normal batch, blobs are created and used in the current batches. // firstBlobIndex can be non-zero. require(params.blobParams.numBlobs != 0, BlobNotSpecified()); require(params.blobParams.createdIn == 0, InvalidBlobCreatedIn()); params.blobParams.createdIn = uint64(block.number); } else { // this is a forced-inclusion batch, blobs were created in early blocks and are used // in the current batches require(params.blobParams.createdIn != 0, InvalidBlobCreatedIn()); require(params.blobParams.numBlobs == 0, InvalidBlobParams()); require(params.blobParams.firstBlobIndex == 0, InvalidBlobParams()); } // Keep track of last batch's information. Batch storage lastBatch = state.batches[(stats2.numBatches - 1) % config.batchRingBufferSize]; (uint64 anchorBlockId, uint64 lastBlockTimestamp) = _validateBatchParams( params, config.maxAnchorHeightOffset, config.maxSignalsToReceive, config.maxBlocksPerBatch, lastBatch ); // This section constructs the metadata for the proposed batch, which is crucial for // nodes/clients to process the batch. The metadata itself is not stored on-chain; // instead, only its hash is kept. // The metadata must be supplied as calldata prior to proving the batch, enabling the // computation and verification of its integrity through the comparison of the metahash. // // Note that `difficulty` has been removed from the metadata. The client and prover must // use // the following approach to calculate a block's difficulty: // `keccak256(abi.encode("TAIKO_DIFFICULTY", block.number))` info_ = BatchInfo({ txsHash: bytes32(0), // to be initialised later // // Data to build L2 blocks blocks: params.blocks, blobHashes: new bytes32[](0), // to be initialised later extraData: bytes32(uint256(config.baseFeeConfig.sharingPctg)), coinbase: params.coinbase, proposedIn: uint64(block.number), blobCreatedIn: params.blobParams.createdIn, blobByteOffset: params.blobParams.byteOffset, blobByteSize: params.blobParams.byteSize, gasLimit: config.blockMaxGasLimit, lastBlockId: 0, // to be initialised later lastBlockTimestamp: lastBlockTimestamp, // // Data for the L2 anchor transaction, shared by all blocks in the batch anchorBlockId: anchorBlockId, anchorBlockHash: blockhash(anchorBlockId), baseFeeConfig: config.baseFeeConfig }); require(info_.anchorBlockHash != 0, ZeroAnchorBlockHash()); info_.lastBlockId = stats2.numBatches == config.forkHeights.pacaya ? stats2.numBatches + uint64(params.blocks.length) - 1 : lastBatch.lastBlockId + uint64(params.blocks.length); (info_.txsHash, info_.blobHashes) = _calculateTxsHash(keccak256(_txList), params.blobParams); meta_ = BatchMetadata({ infoHash: keccak256(abi.encode(info_)), proposer: params.proposer, batchId: stats2.numBatches, proposedAt: uint64(block.timestamp) }); Batch storage batch = state.batches[stats2.numBatches % config.batchRingBufferSize]; // SSTORE #1 batch.metaHash = keccak256(abi.encode(meta_)); // SSTORE #2 {{ batch.batchId = stats2.numBatches; batch.lastBlockTimestamp = lastBlockTimestamp; batch.anchorBlockId = anchorBlockId; batch.nextTransitionId = 1; batch.verifiedTransitionId = 0; batch.reserved4 = 0; // SSTORE }} _debitBond(params.proposer, config.livenessBondBase); // SSTORE #3 {{ batch.lastBlockId = info_.lastBlockId; batch.reserved3 = 0; batch.livenessBond = config.livenessBondBase; // SSTORE }} stats2.numBatches += 1; require( config.forkHeights.shasta == 0 || stats2.numBatches < config.forkHeights.shasta, BeyondCurrentFork() ); stats2.lastProposedIn = uint56(block.number); emit BatchProposed(info_, meta_, _txList); } // end-of-unchecked _verifyBatches(config, stats2, 1); } /// @notice Proves multiple batches with a single aggregated proof. /// @param _params ABI-encoded parameter containing: /// - metas: Array of metadata for each batch being proved. /// - transitions: Array of batch transitions to be proved. /// @param _proof The aggregated cryptographic proof proving the batches transitions. function proveBatches(bytes calldata _params, bytes calldata _proof) external nonReentrant { (BatchMetadata[] memory metas, Transition[] memory trans) = abi.decode(_params, (BatchMetadata[], Transition[])); uint256 metasLength = metas.length; require(metasLength != 0, NoBlocksToProve()); require(metasLength == trans.length, ArraySizesMismatch()); Stats2 memory stats2 = state.stats2; require(!stats2.paused, ContractPaused()); Config memory config = pacayaConfig(); IVerifier.Context[] memory ctxs = new IVerifier.Context[](metasLength); bool hasConflictingProof; for (uint256 i; i < metasLength; ++i) { BatchMetadata memory meta = metas[i]; require(meta.batchId >= config.forkHeights.pacaya, ForkNotActivated()); require( config.forkHeights.shasta == 0 || meta.batchId < config.forkHeights.shasta, BeyondCurrentFork() ); require(meta.batchId > stats2.lastVerifiedBatchId, BatchNotFound()); require(meta.batchId < stats2.numBatches, BatchNotFound()); Transition memory tran = trans[i]; require(tran.parentHash != 0, InvalidTransitionParentHash()); require(tran.blockHash != 0, InvalidTransitionBlockHash()); require(tran.stateRoot != 0, InvalidTransitionStateRoot()); ctxs[i].batchId = meta.batchId; ctxs[i].metaHash = keccak256(abi.encode(meta)); ctxs[i].transition = tran; // Verify the batch's metadata. uint256 slot = meta.batchId % config.batchRingBufferSize; Batch storage batch = state.batches[slot]; require(ctxs[i].metaHash == batch.metaHash, MetaHashMismatch()); // Finds out if this transition is overwriting an existing one (with the same parent // hash) or is a new one. uint24 tid; uint24 nextTransitionId = batch.nextTransitionId; if (nextTransitionId > 1) { // This batch has at least one transition. if (state.transitions[slot][1].parentHash == tran.parentHash) { // Overwrite the first transition. tid = 1; } else if (nextTransitionId > 2) { // Retrieve the transition ID using the parent hash from the mapping. If the ID // is 0, it indicates a new transition; otherwise, it's an overwrite of an // existing transition. tid = state.transitionIds[meta.batchId][tran.parentHash]; } } if (tid == 0) { // This transition is new, we need to use the next available ID. unchecked { tid = batch.nextTransitionId++; } } else { TransitionState memory _ts = state.transitions[slot][tid]; if (_ts.blockHash == 0) { // This transition has been invalidated due to a conflicting proof. // So we can reuse the transition ID. } else { bool isSameTransition = _ts.blockHash == tran.blockHash && (_ts.stateRoot == 0 || _ts.stateRoot == tran.stateRoot); if (isSameTransition) { // Re-approving the same transition is allowed, but we will not change the // existing one. } else { // A conflict is detected with the new transition. Pause the contract and // invalidate the existing transition by setting its blockHash to 0. hasConflictingProof = true; state.transitions[slot][tid].blockHash = 0; emit ConflictingProof(meta.batchId, _ts, tran); } // Proceed with other transitions. continue; } } TransitionState storage ts = state.transitions[slot][tid]; ts.blockHash = tran.blockHash; ts.stateRoot = meta.batchId % config.stateRootSyncInternal == 0 ? tran.stateRoot : bytes32(0); bool inProvingWindow; unchecked { inProvingWindow = block.timestamp <= uint256(meta.proposedAt).max(stats2.lastUnpausedAt) + config.provingWindow; } ts.inProvingWindow = inProvingWindow; ts.prover = inProvingWindow ? meta.proposer : msg.sender; ts.createdAt = uint48(block.timestamp); if (tid == 1) { ts.parentHash = tran.parentHash; } else { state.transitionIds[meta.batchId][tran.parentHash] = tid; } } IVerifier(verifier).verifyProof(ctxs, _proof); // Emit the event { uint64[] memory batchIds = new uint64[](metasLength); for (uint256 i; i < metasLength; ++i) { batchIds[i] = metas[i].batchId; } emit BatchesProved(verifier, batchIds, trans); } if (hasConflictingProof) { _pause(); emit Paused(verifier); } else { _verifyBatches(config, stats2, metasLength); } } /// @notice Verify batches by providing the length of the batches to verify. /// @dev This function is necessary to upgrade from this fork to the next one. /// @param _length Specifis how many batches to verify. The max number of batches to verify is /// `pacayaConfig().maxBatchesToVerify * _length`. function verifyBatches(uint64 _length) external nonZeroValue(_length) nonReentrant whenNotPaused { _verifyBatches(pacayaConfig(), state.stats2, _length); } /// @inheritdoc ITaikoInbox function depositBond(uint256 _amount) external payable whenNotPaused { state.bondBalance[msg.sender] += _handleDeposit(msg.sender, _amount); } /// @inheritdoc ITaikoInbox function withdrawBond(uint256 _amount) external whenNotPaused { uint256 balance = state.bondBalance[msg.sender]; require(balance >= _amount, InsufficientBond()); emit BondWithdrawn(msg.sender, _amount); state.bondBalance[msg.sender] -= _amount; if (bondToken != address(0)) { IERC20(bondToken).safeTransfer(msg.sender, _amount); } else { LibAddress.sendEtherAndVerify(msg.sender, _amount); } } /// @inheritdoc ITaikoInbox function getStats1() external view returns (Stats1 memory) { return state.stats1; } /// @inheritdoc ITaikoInbox function getStats2() external view returns (Stats2 memory) { return state.stats2; } /// @inheritdoc ITaikoInbox function getTransitionById( uint64 _batchId, uint24 _tid ) external view returns (TransitionState memory) { Config memory config = pacayaConfig(); uint256 slot = _batchId % config.batchRingBufferSize; Batch storage batch = state.batches[slot]; require(batch.batchId == _batchId, BatchNotFound()); require(_tid != 0, TransitionNotFound()); require(_tid < batch.nextTransitionId, TransitionNotFound()); return state.transitions[slot][_tid]; } /// @inheritdoc ITaikoInbox function getTransitionByParentHash( uint64 _batchId, bytes32 _parentHash ) external view returns (TransitionState memory) { Config memory config = pacayaConfig(); uint256 slot = _batchId % config.batchRingBufferSize; Batch storage batch = state.batches[slot]; require(batch.batchId == _batchId, BatchNotFound()); uint24 tid; if (batch.nextTransitionId > 1) { // This batch has at least one transition. if (state.transitions[slot][1].parentHash == _parentHash) { // Overwrite the first transition. tid = 1; } else if (batch.nextTransitionId > 2) { // Retrieve the transition ID using the parent hash from the mapping. If the ID // is 0, it indicates a new transition; otherwise, it's an overwrite of an // existing transition. tid = state.transitionIds[_batchId][_parentHash]; } } require(tid != 0 && tid < batch.nextTransitionId, TransitionNotFound()); return state.transitions[slot][tid]; } /// @inheritdoc ITaikoInbox function getLastVerifiedTransition() external view returns (uint64 batchId_, uint64 blockId_, TransitionState memory ts_) { batchId_ = state.stats2.lastVerifiedBatchId; require(batchId_ >= pacayaConfig().forkHeights.pacaya, BatchNotFound()); blockId_ = getBatch(batchId_).lastBlockId; ts_ = getBatchVerifyingTransition(batchId_); } /// @inheritdoc ITaikoInbox function getLastSyncedTransition() external view returns (uint64 batchId_, uint64 blockId_, TransitionState memory ts_) { batchId_ = state.stats1.lastSyncedBatchId; blockId_ = getBatch(batchId_).lastBlockId; ts_ = getBatchVerifyingTransition(batchId_); } /// @inheritdoc ITaikoInbox function bondBalanceOf(address _user) external view returns (uint256) { return state.bondBalance[_user]; } /// @notice Determines the operational layer of the contract, whether it is on Layer 1 (L1) or /// Layer 2 (L2). /// @return True if the contract is operating on L1, false if on L2. function isOnL1() external pure override returns (bool) { return true; } // Public functions ------------------------------------------------------------------------- /// @inheritdoc EssentialContract function paused() public view override returns (bool) { return state.stats2.paused; } /// @inheritdoc ITaikoInbox function getBatch(uint64 _batchId) public view returns (Batch memory batch_) { Config memory config = pacayaConfig(); batch_ = state.batches[_batchId % config.batchRingBufferSize]; require(batch_.batchId == _batchId, BatchNotFound()); } /// @inheritdoc ITaikoInbox function getBatchVerifyingTransition(uint64 _batchId) public view returns (TransitionState memory ts_) { Config memory config = pacayaConfig(); uint64 slot = _batchId % config.batchRingBufferSize; Batch storage batch = state.batches[slot]; require(batch.batchId == _batchId, BatchNotFound()); if (batch.verifiedTransitionId != 0) { ts_ = state.transitions[slot][batch.verifiedTransitionId]; } } /// @inheritdoc ITaikoInbox function pacayaConfig() public view virtual returns (Config memory); // Internal functions ---------------------------------------------------------------------- function __Taiko_init(address _owner, bytes32 _genesisBlockHash) internal onlyInitializing { __Essential_init(_owner); require(_genesisBlockHash != 0, InvalidGenesisBlockHash()); state.transitions[0][1].blockHash = _genesisBlockHash; Batch storage batch = state.batches[0]; batch.metaHash = bytes32(uint256(1)); batch.lastBlockTimestamp = uint64(block.timestamp); batch.anchorBlockId = uint64(block.number); batch.nextTransitionId = 2; batch.verifiedTransitionId = 1; state.stats1.genesisHeight = uint64(block.number); state.stats2.lastProposedIn = uint56(block.number); state.stats2.numBatches = 1; emit BatchesVerified(0, _genesisBlockHash); } function _unpause() internal override { state.stats2.lastUnpausedAt = uint64(block.timestamp); state.stats2.paused = false; } function _pause() internal override { state.stats2.paused = true; } function _calculateTxsHash( bytes32 _txListHash, BlobParams memory _blobParams ) internal view virtual returns (bytes32 hash_, bytes32[] memory blobHashes_) { if (_blobParams.blobHashes.length != 0) { blobHashes_ = _blobParams.blobHashes; } else { uint256 numBlobs = _blobParams.numBlobs; blobHashes_ = new bytes32[](numBlobs); for (uint256 i; i < numBlobs; ++i) { unchecked { blobHashes_[i] = blobhash(_blobParams.firstBlobIndex + i); } } } uint256 bloblHashesLength = blobHashes_.length; for (uint256 i; i < bloblHashesLength; ++i) { require(blobHashes_[i] != 0, BlobNotFound()); } hash_ = keccak256(abi.encode(_txListHash, blobHashes_)); } // Private functions ----------------------------------------------------------------------- function _verifyBatches( Config memory _config, Stats2 memory _stats2, uint256 _length ) private { uint64 batchId = _stats2.lastVerifiedBatchId; bool canVerifyBlocks; unchecked { uint64 pacayaForkHeight = _config.forkHeights.pacaya; canVerifyBlocks = pacayaForkHeight == 0 || batchId >= pacayaForkHeight - 1; } if (canVerifyBlocks) { uint256 slot = batchId % _config.batchRingBufferSize; Batch storage batch = state.batches[slot]; uint24 tid = batch.verifiedTransitionId; bytes32 blockHash = state.transitions[slot][tid].blockHash; SyncBlock memory synced; uint256 stopBatchId; unchecked { stopBatchId = ( _config.maxBatchesToVerify * _length + _stats2.lastVerifiedBatchId + 1 ).min(_stats2.numBatches); if (_config.forkHeights.shasta != 0) { stopBatchId = stopBatchId.min(_config.forkHeights.shasta); } } for (++batchId; batchId < stopBatchId; ++batchId) { slot = batchId % _config.batchRingBufferSize; batch = state.batches[slot]; uint24 nextTransitionId = batch.nextTransitionId; if (paused()) break; if (nextTransitionId <= 1) break; TransitionState storage ts = state.transitions[slot][1]; if (ts.parentHash == blockHash) { tid = 1; } else if (nextTransitionId > 2) { uint24 _tid = state.transitionIds[batchId][blockHash]; if (_tid == 0) break; tid = _tid; ts = state.transitions[slot][tid]; } else { break; } bytes32 _blockHash = ts.blockHash; // This transition has been invalidated due to conflicting proof if (_blockHash == 0) break; unchecked { if (ts.createdAt + _config.cooldownWindow > block.timestamp) { break; } } blockHash = _blockHash; uint96 bondToReturn = ts.inProvingWindow ? batch.livenessBond : batch.livenessBond / 2; _creditBond(ts.prover, bondToReturn); if (batchId % _config.stateRootSyncInternal == 0) { synced.batchId = batchId; synced.blockId = batch.lastBlockId; synced.tid = tid; synced.stateRoot = ts.stateRoot; } } unchecked { --batchId; } if (_stats2.lastVerifiedBatchId != batchId) { _stats2.lastVerifiedBatchId = batchId; batch = state.batches[_stats2.lastVerifiedBatchId % _config.batchRingBufferSize]; batch.verifiedTransitionId = tid; emit BatchesVerified(_stats2.lastVerifiedBatchId, blockHash); if (synced.batchId != 0) { if (synced.batchId != _stats2.lastVerifiedBatchId) { // We write the synced batch's verifiedTransitionId to storage batch = state.batches[synced.batchId % _config.batchRingBufferSize]; batch.verifiedTransitionId = synced.tid; } Stats1 memory stats1 = state.stats1; stats1.lastSyncedBatchId = batch.batchId; stats1.lastSyncedAt = uint64(block.timestamp); state.stats1 = stats1; emit Stats1Updated(stats1); // Ask signal service to write cross chain signal signalService.syncChainData( _config.chainId, LibStrings.H_STATE_ROOT, synced.blockId, synced.stateRoot ); } } } state.stats2 = _stats2; emit Stats2Updated(_stats2); } function _debitBond(address _user, uint256 _amount) private { if (_amount == 0) return; uint256 balance = state.bondBalance[_user]; if (balance >= _amount) { unchecked { state.bondBalance[_user] = balance - _amount; } } else if (bondToken != address(0)) { uint256 amountDeposited = _handleDeposit(_user, _amount); require(amountDeposited == _amount, InsufficientBond()); } else { // Ether as bond must be deposited before proposing a batch revert InsufficientBond(); } emit BondDebited(_user, _amount); } function _creditBond(address _user, uint256 _amount) private { if (_amount == 0) return; unchecked { state.bondBalance[_user] += _amount; } emit BondCredited(_user, _amount); } function _handleDeposit( address _user, uint256 _amount ) private returns (uint256 amountDeposited_) { if (bondToken != address(0)) { require(msg.value == 0, MsgValueNotZero()); uint256 balance = IERC20(bondToken).balanceOf(address(this)); IERC20(bondToken).safeTransferFrom(_user, address(this), _amount); amountDeposited_ = IERC20(bondToken).balanceOf(address(this)) - balance; } else { require(msg.value == _amount, EtherNotPaidAsBond()); amountDeposited_ = _amount; } emit BondDeposited(_user, amountDeposited_); } function _validateBatchParams( BatchParams memory _params, uint64 _maxAnchorHeightOffset, uint8 _maxSignalsToReceive, uint16 _maxBlocksPerBatch, Batch memory _lastBatch ) private view returns (uint64 anchorBlockId_, uint64 lastBlockTimestamp_) { uint256 blocksLength = _params.blocks.length; require(blocksLength != 0, BlockNotFound()); require(blocksLength <= _maxBlocksPerBatch, TooManyBlocks()); unchecked { if (_params.anchorBlockId == 0) { anchorBlockId_ = uint64(block.number - 1); } else { require( _params.anchorBlockId + _maxAnchorHeightOffset >= block.number, AnchorBlockIdTooSmall() ); require(_params.anchorBlockId < block.number, AnchorBlockIdTooLarge()); require( _params.anchorBlockId >= _lastBatch.anchorBlockId, AnchorBlockIdSmallerThanParent() ); anchorBlockId_ = _params.anchorBlockId; } lastBlockTimestamp_ = _params.lastBlockTimestamp == 0 ? uint64(block.timestamp) : _params.lastBlockTimestamp; require(lastBlockTimestamp_ <= block.timestamp, TimestampTooLarge()); require(_params.blocks[0].timeShift == 0, FirstBlockTimeShiftNotZero()); uint64 totalShift; for (uint256 i; i < blocksLength; ++i) { totalShift += _params.blocks[i].timeShift; uint256 numSignals = _params.blocks[i].signalSlots.length; if (numSignals == 0) continue; require(numSignals <= _maxSignalsToReceive, TooManySignals()); for (uint256 j; j < numSignals; ++j) { require( signalService.isSignalSent(_params.blocks[i].signalSlots[j]), SignalNotSent() ); } } require(lastBlockTimestamp_ >= totalShift, TimestampTooSmall()); uint64 firstBlockTimestamp = lastBlockTimestamp_ - totalShift; require( firstBlockTimestamp + _maxAnchorHeightOffset * LibNetwork.ETHEREUM_BLOCK_TIME >= block.timestamp, TimestampTooSmall() ); require( firstBlockTimestamp >= _lastBatch.lastBlockTimestamp, TimestampSmallerThanParent() ); // make sure the batch builds on the expected latest chain state. require( _params.parentMetaHash == 0 || _params.parentMetaHash == _lastBatch.metaHash, ParentMetaHashMismatch() ); } } // Memory-only structs ---------------------------------------------------------------------- struct SyncBlock { uint64 batchId; uint64 blockId; uint24 tid; bytes32 stateRoot; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value)); } /** * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value)); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); _callOptionalReturn(token, approvalCall); } } /** * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. * Revert on invalid signature. */ function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol"; import "./IResolver.sol"; /// @title EssentialContract /// @custom:security-contact [email protected] abstract contract EssentialContract is UUPSUpgradeable, Ownable2StepUpgradeable { uint8 internal constant _FALSE = 1; uint8 internal constant _TRUE = 2; address private immutable __resolver; uint256[50] private __gapFromOldAddressResolver; /// @dev Slot 1. uint8 internal __reentry; uint8 internal __paused; uint256[49] private __gap; /// @notice Emitted when the contract is paused. /// @param account The account that paused the contract. event Paused(address account); /// @notice Emitted when the contract is unpaused. /// @param account The account that unpaused the contract. event Unpaused(address account); error INVALID_PAUSE_STATUS(); error FUNC_NOT_IMPLEMENTED(); error REENTRANT_CALL(); error ACCESS_DENIED(); error RESOLVER_NOT_FOUND(); error ZERO_ADDRESS(); error ZERO_VALUE(); /// @dev Modifier that ensures the caller is the owner or resolved address of a given name. /// @param _name The name to check against. modifier onlyFromOwnerOrNamed(bytes32 _name) { require(msg.sender == owner() || msg.sender == resolve(_name, true), ACCESS_DENIED()); _; } /// @dev Modifier that ensures the caller is either the owner or a specified address. /// @param _addr The address to check against. modifier onlyFromOwnerOr(address _addr) { require(msg.sender == owner() || msg.sender == _addr, ACCESS_DENIED()); _; } /// @dev Modifier that reverts the function call, indicating it is not implemented. modifier notImplemented() { revert FUNC_NOT_IMPLEMENTED(); _; } /// @dev Modifier that prevents reentrant calls to a function. modifier nonReentrant() { require(_loadReentryLock() != _TRUE, REENTRANT_CALL()); _storeReentryLock(_TRUE); _; _storeReentryLock(_FALSE); } /// @dev Modifier that allows function execution only when the contract is paused. modifier whenPaused() { require(paused(), INVALID_PAUSE_STATUS()); _; } /// @dev Modifier that allows function execution only when the contract is not paused. modifier whenNotPaused() { require(!paused(), INVALID_PAUSE_STATUS()); _; } /// @dev Modifier that ensures the provided address is not the zero address. /// @param _addr The address to check. modifier nonZeroAddr(address _addr) { require(_addr != address(0), ZERO_ADDRESS()); _; } /// @dev Modifier that ensures the provided value is not zero. /// @param _value The value to check. modifier nonZeroValue(uint256 _value) { require(_value != 0, ZERO_VALUE()); _; } /// @dev Modifier that ensures the provided bytes32 value is not zero. /// @param _value The bytes32 value to check. modifier nonZeroBytes32(bytes32 _value) { require(_value != 0, ZERO_VALUE()); _; } /// @dev Modifier that ensures the caller is the resolved address of a given /// name. /// @param _name The name to check against. modifier onlyFromNamed(bytes32 _name) { require(msg.sender == resolve(_name, true), ACCESS_DENIED()); _; } /// @dev Modifier that ensures the caller is the resolved address of a given /// name, if the name is set. /// @param _name The name to check against. modifier onlyFromOptionalNamed(bytes32 _name) { address addr = resolve(_name, true); require(addr == address(0) || msg.sender == addr, ACCESS_DENIED()); _; } /// @dev Modifier that ensures the caller is a resolved address to either _name1 or _name2 /// name. /// @param _name1 The first name to check against. /// @param _name2 The second name to check against. modifier onlyFromNamedEither(bytes32 _name1, bytes32 _name2) { require( msg.sender == resolve(_name1, true) || msg.sender == resolve(_name2, true), ACCESS_DENIED() ); _; } /// @dev Modifier that ensures the caller is either of the two specified addresses. /// @param _addr1 The first address to check against. /// @param _addr2 The second address to check against. modifier onlyFromEither(address _addr1, address _addr2) { require(msg.sender == _addr1 || msg.sender == _addr2, ACCESS_DENIED()); _; } /// @dev Modifier that ensures the caller is the specified address. /// @param _addr The address to check against. modifier onlyFrom(address _addr) { require(msg.sender == _addr, ACCESS_DENIED()); _; } /// @dev Modifier that ensures the caller is the specified address. /// @param _addr The address to check against. modifier onlyFromOptional(address _addr) { require(_addr == address(0) || msg.sender == _addr, ACCESS_DENIED()); _; } constructor(address _resolver) { __resolver = _resolver; _disableInitializers(); } /// @notice Pauses the contract. function pause() public whenNotPaused { _pause(); emit Paused(msg.sender); // We call the authorize function here to avoid: // Warning (5740): Unreachable code. _authorizePause(msg.sender, true); } /// @notice Unpauses the contract. function unpause() public whenPaused { _unpause(); emit Unpaused(msg.sender); // We call the authorize function here to avoid: // Warning (5740): Unreachable code. _authorizePause(msg.sender, false); } function impl() public view returns (address) { return _getImplementation(); } /// @notice Returns true if the contract is paused, and false otherwise. /// @return true if paused, false otherwise. function paused() public view virtual returns (bool) { return __paused == _TRUE; } function inNonReentrant() public view returns (bool) { return _loadReentryLock() == _TRUE; } /// @notice Returns the address of this contract. /// @return The address of this contract. function resolver() public view virtual returns (address) { return __resolver; } /// @notice Resolves a name to an address on a specific chain /// @param _chainId The chain ID to resolve the name on /// @param _name The name to resolve /// @param _allowZeroAddress Whether to allow resolving to the zero address /// @return The resolved address function resolve( uint64 _chainId, bytes32 _name, bool _allowZeroAddress ) internal view returns (address) { return IResolver(resolver()).resolve(_chainId, _name, _allowZeroAddress); } /// @notice Resolves a name to an address on the current chain /// @param _name The name to resolve /// @param _allowZeroAddress Whether to allow resolving to the zero address /// @return The resolved address function resolve(bytes32 _name, bool _allowZeroAddress) internal view returns (address) { return IResolver(resolver()).resolve(block.chainid, _name, _allowZeroAddress); } /// @notice Initializes the contract. /// @param _owner The owner of this contract. msg.sender will be used if this value is zero. function __Essential_init(address _owner) internal virtual onlyInitializing { __Context_init(); _transferOwnership(_owner == address(0) ? msg.sender : _owner); __paused = _FALSE; } function _pause() internal virtual { __paused = _TRUE; } function _unpause() internal virtual { __paused = _FALSE; } function _authorizeUpgrade(address) internal virtual override onlyOwner { } function _authorizePause(address, bool) internal virtual onlyOwner { } // Stores the reentry lock function _storeReentryLock(uint8 _reentry) internal virtual { __reentry = _reentry; } // Loads the reentry lock function _loadReentryLock() internal view virtual returns (uint8 reentry_) { reentry_ = __reentry; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; /// @title ITaiko /// @notice This interface is used for contracts identified by the "taiko" label in the address /// resolver, specifically the TaikoInbox and TaikoAnchor contracts. /// @custom:security-contact [email protected] interface ITaiko { /// @notice Determines the operational layer of the contract, whether it is on Layer 1 (L1) or /// Layer 2 (L2). /// @return True if the contract is operating on L1, false if on L2. function isOnL1() external pure returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /// @title LibAddress /// @dev Provides utilities for address-related operations. /// @custom:security-contact [email protected] library LibAddress { error ETH_TRANSFER_FAILED(); /// @dev Sends Ether to the specified address. This method will not revert even if sending ether /// fails. /// This function is inspired by /// https://github.com/nomad-xyz/ExcessivelySafeCall/blob/main/src/ExcessivelySafeCall.sol /// @param _to The recipient address. /// @param _amount The amount of Ether to send in wei. /// @param _gasLimit The max amount gas to pay for this transaction. /// @return success_ true if the call is successful, false otherwise. function sendEther( address _to, uint256 _amount, uint256 _gasLimit, bytes memory _calldata ) internal returns (bool success_) { // Check for zero-address transactions require(_to != address(0), ETH_TRANSFER_FAILED()); // dispatch message to recipient // by assembly calling "handle" function // we call via assembly to avoid memcopying a very large returndata // returned by a malicious contract assembly { success_ := call( _gasLimit, // gas _to, // recipient _amount, // ether value add(_calldata, 0x20), // inloc mload(_calldata), // inlen 0, // outloc 0 // outlen ) } } /// @dev Sends Ether to the specified address. This method will revert if sending ether fails. /// @param _to The recipient address. /// @param _amount The amount of Ether to send in wei. /// @param _gasLimit The max amount gas to pay for this transaction. function sendEtherAndVerify(address _to, uint256 _amount, uint256 _gasLimit) internal { if (_amount == 0) return; require(sendEther(_to, _amount, _gasLimit, ""), ETH_TRANSFER_FAILED()); } /// @dev Sends Ether to the specified address. This method will revert if sending ether fails. /// @param _to The recipient address. /// @param _amount The amount of Ether to send in wei. function sendEtherAndVerify(address _to, uint256 _amount) internal { sendEtherAndVerify(_to, _amount, gasleft()); } function supportsInterface( address _addr, bytes4 _interfaceId ) internal view returns (bool result_) { (bool success, bytes memory data) = _addr.staticcall(abi.encodeCall(IERC165.supportsInterface, (_interfaceId))); if (success && data.length == 32) { result_ = abi.decode(data, (bool)); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; /// @title LibMath /// @dev This library offers additional math functions for uint256. /// @custom:security-contact [email protected] library LibMath { /// @dev Returns the smaller of the two given values. /// @param _a The first number to compare. /// @param _b The second number to compare. /// @return The smaller of the two numbers. function min(uint256 _a, uint256 _b) internal pure returns (uint256) { return _a > _b ? _b : _a; } /// @dev Returns the larger of the two given values. /// @param _a The first number to compare. /// @param _b The second number to compare. /// @return The larger of the two numbers. function max(uint256 _a, uint256 _b) internal pure returns (uint256) { return _a > _b ? _a : _b; } function capToUint64(uint256 _value) internal pure returns (uint64) { return uint64(min(_value, type(uint64).max)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; /// @title LibNetwork library LibNetwork { uint256 internal constant ETHEREUM_MAINNET = 1; uint256 internal constant ETHEREUM_ROPSTEN = 2; uint256 internal constant ETHEREUM_RINKEBY = 4; uint256 internal constant ETHEREUM_GOERLI = 5; uint256 internal constant ETHEREUM_KOVAN = 42; uint256 internal constant ETHEREUM_HOLESKY = 17_000; uint256 internal constant ETHEREUM_SEPOLIA = 11_155_111; uint256 internal constant ETHEREUM_HELDER = 7_014_190_335; uint256 internal constant ETHEREUM_HOODI = 560_048; uint64 internal constant TAIKO_MAINNET = 167_000; uint64 internal constant TAIKO_HEKLA = 167_009; uint64 internal constant TAIKO_DEVNET = 167_001; uint64 internal constant TAIKO_PRECONF = 167_010; uint256 internal constant ETHEREUM_BLOCK_TIME = 12 seconds; /// @dev Checks if the chain ID represents an Ethereum testnet. /// @param _chainId The chain ID. /// @return true if the chain ID represents an Ethereum testnet, false otherwise. function isEthereumTestnet(uint256 _chainId) internal pure returns (bool) { return _chainId == LibNetwork.ETHEREUM_ROPSTEN || _chainId == LibNetwork.ETHEREUM_RINKEBY || _chainId == LibNetwork.ETHEREUM_GOERLI || _chainId == LibNetwork.ETHEREUM_KOVAN || _chainId == LibNetwork.ETHEREUM_HOLESKY || _chainId == LibNetwork.ETHEREUM_SEPOLIA || _chainId == LibNetwork.ETHEREUM_HELDER || _chainId == LibNetwork.ETHEREUM_HOODI; } /// @dev Checks if the chain ID represents an Ethereum testnet or the Etheruem mainnet. /// @param _chainId The chain ID. /// @return true if the chain ID represents an Ethereum testnet or the Etheruem mainnet, false /// otherwise. function isEthereumMainnetOrTestnet(uint256 _chainId) internal pure returns (bool) { return _chainId == LibNetwork.ETHEREUM_MAINNET || isEthereumTestnet(_chainId); } /// @dev Checks if the chain ID represents the Taiko L2 mainnet. /// @param _chainId The chain ID. /// @return true if the chain ID represents the Taiko L2 mainnet. function isTaikoMainnet(uint256 _chainId) internal pure returns (bool) { return _chainId == TAIKO_MAINNET; } /// @dev Checks if the chain ID represents an internal Taiko devnet's base layer. /// @param _chainId The chain ID. /// @return true if the chain ID represents an internal Taiko devnet's base layer, false /// otherwise. function isTaikoDevnet(uint256 _chainId) internal pure returns (bool) { return _chainId >= 32_300 && _chainId <= 32_400; } /// @dev Checks if the chain supports Dencun hardfork. Note that this check doesn't need to be /// exhaustive. /// @param _chainId The chain ID. /// @return true if the chain supports Dencun hardfork, false otherwise. function isDencunSupported(uint256 _chainId) internal pure returns (bool) { return _chainId == LibNetwork.ETHEREUM_MAINNET || _chainId == LibNetwork.ETHEREUM_HOLESKY || _chainId == LibNetwork.ETHEREUM_SEPOLIA || _chainId == LibNetwork.ETHEREUM_HELDER || _chainId == LibNetwork.ETHEREUM_HOODI || isTaikoDevnet(_chainId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; /// @title LibStrings /// @custom:security-contact [email protected] library LibStrings { bytes32 internal constant B_AUTOMATA_DCAP_ATTESTATION = bytes32("automata_dcap_attestation"); bytes32 internal constant B_SGX_GETH_AUTOMATA = bytes32("sgx_geth_automata"); bytes32 internal constant B_BOND_TOKEN = bytes32("bond_token"); bytes32 internal constant B_BRIDGE = bytes32("bridge"); bytes32 internal constant B_BRIDGE_WATCHDOG = bytes32("bridge_watchdog"); bytes32 internal constant B_BRIDGED_ERC1155 = bytes32("bridged_erc1155"); bytes32 internal constant B_BRIDGED_ERC20 = bytes32("bridged_erc20"); bytes32 internal constant B_BRIDGED_ERC721 = bytes32("bridged_erc721"); bytes32 internal constant B_CHAIN_WATCHDOG = bytes32("chain_watchdog"); bytes32 internal constant B_ERC1155_VAULT = bytes32("erc1155_vault"); bytes32 internal constant B_ERC20_VAULT = bytes32("erc20_vault"); bytes32 internal constant B_ERC721_VAULT = bytes32("erc721_vault"); bytes32 internal constant B_FORCED_INCLUSION_STORE = bytes32("forced_inclusion_store"); bytes32 internal constant B_PRECONF_WHITELIST = bytes32("preconf_whitelist"); bytes32 internal constant B_PRECONF_WHITELIST_OWNER = bytes32("preconf_whitelist_owner"); bytes32 internal constant B_PRECONF_ROUTER = bytes32("preconf_router"); bytes32 internal constant B_TAIKO_WRAPPER = bytes32("taiko_wrapper"); bytes32 internal constant B_PROOF_VERIFIER = bytes32("proof_verifier"); bytes32 internal constant B_SGX_RETH_VERIFIER = bytes32("sgx_reth_verifier"); bytes32 internal constant B_SGX_GETH_VERIFIER = bytes32("sgx_geth_verifier"); bytes32 internal constant B_RISC0_RETH_VERIFIER = bytes32("risc0_reth_verifier"); bytes32 internal constant B_SP1_RETH_VERIFIER = bytes32("sp1_reth_verifier"); bytes32 internal constant B_PROVER_SET = bytes32("prover_set"); bytes32 internal constant B_QUOTA_MANAGER = bytes32("quota_manager"); bytes32 internal constant B_SIGNAL_SERVICE = bytes32("signal_service"); bytes32 internal constant B_TAIKO = bytes32("taiko"); bytes32 internal constant B_TAIKO_TOKEN = bytes32("taiko_token"); bytes32 internal constant B_WITHDRAWER = bytes32("withdrawer"); bytes32 internal constant H_SIGNAL_ROOT = keccak256("SIGNAL_ROOT"); bytes32 internal constant H_STATE_ROOT = keccak256("STATE_ROOT"); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; /// @title ISignalService /// @notice The SignalService contract serves as a secure cross-chain message /// passing system. It defines methods for sending and verifying signals with /// merkle proofs. The trust assumption is that the target chain has secure /// access to the merkle root (such as Taiko injects it in the anchor /// transaction). With this, verifying a signal is reduced to simply verifying /// a merkle proof. /// @custom:security-contact [email protected] interface ISignalService { enum CacheOption { CACHE_NOTHING, CACHE_SIGNAL_ROOT, CACHE_STATE_ROOT, CACHE_BOTH } struct HopProof { /// @notice This hop's destination chain ID. If there is a next hop, this ID is the next /// hop's source chain ID. uint64 chainId; /// @notice The ID of a source chain block whose state root has been synced to the hop's /// destination chain. /// Note that this block ID must be greater than or equal to the block ID where the signal /// was sent on the source chain. uint64 blockId; /// @notice The state root or signal root of the source chain at the above blockId. This /// value has been synced to the destination chain. /// @dev To get both the blockId and the rootHash, apps should subscribe to the /// ChainDataSynced event or query `topBlockId` first using the source chain's ID and /// LibStrings.H_STATE_ROOT to get the most recent block ID synced, then call /// `getSyncedChainData` to read the synchronized data. bytes32 rootHash; /// @notice Options to cache either the state roots or signal roots of middle-hops to the /// current chain. CacheOption cacheOption; /// @notice The signal service's account proof. If this value is empty, then `rootHash` will /// be used as the signal root, otherwise, `rootHash` will be used as the state root. bytes[] accountProof; /// @notice The signal service's storage proof. bytes[] storageProof; } /// @notice Emitted when a remote chain's state root or signal root is /// synced locally as a signal. /// @param chainId The remote chainId. /// @param blockId The chain data's corresponding blockId. /// @param kind A value to mark the data type. /// @param data The remote data. /// @param signal The signal for this chain data. event ChainDataSynced( uint64 indexed chainId, uint64 indexed blockId, bytes32 indexed kind, bytes32 data, bytes32 signal ); /// @notice Emitted when signals are received directly by TaikoL2 in its Anchor transaction. /// @param signalSlots The signal slots that were received. event SignalsReceived(bytes32[] signalSlots); /// @notice Emitted when a signal is sent. /// @param app The address that initiated the signal. /// @param signal The signal (message) that was sent. /// @param slot The location in storage where this signal is stored. /// @param value The value of the signal. event SignalSent(address app, bytes32 signal, bytes32 slot, bytes32 value); /// @notice Emitted when an address is authorized or deauthorized. /// @param addr The address to be authorized or deauthorized. /// @param authorized True if authorized, false otherwise. event Authorized(address indexed addr, bool authorized); /// @dev Allow TaikoL2 to receive signals directly in its Anchor transaction. /// @param _signalSlots The signal slots to mark as received. function receiveSignals(bytes32[] calldata _signalSlots) external; /// @notice Send a signal (message) by setting the storage slot to the same value as the signal /// itself. /// @param _signal The signal (message) to send. /// @return slot_ The location in storage where this signal is stored. function sendSignal(bytes32 _signal) external returns (bytes32 slot_); /// @notice Sync a data from a remote chain locally as a signal. The signal is calculated /// uniquely from chainId, kind, and data. /// @param _chainId The remote chainId. /// @param _kind A value to mark the data type. /// @param _blockId The chain data's corresponding blockId /// @param _chainData The remote data. /// @return signal_ The signal for this chain data. function syncChainData( uint64 _chainId, bytes32 _kind, uint64 _blockId, bytes32 _chainData ) external returns (bytes32 signal_); /// @notice Verifies if a signal has been received on the target chain. /// @param _chainId The identifier for the source chain from which the /// signal originated. /// @param _app The address that initiated the signal. /// @param _signal The signal (message) to send. /// @param _proof Merkle proof that the signal was persisted on the /// source chain. If this proof is empty, then we check if this signal has been marked as /// received by TaikoL2. /// @return numCacheOps_ The number of newly cached items. function proveSignalReceived( uint64 _chainId, address _app, bytes32 _signal, bytes calldata _proof ) external returns (uint256 numCacheOps_); /// @notice Verifies if a signal has been received on the target chain. /// This is the "readonly" version of proveSignalReceived. /// @param _chainId The identifier for the source chain from which the /// signal originated. /// @param _app The address that initiated the signal. /// @param _signal The signal (message) to send. /// @param _proof Merkle proof that the signal was persisted on the /// source chain. If this proof is empty, then we check if this signal has been marked as /// received by TaikoL2. function verifySignalReceived( uint64 _chainId, address _app, bytes32 _signal, bytes calldata _proof ) external view; /// @notice Verifies if a particular signal has already been sent. /// @param _app The address that initiated the signal. /// @param _signal The signal (message) that was sent. /// @return true if the signal has been sent, otherwise false. function isSignalSent(address _app, bytes32 _signal) external view returns (bool); /// @notice Verifies if a particular signal has already been sent. /// @param _signalSlot The location in storage where this signal is stored. function isSignalSent(bytes32 _signalSlot) external view returns (bool); /// @notice Checks if a chain data has been synced. /// @param _chainId The remote chainId. /// @param _kind A value to mark the data type. /// @param _blockId The chain data's corresponding blockId /// @param _chainData The remote data. /// @return true if the data has been synced, otherwise false. function isChainDataSynced( uint64 _chainId, bytes32 _kind, uint64 _blockId, bytes32 _chainData ) external view returns (bool); /// @notice Returns the given block's chain data. /// @param _chainId Identifier of the chainId. /// @param _kind A value to mark the data type. /// @param _blockId The chain data's corresponding block id. If this value is 0, use the top /// block id. /// @return blockId_ The actual block id. /// @return chainData_ The synced chain data. function getSyncedChainData( uint64 _chainId, bytes32 _kind, uint64 _blockId ) external view returns (uint64 blockId_, bytes32 chainData_); /// @notice Returns the data to be used for caching slot generation. /// @param _chainId Identifier of the chainId. /// @param _kind A value to mark the data type. /// @param _blockId The chain data's corresponding block id. If this value is 0, use the top /// block id. /// @return signal_ The signal used for caching slot creation. function signalForChainData( uint64 _chainId, bytes32 _kind, uint64 _blockId ) external pure returns (bytes32 signal_); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import "../based/ITaikoInbox.sol"; /// @title IVerifier /// @notice Defines the function that handles proof verification. /// @custom:security-contact [email protected] interface IVerifier { struct Context { uint64 batchId; bytes32 metaHash; ITaikoInbox.Transition transition; } /// @notice Verifies multiple proofs. This function must throw if the proof cannot be verified. /// @param _ctxs The array of contexts for the proof verifications. /// @param _proof The batch proof to verify. function verifyProof(Context[] calldata _ctxs, bytes calldata _proof) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import "src/shared/based/LibSharedData.sol"; /// @title TaikoInbox /// @notice Acts as the inbox for the Taiko Alethia protocol, a simplified version of the /// original Taiko-Based Contestable Rollup (BCR). The tier-based proof system and /// contestation mechanisms have been removed. /// /// Key assumptions of this protocol: /// - Block proposals and proofs are asynchronous. Proofs are not available at proposal time, /// unlike Taiko Gwyneth, which assumes synchronous composability. /// - Proofs are presumed error-free and thoroughly validated, with proof type management /// delegated to IVerifier contracts. /// /// @dev Registered in the address resolver as "taiko". /// @custom:security-contact [email protected] interface ITaikoInbox { struct BlockParams { // the max number of transactions in this block. Note that if there are not enough // transactions in calldata or blobs, the block will contains as many transactions as // possible. uint16 numTransactions; // The time difference (in seconds) between the timestamp of this block and // the timestamp of the parent block in the same batch. For the first block in a batch, // there is not parent block in the same batch, so the time shift should be 0. uint8 timeShift; // Signals sent on L1 and need to sync to this L2 block. bytes32[] signalSlots; } struct BlobParams { // The hashes of the blob. Note that if this array is not empty. `firstBlobIndex` and // `numBlobs` must be 0. bytes32[] blobHashes; // The index of the first blob in this batch. uint8 firstBlobIndex; // The number of blobs in this batch. Blobs are initially concatenated and subsequently // decompressed via Zlib. uint8 numBlobs; // The byte offset of the blob in the batch. uint32 byteOffset; // The byte size of the blob. uint32 byteSize; // The block number when the blob was created. This value is only non-zero when // `blobHashes` are non-empty. uint64 createdIn; } struct BatchParams { address proposer; address coinbase; bytes32 parentMetaHash; uint64 anchorBlockId; uint64 lastBlockTimestamp; bool revertIfNotFirstProposal; // Specifies the number of blocks to be generated from this batch. BlobParams blobParams; BlockParams[] blocks; } /// @dev This struct holds batch information essential for constructing blocks offchain, but it /// does not include data necessary for batch proving. struct BatchInfo { bytes32 txsHash; // Data to build L2 blocks BlockParams[] blocks; bytes32[] blobHashes; bytes32 extraData; address coinbase; uint64 proposedIn; // Used by node/client uint64 blobCreatedIn; uint32 blobByteOffset; uint32 blobByteSize; uint32 gasLimit; uint64 lastBlockId; uint64 lastBlockTimestamp; // Data for the L2 anchor transaction, shared by all blocks in the batch uint64 anchorBlockId; // corresponds to the `_anchorStateRoot` parameter in the anchor transaction. // The batch's validity proof shall verify the integrity of these two values. bytes32 anchorBlockHash; LibSharedData.BaseFeeConfig baseFeeConfig; } /// @dev This struct holds batch metadata essential for proving the batch. struct BatchMetadata { bytes32 infoHash; address proposer; uint64 batchId; uint64 proposedAt; // Used by node/client } /// @notice Struct representing transition to be proven. struct Transition { bytes32 parentHash; bytes32 blockHash; bytes32 stateRoot; } // @notice Struct representing transition storage /// @notice 4 slots used. struct TransitionState { bytes32 parentHash; bytes32 blockHash; bytes32 stateRoot; address prover; bool inProvingWindow; uint48 createdAt; } /// @notice 3 slots used. struct Batch { bytes32 metaHash; // slot 1 uint64 lastBlockId; // slot 2 uint96 reserved3; uint96 livenessBond; uint64 batchId; // slot 3 uint64 lastBlockTimestamp; uint64 anchorBlockId; uint24 nextTransitionId; uint8 reserved4; // The ID of the transaction that is used to verify this batch. However, if this batch is // not verified as the last one in a transaction, verifiedTransitionId will remain zero. uint24 verifiedTransitionId; } /// @notice Forge is only able to run coverage in case the contracts by default capable of /// compiling without any optimization (neither optimizer runs, no compiling --via-ir flag). struct Stats1 { uint64 genesisHeight; uint64 __reserved2; uint64 lastSyncedBatchId; uint64 lastSyncedAt; } struct Stats2 { uint64 numBatches; uint64 lastVerifiedBatchId; bool paused; uint56 lastProposedIn; uint64 lastUnpausedAt; } struct ForkHeights { uint64 ontake; // measured with block number. uint64 pacaya; // measured with the batch Id, not block number. uint64 shasta; // measured with the batch Id, not block number. uint64 unzen; // measured with the batch Id, not block number. } /// @notice Struct holding Taiko configuration parameters. See {TaikoConfig}. struct Config { /// @notice The chain ID of the network where Taiko contracts are deployed. uint64 chainId; /// @notice The maximum number of unverified batches the protocol supports. uint64 maxUnverifiedBatches; /// @notice Size of the batch ring buffer, allowing extra space for proposals. uint64 batchRingBufferSize; /// @notice The maximum number of verifications allowed when a batch is proposed or proved. uint64 maxBatchesToVerify; /// @notice The maximum gas limit allowed for a block. uint32 blockMaxGasLimit; /// @notice The amount of Taiko token as a prover liveness bond per batch. uint96 livenessBondBase; /// @notice The amount of Taiko token as a prover liveness bond per block. This field is /// deprecated and its value will be ignored. uint96 livenessBondPerBlock; /// @notice The number of batches between two L2-to-L1 state root sync. uint8 stateRootSyncInternal; /// @notice The max differences of the anchor height and the current block number. uint64 maxAnchorHeightOffset; /// @notice Base fee configuration LibSharedData.BaseFeeConfig baseFeeConfig; /// @notice The proving window in seconds. uint16 provingWindow; /// @notice The time required for a transition to be used for verifying a batch. uint24 cooldownWindow; /// @notice The maximum number of signals to be received by TaikoL2. uint8 maxSignalsToReceive; /// @notice The maximum number of blocks per batch. uint16 maxBlocksPerBatch; /// @notice Historical heights of the forks. ForkHeights forkHeights; } /// @notice Struct holding the state variables for the {Taiko} contract. struct State { // Ring buffer for proposed batches and a some recent verified batches. mapping(uint256 batchId_mod_batchRingBufferSize => Batch batch) batches; // Indexing to transition ids (ring buffer not possible) mapping(uint256 batchId => mapping(bytes32 parentHash => uint24 transitionId)) transitionIds; // Ring buffer for transitions mapping( uint256 batchId_mod_batchRingBufferSize => mapping(uint24 transitionId => TransitionState ts) ) transitions; bytes32 __reserve1; // slot 4 - was used as a ring buffer for Ether deposits Stats1 stats1; // slot 5 Stats2 stats2; // slot 6 mapping(address account => uint256 bond) bondBalance; uint256[43] __gap; } /// @notice Emitted when tokens are deposited into a user's bond balance. /// @param user The address of the user who deposited the tokens. /// @param amount The amount of tokens deposited. event BondDeposited(address indexed user, uint256 amount); /// @notice Emitted when tokens are withdrawn from a user's bond balance. /// @param user The address of the user who withdrew the tokens. /// @param amount The amount of tokens withdrawn. event BondWithdrawn(address indexed user, uint256 amount); /// @notice Emitted when a token is credited back to a user's bond balance. /// @param user The address of the user whose bond balance is credited. /// @param amount The amount of tokens credited. event BondCredited(address indexed user, uint256 amount); /// @notice Emitted when a token is debited from a user's bond balance. /// @param user The address of the user whose bond balance is debited. /// @param amount The amount of tokens debited. event BondDebited(address indexed user, uint256 amount); /// @notice Emitted when a batch is synced. /// @param stats1 The Stats1 data structure. event Stats1Updated(Stats1 stats1); /// @notice Emitted when some state variable values changed. /// @param stats2 The Stats2 data structure. event Stats2Updated(Stats2 stats2); /// @notice Emitted when a batch is proposed. /// @param info The info of the proposed batch. /// @param meta The metadata of the proposed batch. /// @param txList The tx list in calldata. event BatchProposed(BatchInfo info, BatchMetadata meta, bytes txList); /// @notice Emitted when multiple transitions are proved. /// @param verifier The address of the verifier. /// @param transitions The transitions data. event BatchesProved(address verifier, uint64[] batchIds, Transition[] transitions); /// @notice Emitted when a transition is overwritten by a conflicting one with the same parent /// hash but different block hash or state root. /// @param batchId The batch ID. /// @param oldTran The old transition overwritten. /// @param newTran The new transition. event ConflictingProof(uint64 batchId, TransitionState oldTran, Transition newTran); /// @notice Emitted when a batch is verified. /// @param batchId The ID of the verified batch. /// @param blockHash The hash of the verified batch. event BatchesVerified(uint64 batchId, bytes32 blockHash); error AnchorBlockIdSmallerThanParent(); error AnchorBlockIdTooLarge(); error AnchorBlockIdTooSmall(); error ArraySizesMismatch(); error BatchNotFound(); error BatchVerified(); error BeyondCurrentFork(); error BlobNotFound(); error BlockNotFound(); error BlobNotSpecified(); error ContractPaused(); error CustomProposerMissing(); error CustomProposerNotAllowed(); error EtherNotPaidAsBond(); error FirstBlockTimeShiftNotZero(); error ForkNotActivated(); error InsufficientBond(); error InvalidBlobCreatedIn(); error InvalidBlobParams(); error InvalidGenesisBlockHash(); error InvalidParams(); error InvalidTransitionBlockHash(); error InvalidTransitionParentHash(); error InvalidTransitionStateRoot(); error MetaHashMismatch(); error MsgValueNotZero(); error NoBlocksToProve(); error NotFirstProposal(); error NotInboxWrapper(); error ParentMetaHashMismatch(); error SameTransition(); error SignalNotSent(); error TimestampSmallerThanParent(); error TimestampTooLarge(); error TimestampTooSmall(); error TooManyBatches(); error TooManyBlocks(); error TooManySignals(); error TransitionNotFound(); error ZeroAnchorBlockHash(); /// @notice Proposes a batch of blocks. /// @param _params ABI-encoded parameters. /// @param _txList The transaction list in calldata. If the txList is empty, blob will be used /// for data availability. /// @return info_ The info of the proposed batch. /// @return meta_ The metadata of the proposed batch. function proposeBatch( bytes calldata _params, bytes calldata _txList ) external returns (ITaikoInbox.BatchInfo memory info_, ITaikoInbox.BatchMetadata memory meta_); /// @notice Proves state transitions for multiple batches with a single aggregated proof. /// @param _params ABI-encoded parameter containing: /// - metas: Array of metadata for each batch being proved. /// - transitions: Array of batch transitions to be proved. /// @param _proof The aggregated cryptographic proof proving the batches transitions. function proveBatches(bytes calldata _params, bytes calldata _proof) external; /// @notice Deposits TAIKO tokens into the contract to be used as liveness bond. /// @param _amount The amount of TAIKO tokens to deposit. function depositBond(uint256 _amount) external payable; /// @notice Withdraws a specified amount of TAIKO tokens from the contract. /// @param _amount The amount of TAIKO tokens to withdraw. function withdrawBond(uint256 _amount) external; /// @notice Returns the TAIKO token balance of a specific user. /// @param _user The address of the user. /// @return The TAIKO token balance of the user. function bondBalanceOf(address _user) external view returns (uint256); /// @notice Retrieves the Bond token address. If Ether is used as bond, this function returns /// address(0). /// @return The Bond token address. function bondToken() external view returns (address); /// @notice Retrieves the first set of protocol statistics. /// @return Stats1 structure containing the statistics. function getStats1() external view returns (Stats1 memory); /// @notice Retrieves the second set of protocol statistics. /// @return Stats2 structure containing the statistics. function getStats2() external view returns (Stats2 memory); /// @notice Retrieves data about a specific batch. /// @param _batchId The ID of the batch to retrieve. /// @return batch_ The batch data. function getBatch(uint64 _batchId) external view returns (Batch memory batch_); /// @notice Retrieves a specific transition by batch ID and transition ID. This function may /// revert if the transition is not found. /// @param _batchId The batch ID. /// @param _tid The transition ID. /// @return The specified transition state. function getTransitionById( uint64 _batchId, uint24 _tid ) external view returns (ITaikoInbox.TransitionState memory); /// @notice Retrieves a specific transition by batch ID and parent Hash. This function may /// revert if the transition is not found. /// @param _batchId The batch ID. /// @param _parentHash The parent hash. /// @return The specified transition state. function getTransitionByParentHash( uint64 _batchId, bytes32 _parentHash ) external view returns (ITaikoInbox.TransitionState memory); /// @notice Retrieves the transition used for the last verified batch. /// @return batchId_ The batch ID of the last verified transition. /// @return blockId_ The block ID of the last verified block. /// @return ts_ The last verified transition. function getLastVerifiedTransition() external view returns (uint64 batchId_, uint64 blockId_, TransitionState memory ts_); /// @notice Retrieves the transition used for the last synced batch. /// @return batchId_ The batch ID of the last synced transition. /// @return blockId_ The block ID of the last synced block. /// @return ts_ The last synced transition. function getLastSyncedTransition() external view returns (uint64 batchId_, uint64 blockId_, TransitionState memory ts_); /// @notice Retrieves the transition used for verifying a batch. /// @param _batchId The batch ID. /// @return The transition used for verifying the batch. function getBatchVerifyingTransition(uint64 _batchId) external view returns (TransitionState memory); /// @notice Retrieves the current protocol configuration. /// @return The current configuration. function pacayaConfig() external view returns (Config memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import "./ITaikoInbox.sol"; /// @title IProposeBatch /// @notice This interface defines the proposeBatch function that is also part of the ITaikoInbox /// interface. /// @custom:security-contact [email protected] interface IProposeBatch { /// @notice Proposes a batch of blocks. /// @param _params ABI-encoded parameters. /// @param _txList The transaction list in calldata. If the txList is empty, blob will be used /// for data availability. /// @return info_ The info of the proposed batch. /// @return meta_ The mmetadata of the proposed batch. function proposeBatch( bytes calldata _params, bytes calldata _txList ) external returns (ITaikoInbox.BatchInfo memory info_, ITaikoInbox.BatchMetadata memory meta_); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/UUPSUpgradeable.sol) pragma solidity ^0.8.0; import "../../interfaces/draft-IERC1822.sol"; import "../ERC1967/ERC1967Upgrade.sol"; /** * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy. * * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing * `UUPSUpgradeable` with a custom implementation of upgrades. * * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism. * * _Available since v4.1._ */ abstract contract UUPSUpgradeable is IERC1822Proxiable, ERC1967Upgrade { /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment address private immutable __self = address(this); /** * @dev Check that the execution is being performed through a delegatecall call and that the execution context is * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to * fail. */ modifier onlyProxy() { require(address(this) != __self, "Function must be called through delegatecall"); require(_getImplementation() == __self, "Function must be called through active proxy"); _; } /** * @dev Check that the execution is not being performed through a delegate call. This allows a function to be * callable on the implementing contract but not through proxies. */ modifier notDelegated() { require(address(this) == __self, "UUPSUpgradeable: must not be called through delegatecall"); _; } /** * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the * implementation. It is used to validate the implementation's compatibility when performing an upgrade. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier. */ function proxiableUUID() external view virtual override notDelegated returns (bytes32) { return _IMPLEMENTATION_SLOT; } /** * @dev Upgrade the implementation of the proxy to `newImplementation`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. * * @custom:oz-upgrades-unsafe-allow-reachable delegatecall */ function upgradeTo(address newImplementation) public virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallUUPS(newImplementation, new bytes(0), false); } /** * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call * encoded in `data`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. * * @custom:oz-upgrades-unsafe-allow-reachable delegatecall */ function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallUUPS(newImplementation, data, true); } /** * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by * {upgradeTo} and {upgradeToAndCall}. * * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}. * * ```solidity * function _authorizeUpgrade(address) internal override onlyOwner {} * ``` */ function _authorizeUpgrade(address newImplementation) internal virtual; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol) pragma solidity ^0.8.0; import "./OwnableUpgradeable.sol"; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership} and {acceptOwnership}. * * This module is used through inheritance. It will make available all functions * from parent (Ownable). */ abstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable { address private _pendingOwner; event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner); function __Ownable2Step_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable2Step_init_unchained() internal onlyInitializing { } /** * @dev Returns the address of the pending owner. */ function pendingOwner() public view virtual returns (address) { return _pendingOwner; } /** * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual override onlyOwner { _pendingOwner = newOwner; emit OwnershipTransferStarted(owner(), newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner. * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual override { delete _pendingOwner; super._transferOwnership(newOwner); } /** * @dev The new owner accepts the ownership transfer. */ function acceptOwnership() public virtual { address sender = _msgSender(); require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner"); _transferOwnership(sender); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; /// @title IResolver /// @notice This contract acts as a bridge for name-to-address resolution. /// @custom:security-contact [email protected] interface IResolver { error RESOLVED_TO_ZERO_ADDRESS(); /// @notice Resolves a name to its address deployed on a specified chain. /// @param _chainId The chainId of interest. /// @param _name Name whose address is to be resolved. /// @param _allowZeroAddress If set to true, does not throw if the resolved /// address is `address(0)`. /// @return Address associated with the given name on the specified /// chain. function resolve( uint256 _chainId, bytes32 _name, bool _allowZeroAddress ) external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; library LibSharedData { /// @dev Struct that represents L2 basefee configurations struct BaseFeeConfig { uint8 adjustmentQuotient; uint8 sharingPctg; uint32 gasIssuancePerSecond; uint64 minGasExcess; uint32 maxGasIssuancePerBlock; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol) pragma solidity ^0.8.0; /** * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified * proxy whose upgrades are fully controlled by the current implementation. */ interface IERC1822Proxiable { /** * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation * address. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. */ function proxiableUUID() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol) pragma solidity ^0.8.2; import "../beacon/IBeacon.sol"; import "../../interfaces/IERC1967.sol"; import "../../interfaces/draft-IERC1822.sol"; import "../../utils/Address.sol"; import "../../utils/StorageSlot.sol"; /** * @dev This abstract contract provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. * * _Available since v4.1._ */ abstract contract ERC1967Upgrade is IERC1967 { // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Returns the current implementation address. */ function _getImplementation() internal view returns (address) { return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; } /** * @dev Stores a new address in the EIP1967 implementation slot. */ function _setImplementation(address newImplementation) private { require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Perform implementation upgrade * * Emits an {Upgraded} event. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Perform implementation upgrade with additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCall(address newImplementation, bytes memory data, bool forceCall) internal { _upgradeTo(newImplementation); if (data.length > 0 || forceCall) { Address.functionDelegateCall(newImplementation, data); } } /** * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCallUUPS(address newImplementation, bytes memory data, bool forceCall) internal { // Upgrades from old implementations will perform a rollback test. This test requires the new // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing // this special case will break upgrade paths from old UUPS implementation to new ones. if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) { _setImplementation(newImplementation); } else { try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) { require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID"); } catch { revert("ERC1967Upgrade: new implementation is not UUPS"); } _upgradeToAndCall(newImplementation, data, forceCall); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Returns the current admin. */ function _getAdmin() internal view returns (address) { return StorageSlot.getAddressSlot(_ADMIN_SLOT).value; } /** * @dev Stores a new address in the EIP1967 admin slot. */ function _setAdmin(address newAdmin) private { require(newAdmin != address(0), "ERC1967: new admin is the zero address"); StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {AdminChanged} event. */ function _changeAdmin(address newAdmin) internal { emit AdminChanged(_getAdmin(), newAdmin); _setAdmin(newAdmin); } /** * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor. */ bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Returns the current beacon. */ function _getBeacon() internal view returns (address) { return StorageSlot.getAddressSlot(_BEACON_SLOT).value; } /** * @dev Stores a new beacon in the EIP1967 beacon slot. */ function _setBeacon(address newBeacon) private { require(Address.isContract(newBeacon), "ERC1967: new beacon is not a contract"); require( Address.isContract(IBeacon(newBeacon).implementation()), "ERC1967: beacon implementation is not a contract" ); StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon; } /** * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that). * * Emits a {BeaconUpgraded} event. */ function _upgradeBeaconToAndCall(address newBeacon, bytes memory data, bool forceCall) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0 || forceCall) { Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @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 Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 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 functions marked with `initializer` can be nested in the context of a * constructor. * * Emits an {Initialized} event. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _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 255 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _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() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @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 { require(!_initializing, "Initializable: contract is initializing"); if (_initialized != type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint8) { return _initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _initializing; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol) pragma solidity ^0.8.0; /** * @dev This is the interface that {BeaconProxy} expects of its beacon. */ interface IBeacon { /** * @dev Must return an address that can be used as a delegate call target. * * {BeaconProxy} will check that this address is a contract. */ function implementation() external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol) pragma solidity ^0.8.0; /** * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC. * * _Available since v4.8.3._ */ interface IERC1967 { /** * @dev Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Emitted when the beacon is changed. */ event BeaconUpgraded(address indexed beacon); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ```solidity * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._ * _Available since v4.9 for `string`, `bytes`._ */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } struct StringSlot { string value; } struct BytesSlot { bytes value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } /** * @dev Returns an `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol) pragma solidity ^0.8.0; 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; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
{ "remappings": [ "openzeppelin/=node_modules/@openzeppelin/", "@openzeppelin/=node_modules/@openzeppelin/", "@openzeppelin-upgrades/contracts/=node_modules/@openzeppelin/contracts-upgradeable/", "@risc0/contracts/=node_modules/risc0-ethereum/contracts/src/", "@solady/=node_modules/solady/", "@optimism/=node_modules/optimism/", "@sp1-contracts/=node_modules/sp1-contracts/contracts/", "forge-std/=node_modules/forge-std/", "ds-test/=node_modules/ds-test/src/", "@p256-verifier/contracts/=node_modules/p256-verifier/src/", "eigenlayer-middleware/=node_modules/eigenlayer-middleware/", "eigenlayer-contracts/=node_modules/eigenlayer-contracts/", "src/=contracts/", "test/=test/", "script/=script/", "optimism/=node_modules/optimism/", "p256-verifier/=node_modules/p256-verifier/", "risc0-ethereum/=node_modules/risc0-ethereum/", "solady/=node_modules/solady/", "sp1-contracts/=node_modules/sp1-contracts/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "cancun", "viaIR": false, "libraries": {} }
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_wrapper","type":"address"},{"internalType":"address","name":"_verifier","type":"address"},{"internalType":"address","name":"_bondToken","type":"address"},{"internalType":"address","name":"_signalService","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ACCESS_DENIED","type":"error"},{"inputs":[],"name":"AnchorBlockIdSmallerThanParent","type":"error"},{"inputs":[],"name":"AnchorBlockIdTooLarge","type":"error"},{"inputs":[],"name":"AnchorBlockIdTooSmall","type":"error"},{"inputs":[],"name":"ArraySizesMismatch","type":"error"},{"inputs":[],"name":"BatchNotFound","type":"error"},{"inputs":[],"name":"BatchVerified","type":"error"},{"inputs":[],"name":"BeyondCurrentFork","type":"error"},{"inputs":[],"name":"BlobNotFound","type":"error"},{"inputs":[],"name":"BlobNotSpecified","type":"error"},{"inputs":[],"name":"BlockNotFound","type":"error"},{"inputs":[],"name":"ContractPaused","type":"error"},{"inputs":[],"name":"CustomProposerMissing","type":"error"},{"inputs":[],"name":"CustomProposerNotAllowed","type":"error"},{"inputs":[],"name":"ETH_TRANSFER_FAILED","type":"error"},{"inputs":[],"name":"EtherNotPaidAsBond","type":"error"},{"inputs":[],"name":"FUNC_NOT_IMPLEMENTED","type":"error"},{"inputs":[],"name":"FirstBlockTimeShiftNotZero","type":"error"},{"inputs":[],"name":"ForkNotActivated","type":"error"},{"inputs":[],"name":"INVALID_PAUSE_STATUS","type":"error"},{"inputs":[],"name":"InsufficientBond","type":"error"},{"inputs":[],"name":"InvalidBlobCreatedIn","type":"error"},{"inputs":[],"name":"InvalidBlobParams","type":"error"},{"inputs":[],"name":"InvalidGenesisBlockHash","type":"error"},{"inputs":[],"name":"InvalidParams","type":"error"},{"inputs":[],"name":"InvalidTransitionBlockHash","type":"error"},{"inputs":[],"name":"InvalidTransitionParentHash","type":"error"},{"inputs":[],"name":"InvalidTransitionStateRoot","type":"error"},{"inputs":[],"name":"MetaHashMismatch","type":"error"},{"inputs":[],"name":"MsgValueNotZero","type":"error"},{"inputs":[],"name":"NoBlocksToProve","type":"error"},{"inputs":[],"name":"NotFirstProposal","type":"error"},{"inputs":[],"name":"NotInboxWrapper","type":"error"},{"inputs":[],"name":"ParentMetaHashMismatch","type":"error"},{"inputs":[],"name":"REENTRANT_CALL","type":"error"},{"inputs":[],"name":"RESOLVER_NOT_FOUND","type":"error"},{"inputs":[],"name":"SameTransition","type":"error"},{"inputs":[],"name":"SignalNotSent","type":"error"},{"inputs":[],"name":"TimestampSmallerThanParent","type":"error"},{"inputs":[],"name":"TimestampTooLarge","type":"error"},{"inputs":[],"name":"TimestampTooSmall","type":"error"},{"inputs":[],"name":"TooManyBatches","type":"error"},{"inputs":[],"name":"TooManyBlocks","type":"error"},{"inputs":[],"name":"TooManySignals","type":"error"},{"inputs":[],"name":"TransitionNotFound","type":"error"},{"inputs":[],"name":"ZERO_ADDRESS","type":"error"},{"inputs":[],"name":"ZERO_VALUE","type":"error"},{"inputs":[],"name":"ZeroAnchorBlockHash","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"bytes32","name":"txsHash","type":"bytes32"},{"components":[{"internalType":"uint16","name":"numTransactions","type":"uint16"},{"internalType":"uint8","name":"timeShift","type":"uint8"},{"internalType":"bytes32[]","name":"signalSlots","type":"bytes32[]"}],"internalType":"struct ITaikoInbox.BlockParams[]","name":"blocks","type":"tuple[]"},{"internalType":"bytes32[]","name":"blobHashes","type":"bytes32[]"},{"internalType":"bytes32","name":"extraData","type":"bytes32"},{"internalType":"address","name":"coinbase","type":"address"},{"internalType":"uint64","name":"proposedIn","type":"uint64"},{"internalType":"uint64","name":"blobCreatedIn","type":"uint64"},{"internalType":"uint32","name":"blobByteOffset","type":"uint32"},{"internalType":"uint32","name":"blobByteSize","type":"uint32"},{"internalType":"uint32","name":"gasLimit","type":"uint32"},{"internalType":"uint64","name":"lastBlockId","type":"uint64"},{"internalType":"uint64","name":"lastBlockTimestamp","type":"uint64"},{"internalType":"uint64","name":"anchorBlockId","type":"uint64"},{"internalType":"bytes32","name":"anchorBlockHash","type":"bytes32"},{"components":[{"internalType":"uint8","name":"adjustmentQuotient","type":"uint8"},{"internalType":"uint8","name":"sharingPctg","type":"uint8"},{"internalType":"uint32","name":"gasIssuancePerSecond","type":"uint32"},{"internalType":"uint64","name":"minGasExcess","type":"uint64"},{"internalType":"uint32","name":"maxGasIssuancePerBlock","type":"uint32"}],"internalType":"struct LibSharedData.BaseFeeConfig","name":"baseFeeConfig","type":"tuple"}],"indexed":false,"internalType":"struct ITaikoInbox.BatchInfo","name":"info","type":"tuple"},{"components":[{"internalType":"bytes32","name":"infoHash","type":"bytes32"},{"internalType":"address","name":"proposer","type":"address"},{"internalType":"uint64","name":"batchId","type":"uint64"},{"internalType":"uint64","name":"proposedAt","type":"uint64"}],"indexed":false,"internalType":"struct ITaikoInbox.BatchMetadata","name":"meta","type":"tuple"},{"indexed":false,"internalType":"bytes","name":"txList","type":"bytes"}],"name":"BatchProposed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"verifier","type":"address"},{"indexed":false,"internalType":"uint64[]","name":"batchIds","type":"uint64[]"},{"components":[{"internalType":"bytes32","name":"parentHash","type":"bytes32"},{"internalType":"bytes32","name":"blockHash","type":"bytes32"},{"internalType":"bytes32","name":"stateRoot","type":"bytes32"}],"indexed":false,"internalType":"struct ITaikoInbox.Transition[]","name":"transitions","type":"tuple[]"}],"name":"BatchesProved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"batchId","type":"uint64"},{"indexed":false,"internalType":"bytes32","name":"blockHash","type":"bytes32"}],"name":"BatchesVerified","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"BondCredited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"BondDebited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"BondDeposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"BondWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"batchId","type":"uint64"},{"components":[{"internalType":"bytes32","name":"parentHash","type":"bytes32"},{"internalType":"bytes32","name":"blockHash","type":"bytes32"},{"internalType":"bytes32","name":"stateRoot","type":"bytes32"},{"internalType":"address","name":"prover","type":"address"},{"internalType":"bool","name":"inProvingWindow","type":"bool"},{"internalType":"uint48","name":"createdAt","type":"uint48"}],"indexed":false,"internalType":"struct ITaikoInbox.TransitionState","name":"oldTran","type":"tuple"},{"components":[{"internalType":"bytes32","name":"parentHash","type":"bytes32"},{"internalType":"bytes32","name":"blockHash","type":"bytes32"},{"internalType":"bytes32","name":"stateRoot","type":"bytes32"}],"indexed":false,"internalType":"struct ITaikoInbox.Transition","name":"newTran","type":"tuple"}],"name":"ConflictingProof","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint64","name":"genesisHeight","type":"uint64"},{"internalType":"uint64","name":"__reserved2","type":"uint64"},{"internalType":"uint64","name":"lastSyncedBatchId","type":"uint64"},{"internalType":"uint64","name":"lastSyncedAt","type":"uint64"}],"indexed":false,"internalType":"struct ITaikoInbox.Stats1","name":"stats1","type":"tuple"}],"name":"Stats1Updated","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint64","name":"numBatches","type":"uint64"},{"internalType":"uint64","name":"lastVerifiedBatchId","type":"uint64"},{"internalType":"bool","name":"paused","type":"bool"},{"internalType":"uint56","name":"lastProposedIn","type":"uint56"},{"internalType":"uint64","name":"lastUnpausedAt","type":"uint64"}],"indexed":false,"internalType":"struct ITaikoInbox.Stats2","name":"stats2","type":"tuple"}],"name":"Stats2Updated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"batchId","type":"uint64"},{"indexed":false,"internalType":"uint24","name":"tid","type":"uint24"},{"components":[{"internalType":"bytes32","name":"parentHash","type":"bytes32"},{"internalType":"bytes32","name":"blockHash","type":"bytes32"},{"internalType":"bytes32","name":"stateRoot","type":"bytes32"},{"internalType":"address","name":"prover","type":"address"},{"internalType":"bool","name":"inProvingWindow","type":"bool"},{"internalType":"uint48","name":"createdAt","type":"uint48"}],"indexed":false,"internalType":"struct ITaikoInbox.TransitionState","name":"ts","type":"tuple"}],"name":"TransitionWritten","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"bondBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bondToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"depositBond","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint64","name":"_batchId","type":"uint64"}],"name":"getBatch","outputs":[{"components":[{"internalType":"bytes32","name":"metaHash","type":"bytes32"},{"internalType":"uint64","name":"lastBlockId","type":"uint64"},{"internalType":"uint96","name":"reserved3","type":"uint96"},{"internalType":"uint96","name":"livenessBond","type":"uint96"},{"internalType":"uint64","name":"batchId","type":"uint64"},{"internalType":"uint64","name":"lastBlockTimestamp","type":"uint64"},{"internalType":"uint64","name":"anchorBlockId","type":"uint64"},{"internalType":"uint24","name":"nextTransitionId","type":"uint24"},{"internalType":"uint8","name":"reserved4","type":"uint8"},{"internalType":"uint24","name":"verifiedTransitionId","type":"uint24"}],"internalType":"struct ITaikoInbox.Batch","name":"batch_","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"_batchId","type":"uint64"}],"name":"getBatchVerifyingTransition","outputs":[{"components":[{"internalType":"bytes32","name":"parentHash","type":"bytes32"},{"internalType":"bytes32","name":"blockHash","type":"bytes32"},{"internalType":"bytes32","name":"stateRoot","type":"bytes32"},{"internalType":"address","name":"prover","type":"address"},{"internalType":"bool","name":"inProvingWindow","type":"bool"},{"internalType":"uint48","name":"createdAt","type":"uint48"}],"internalType":"struct ITaikoInbox.TransitionState","name":"ts_","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLastSyncedTransition","outputs":[{"internalType":"uint64","name":"batchId_","type":"uint64"},{"internalType":"uint64","name":"blockId_","type":"uint64"},{"components":[{"internalType":"bytes32","name":"parentHash","type":"bytes32"},{"internalType":"bytes32","name":"blockHash","type":"bytes32"},{"internalType":"bytes32","name":"stateRoot","type":"bytes32"},{"internalType":"address","name":"prover","type":"address"},{"internalType":"bool","name":"inProvingWindow","type":"bool"},{"internalType":"uint48","name":"createdAt","type":"uint48"}],"internalType":"struct ITaikoInbox.TransitionState","name":"ts_","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLastVerifiedTransition","outputs":[{"internalType":"uint64","name":"batchId_","type":"uint64"},{"internalType":"uint64","name":"blockId_","type":"uint64"},{"components":[{"internalType":"bytes32","name":"parentHash","type":"bytes32"},{"internalType":"bytes32","name":"blockHash","type":"bytes32"},{"internalType":"bytes32","name":"stateRoot","type":"bytes32"},{"internalType":"address","name":"prover","type":"address"},{"internalType":"bool","name":"inProvingWindow","type":"bool"},{"internalType":"uint48","name":"createdAt","type":"uint48"}],"internalType":"struct ITaikoInbox.TransitionState","name":"ts_","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getStats1","outputs":[{"components":[{"internalType":"uint64","name":"genesisHeight","type":"uint64"},{"internalType":"uint64","name":"__reserved2","type":"uint64"},{"internalType":"uint64","name":"lastSyncedBatchId","type":"uint64"},{"internalType":"uint64","name":"lastSyncedAt","type":"uint64"}],"internalType":"struct ITaikoInbox.Stats1","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getStats2","outputs":[{"components":[{"internalType":"uint64","name":"numBatches","type":"uint64"},{"internalType":"uint64","name":"lastVerifiedBatchId","type":"uint64"},{"internalType":"bool","name":"paused","type":"bool"},{"internalType":"uint56","name":"lastProposedIn","type":"uint56"},{"internalType":"uint64","name":"lastUnpausedAt","type":"uint64"}],"internalType":"struct ITaikoInbox.Stats2","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"_batchId","type":"uint64"},{"internalType":"uint24","name":"_tid","type":"uint24"}],"name":"getTransitionById","outputs":[{"components":[{"internalType":"bytes32","name":"parentHash","type":"bytes32"},{"internalType":"bytes32","name":"blockHash","type":"bytes32"},{"internalType":"bytes32","name":"stateRoot","type":"bytes32"},{"internalType":"address","name":"prover","type":"address"},{"internalType":"bool","name":"inProvingWindow","type":"bool"},{"internalType":"uint48","name":"createdAt","type":"uint48"}],"internalType":"struct ITaikoInbox.TransitionState","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"_batchId","type":"uint64"},{"internalType":"bytes32","name":"_parentHash","type":"bytes32"}],"name":"getTransitionByParentHash","outputs":[{"components":[{"internalType":"bytes32","name":"parentHash","type":"bytes32"},{"internalType":"bytes32","name":"blockHash","type":"bytes32"},{"internalType":"bytes32","name":"stateRoot","type":"bytes32"},{"internalType":"address","name":"prover","type":"address"},{"internalType":"bool","name":"inProvingWindow","type":"bool"},{"internalType":"uint48","name":"createdAt","type":"uint48"}],"internalType":"struct ITaikoInbox.TransitionState","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"impl","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"inNonReentrant","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"inboxWrapper","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"bytes32","name":"_genesisBlockHash","type":"bytes32"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isOnL1","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pacayaConfig","outputs":[{"components":[{"internalType":"uint64","name":"chainId","type":"uint64"},{"internalType":"uint64","name":"maxUnverifiedBatches","type":"uint64"},{"internalType":"uint64","name":"batchRingBufferSize","type":"uint64"},{"internalType":"uint64","name":"maxBatchesToVerify","type":"uint64"},{"internalType":"uint32","name":"blockMaxGasLimit","type":"uint32"},{"internalType":"uint96","name":"livenessBondBase","type":"uint96"},{"internalType":"uint96","name":"livenessBondPerBlock","type":"uint96"},{"internalType":"uint8","name":"stateRootSyncInternal","type":"uint8"},{"internalType":"uint64","name":"maxAnchorHeightOffset","type":"uint64"},{"components":[{"internalType":"uint8","name":"adjustmentQuotient","type":"uint8"},{"internalType":"uint8","name":"sharingPctg","type":"uint8"},{"internalType":"uint32","name":"gasIssuancePerSecond","type":"uint32"},{"internalType":"uint64","name":"minGasExcess","type":"uint64"},{"internalType":"uint32","name":"maxGasIssuancePerBlock","type":"uint32"}],"internalType":"struct LibSharedData.BaseFeeConfig","name":"baseFeeConfig","type":"tuple"},{"internalType":"uint16","name":"provingWindow","type":"uint16"},{"internalType":"uint24","name":"cooldownWindow","type":"uint24"},{"internalType":"uint8","name":"maxSignalsToReceive","type":"uint8"},{"internalType":"uint16","name":"maxBlocksPerBatch","type":"uint16"},{"components":[{"internalType":"uint64","name":"ontake","type":"uint64"},{"internalType":"uint64","name":"pacaya","type":"uint64"},{"internalType":"uint64","name":"shasta","type":"uint64"},{"internalType":"uint64","name":"unzen","type":"uint64"}],"internalType":"struct ITaikoInbox.ForkHeights","name":"forkHeights","type":"tuple"}],"internalType":"struct ITaikoInbox.Config","name":"","type":"tuple"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_params","type":"bytes"},{"internalType":"bytes","name":"_txList","type":"bytes"}],"name":"proposeBatch","outputs":[{"components":[{"internalType":"bytes32","name":"txsHash","type":"bytes32"},{"components":[{"internalType":"uint16","name":"numTransactions","type":"uint16"},{"internalType":"uint8","name":"timeShift","type":"uint8"},{"internalType":"bytes32[]","name":"signalSlots","type":"bytes32[]"}],"internalType":"struct ITaikoInbox.BlockParams[]","name":"blocks","type":"tuple[]"},{"internalType":"bytes32[]","name":"blobHashes","type":"bytes32[]"},{"internalType":"bytes32","name":"extraData","type":"bytes32"},{"internalType":"address","name":"coinbase","type":"address"},{"internalType":"uint64","name":"proposedIn","type":"uint64"},{"internalType":"uint64","name":"blobCreatedIn","type":"uint64"},{"internalType":"uint32","name":"blobByteOffset","type":"uint32"},{"internalType":"uint32","name":"blobByteSize","type":"uint32"},{"internalType":"uint32","name":"gasLimit","type":"uint32"},{"internalType":"uint64","name":"lastBlockId","type":"uint64"},{"internalType":"uint64","name":"lastBlockTimestamp","type":"uint64"},{"internalType":"uint64","name":"anchorBlockId","type":"uint64"},{"internalType":"bytes32","name":"anchorBlockHash","type":"bytes32"},{"components":[{"internalType":"uint8","name":"adjustmentQuotient","type":"uint8"},{"internalType":"uint8","name":"sharingPctg","type":"uint8"},{"internalType":"uint32","name":"gasIssuancePerSecond","type":"uint32"},{"internalType":"uint64","name":"minGasExcess","type":"uint64"},{"internalType":"uint32","name":"maxGasIssuancePerBlock","type":"uint32"}],"internalType":"struct LibSharedData.BaseFeeConfig","name":"baseFeeConfig","type":"tuple"}],"internalType":"struct ITaikoInbox.BatchInfo","name":"info_","type":"tuple"},{"components":[{"internalType":"bytes32","name":"infoHash","type":"bytes32"},{"internalType":"address","name":"proposer","type":"address"},{"internalType":"uint64","name":"batchId","type":"uint64"},{"internalType":"uint64","name":"proposedAt","type":"uint64"}],"internalType":"struct ITaikoInbox.BatchMetadata","name":"meta_","type":"tuple"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"_params","type":"bytes"},{"internalType":"bytes","name":"_proof","type":"bytes"}],"name":"proveBatches","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resolver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"signalService","outputs":[{"internalType":"contract ISignalService","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"state","outputs":[{"internalType":"bytes32","name":"__reserve1","type":"bytes32"},{"components":[{"internalType":"uint64","name":"genesisHeight","type":"uint64"},{"internalType":"uint64","name":"__reserved2","type":"uint64"},{"internalType":"uint64","name":"lastSyncedBatchId","type":"uint64"},{"internalType":"uint64","name":"lastSyncedAt","type":"uint64"}],"internalType":"struct ITaikoInbox.Stats1","name":"stats1","type":"tuple"},{"components":[{"internalType":"uint64","name":"numBatches","type":"uint64"},{"internalType":"uint64","name":"lastVerifiedBatchId","type":"uint64"},{"internalType":"bool","name":"paused","type":"bool"},{"internalType":"uint56","name":"lastProposedIn","type":"uint56"},{"internalType":"uint64","name":"lastUnpausedAt","type":"uint64"}],"internalType":"struct ITaikoInbox.Stats2","name":"stats2","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"verifier","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"_length","type":"uint64"}],"name":"verifyBatches","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawBond","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"_batchId","type":"uint64"},{"internalType":"bytes32","name":"_parentHash","type":"bytes32"},{"internalType":"bytes32","name":"_blockHash","type":"bytes32"},{"internalType":"bytes32","name":"_stateRoot","type":"bytes32"},{"internalType":"address","name":"_prover","type":"address"},{"internalType":"bool","name":"_inProvingWindow","type":"bool"}],"name":"writeTransition","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
61014060405230608052348015610014575f5ffd5b506040516160793803806160798339810160408190526100339161019c565b5f60a081905284908490849084906100496100c5565b50826001600160a01b0381166100725760405163538ba4f960e01b815260040160405180910390fd5b816001600160a01b03811661009a5760405163538ba4f960e01b815260040160405180910390fd5b50506001600160a01b0393841660c05291831660e0528216610100521661012052506101ed92505050565b5f54610100900460ff16156101305760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff9081161461017f575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b80516001600160a01b0381168114610197575f5ffd5b919050565b5f5f5f5f608085870312156101af575f5ffd5b6101b885610181565b93506101c660208601610181565b92506101d460408601610181565b91506101e260608601610181565b905092959194509250565b60805160a05160c05160e0516101005161012051615dc76102b25f395f8181610537015281816135620152613c3e01525f818161079b015281816121c60152818161220001528181613f8501528181614049015281816140ac0152818161412c015261416b01525f81816103c7015281816129c301528181612aec0152612b5101525f81816104e501528181610e260152610f0b01525f61022401525f8181610acf01528181610b0f015281816117360152818161177601526117ed0152615dc75ff3fe608060405260043610610212575f3560e01c80637e7501dc1161011e578063c152c9eb116100a8578063cee1136c1161006d578063cee1136c146107fb578063e30c39781461080f578063e8353dc01461082c578063f2fde38b1461084b578063ff109f591461086a575f5ffd5b8063c152c9eb146106aa578063c19d93fb146106c9578063c28f43921461078a578063c3daab96146107bd578063c9cc2843146107dc575f5ffd5b80638da5cb5b116100ee5780638da5cb5b146106015780639c4364731461061e578063a4b2355414610641578063a9c2c83514610654578063b932bf2b14610689575f5ffd5b80637e7501dc146105815780638456cb59146105ad578063888775d9146105c15780638abf6077146105ed575f5ffd5b806347faad141161019f57806359df11181161016f57806359df1118146104d45780635c975abb1461050757806362d0945314610526578063715018a61461055957806379ba50971461056d575f5ffd5b806347faad141461045f5780634dcb05f91461048c5780634f1ef2861461049f57806352d1902d146104b2575f5ffd5b80632b7ac3f3116101e55780632b7ac3f3146103b65780632cc0b254146103e95780633075db56146104085780633659cfe61461042c5780633f4ba83a1461044b575f5ffd5b806304f3bcec146102165780630cc62b421461026157806312ad809c1461028257806326baca1c1461030c575b5f5ffd5b348015610221575f5ffd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b34801561026c575f5ffd5b5061028061027b3660046149eb565b610889565b005b34801561028d575f5ffd5b506102ff604080516080810182525f808252602082018190529181018290526060810191909152506040805160808101825260ff546001600160401b038082168352600160401b820481166020840152600160801b8204811693830193909352600160c01b9004909116606082015290565b6040516102589190614a4e565b348015610317575f5ffd5b506103a96040805160a0810182525f80825260208201819052918101829052606081018290526080810191909152506040805160a081018252610100546001600160401b038082168352600160401b82048116602084015260ff600160801b83041615159383019390935266ffffffffffffff600160881b8204166060830152600160c01b9004909116608082015290565b6040516102589190614ab2565b3480156103c1575f5ffd5b506102447f000000000000000000000000000000000000000000000000000000000000000081565b3480156103f4575f5ffd5b50610280610403366004614ad6565b610998565b348015610413575f5ffd5b5061041c610aad565b6040519015158152602001610258565b348015610437575f5ffd5b50610280610446366004614afe565b610ac5565b348015610456575f5ffd5b50610280610b8c565b34801561046a575f5ffd5b5061047e610479366004614b5b565b610c2f565b604051610258929190614e6e565b61028061049a366004614e8f565b6116cf565b6102806104ad366004614f79565b61172c565b3480156104bd575f5ffd5b506104c66117e1565b604051908152602001610258565b3480156104df575f5ffd5b506102447f000000000000000000000000000000000000000000000000000000000000000081565b348015610512575f5ffd5b5061010054600160801b900460ff1661041c565b348015610531575f5ffd5b506102447f000000000000000000000000000000000000000000000000000000000000000081565b348015610564575f5ffd5b50610280611892565b348015610578575f5ffd5b506102806118a3565b34801561058c575f5ffd5b506105a061059b3660046149eb565b61191a565b6040516102589190615066565b3480156105b8575f5ffd5b50610280611a32565b3480156105cc575f5ffd5b506105e06105db3660046149eb565b611ab5565b6040516102589190615074565b3480156105f8575f5ffd5b50610244611c07565b34801561060c575f5ffd5b506033546001600160a01b0316610244565b348015610629575f5ffd5b50610632611c15565b6040516102589392919061516d565b34801561064c575f5ffd5b50600161041c565b34801561065f575f5ffd5b506104c661066e366004614afe565b6001600160a01b03165f908152610101602052604090205490565b348015610694575f5ffd5b5061069d611c97565b6040516102589190615193565b3480156106b5575f5ffd5b506102806106c43660046152f9565b611e39565b3480156106d4575f5ffd5b5060fe54604080516080808201835260ff80546001600160401b038082168552600160401b8083048216602080880191909152600160801b8085048416888a0152600160c01b9485900484166060808a0191909152895160a081018b5261010054808716825294850486169381019390935290830490951615159781019790975266ffffffffffffff600160881b820416938701939093529104169083015261077b929183565b60405161025893929190615358565b348015610795575f5ffd5b506102447f000000000000000000000000000000000000000000000000000000000000000081565b3480156107c8575f5ffd5b506102806107d7366004614e8f565b61210e565b3480156107e7575f5ffd5b506102806107f6366004614b5b565b612231565b348015610806575f5ffd5b50610632612bc7565b34801561081a575f5ffd5b506065546001600160a01b0316610244565b348015610837575f5ffd5b506105a061084636600461537a565b612bef565b348015610856575f5ffd5b50610280610865366004614afe565b612daa565b348015610875575f5ffd5b506105a0610884366004615394565b612e1b565b806001600160401b0316805f036108b35760405163ec73295960e01b815260040160405180910390fd5b60026108c160c95460ff1690565b60ff16036108e25760405163dfc60d8560e01b815260040160405180910390fd5b6108ec6002612f63565b61010054600160801b900460ff16156109185760405163bae6e2a960e01b815260040160405180910390fd5b61098a610923611c97565b6040805160a081018252610100546001600160401b038082168352600160401b82048116602084015260ff600160801b83041615159383019390935266ffffffffffffff600160881b8204166060830152600160c01b900482166080820152908516612f79565b6109946001612f63565b5050565b5f54610100900460ff16158080156109b657505f54600160ff909116105b806109cf5750303b1580156109cf57505f5460ff166001145b610a375760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b5f805460ff191660011790558015610a58575f805461ff0019166101001790555b610a6283836136b8565b8015610aa8575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15b505050565b5f6002610abc60c95460ff1690565b60ff1614905090565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003610b0d5760405162461bcd60e51b8152600401610a2e906153d0565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610b3f613875565b6001600160a01b031614610b655760405162461bcd60e51b8152600401610a2e9061541c565b610b6e81613890565b604080515f80825260208201909252610b8991839190613898565b50565b61010054600160801b900460ff16610bb75760405163bae6e2a960e01b815260040160405180910390fd5b610100805477ffffffffffffff00ffffffffffffffffffffffffffffffff16600160c01b426001600160401b03160260ff60801b19161790556040513381527f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa9060200160405180910390a1610c2d335f613a02565b565b610ccf604080516101e0810182525f80825260606020808401829052838501829052818401839052608080850184905260a080860185905260c0860185905260e08601859052610100860185905261012086018590526101408601859052610160860185905261018086018590526101a086018590528651908101875284815291820184905294810183905290810182905292830152906101c082015290565b604080516080810182525f8082526020820181905291810182905260608101919091526002610d0060c95460ff1690565b60ff1603610d215760405163dfc60d8560e01b815260040160405180910390fd5b610d2b6002612f63565b6040805160a081018252610100546001600160401b038082168352600160401b82048116602084015260ff600160801b83041615159383019390935266ffffffffffffff600160881b8204166060830152600160c01b900490911660808201525f610d94611c97565b9050806101c00151602001516001600160401b0316825f01516001600160401b03161015610dd557604051630db2616960e01b815260040160405180910390fd5b80602001518260200151016001600160401b0316825f01516001600160401b03161115610e155760405163a464214b60e01b815260040160405180910390fd5b5f610e22888a018a615690565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610ed85780516001600160a01b031615610e7b5760405163612e247160e11b815260040160405180910390fd5b33815260c0810151515115610ea357604051632677ebff60e01b815260040160405180910390fd5b60c081015160a001516001600160401b031615610ed3576040516307a4f83360e11b815260040160405180910390fd5b610f49565b80516001600160a01b0316610f00576040516310213ad760e01b815260040160405180910390fd5b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610f4957604051635e9e444960e01b815260040160405180910390fd5b60208101516001600160a01b0316610f6c5780516001600160a01b031660208201525b8060a0015115610faa576101005443600160881b90910466ffffffffffffff1603610faa576040516304f14fd760e11b815260040160405180910390fd5b85158015906110615760c08201516020015160ff1615610fdd57604051632677ebff60e01b815260040160405180910390fd5b60c08201516040015160ff161561100757604051632677ebff60e01b815260040160405180910390fd5b60c082015160a001516001600160401b031615611037576040516307a4f83360e11b815260040160405180910390fd5b60c082015151511561105c57604051632677ebff60e01b815260040160405180910390fd5b611168565b60c082015151515f036110e3578160c001516040015160ff165f036110995760405163f911438d60e01b815260040160405180910390fd5b60c082015160a001516001600160401b0316156110c9576040516307a4f83360e11b815260040160405180910390fd5b60c08201516001600160401b03431660a090910152611168565b8160c0015160a001516001600160401b03165f03611114576040516307a4f83360e11b815260040160405180910390fd5b60c08201516040015160ff161561113e57604051632677ebff60e01b815260040160405180910390fd5b60c08201516020015160ff161561116857604051632677ebff60e01b815260040160405180910390fd5b5f60fb5f015f85604001516001600160401b03166001885f0151036001600160401b03168161119957611199615784565b6001600160401b039190068116825260208083019390935260409182015f908120610100808a01516101808b01516101a08c01518751610140810189528554815260018601548089169a82019a909a526001600160601b03600160401b808c0482169a83019a909a52600160a01b909a0490991660608a0152600285015480881660808b0152978804871660a08a0152600160801b880490961660c089015262ffffff600160c01b8804811660e08a015260ff600160d81b89041693890193909352600160e01b9096049091166101208701529095509093849361127f93899392613a0a565b91509150604051806101e001604052805f5f1b81526020018660e0015181526020015f6001600160401b038111156112b9576112b9614ea6565b6040519080825280602002602001820160405280156112e2578160200160208202803683370190505b5081526020018761012001516020015160ff165f1b815260200186602001516001600160a01b03168152602001436001600160401b031681526020018660c0015160a001516001600160401b031681526020018660c001516060015163ffffffff1681526020018660c001516080015163ffffffff168152602001876080015163ffffffff1681526020015f6001600160401b03168152602001826001600160401b03168152602001836001600160401b03168152602001836001600160401b03164081526020018761012001518152509850886101a001515f5f1b036113dc576040516302b44f0160e41b815260040160405180910390fd5b856101c00151602001516001600160401b0316875f01516001600160401b03161461141b5760e08501515160018401546001600160401b031601611428565b60e0850151518751015f19015b6001600160401b03166101408a015260405161145d9061144b908d908d90615798565b60405180910390208660c00151613e15565b6040808c0191909152908a52805160808101909152806114808b60a083016157a7565b604051602081830303815290604052805190602001208152602001865f01516001600160a01b03168152602001885f01516001600160401b03168152602001426001600160401b031681525097505f60fb5f015f88604001516001600160401b03168a5f01516001600160401b0316816114fc576114fc615784565b066001600160401b031681526020019081526020015f2090508860405160200161152691906157b9565b60408051808303601f19018152919052805160209091012081558751600282018054600160c01b6001600160401b039384166001600160801b031990921691909117600160401b86851602176affffffffffffffffffffff60801b1916600160801b9387169390930262ffffff60c01b1916929092179190911763ffffffff60d81b19169055855160a08801516115c691906001600160601b0316613f36565b6101408a015160a08801516001600160601b0316600160a01b026001600160401b0391821617600180840191909155895101811689526101c0880151604001511615806116305750866101c00151604001516001600160401b0316885f01516001600160401b0316105b61164d5760405163110f3dcf60e31b815260040160405180910390fd5b43886060019066ffffffffffffff16908166ffffffffffffff16815250507f9eb7fc80523943f28950bbb71ed6d584effe3e1e02ca4ddc8c86e5ee1558c0968a8a8e8e6040516116a094939291906157ef565b60405180910390a15050505050506116ba81836001612f79565b50506116c66001612f63565b94509492505050565b61010054600160801b900460ff16156116fb5760405163bae6e2a960e01b815260040160405180910390fd5b6117053382614046565b335f908152610101602052604081208054909190611724908490615835565b909155505050565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036117745760405162461bcd60e51b8152600401610a2e906153d0565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166117a6613875565b6001600160a01b0316146117cc5760405162461bcd60e51b8152600401610a2e9061541c565b6117d582613890565b61099482826001613898565b5f306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146118805760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610a2e565b505f516020615d4b5f395f51905f5290565b61189a614259565b610c2d5f6142b3565b60655433906001600160a01b031681146119115760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b6064820152608401610a2e565b610b89816142b3565b61192261494c565b5f61192b611c97565b90505f81604001518461193e9190615848565b6001600160401b038082165f90815260fb6020526040902060028101549293509181169086161461198257604051632785786f60e21b815260040160405180910390fd5b6002810154600160e01b900462ffffff1615611a2a576001600160401b0382165f90815260fd60209081526040808320600285810154600160e01b900462ffffff16855290835292819020815160c0810183528154815260018201549381019390935292830154908201526003909101546001600160a01b0381166060830152600160a01b810460ff1615156080830152600160a81b900465ffffffffffff1660a082015293505b505050919050565b61010054600160801b900460ff1615611a5e5760405163bae6e2a960e01b815260040160405180910390fd5b611a77610100805460ff60801b1916600160801b179055565b6040513381527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589060200160405180910390a1610c2d336001613a02565b60408051610140810182525f80825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081018290526101008101829052610120810182905290611b0d611c97565b905060fb5f015f826040015185611b249190615848565b6001600160401b03908116825260208083019390935260409182015f20825161014081018452815481526001820154808416958201959095526001600160601b03600160401b808704821695830195909552600160a01b90950490941660608501526002015480821660808501819052928104821660a0850152600160801b8104821660c085015262ffffff600160c01b8204811660e086015260ff600160d81b830416610100860152600160e01b9091041661012084015291935090841614611c0157604051632785786f60e21b815260040160405180910390fd5b50919050565b5f611c10613875565b905090565b5f5f611c1f61494c565b61010054600160401b90046001600160401b03169250611c3d611c97565b6101c00151602001516001600160401b0316836001600160401b03161015611c7857604051632785786f60e21b815260040160405180910390fd5b611c8183611ab5565b602001519150611c908361191a565b9050909192565b604080516101e0810182525f80825260208083018290528284018290526060808401839052608080850184905260a080860185905260c0860185905260e086018590526101008601859052865190810187528481528084018590528087018590528083018590528082018590526101208601526101408501849052610160850184905261018085018490526101a0850184905285519081018652838152918201839052938101829052928301526101c081019190915250604080516101e08101825262028c6181526204f1a06020808301919091526204f3a08284015260086060808401829052630e4e1c006080808601919091526806c6b935b8bbd4000060a0808701919091525f60c08701819052600460e0880152610100870184905287519182018852938152603281860152624c4b40818801526350298966818401526323c3460081830152610120860152611c20610140860181905261016086015260106101808601526103006101a086015285519081018652620cd34081526213d5b093810193909352938201819052928101929092526101c081019190915290565b611e41614259565b5f849003611e6257604051635435b28960e11b815260040160405180910390fd5b5f859003611e8357604051635435b28960e11b815260040160405180910390fd5b5f839003611ea457604051635435b28960e11b815260040160405180910390fd5b610100546001600160401b03600160401b909104811690871611611edb5760405163c63c8bfd60e01b815260040160405180910390fd5b5f611ee4611c97565b90505f816040015188611ef79190615848565b6001600160401b039081165f81815260fb602052604090206002810154919350918a8116911614611f3b57604051632785786f60e21b815260040160405180910390fd5b6001600160401b0389165f90815260fc602090815260408083208b845290915281205462ffffff1690819003611fa857600282018054600160c01b900462ffffff16906018611f8983615875565b91906101000a81548162ffffff021916908362ffffff16021790555090505b5f83815260fd6020908152604080832062ffffff85168452909152902060e0850151611fd79060ff168c615848565b6001600160401b031615611feb575f611fed565b875b600282015560018082018a90556003820180546001600160a01b038a166001600160a81b031990911617600160a01b891515021765ffffffffffff60a81b1916600160a81b4265ffffffffffff160217905562ffffff8316900361205357898155612087565b6001600160401b038b165f90815260fc602090815260408083208d84529091529020805462ffffff191662ffffff84161790555b7fd859648d474435f113442503ab429a8dc1e53be35a151a45aeec3e67302a941c8b836040518060c001604052808e81526020018d81526020018c81526020018b6001600160a01b031681526020018a151581526020014265ffffffffffff168152506040516120f993929190615897565b60405180910390a15050505050505050505050565b61010054600160801b900460ff161561213a5760405163bae6e2a960e01b815260040160405180910390fd5b335f90815261010160205260409020548181101561216b5760405163e92c469f60e01b815260040160405180910390fd5b60405182815233907f0d41118e36df44efb77a471fc49fb9c0be0406d802ef95520e9fbf606e65b4559060200160405180910390a2335f9081526101016020526040812080548492906121bf9084906158c0565b90915550507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615612227576109946001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633846142cc565b610994338361432f565b600261223f60c95460ff1690565b60ff16036122605760405163dfc60d8560e01b815260040160405180910390fd5b61226a6002612f63565b5f806122788587018761595d565b815191935091505f8190036122a057604051631b3dc8e560e11b815260040160405180910390fd5b815181146122c1576040516341e3f65360e11b815260040160405180910390fd5b6040805160a081018252610100546001600160401b038082168352600160401b82048116602084015260ff600160801b8304161580159484019490945266ffffffffffffff600160881b8304166060840152600160c01b9091041660808201529061233f5760405163ab35696f60e01b815260040160405180910390fd5b5f612348611c97565b90505f836001600160401b0381111561236357612363614ea6565b60405190808252806020026020018201604052801561239c57816020015b61238961498f565b8152602001906001900390816123815790505b5090505f5f5b858110156129ab575f8882815181106123bd576123bd615a66565b60200260200101519050846101c00151602001516001600160401b031681604001516001600160401b0316101561240757604051630db2616960e01b815260040160405180910390fd5b6101c0850151604001516001600160401b031615806124445750846101c00151604001516001600160401b031681604001516001600160401b0316105b6124615760405163110f3dcf60e31b815260040160405180910390fd5b85602001516001600160401b031681604001516001600160401b03161161249b57604051632785786f60e21b815260040160405180910390fd5b855f01516001600160401b031681604001516001600160401b0316106124d457604051632785786f60e21b815260040160405180910390fd5b5f8883815181106124e7576124e7615a66565b60200260200101519050805f01515f5f1b03612516576040516319ead34160e01b815260040160405180910390fd5b60208101515f0361253a5760405163ac97cfc760e01b815260040160405180910390fd5b60408101515f0361255e57604051636c0118eb60e01b815260040160405180910390fd5b816040015185848151811061257557612575615a66565b6020908102919091018101516001600160401b0390921690915260405161259e918491016157b9565b604051602081830303815290604052805190602001208584815181106125c6576125c6615a66565b60200260200101516020018181525050808584815181106125e9576125e9615a66565b6020026020010151604001819052505f8660400151836040015161260d9190615848565b6001600160401b03165f81815260fb6020526040902080548851929350909188908790811061263e5761263e615a66565b602002602001015160200151146126685760405163419b53b760e01b815260040160405180910390fd5b60028101545f90600160c01b900462ffffff1660018111156126e95784515f85815260fd6020908152604080832060018452909152902054036126ae57600191506126e9565b60028162ffffff1611156126e9576040808701516001600160401b03165f90815260fc6020908152828220885183529052205462ffffff1691505b8162ffffff165f0361272a5760028301805462ffffff60c01b198116600160c01b9182900462ffffff90811660018101909116909202179091559150612852565b5f84815260fd6020908152604080832062ffffff86168452825291829020825160c081018452815481526001820154928101839052600282015493810193909352600301546001600160a01b0381166060840152600160a01b810460ff1615156080840152600160a81b900465ffffffffffff1660a083015215612850575f866020015182602001511480156127d35750604082015115806127d3575086604001518260400151145b905080612843575f86815260fd6020908152604080832062ffffff88168452909152808220600190810192909255898101519051919b507fa05e896ff20170d694345384140d3397c040699d982fd6bdd73028e3d311f4449161283a919085908b90615a7a565b60405180910390a15b50505050505050506129a3565b505b5f84815260fd6020908152604080832062ffffff8616845282529182902090870151600182015560e08c01519188015190916128939160ff90911690615848565b6001600160401b0316156128a7575f6128ad565b85604001515b60028201556101408b015160808d015160608901515f9261ffff16916128df916001600160401b03908116911661433a565b60038401805460ff60a01b191691909201421115600160a01b81029190911790915590508061290e5733612914565b87602001515b6003830180546001600160a01b0392909216600166ffffffffffff0160a01b031990921691909117600160a81b4265ffffffffffff160217905562ffffff8416600103612964578651825561299a565b6040888101516001600160401b03165f90815260fc60209081528282208a518352905220805462ffffff191662ffffff86161790555b50505050505050505b6001016123a2565b506040516326c9adc960e21b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690639b26b724906129fc9085908d908d90600401615aba565b5f604051808303815f87803b158015612a13575f5ffd5b505af1158015612a25573d5f5f3e3d5ffd5b505050505f856001600160401b03811115612a4257612a42614ea6565b604051908082528060200260200182016040528015612a6b578160200160208202803683370190505b5090505f5b86811015612ac857888181518110612a8a57612a8a615a66565b602002602001015160400151828281518110612aa857612aa8615a66565b6001600160401b0390921660209283029190910190910152600101612a70565b507fc99f03c7db71a9e8c78654b1d2f77378b413cc979a02fa22dc9d39702afa92bc7f00000000000000000000000000000000000000000000000000000000000000008289604051612b1c93929190615b3b565b60405180910390a1508015612ba557612b44610100805460ff60801b1916600160801b179055565b6040516001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001681527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589060200160405180910390a1612bb0565b612bb0838587612f79565b50505050505050612bc16001612f63565b50505050565b5f5f612bd161494c565b60ff54600160801b90046001600160401b03169250611c8183611ab5565b612bf761494c565b5f612c00611c97565b90505f816040015185612c139190615848565b6001600160401b039081165f81815260fb60205260409020600281015491935091878116911614612c5757604051632785786f60e21b815260040160405180910390fd5b60028101545f906001600160c01b90910462ffffff161115612cde575f83815260fd6020908152604080832060018452909152902054869003612c9c57506001612cde565b600282810154600160c01b900462ffffff161115612cde57506001600160401b0386165f90815260fc6020908152604080832088845290915290205462ffffff165b62ffffff811615801590612d055750600282015462ffffff600160c01b9091048116908216105b612d2257604051631daf8e2f60e21b815260040160405180910390fd5b5f92835260fd6020908152604080852062ffffff909316855291815292819020815160c08101835281548152600182015494810194909452600281015491840191909152600301546001600160a01b038116606084015260ff600160a01b8204161515608084015265ffffffffffff600160a81b9091041660a0830152509150505b92915050565b612db2614259565b606580546001600160a01b0383166001600160a01b03199091168117909155612de36033546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b612e2361494c565b5f612e2c611c97565b90505f816040015185612e3f9190615848565b6001600160401b039081165f81815260fb60205260409020600281015491935091878116911614612e8357604051632785786f60e21b815260040160405180910390fd5b8462ffffff165f03612ea857604051631daf8e2f60e21b815260040160405180910390fd5b600281015462ffffff600160c01b909104811690861610612edc57604051631daf8e2f60e21b815260040160405180910390fd5b505f90815260fd6020908152604080832062ffffff87168452825291829020825160c081018452815481526001820154928101929092526002810154928201929092526003909101546001600160a01b038116606083015260ff600160a01b8204161515608083015265ffffffffffff600160a81b9091041660a082015291505092915050565b60c9805460ff191660ff92909216919091179055565b6020808301516101c0850151909101515f906001600160401b0381161580612fb65750600181036001600160401b0316836001600160401b031610155b91505080156135de575f856040015183612fd09190615848565b6001600160401b03165f81815260fb60209081526040808320600281015460fd8452828520600160e01b90910462ffffff168086529084528285206001015483516080810185528681529485018690529284018590526060840194909452939450905f6130738a5f01516001600160401b03168b602001516001600160401b03168b8e606001516001600160401b0316020160010161435190919063ffffffff16565b90508a6101c00151604001516001600160401b03165f146130af576101c08b0151604001516130ac9082906001600160401b0316614351565b90505b6130b888615bf3565b97505b80886001600160401b031610156133015760408b01516130db9089615848565b6001600160401b03165f81815260fb60205260409020600281015461010054929850909650600160c01b900462ffffff1690600160801b900460ff16156131225750613301565b60018162ffffff16116131355750613301565b5f87815260fd60209081526040808320600184529091529020805485900361316057600195506131d4565b60028262ffffff1611156131cd576001600160401b038a165f90815260fc6020908152604080832088845290915281205462ffffff16908190036131a657505050613301565b5f89815260fd6020908152604080832062ffffff85168452909152902090965090506131d4565b5050613301565b60018101545f8190036131e957505050613301565b428e610160015162ffffff168360030160159054906101000a900465ffffffffffff160165ffffffffffff16111561322357505050613301565b8095505f8260030160149054906101000a900460ff1661326357600189015461325e90600290600160a01b90046001600160601b0316615c14565b613279565b6001890154600160a01b90046001600160601b03165b600384015490915061329d906001600160a01b03166001600160601b03831661435f565b60e08f01516132af9060ff168d615848565b6001600160401b03165f036132ec576001600160401b03808d16875260018a015416602087015262ffffff88166040870152600283015460608701525b50505050876132fa90615bf3565b97506130bb565b87600190039750876001600160401b03168a602001516001600160401b0316146135d7576001600160401b03881660208b0181905260408c015160fb915f9161334991615848565b6001600160401b03908116825260208083019390935260409182015f2060028101805462ffffff60e01b1916600160e01b62ffffff8b16021790558d8401518351921682529281018690529196507fd6b1adebb10d3d794bc13103c4e9a696e79b3ce83355d8bdd77237cb20b3a4a0910160405180910390a181516001600160401b0316156135d75789602001516001600160401b0316825f01516001600160401b0316146134465760408b0151825160fb915f916134089190615848565b6001600160401b031681526020019081526020015f209450816040015185600201601c6101000a81548162ffffff021916908362ffffff1602179055505b6040805160808101825260ff80546001600160401b03808216808552600160401b80840483166020870181905260028d0154841687890181905242909416606088018190526001600160801b03199095169092179102176fffffffffffffffffffffffffffffffff16600160801b9091026001600160c01b031617600160c01b90910217905590517fcfbcbd3a81b749a28e6289bc350363f1949bb0a58ba7120d8dd4ef4b3617dff8906134fb908390614a4e565b60405180910390a18b51602084015160608501516040516313e4299d60e21b81526001600160401b0393841660048201527f73e6d340850343cc6f001515dc593377337c95a6ffe034fe1e844d4dab5da169602482015292909116604483015260648201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634f90a674906084016020604051808303815f875af11580156135b0573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906135d49190615c41565b50505b5050505050505b83516101008054602087015160408089015160608a015160808b01516001600160401b03908116600160c01b026001600160c01b0366ffffffffffffff909316600160881b0266ffffffffffffff60881b19941515600160801b029490941667ffffffffffffffff60801b19968316600160401b026001600160801b031990981692909916919091179590951793909316959095179490941716179055517f7156d026e6a3864d290a971910746f96477d3901e33c4b2375e4ee00dabe7d87906136a9908690614ab2565b60405180910390a15050505050565b5f54610100900460ff166136de5760405162461bcd60e51b8152600401610a2e90615c58565b6136e7826143c6565b5f8190036137085760405163cd21cd4360e01b815260040160405180910390fd5b7f62706e85402cc48a87d49cd7385662e24ad19ed753c6d6f4d464b32120eeb9938190555f80805260fb602090815260017fc88390e7e62175be0932452175b6a7222b6b094ab0ef984a5153c620345d89758181557fc88390e7e62175be0932452175b6a7222b6b094ab0ef984a5153c620345d8977805477ffffffffffffffffffffffffffffffff00000000000000001916600160401b426001600160401b039081169190910267ffffffffffffffff60801b191691909117600160801b439283169081029190911766ffffff00ffffff60c01b1916638000000160c11b1790925560ff805467ffffffffffffffff199081169093179055610100805477ffffffffffffff000000000000000000ffffffffffffffff1916600160881b66ffffffffffffff909316929092029092161790921790915560408051938452918301849052917fd6b1adebb10d3d794bc13103c4e9a696e79b3ce83355d8bdd77237cb20b3a4a09101610a9f565b5f516020615d4b5f395f51905f52546001600160a01b031690565b610b89614259565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156138cb57610aa883614424565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015613925575060408051601f3d908101601f1916820190925261392291810190615c41565b60015b6139885760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610a2e565b5f516020615d4b5f395f51905f5281146139f65760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610a2e565b50610aa88383836144bf565b610994614259565b60e0850151515f908190808203613a345760405163feb32ebd60e01b815260040160405180910390fd5b8461ffff16811115613a5957604051633f836abd60e11b815260040160405180910390fd5b87606001516001600160401b03165f03613a7857600143039250613b18565b43878960600151016001600160401b03161015613aa8576040516311abefd560e21b815260040160405180910390fd5b4388606001516001600160401b031610613ad557604051630fe29b5f60e31b815260040160405180910390fd5b8360c001516001600160401b031688606001516001600160401b03161015613b1057604051637f0b4c5960e11b815260040160405180910390fd5b876060015192505b60808801516001600160401b031615613b35578760800151613b37565b425b915042826001600160401b03161115613b6357604051633d32ffdb60e01b815260040160405180910390fd5b8760e001515f81518110613b7957613b79615a66565b60200260200101516020015160ff165f14613ba757604051630649ac0f60e31b815260040160405180910390fd5b5f5f5b82811015613d33578960e001518181518110613bc857613bc8615a66565b60200260200101516020015160ff16820191505f8a60e001518281518110613bf257613bf2615a66565b602002602001015160400151519050805f03613c0e5750613d2b565b8860ff16811115613c325760405163c577d38360e01b815260040160405180910390fd5b5f5b81811015613d28577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638e899f808d60e001518581518110613c8157613c81615a66565b6020026020010151604001518381518110613c9e57613c9e615a66565b60200260200101516040518263ffffffff1660e01b8152600401613cc491815260200190565b602060405180830381865afa158015613cdf573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613d039190615ca3565b613d2057604051634300d2ff60e11b815260040160405180910390fd5b600101613c34565b50505b600101613baa565b50806001600160401b0316836001600160401b03161015613d6757604051630cccd76960e11b815260040160405180910390fd5b808303426001600160401b03808316908b16600c02011015613d9c57604051630cccd76960e11b815260040160405180910390fd5b8560a001516001600160401b0316816001600160401b03161015613dd35760405163084e26e160e21b815260040160405180910390fd5b60408a01511580613de85750855160408b0151145b613e08576040516001629d908960e01b0319815260040160405180910390fd5b5050509550959350505050565b8051515f9060609015613e2a57508151613eb3565b604083015160ff16806001600160401b03811115613e4a57613e4a614ea6565b604051908082528060200260200182016040528015613e73578160200160208202803683370190505b5091505f5b81811015613eb05780856020015160ff160149838281518110613e9d57613e9d615a66565b6020908102919091010152600101613e78565b50505b80515f5b81811015613f0257828181518110613ed157613ed1615a66565b60200260200101515f5f1b03613efa57604051637bb2fa2f60e11b815260040160405180910390fd5b600101613eb7565b508482604051602001613f16929190615cbe565b604051602081830303815290604052805190602001209250509250929050565b805f03613f41575050565b6001600160a01b0382165f9081526101016020526040902054818110613f83576001600160a01b0383165f908152610101602052604090208282039055613ffe565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615613fe5575f613fbd8484614046565b9050828114613fdf5760405163e92c469f60e01b815260040160405180910390fd5b50613ffe565b60405163e92c469f60e01b815260040160405180910390fd5b826001600160a01b03167f85f32beeaff2d0019a8d196f06790c9a652191759c46643311344fd38920423c8360405161403991815260200190565b60405180910390a2505050565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316156141ee5734156140955760405163798ee6f160e01b815260040160405180910390fd5b6040516370a0823160e01b81523060048201525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156140f9573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061411d9190615c41565b90506141546001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168530866144e3565b6040516370a0823160e01b815230600482015281907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156141b8573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906141dc9190615c41565b6141e691906158c0565b915050614210565b81341461420d5760405162c56beb60e11b815260040160405180910390fd5b50805b826001600160a01b03167f8ed8c6869618197b68315ade66e75ed3906c97b111fa3ab81e5760046825c7db8260405161424b91815260200190565b60405180910390a292915050565b6033546001600160a01b03163314610c2d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a2e565b606580546001600160a01b0319169055610b898161451b565b6040516001600160a01b038316602482015260448101829052610aa890849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261456c565b61099482825a61463f565b5f818311614348578161434a565b825b9392505050565b5f818311611c01578261434a565b805f0361436a575050565b6001600160a01b0382165f818152610101602052604090819020805484019055517f6de6fe586196fa05b73b973026c5fda3968a2933989bff3a0b6bd57644fab606906143ba9084815260200190565b60405180910390a25050565b5f54610100900460ff166143ec5760405162461bcd60e51b8152600401610a2e90615c58565b6143f4614682565b6144126001600160a01b0382161561440c57816142b3565b336142b3565b5060c9805461ff001916610100179055565b6001600160a01b0381163b6144915760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610a2e565b5f516020615d4b5f395f51905f5280546001600160a01b0319166001600160a01b0392909216919091179055565b6144c8836146a8565b5f825111806144d45750805b15610aa857612bc183836146e7565b6040516001600160a01b0380851660248301528316604482015260648101829052612bc19085906323b872dd60e01b906084016142f8565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f6145c0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661470c9092919063ffffffff16565b905080515f14806145e05750808060200190518101906145e09190615ca3565b610aa85760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a2e565b815f0361464b57505050565b61466583838360405180602001604052805f815250614722565b610aa857604051634c67134d60e11b815260040160405180910390fd5b5f54610100900460ff16610c2d5760405162461bcd60e51b8152600401610a2e90615c58565b6146b181614424565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a250565b606061434a8383604051806060016040528060278152602001615d6b6027913961475f565b606061471a84845f856147d3565b949350505050565b5f6001600160a01b03851661474a57604051634c67134d60e11b815260040160405180910390fd5b5f5f835160208501878988f195945050505050565b60605f5f856001600160a01b03168560405161477b9190615cff565b5f60405180830381855af49150503d805f81146147b3576040519150601f19603f3d011682016040523d82523d5f602084013e6147b8565b606091505b50915091506147c9868383876148aa565b9695505050505050565b6060824710156148345760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a2e565b5f5f866001600160a01b0316858760405161484f9190615cff565b5f6040518083038185875af1925050503d805f8114614889576040519150601f19603f3d011682016040523d82523d5f602084013e61488e565b606091505b509150915061489f878383876148aa565b979650505050505050565b606083156149185782515f03614911576001600160a01b0385163b6149115760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a2e565b508161471a565b61471a838381511561492d5781518083602001fd5b8060405162461bcd60e51b8152600401610a2e9190615d15565b905290565b6040518060c001604052805f81526020015f81526020015f81526020015f6001600160a01b031681526020015f151581526020015f65ffffffffffff1681525090565b60405180606001604052805f6001600160401b031681526020015f815260200161494760405180606001604052805f81526020015f81526020015f81525090565b80356001600160401b03811681146149e6575f5ffd5b919050565b5f602082840312156149fb575f5ffd5b61434a826149d0565b6001600160401b0381511682526001600160401b0360208201511660208301526001600160401b0360408201511660408301526001600160401b0360608201511660608301525050565b60808101612da48284614a04565b6001600160401b0381511682526001600160401b03602082015116602083015260408101511515604083015266ffffffffffffff60608201511660608301526001600160401b0360808201511660808301525050565b60a08101612da48284614a5c565b80356001600160a01b03811681146149e6575f5ffd5b5f5f60408385031215614ae7575f5ffd5b614af083614ac0565b946020939093013593505050565b5f60208284031215614b0e575f5ffd5b61434a82614ac0565b5f5f83601f840112614b27575f5ffd5b5081356001600160401b03811115614b3d575f5ffd5b602083019150836020828501011115614b54575f5ffd5b9250929050565b5f5f5f5f60408587031215614b6e575f5ffd5b84356001600160401b03811115614b83575f5ffd5b614b8f87828801614b17565b90955093505060208501356001600160401b03811115614bad575f5ffd5b614bb987828801614b17565b95989497509550505050565b5f8151808452602084019350602083015f5b82811015614bf5578151865260209586019590910190600101614bd7565b5093949350505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614c7557601f19858403018852815161ffff815116845260ff60208201511660208501526040810151905060606040850152614c5e6060850182614bc5565b6020998a0199909450929092019150600101614c1b565b50909695505050505050565b60ff815116825260ff602082015116602083015263ffffffff60408201511660408301526001600160401b03606082015116606083015263ffffffff60808201511660808301525050565b805182525f60208201516102606020850152614cec610260850182614bff565b905060408301518482036040860152614d058282614bc5565b915050606083015160608501526080830151614d2c60808601826001600160a01b03169052565b5060a0830151614d4760a08601826001600160401b03169052565b5060c0830151614d6260c08601826001600160401b03169052565b5060e0830151614d7a60e086018263ffffffff169052565b50610100830151614d9461010086018263ffffffff169052565b50610120830151614dae61012086018263ffffffff169052565b50610140830151614dcb6101408601826001600160401b03169052565b50610160830151614de86101608601826001600160401b03169052565b50610180830151614e056101808601826001600160401b03169052565b506101a08301516101a08501526101c0830151614e266101c0860182614c81565b509392505050565b8051825260018060a01b0360208201511660208301526001600160401b0360408201511660408301526001600160401b0360608201511660608301525050565b60a081525f614e8060a0830185614ccc565b905061434a6020830184614e2e565b5f60208284031215614e9f575f5ffd5b5035919050565b634e487b7160e01b5f52604160045260245ffd5b60405160c081016001600160401b0381118282101715614edc57614edc614ea6565b60405290565b604051606081016001600160401b0381118282101715614edc57614edc614ea6565b60405161010081016001600160401b0381118282101715614edc57614edc614ea6565b604051608081016001600160401b0381118282101715614edc57614edc614ea6565b604051601f8201601f191681016001600160401b0381118282101715614f7157614f71614ea6565b604052919050565b5f5f60408385031215614f8a575f5ffd5b614f9383614ac0565b915060208301356001600160401b03811115614fad575f5ffd5b8301601f81018513614fbd575f5ffd5b80356001600160401b03811115614fd657614fd6614ea6565b614fe9601f8201601f1916602001614f49565b818152866020838501011115614ffd575f5ffd5b816020840160208301375f602083830101528093505050509250929050565b8051825260208082015190830152604080820151908301526060808201516001600160a01b03169083015260808082015115159083015260a09081015165ffffffffffff16910152565b60c08101612da4828461501c565b81518152602080830151610140830191615098908401826001600160401b03169052565b5060408301516150b360408401826001600160601b03169052565b5060608301516150ce60608401826001600160601b03169052565b5060808301516150e960808401826001600160401b03169052565b5060a083015161510460a08401826001600160401b03169052565b5060c083015161511f60c08401826001600160401b03169052565b5060e083015161513660e084018262ffffff169052565b5061010083015161514d61010084018260ff169052565b5061012083015161516661012084018262ffffff169052565b5092915050565b6001600160401b03848116825283166020820152610100810161471a604083018461501c565b81516001600160401b031681526102c0810160208301516151bf60208401826001600160401b03169052565b5060408301516151da60408401826001600160401b03169052565b5060608301516151f560608401826001600160401b03169052565b50608083015161520d608084018263ffffffff169052565b5060a083015161522860a08401826001600160601b03169052565b5060c083015161524360c08401826001600160601b03169052565b5060e083015161525860e084018260ff169052565b506101008301516152756101008401826001600160401b03169052565b5061012083015161528a610120840182614c81565b5061014083015161ffff9081166101c08481019190915261016085015162ffffff166101e085015261018085015160ff166102008501526101a0850151909116610220840152830151615166610240840182614a04565b8015158114610b89575f5ffd5b80356149e6816152e1565b5f5f5f5f5f5f60c0878903121561530e575f5ffd5b615317876149d0565b955060208701359450604087013593506060870135925061533a60808801614ac0565b915060a087013561534a816152e1565b809150509295509295509295565b838152610140810161536d6020830185614a04565b61471a60a0830184614a5c565b5f5f6040838503121561538b575f5ffd5b614af0836149d0565b5f5f604083850312156153a5575f5ffd5b6153ae836149d0565b9150602083013562ffffff811681146153c5575f5ffd5b809150509250929050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b5f6001600160401b0382111561548057615480614ea6565b5060051b60200190565b5f82601f830112615499575f5ffd5b81356154ac6154a782615468565b614f49565b8082825260208201915060208360051b8601019250858311156154cd575f5ffd5b602085015b838110156154ea5780358352602092830192016154d2565b5095945050505050565b803560ff811681146149e6575f5ffd5b803563ffffffff811681146149e6575f5ffd5b5f60c08284031215615527575f5ffd5b61552f614eba565b905081356001600160401b03811115615546575f5ffd5b6155528482850161548a565b825250615561602083016154f4565b6020820152615572604083016154f4565b604082015261558360608301615504565b606082015261559460808301615504565b60808201526155a560a083016149d0565b60a082015292915050565b5f82601f8301126155bf575f5ffd5b81356155cd6154a782615468565b8082825260208201915060208360051b8601019250858311156155ee575f5ffd5b602085015b838110156154ea5780356001600160401b03811115615610575f5ffd5b86016060818903601f19011215615625575f5ffd5b61562d614ee2565b602082013561ffff81168114615641575f5ffd5b815261564f604083016154f4565b602082015260608201356001600160401b0381111561566c575f5ffd5b61567b8a60208386010161548a565b604083015250845250602092830192016155f3565b5f602082840312156156a0575f5ffd5b81356001600160401b038111156156b5575f5ffd5b820161010081850312156156c7575f5ffd5b6156cf614f04565b6156d882614ac0565b81526156e660208301614ac0565b602082015260408281013590820152615701606083016149d0565b6060820152615712608083016149d0565b608082015261572360a083016152ee565b60a082015260c08201356001600160401b03811115615740575f5ffd5b61574c86828501615517565b60c08301525060e08201356001600160401b0381111561576a575f5ffd5b615776868285016155b0565b60e083015250949350505050565b634e487b7160e01b5f52601260045260245ffd5b818382375f9101908152919050565b602081525f61434a6020830184614ccc565b60808101612da48284614e2e565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b60c081525f61580160c0830187614ccc565b61580e6020840187614e2e565b82810360a084015261489f8185876157c7565b634e487b7160e01b5f52601160045260245ffd5b80820180821115612da457612da4615821565b5f6001600160401b0383168061586057615860615784565b806001600160401b0384160691505092915050565b5f62ffffff821662ffffff810361588e5761588e615821565b60010192915050565b6001600160401b038416815262ffffff83166020820152610100810161471a604083018461501c565b81810381811115612da457612da4615821565b5f82601f8301126158e2575f5ffd5b81356158f06154a782615468565b80828252602082019150602060608402860101925085831115615911575f5ffd5b602085015b838110156154ea576060818803121561592d575f5ffd5b615935614ee2565b8135815260208083013581830152604080840135908301529084529290920191606001615916565b5f5f6040838503121561596e575f5ffd5b82356001600160401b03811115615983575f5ffd5b8301601f81018513615993575f5ffd5b80356159a16154a782615468565b8082825260208201915060208360071b8501019250878311156159c2575f5ffd5b6020840193505b82841015615a3357608084890312156159e0575f5ffd5b6159e8614f27565b843581526159f860208601614ac0565b6020820152615a09604086016149d0565b6040820152615a1a606086016149d0565b60608201528252608093909301926020909101906159c9565b945050505060208301356001600160401b03811115615a50575f5ffd5b615a5c858286016158d3565b9150509250929050565b634e487b7160e01b5f52603260045260245ffd5b6001600160401b03841681526101408101615a98602083018561501c565b825160e08301526020830151610100830152604083015161012083015261471a565b604080825284519082018190525f9060208601906060840190835b81811015615b2657835180516001600160401b03168452602080820151818601526040918201518051838701528082015160608701529091015160808501529093019260a090920191600101615ad5565b5050838103602085015261489f8186886157c7565b6001600160a01b03841681526060602080830182905284519183018290525f91908501906080840190835b81811015615b8d5783516001600160401b0316835260209384019390920191600101615b66565b50508381036040850152845180825260209182019250908501905f5b81811015615be657615bd08484518051825260208082015190830152604090810151910152565b6060939093019260209290920191600101615ba9565b5091979650505050505050565b5f6001600160401b0382166001600160401b03810361588e5761588e615821565b5f6001600160601b03831680615c2c57615c2c615784565b806001600160601b0384160491505092915050565b5f60208284031215615c51575f5ffd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b5f60208284031215615cb3575f5ffd5b815161434a816152e1565b5f60408201848352604060208401528084518083526060850191506020860192505f5b81811015614c75578351835260209384019390920191600101615ce1565b5f82518060208501845e5f920191825250919050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f8301168401019150509291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220743b5b3abd81b9b21af96b31b93efeca46aa08305107b03b4de0b06cb7afe8db64736f6c634300081b00330000000000000000000000008698690deedb923fa0a674d3f65896b0031bf7c90000000000000000000000009a919115127ed338c3bfbcdfbe72d4f167fa9e1d0000000000000000000000006490e12d480549d333499236ff2ba6676c2960110000000000000000000000006fc2fe9d9dd0251ec5e0727e826afbb0db2cbe0d
Deployed Bytecode
0x608060405260043610610212575f3560e01c80637e7501dc1161011e578063c152c9eb116100a8578063cee1136c1161006d578063cee1136c146107fb578063e30c39781461080f578063e8353dc01461082c578063f2fde38b1461084b578063ff109f591461086a575f5ffd5b8063c152c9eb146106aa578063c19d93fb146106c9578063c28f43921461078a578063c3daab96146107bd578063c9cc2843146107dc575f5ffd5b80638da5cb5b116100ee5780638da5cb5b146106015780639c4364731461061e578063a4b2355414610641578063a9c2c83514610654578063b932bf2b14610689575f5ffd5b80637e7501dc146105815780638456cb59146105ad578063888775d9146105c15780638abf6077146105ed575f5ffd5b806347faad141161019f57806359df11181161016f57806359df1118146104d45780635c975abb1461050757806362d0945314610526578063715018a61461055957806379ba50971461056d575f5ffd5b806347faad141461045f5780634dcb05f91461048c5780634f1ef2861461049f57806352d1902d146104b2575f5ffd5b80632b7ac3f3116101e55780632b7ac3f3146103b65780632cc0b254146103e95780633075db56146104085780633659cfe61461042c5780633f4ba83a1461044b575f5ffd5b806304f3bcec146102165780630cc62b421461026157806312ad809c1461028257806326baca1c1461030c575b5f5ffd5b348015610221575f5ffd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b34801561026c575f5ffd5b5061028061027b3660046149eb565b610889565b005b34801561028d575f5ffd5b506102ff604080516080810182525f808252602082018190529181018290526060810191909152506040805160808101825260ff546001600160401b038082168352600160401b820481166020840152600160801b8204811693830193909352600160c01b9004909116606082015290565b6040516102589190614a4e565b348015610317575f5ffd5b506103a96040805160a0810182525f80825260208201819052918101829052606081018290526080810191909152506040805160a081018252610100546001600160401b038082168352600160401b82048116602084015260ff600160801b83041615159383019390935266ffffffffffffff600160881b8204166060830152600160c01b9004909116608082015290565b6040516102589190614ab2565b3480156103c1575f5ffd5b506102447f0000000000000000000000009a919115127ed338c3bfbcdfbe72d4f167fa9e1d81565b3480156103f4575f5ffd5b50610280610403366004614ad6565b610998565b348015610413575f5ffd5b5061041c610aad565b6040519015158152602001610258565b348015610437575f5ffd5b50610280610446366004614afe565b610ac5565b348015610456575f5ffd5b50610280610b8c565b34801561046a575f5ffd5b5061047e610479366004614b5b565b610c2f565b604051610258929190614e6e565b61028061049a366004614e8f565b6116cf565b6102806104ad366004614f79565b61172c565b3480156104bd575f5ffd5b506104c66117e1565b604051908152602001610258565b3480156104df575f5ffd5b506102447f0000000000000000000000008698690deedb923fa0a674d3f65896b0031bf7c981565b348015610512575f5ffd5b5061010054600160801b900460ff1661041c565b348015610531575f5ffd5b506102447f0000000000000000000000006fc2fe9d9dd0251ec5e0727e826afbb0db2cbe0d81565b348015610564575f5ffd5b50610280611892565b348015610578575f5ffd5b506102806118a3565b34801561058c575f5ffd5b506105a061059b3660046149eb565b61191a565b6040516102589190615066565b3480156105b8575f5ffd5b50610280611a32565b3480156105cc575f5ffd5b506105e06105db3660046149eb565b611ab5565b6040516102589190615074565b3480156105f8575f5ffd5b50610244611c07565b34801561060c575f5ffd5b506033546001600160a01b0316610244565b348015610629575f5ffd5b50610632611c15565b6040516102589392919061516d565b34801561064c575f5ffd5b50600161041c565b34801561065f575f5ffd5b506104c661066e366004614afe565b6001600160a01b03165f908152610101602052604090205490565b348015610694575f5ffd5b5061069d611c97565b6040516102589190615193565b3480156106b5575f5ffd5b506102806106c43660046152f9565b611e39565b3480156106d4575f5ffd5b5060fe54604080516080808201835260ff80546001600160401b038082168552600160401b8083048216602080880191909152600160801b8085048416888a0152600160c01b9485900484166060808a0191909152895160a081018b5261010054808716825294850486169381019390935290830490951615159781019790975266ffffffffffffff600160881b820416938701939093529104169083015261077b929183565b60405161025893929190615358565b348015610795575f5ffd5b506102447f0000000000000000000000006490e12d480549d333499236ff2ba6676c29601181565b3480156107c8575f5ffd5b506102806107d7366004614e8f565b61210e565b3480156107e7575f5ffd5b506102806107f6366004614b5b565b612231565b348015610806575f5ffd5b50610632612bc7565b34801561081a575f5ffd5b506065546001600160a01b0316610244565b348015610837575f5ffd5b506105a061084636600461537a565b612bef565b348015610856575f5ffd5b50610280610865366004614afe565b612daa565b348015610875575f5ffd5b506105a0610884366004615394565b612e1b565b806001600160401b0316805f036108b35760405163ec73295960e01b815260040160405180910390fd5b60026108c160c95460ff1690565b60ff16036108e25760405163dfc60d8560e01b815260040160405180910390fd5b6108ec6002612f63565b61010054600160801b900460ff16156109185760405163bae6e2a960e01b815260040160405180910390fd5b61098a610923611c97565b6040805160a081018252610100546001600160401b038082168352600160401b82048116602084015260ff600160801b83041615159383019390935266ffffffffffffff600160881b8204166060830152600160c01b900482166080820152908516612f79565b6109946001612f63565b5050565b5f54610100900460ff16158080156109b657505f54600160ff909116105b806109cf5750303b1580156109cf57505f5460ff166001145b610a375760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b5f805460ff191660011790558015610a58575f805461ff0019166101001790555b610a6283836136b8565b8015610aa8575f805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15b505050565b5f6002610abc60c95460ff1690565b60ff1614905090565b6001600160a01b037f000000000000000000000000f47eb6f8f9934f2838594a733f680ee8136d1024163003610b0d5760405162461bcd60e51b8152600401610a2e906153d0565b7f000000000000000000000000f47eb6f8f9934f2838594a733f680ee8136d10246001600160a01b0316610b3f613875565b6001600160a01b031614610b655760405162461bcd60e51b8152600401610a2e9061541c565b610b6e81613890565b604080515f80825260208201909252610b8991839190613898565b50565b61010054600160801b900460ff16610bb75760405163bae6e2a960e01b815260040160405180910390fd5b610100805477ffffffffffffff00ffffffffffffffffffffffffffffffff16600160c01b426001600160401b03160260ff60801b19161790556040513381527f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa9060200160405180910390a1610c2d335f613a02565b565b610ccf604080516101e0810182525f80825260606020808401829052838501829052818401839052608080850184905260a080860185905260c0860185905260e08601859052610100860185905261012086018590526101408601859052610160860185905261018086018590526101a086018590528651908101875284815291820184905294810183905290810182905292830152906101c082015290565b604080516080810182525f8082526020820181905291810182905260608101919091526002610d0060c95460ff1690565b60ff1603610d215760405163dfc60d8560e01b815260040160405180910390fd5b610d2b6002612f63565b6040805160a081018252610100546001600160401b038082168352600160401b82048116602084015260ff600160801b83041615159383019390935266ffffffffffffff600160881b8204166060830152600160c01b900490911660808201525f610d94611c97565b9050806101c00151602001516001600160401b0316825f01516001600160401b03161015610dd557604051630db2616960e01b815260040160405180910390fd5b80602001518260200151016001600160401b0316825f01516001600160401b03161115610e155760405163a464214b60e01b815260040160405180910390fd5b5f610e22888a018a615690565b90507f0000000000000000000000008698690deedb923fa0a674d3f65896b0031bf7c96001600160a01b0316610ed85780516001600160a01b031615610e7b5760405163612e247160e11b815260040160405180910390fd5b33815260c0810151515115610ea357604051632677ebff60e01b815260040160405180910390fd5b60c081015160a001516001600160401b031615610ed3576040516307a4f83360e11b815260040160405180910390fd5b610f49565b80516001600160a01b0316610f00576040516310213ad760e01b815260040160405180910390fd5b336001600160a01b037f0000000000000000000000008698690deedb923fa0a674d3f65896b0031bf7c91614610f4957604051635e9e444960e01b815260040160405180910390fd5b60208101516001600160a01b0316610f6c5780516001600160a01b031660208201525b8060a0015115610faa576101005443600160881b90910466ffffffffffffff1603610faa576040516304f14fd760e11b815260040160405180910390fd5b85158015906110615760c08201516020015160ff1615610fdd57604051632677ebff60e01b815260040160405180910390fd5b60c08201516040015160ff161561100757604051632677ebff60e01b815260040160405180910390fd5b60c082015160a001516001600160401b031615611037576040516307a4f83360e11b815260040160405180910390fd5b60c082015151511561105c57604051632677ebff60e01b815260040160405180910390fd5b611168565b60c082015151515f036110e3578160c001516040015160ff165f036110995760405163f911438d60e01b815260040160405180910390fd5b60c082015160a001516001600160401b0316156110c9576040516307a4f83360e11b815260040160405180910390fd5b60c08201516001600160401b03431660a090910152611168565b8160c0015160a001516001600160401b03165f03611114576040516307a4f83360e11b815260040160405180910390fd5b60c08201516040015160ff161561113e57604051632677ebff60e01b815260040160405180910390fd5b60c08201516020015160ff161561116857604051632677ebff60e01b815260040160405180910390fd5b5f60fb5f015f85604001516001600160401b03166001885f0151036001600160401b03168161119957611199615784565b6001600160401b039190068116825260208083019390935260409182015f908120610100808a01516101808b01516101a08c01518751610140810189528554815260018601548089169a82019a909a526001600160601b03600160401b808c0482169a83019a909a52600160a01b909a0490991660608a0152600285015480881660808b0152978804871660a08a0152600160801b880490961660c089015262ffffff600160c01b8804811660e08a015260ff600160d81b89041693890193909352600160e01b9096049091166101208701529095509093849361127f93899392613a0a565b91509150604051806101e001604052805f5f1b81526020018660e0015181526020015f6001600160401b038111156112b9576112b9614ea6565b6040519080825280602002602001820160405280156112e2578160200160208202803683370190505b5081526020018761012001516020015160ff165f1b815260200186602001516001600160a01b03168152602001436001600160401b031681526020018660c0015160a001516001600160401b031681526020018660c001516060015163ffffffff1681526020018660c001516080015163ffffffff168152602001876080015163ffffffff1681526020015f6001600160401b03168152602001826001600160401b03168152602001836001600160401b03168152602001836001600160401b03164081526020018761012001518152509850886101a001515f5f1b036113dc576040516302b44f0160e41b815260040160405180910390fd5b856101c00151602001516001600160401b0316875f01516001600160401b03161461141b5760e08501515160018401546001600160401b031601611428565b60e0850151518751015f19015b6001600160401b03166101408a015260405161145d9061144b908d908d90615798565b60405180910390208660c00151613e15565b6040808c0191909152908a52805160808101909152806114808b60a083016157a7565b604051602081830303815290604052805190602001208152602001865f01516001600160a01b03168152602001885f01516001600160401b03168152602001426001600160401b031681525097505f60fb5f015f88604001516001600160401b03168a5f01516001600160401b0316816114fc576114fc615784565b066001600160401b031681526020019081526020015f2090508860405160200161152691906157b9565b60408051808303601f19018152919052805160209091012081558751600282018054600160c01b6001600160401b039384166001600160801b031990921691909117600160401b86851602176affffffffffffffffffffff60801b1916600160801b9387169390930262ffffff60c01b1916929092179190911763ffffffff60d81b19169055855160a08801516115c691906001600160601b0316613f36565b6101408a015160a08801516001600160601b0316600160a01b026001600160401b0391821617600180840191909155895101811689526101c0880151604001511615806116305750866101c00151604001516001600160401b0316885f01516001600160401b0316105b61164d5760405163110f3dcf60e31b815260040160405180910390fd5b43886060019066ffffffffffffff16908166ffffffffffffff16815250507f9eb7fc80523943f28950bbb71ed6d584effe3e1e02ca4ddc8c86e5ee1558c0968a8a8e8e6040516116a094939291906157ef565b60405180910390a15050505050506116ba81836001612f79565b50506116c66001612f63565b94509492505050565b61010054600160801b900460ff16156116fb5760405163bae6e2a960e01b815260040160405180910390fd5b6117053382614046565b335f908152610101602052604081208054909190611724908490615835565b909155505050565b6001600160a01b037f000000000000000000000000f47eb6f8f9934f2838594a733f680ee8136d10241630036117745760405162461bcd60e51b8152600401610a2e906153d0565b7f000000000000000000000000f47eb6f8f9934f2838594a733f680ee8136d10246001600160a01b03166117a6613875565b6001600160a01b0316146117cc5760405162461bcd60e51b8152600401610a2e9061541c565b6117d582613890565b61099482826001613898565b5f306001600160a01b037f000000000000000000000000f47eb6f8f9934f2838594a733f680ee8136d102416146118805760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610a2e565b505f516020615d4b5f395f51905f5290565b61189a614259565b610c2d5f6142b3565b60655433906001600160a01b031681146119115760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b6064820152608401610a2e565b610b89816142b3565b61192261494c565b5f61192b611c97565b90505f81604001518461193e9190615848565b6001600160401b038082165f90815260fb6020526040902060028101549293509181169086161461198257604051632785786f60e21b815260040160405180910390fd5b6002810154600160e01b900462ffffff1615611a2a576001600160401b0382165f90815260fd60209081526040808320600285810154600160e01b900462ffffff16855290835292819020815160c0810183528154815260018201549381019390935292830154908201526003909101546001600160a01b0381166060830152600160a01b810460ff1615156080830152600160a81b900465ffffffffffff1660a082015293505b505050919050565b61010054600160801b900460ff1615611a5e5760405163bae6e2a960e01b815260040160405180910390fd5b611a77610100805460ff60801b1916600160801b179055565b6040513381527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589060200160405180910390a1610c2d336001613a02565b60408051610140810182525f80825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081018290526101008101829052610120810182905290611b0d611c97565b905060fb5f015f826040015185611b249190615848565b6001600160401b03908116825260208083019390935260409182015f20825161014081018452815481526001820154808416958201959095526001600160601b03600160401b808704821695830195909552600160a01b90950490941660608501526002015480821660808501819052928104821660a0850152600160801b8104821660c085015262ffffff600160c01b8204811660e086015260ff600160d81b830416610100860152600160e01b9091041661012084015291935090841614611c0157604051632785786f60e21b815260040160405180910390fd5b50919050565b5f611c10613875565b905090565b5f5f611c1f61494c565b61010054600160401b90046001600160401b03169250611c3d611c97565b6101c00151602001516001600160401b0316836001600160401b03161015611c7857604051632785786f60e21b815260040160405180910390fd5b611c8183611ab5565b602001519150611c908361191a565b9050909192565b604080516101e0810182525f80825260208083018290528284018290526060808401839052608080850184905260a080860185905260c0860185905260e086018590526101008601859052865190810187528481528084018590528087018590528083018590528082018590526101208601526101408501849052610160850184905261018085018490526101a0850184905285519081018652838152918201839052938101829052928301526101c081019190915250604080516101e08101825262028c6181526204f1a06020808301919091526204f3a08284015260086060808401829052630e4e1c006080808601919091526806c6b935b8bbd4000060a0808701919091525f60c08701819052600460e0880152610100870184905287519182018852938152603281860152624c4b40818801526350298966818401526323c3460081830152610120860152611c20610140860181905261016086015260106101808601526103006101a086015285519081018652620cd34081526213d5b093810193909352938201819052928101929092526101c081019190915290565b611e41614259565b5f849003611e6257604051635435b28960e11b815260040160405180910390fd5b5f859003611e8357604051635435b28960e11b815260040160405180910390fd5b5f839003611ea457604051635435b28960e11b815260040160405180910390fd5b610100546001600160401b03600160401b909104811690871611611edb5760405163c63c8bfd60e01b815260040160405180910390fd5b5f611ee4611c97565b90505f816040015188611ef79190615848565b6001600160401b039081165f81815260fb602052604090206002810154919350918a8116911614611f3b57604051632785786f60e21b815260040160405180910390fd5b6001600160401b0389165f90815260fc602090815260408083208b845290915281205462ffffff1690819003611fa857600282018054600160c01b900462ffffff16906018611f8983615875565b91906101000a81548162ffffff021916908362ffffff16021790555090505b5f83815260fd6020908152604080832062ffffff85168452909152902060e0850151611fd79060ff168c615848565b6001600160401b031615611feb575f611fed565b875b600282015560018082018a90556003820180546001600160a01b038a166001600160a81b031990911617600160a01b891515021765ffffffffffff60a81b1916600160a81b4265ffffffffffff160217905562ffffff8316900361205357898155612087565b6001600160401b038b165f90815260fc602090815260408083208d84529091529020805462ffffff191662ffffff84161790555b7fd859648d474435f113442503ab429a8dc1e53be35a151a45aeec3e67302a941c8b836040518060c001604052808e81526020018d81526020018c81526020018b6001600160a01b031681526020018a151581526020014265ffffffffffff168152506040516120f993929190615897565b60405180910390a15050505050505050505050565b61010054600160801b900460ff161561213a5760405163bae6e2a960e01b815260040160405180910390fd5b335f90815261010160205260409020548181101561216b5760405163e92c469f60e01b815260040160405180910390fd5b60405182815233907f0d41118e36df44efb77a471fc49fb9c0be0406d802ef95520e9fbf606e65b4559060200160405180910390a2335f9081526101016020526040812080548492906121bf9084906158c0565b90915550507f0000000000000000000000006490e12d480549d333499236ff2ba6676c2960116001600160a01b031615612227576109946001600160a01b037f0000000000000000000000006490e12d480549d333499236ff2ba6676c2960111633846142cc565b610994338361432f565b600261223f60c95460ff1690565b60ff16036122605760405163dfc60d8560e01b815260040160405180910390fd5b61226a6002612f63565b5f806122788587018761595d565b815191935091505f8190036122a057604051631b3dc8e560e11b815260040160405180910390fd5b815181146122c1576040516341e3f65360e11b815260040160405180910390fd5b6040805160a081018252610100546001600160401b038082168352600160401b82048116602084015260ff600160801b8304161580159484019490945266ffffffffffffff600160881b8304166060840152600160c01b9091041660808201529061233f5760405163ab35696f60e01b815260040160405180910390fd5b5f612348611c97565b90505f836001600160401b0381111561236357612363614ea6565b60405190808252806020026020018201604052801561239c57816020015b61238961498f565b8152602001906001900390816123815790505b5090505f5f5b858110156129ab575f8882815181106123bd576123bd615a66565b60200260200101519050846101c00151602001516001600160401b031681604001516001600160401b0316101561240757604051630db2616960e01b815260040160405180910390fd5b6101c0850151604001516001600160401b031615806124445750846101c00151604001516001600160401b031681604001516001600160401b0316105b6124615760405163110f3dcf60e31b815260040160405180910390fd5b85602001516001600160401b031681604001516001600160401b03161161249b57604051632785786f60e21b815260040160405180910390fd5b855f01516001600160401b031681604001516001600160401b0316106124d457604051632785786f60e21b815260040160405180910390fd5b5f8883815181106124e7576124e7615a66565b60200260200101519050805f01515f5f1b03612516576040516319ead34160e01b815260040160405180910390fd5b60208101515f0361253a5760405163ac97cfc760e01b815260040160405180910390fd5b60408101515f0361255e57604051636c0118eb60e01b815260040160405180910390fd5b816040015185848151811061257557612575615a66565b6020908102919091018101516001600160401b0390921690915260405161259e918491016157b9565b604051602081830303815290604052805190602001208584815181106125c6576125c6615a66565b60200260200101516020018181525050808584815181106125e9576125e9615a66565b6020026020010151604001819052505f8660400151836040015161260d9190615848565b6001600160401b03165f81815260fb6020526040902080548851929350909188908790811061263e5761263e615a66565b602002602001015160200151146126685760405163419b53b760e01b815260040160405180910390fd5b60028101545f90600160c01b900462ffffff1660018111156126e95784515f85815260fd6020908152604080832060018452909152902054036126ae57600191506126e9565b60028162ffffff1611156126e9576040808701516001600160401b03165f90815260fc6020908152828220885183529052205462ffffff1691505b8162ffffff165f0361272a5760028301805462ffffff60c01b198116600160c01b9182900462ffffff90811660018101909116909202179091559150612852565b5f84815260fd6020908152604080832062ffffff86168452825291829020825160c081018452815481526001820154928101839052600282015493810193909352600301546001600160a01b0381166060840152600160a01b810460ff1615156080840152600160a81b900465ffffffffffff1660a083015215612850575f866020015182602001511480156127d35750604082015115806127d3575086604001518260400151145b905080612843575f86815260fd6020908152604080832062ffffff88168452909152808220600190810192909255898101519051919b507fa05e896ff20170d694345384140d3397c040699d982fd6bdd73028e3d311f4449161283a919085908b90615a7a565b60405180910390a15b50505050505050506129a3565b505b5f84815260fd6020908152604080832062ffffff8616845282529182902090870151600182015560e08c01519188015190916128939160ff90911690615848565b6001600160401b0316156128a7575f6128ad565b85604001515b60028201556101408b015160808d015160608901515f9261ffff16916128df916001600160401b03908116911661433a565b60038401805460ff60a01b191691909201421115600160a01b81029190911790915590508061290e5733612914565b87602001515b6003830180546001600160a01b0392909216600166ffffffffffff0160a01b031990921691909117600160a81b4265ffffffffffff160217905562ffffff8416600103612964578651825561299a565b6040888101516001600160401b03165f90815260fc60209081528282208a518352905220805462ffffff191662ffffff86161790555b50505050505050505b6001016123a2565b506040516326c9adc960e21b81526001600160a01b037f0000000000000000000000009a919115127ed338c3bfbcdfbe72d4f167fa9e1d1690639b26b724906129fc9085908d908d90600401615aba565b5f604051808303815f87803b158015612a13575f5ffd5b505af1158015612a25573d5f5f3e3d5ffd5b505050505f856001600160401b03811115612a4257612a42614ea6565b604051908082528060200260200182016040528015612a6b578160200160208202803683370190505b5090505f5b86811015612ac857888181518110612a8a57612a8a615a66565b602002602001015160400151828281518110612aa857612aa8615a66565b6001600160401b0390921660209283029190910190910152600101612a70565b507fc99f03c7db71a9e8c78654b1d2f77378b413cc979a02fa22dc9d39702afa92bc7f0000000000000000000000009a919115127ed338c3bfbcdfbe72d4f167fa9e1d8289604051612b1c93929190615b3b565b60405180910390a1508015612ba557612b44610100805460ff60801b1916600160801b179055565b6040516001600160a01b037f0000000000000000000000009a919115127ed338c3bfbcdfbe72d4f167fa9e1d1681527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589060200160405180910390a1612bb0565b612bb0838587612f79565b50505050505050612bc16001612f63565b50505050565b5f5f612bd161494c565b60ff54600160801b90046001600160401b03169250611c8183611ab5565b612bf761494c565b5f612c00611c97565b90505f816040015185612c139190615848565b6001600160401b039081165f81815260fb60205260409020600281015491935091878116911614612c5757604051632785786f60e21b815260040160405180910390fd5b60028101545f906001600160c01b90910462ffffff161115612cde575f83815260fd6020908152604080832060018452909152902054869003612c9c57506001612cde565b600282810154600160c01b900462ffffff161115612cde57506001600160401b0386165f90815260fc6020908152604080832088845290915290205462ffffff165b62ffffff811615801590612d055750600282015462ffffff600160c01b9091048116908216105b612d2257604051631daf8e2f60e21b815260040160405180910390fd5b5f92835260fd6020908152604080852062ffffff909316855291815292819020815160c08101835281548152600182015494810194909452600281015491840191909152600301546001600160a01b038116606084015260ff600160a01b8204161515608084015265ffffffffffff600160a81b9091041660a0830152509150505b92915050565b612db2614259565b606580546001600160a01b0383166001600160a01b03199091168117909155612de36033546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b612e2361494c565b5f612e2c611c97565b90505f816040015185612e3f9190615848565b6001600160401b039081165f81815260fb60205260409020600281015491935091878116911614612e8357604051632785786f60e21b815260040160405180910390fd5b8462ffffff165f03612ea857604051631daf8e2f60e21b815260040160405180910390fd5b600281015462ffffff600160c01b909104811690861610612edc57604051631daf8e2f60e21b815260040160405180910390fd5b505f90815260fd6020908152604080832062ffffff87168452825291829020825160c081018452815481526001820154928101929092526002810154928201929092526003909101546001600160a01b038116606083015260ff600160a01b8204161515608083015265ffffffffffff600160a81b9091041660a082015291505092915050565b60c9805460ff191660ff92909216919091179055565b6020808301516101c0850151909101515f906001600160401b0381161580612fb65750600181036001600160401b0316836001600160401b031610155b91505080156135de575f856040015183612fd09190615848565b6001600160401b03165f81815260fb60209081526040808320600281015460fd8452828520600160e01b90910462ffffff168086529084528285206001015483516080810185528681529485018690529284018590526060840194909452939450905f6130738a5f01516001600160401b03168b602001516001600160401b03168b8e606001516001600160401b0316020160010161435190919063ffffffff16565b90508a6101c00151604001516001600160401b03165f146130af576101c08b0151604001516130ac9082906001600160401b0316614351565b90505b6130b888615bf3565b97505b80886001600160401b031610156133015760408b01516130db9089615848565b6001600160401b03165f81815260fb60205260409020600281015461010054929850909650600160c01b900462ffffff1690600160801b900460ff16156131225750613301565b60018162ffffff16116131355750613301565b5f87815260fd60209081526040808320600184529091529020805485900361316057600195506131d4565b60028262ffffff1611156131cd576001600160401b038a165f90815260fc6020908152604080832088845290915281205462ffffff16908190036131a657505050613301565b5f89815260fd6020908152604080832062ffffff85168452909152902090965090506131d4565b5050613301565b60018101545f8190036131e957505050613301565b428e610160015162ffffff168360030160159054906101000a900465ffffffffffff160165ffffffffffff16111561322357505050613301565b8095505f8260030160149054906101000a900460ff1661326357600189015461325e90600290600160a01b90046001600160601b0316615c14565b613279565b6001890154600160a01b90046001600160601b03165b600384015490915061329d906001600160a01b03166001600160601b03831661435f565b60e08f01516132af9060ff168d615848565b6001600160401b03165f036132ec576001600160401b03808d16875260018a015416602087015262ffffff88166040870152600283015460608701525b50505050876132fa90615bf3565b97506130bb565b87600190039750876001600160401b03168a602001516001600160401b0316146135d7576001600160401b03881660208b0181905260408c015160fb915f9161334991615848565b6001600160401b03908116825260208083019390935260409182015f2060028101805462ffffff60e01b1916600160e01b62ffffff8b16021790558d8401518351921682529281018690529196507fd6b1adebb10d3d794bc13103c4e9a696e79b3ce83355d8bdd77237cb20b3a4a0910160405180910390a181516001600160401b0316156135d75789602001516001600160401b0316825f01516001600160401b0316146134465760408b0151825160fb915f916134089190615848565b6001600160401b031681526020019081526020015f209450816040015185600201601c6101000a81548162ffffff021916908362ffffff1602179055505b6040805160808101825260ff80546001600160401b03808216808552600160401b80840483166020870181905260028d0154841687890181905242909416606088018190526001600160801b03199095169092179102176fffffffffffffffffffffffffffffffff16600160801b9091026001600160c01b031617600160c01b90910217905590517fcfbcbd3a81b749a28e6289bc350363f1949bb0a58ba7120d8dd4ef4b3617dff8906134fb908390614a4e565b60405180910390a18b51602084015160608501516040516313e4299d60e21b81526001600160401b0393841660048201527f73e6d340850343cc6f001515dc593377337c95a6ffe034fe1e844d4dab5da169602482015292909116604483015260648201527f0000000000000000000000006fc2fe9d9dd0251ec5e0727e826afbb0db2cbe0d6001600160a01b031690634f90a674906084016020604051808303815f875af11580156135b0573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906135d49190615c41565b50505b5050505050505b83516101008054602087015160408089015160608a015160808b01516001600160401b03908116600160c01b026001600160c01b0366ffffffffffffff909316600160881b0266ffffffffffffff60881b19941515600160801b029490941667ffffffffffffffff60801b19968316600160401b026001600160801b031990981692909916919091179590951793909316959095179490941716179055517f7156d026e6a3864d290a971910746f96477d3901e33c4b2375e4ee00dabe7d87906136a9908690614ab2565b60405180910390a15050505050565b5f54610100900460ff166136de5760405162461bcd60e51b8152600401610a2e90615c58565b6136e7826143c6565b5f8190036137085760405163cd21cd4360e01b815260040160405180910390fd5b7f62706e85402cc48a87d49cd7385662e24ad19ed753c6d6f4d464b32120eeb9938190555f80805260fb602090815260017fc88390e7e62175be0932452175b6a7222b6b094ab0ef984a5153c620345d89758181557fc88390e7e62175be0932452175b6a7222b6b094ab0ef984a5153c620345d8977805477ffffffffffffffffffffffffffffffff00000000000000001916600160401b426001600160401b039081169190910267ffffffffffffffff60801b191691909117600160801b439283169081029190911766ffffff00ffffff60c01b1916638000000160c11b1790925560ff805467ffffffffffffffff199081169093179055610100805477ffffffffffffff000000000000000000ffffffffffffffff1916600160881b66ffffffffffffff909316929092029092161790921790915560408051938452918301849052917fd6b1adebb10d3d794bc13103c4e9a696e79b3ce83355d8bdd77237cb20b3a4a09101610a9f565b5f516020615d4b5f395f51905f52546001600160a01b031690565b610b89614259565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156138cb57610aa883614424565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015613925575060408051601f3d908101601f1916820190925261392291810190615c41565b60015b6139885760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610a2e565b5f516020615d4b5f395f51905f5281146139f65760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610a2e565b50610aa88383836144bf565b610994614259565b60e0850151515f908190808203613a345760405163feb32ebd60e01b815260040160405180910390fd5b8461ffff16811115613a5957604051633f836abd60e11b815260040160405180910390fd5b87606001516001600160401b03165f03613a7857600143039250613b18565b43878960600151016001600160401b03161015613aa8576040516311abefd560e21b815260040160405180910390fd5b4388606001516001600160401b031610613ad557604051630fe29b5f60e31b815260040160405180910390fd5b8360c001516001600160401b031688606001516001600160401b03161015613b1057604051637f0b4c5960e11b815260040160405180910390fd5b876060015192505b60808801516001600160401b031615613b35578760800151613b37565b425b915042826001600160401b03161115613b6357604051633d32ffdb60e01b815260040160405180910390fd5b8760e001515f81518110613b7957613b79615a66565b60200260200101516020015160ff165f14613ba757604051630649ac0f60e31b815260040160405180910390fd5b5f5f5b82811015613d33578960e001518181518110613bc857613bc8615a66565b60200260200101516020015160ff16820191505f8a60e001518281518110613bf257613bf2615a66565b602002602001015160400151519050805f03613c0e5750613d2b565b8860ff16811115613c325760405163c577d38360e01b815260040160405180910390fd5b5f5b81811015613d28577f0000000000000000000000006fc2fe9d9dd0251ec5e0727e826afbb0db2cbe0d6001600160a01b0316638e899f808d60e001518581518110613c8157613c81615a66565b6020026020010151604001518381518110613c9e57613c9e615a66565b60200260200101516040518263ffffffff1660e01b8152600401613cc491815260200190565b602060405180830381865afa158015613cdf573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613d039190615ca3565b613d2057604051634300d2ff60e11b815260040160405180910390fd5b600101613c34565b50505b600101613baa565b50806001600160401b0316836001600160401b03161015613d6757604051630cccd76960e11b815260040160405180910390fd5b808303426001600160401b03808316908b16600c02011015613d9c57604051630cccd76960e11b815260040160405180910390fd5b8560a001516001600160401b0316816001600160401b03161015613dd35760405163084e26e160e21b815260040160405180910390fd5b60408a01511580613de85750855160408b0151145b613e08576040516001629d908960e01b0319815260040160405180910390fd5b5050509550959350505050565b8051515f9060609015613e2a57508151613eb3565b604083015160ff16806001600160401b03811115613e4a57613e4a614ea6565b604051908082528060200260200182016040528015613e73578160200160208202803683370190505b5091505f5b81811015613eb05780856020015160ff160149838281518110613e9d57613e9d615a66565b6020908102919091010152600101613e78565b50505b80515f5b81811015613f0257828181518110613ed157613ed1615a66565b60200260200101515f5f1b03613efa57604051637bb2fa2f60e11b815260040160405180910390fd5b600101613eb7565b508482604051602001613f16929190615cbe565b604051602081830303815290604052805190602001209250509250929050565b805f03613f41575050565b6001600160a01b0382165f9081526101016020526040902054818110613f83576001600160a01b0383165f908152610101602052604090208282039055613ffe565b7f0000000000000000000000006490e12d480549d333499236ff2ba6676c2960116001600160a01b031615613fe5575f613fbd8484614046565b9050828114613fdf5760405163e92c469f60e01b815260040160405180910390fd5b50613ffe565b60405163e92c469f60e01b815260040160405180910390fd5b826001600160a01b03167f85f32beeaff2d0019a8d196f06790c9a652191759c46643311344fd38920423c8360405161403991815260200190565b60405180910390a2505050565b5f7f0000000000000000000000006490e12d480549d333499236ff2ba6676c2960116001600160a01b0316156141ee5734156140955760405163798ee6f160e01b815260040160405180910390fd5b6040516370a0823160e01b81523060048201525f907f0000000000000000000000006490e12d480549d333499236ff2ba6676c2960116001600160a01b0316906370a0823190602401602060405180830381865afa1580156140f9573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061411d9190615c41565b90506141546001600160a01b037f0000000000000000000000006490e12d480549d333499236ff2ba6676c296011168530866144e3565b6040516370a0823160e01b815230600482015281907f0000000000000000000000006490e12d480549d333499236ff2ba6676c2960116001600160a01b0316906370a0823190602401602060405180830381865afa1580156141b8573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906141dc9190615c41565b6141e691906158c0565b915050614210565b81341461420d5760405162c56beb60e11b815260040160405180910390fd5b50805b826001600160a01b03167f8ed8c6869618197b68315ade66e75ed3906c97b111fa3ab81e5760046825c7db8260405161424b91815260200190565b60405180910390a292915050565b6033546001600160a01b03163314610c2d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a2e565b606580546001600160a01b0319169055610b898161451b565b6040516001600160a01b038316602482015260448101829052610aa890849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261456c565b61099482825a61463f565b5f818311614348578161434a565b825b9392505050565b5f818311611c01578261434a565b805f0361436a575050565b6001600160a01b0382165f818152610101602052604090819020805484019055517f6de6fe586196fa05b73b973026c5fda3968a2933989bff3a0b6bd57644fab606906143ba9084815260200190565b60405180910390a25050565b5f54610100900460ff166143ec5760405162461bcd60e51b8152600401610a2e90615c58565b6143f4614682565b6144126001600160a01b0382161561440c57816142b3565b336142b3565b5060c9805461ff001916610100179055565b6001600160a01b0381163b6144915760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610a2e565b5f516020615d4b5f395f51905f5280546001600160a01b0319166001600160a01b0392909216919091179055565b6144c8836146a8565b5f825111806144d45750805b15610aa857612bc183836146e7565b6040516001600160a01b0380851660248301528316604482015260648101829052612bc19085906323b872dd60e01b906084016142f8565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f6145c0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661470c9092919063ffffffff16565b905080515f14806145e05750808060200190518101906145e09190615ca3565b610aa85760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a2e565b815f0361464b57505050565b61466583838360405180602001604052805f815250614722565b610aa857604051634c67134d60e11b815260040160405180910390fd5b5f54610100900460ff16610c2d5760405162461bcd60e51b8152600401610a2e90615c58565b6146b181614424565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a250565b606061434a8383604051806060016040528060278152602001615d6b6027913961475f565b606061471a84845f856147d3565b949350505050565b5f6001600160a01b03851661474a57604051634c67134d60e11b815260040160405180910390fd5b5f5f835160208501878988f195945050505050565b60605f5f856001600160a01b03168560405161477b9190615cff565b5f60405180830381855af49150503d805f81146147b3576040519150601f19603f3d011682016040523d82523d5f602084013e6147b8565b606091505b50915091506147c9868383876148aa565b9695505050505050565b6060824710156148345760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a2e565b5f5f866001600160a01b0316858760405161484f9190615cff565b5f6040518083038185875af1925050503d805f8114614889576040519150601f19603f3d011682016040523d82523d5f602084013e61488e565b606091505b509150915061489f878383876148aa565b979650505050505050565b606083156149185782515f03614911576001600160a01b0385163b6149115760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a2e565b508161471a565b61471a838381511561492d5781518083602001fd5b8060405162461bcd60e51b8152600401610a2e9190615d15565b905290565b6040518060c001604052805f81526020015f81526020015f81526020015f6001600160a01b031681526020015f151581526020015f65ffffffffffff1681525090565b60405180606001604052805f6001600160401b031681526020015f815260200161494760405180606001604052805f81526020015f81526020015f81525090565b80356001600160401b03811681146149e6575f5ffd5b919050565b5f602082840312156149fb575f5ffd5b61434a826149d0565b6001600160401b0381511682526001600160401b0360208201511660208301526001600160401b0360408201511660408301526001600160401b0360608201511660608301525050565b60808101612da48284614a04565b6001600160401b0381511682526001600160401b03602082015116602083015260408101511515604083015266ffffffffffffff60608201511660608301526001600160401b0360808201511660808301525050565b60a08101612da48284614a5c565b80356001600160a01b03811681146149e6575f5ffd5b5f5f60408385031215614ae7575f5ffd5b614af083614ac0565b946020939093013593505050565b5f60208284031215614b0e575f5ffd5b61434a82614ac0565b5f5f83601f840112614b27575f5ffd5b5081356001600160401b03811115614b3d575f5ffd5b602083019150836020828501011115614b54575f5ffd5b9250929050565b5f5f5f5f60408587031215614b6e575f5ffd5b84356001600160401b03811115614b83575f5ffd5b614b8f87828801614b17565b90955093505060208501356001600160401b03811115614bad575f5ffd5b614bb987828801614b17565b95989497509550505050565b5f8151808452602084019350602083015f5b82811015614bf5578151865260209586019590910190600101614bd7565b5093949350505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015614c7557601f19858403018852815161ffff815116845260ff60208201511660208501526040810151905060606040850152614c5e6060850182614bc5565b6020998a0199909450929092019150600101614c1b565b50909695505050505050565b60ff815116825260ff602082015116602083015263ffffffff60408201511660408301526001600160401b03606082015116606083015263ffffffff60808201511660808301525050565b805182525f60208201516102606020850152614cec610260850182614bff565b905060408301518482036040860152614d058282614bc5565b915050606083015160608501526080830151614d2c60808601826001600160a01b03169052565b5060a0830151614d4760a08601826001600160401b03169052565b5060c0830151614d6260c08601826001600160401b03169052565b5060e0830151614d7a60e086018263ffffffff169052565b50610100830151614d9461010086018263ffffffff169052565b50610120830151614dae61012086018263ffffffff169052565b50610140830151614dcb6101408601826001600160401b03169052565b50610160830151614de86101608601826001600160401b03169052565b50610180830151614e056101808601826001600160401b03169052565b506101a08301516101a08501526101c0830151614e266101c0860182614c81565b509392505050565b8051825260018060a01b0360208201511660208301526001600160401b0360408201511660408301526001600160401b0360608201511660608301525050565b60a081525f614e8060a0830185614ccc565b905061434a6020830184614e2e565b5f60208284031215614e9f575f5ffd5b5035919050565b634e487b7160e01b5f52604160045260245ffd5b60405160c081016001600160401b0381118282101715614edc57614edc614ea6565b60405290565b604051606081016001600160401b0381118282101715614edc57614edc614ea6565b60405161010081016001600160401b0381118282101715614edc57614edc614ea6565b604051608081016001600160401b0381118282101715614edc57614edc614ea6565b604051601f8201601f191681016001600160401b0381118282101715614f7157614f71614ea6565b604052919050565b5f5f60408385031215614f8a575f5ffd5b614f9383614ac0565b915060208301356001600160401b03811115614fad575f5ffd5b8301601f81018513614fbd575f5ffd5b80356001600160401b03811115614fd657614fd6614ea6565b614fe9601f8201601f1916602001614f49565b818152866020838501011115614ffd575f5ffd5b816020840160208301375f602083830101528093505050509250929050565b8051825260208082015190830152604080820151908301526060808201516001600160a01b03169083015260808082015115159083015260a09081015165ffffffffffff16910152565b60c08101612da4828461501c565b81518152602080830151610140830191615098908401826001600160401b03169052565b5060408301516150b360408401826001600160601b03169052565b5060608301516150ce60608401826001600160601b03169052565b5060808301516150e960808401826001600160401b03169052565b5060a083015161510460a08401826001600160401b03169052565b5060c083015161511f60c08401826001600160401b03169052565b5060e083015161513660e084018262ffffff169052565b5061010083015161514d61010084018260ff169052565b5061012083015161516661012084018262ffffff169052565b5092915050565b6001600160401b03848116825283166020820152610100810161471a604083018461501c565b81516001600160401b031681526102c0810160208301516151bf60208401826001600160401b03169052565b5060408301516151da60408401826001600160401b03169052565b5060608301516151f560608401826001600160401b03169052565b50608083015161520d608084018263ffffffff169052565b5060a083015161522860a08401826001600160601b03169052565b5060c083015161524360c08401826001600160601b03169052565b5060e083015161525860e084018260ff169052565b506101008301516152756101008401826001600160401b03169052565b5061012083015161528a610120840182614c81565b5061014083015161ffff9081166101c08481019190915261016085015162ffffff166101e085015261018085015160ff166102008501526101a0850151909116610220840152830151615166610240840182614a04565b8015158114610b89575f5ffd5b80356149e6816152e1565b5f5f5f5f5f5f60c0878903121561530e575f5ffd5b615317876149d0565b955060208701359450604087013593506060870135925061533a60808801614ac0565b915060a087013561534a816152e1565b809150509295509295509295565b838152610140810161536d6020830185614a04565b61471a60a0830184614a5c565b5f5f6040838503121561538b575f5ffd5b614af0836149d0565b5f5f604083850312156153a5575f5ffd5b6153ae836149d0565b9150602083013562ffffff811681146153c5575f5ffd5b809150509250929050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b5f6001600160401b0382111561548057615480614ea6565b5060051b60200190565b5f82601f830112615499575f5ffd5b81356154ac6154a782615468565b614f49565b8082825260208201915060208360051b8601019250858311156154cd575f5ffd5b602085015b838110156154ea5780358352602092830192016154d2565b5095945050505050565b803560ff811681146149e6575f5ffd5b803563ffffffff811681146149e6575f5ffd5b5f60c08284031215615527575f5ffd5b61552f614eba565b905081356001600160401b03811115615546575f5ffd5b6155528482850161548a565b825250615561602083016154f4565b6020820152615572604083016154f4565b604082015261558360608301615504565b606082015261559460808301615504565b60808201526155a560a083016149d0565b60a082015292915050565b5f82601f8301126155bf575f5ffd5b81356155cd6154a782615468565b8082825260208201915060208360051b8601019250858311156155ee575f5ffd5b602085015b838110156154ea5780356001600160401b03811115615610575f5ffd5b86016060818903601f19011215615625575f5ffd5b61562d614ee2565b602082013561ffff81168114615641575f5ffd5b815261564f604083016154f4565b602082015260608201356001600160401b0381111561566c575f5ffd5b61567b8a60208386010161548a565b604083015250845250602092830192016155f3565b5f602082840312156156a0575f5ffd5b81356001600160401b038111156156b5575f5ffd5b820161010081850312156156c7575f5ffd5b6156cf614f04565b6156d882614ac0565b81526156e660208301614ac0565b602082015260408281013590820152615701606083016149d0565b6060820152615712608083016149d0565b608082015261572360a083016152ee565b60a082015260c08201356001600160401b03811115615740575f5ffd5b61574c86828501615517565b60c08301525060e08201356001600160401b0381111561576a575f5ffd5b615776868285016155b0565b60e083015250949350505050565b634e487b7160e01b5f52601260045260245ffd5b818382375f9101908152919050565b602081525f61434a6020830184614ccc565b60808101612da48284614e2e565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b60c081525f61580160c0830187614ccc565b61580e6020840187614e2e565b82810360a084015261489f8185876157c7565b634e487b7160e01b5f52601160045260245ffd5b80820180821115612da457612da4615821565b5f6001600160401b0383168061586057615860615784565b806001600160401b0384160691505092915050565b5f62ffffff821662ffffff810361588e5761588e615821565b60010192915050565b6001600160401b038416815262ffffff83166020820152610100810161471a604083018461501c565b81810381811115612da457612da4615821565b5f82601f8301126158e2575f5ffd5b81356158f06154a782615468565b80828252602082019150602060608402860101925085831115615911575f5ffd5b602085015b838110156154ea576060818803121561592d575f5ffd5b615935614ee2565b8135815260208083013581830152604080840135908301529084529290920191606001615916565b5f5f6040838503121561596e575f5ffd5b82356001600160401b03811115615983575f5ffd5b8301601f81018513615993575f5ffd5b80356159a16154a782615468565b8082825260208201915060208360071b8501019250878311156159c2575f5ffd5b6020840193505b82841015615a3357608084890312156159e0575f5ffd5b6159e8614f27565b843581526159f860208601614ac0565b6020820152615a09604086016149d0565b6040820152615a1a606086016149d0565b60608201528252608093909301926020909101906159c9565b945050505060208301356001600160401b03811115615a50575f5ffd5b615a5c858286016158d3565b9150509250929050565b634e487b7160e01b5f52603260045260245ffd5b6001600160401b03841681526101408101615a98602083018561501c565b825160e08301526020830151610100830152604083015161012083015261471a565b604080825284519082018190525f9060208601906060840190835b81811015615b2657835180516001600160401b03168452602080820151818601526040918201518051838701528082015160608701529091015160808501529093019260a090920191600101615ad5565b5050838103602085015261489f8186886157c7565b6001600160a01b03841681526060602080830182905284519183018290525f91908501906080840190835b81811015615b8d5783516001600160401b0316835260209384019390920191600101615b66565b50508381036040850152845180825260209182019250908501905f5b81811015615be657615bd08484518051825260208082015190830152604090810151910152565b6060939093019260209290920191600101615ba9565b5091979650505050505050565b5f6001600160401b0382166001600160401b03810361588e5761588e615821565b5f6001600160601b03831680615c2c57615c2c615784565b806001600160601b0384160491505092915050565b5f60208284031215615c51575f5ffd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b5f60208284031215615cb3575f5ffd5b815161434a816152e1565b5f60408201848352604060208401528084518083526060850191506020860192505f5b81811015614c75578351835260209384019390920191600101615ce1565b5f82518060208501845e5f920191825250919050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f8301168401019150509291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220743b5b3abd81b9b21af96b31b93efeca46aa08305107b03b4de0b06cb7afe8db64736f6c634300081b0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000008698690deedb923fa0a674d3f65896b0031bf7c90000000000000000000000009a919115127ed338c3bfbcdfbe72d4f167fa9e1d0000000000000000000000006490e12d480549d333499236ff2ba6676c2960110000000000000000000000006fc2fe9d9dd0251ec5e0727e826afbb0db2cbe0d
-----Decoded View---------------
Arg [0] : _wrapper (address): 0x8698690dEeDB923fA0A674D3f65896B0031BF7c9
Arg [1] : _verifier (address): 0x9A919115127ed338C3bFBcdfBE72D4F167Fa9E1D
Arg [2] : _bondToken (address): 0x6490E12d480549D333499236fF2Ba6676C296011
Arg [3] : _signalService (address): 0x6Fc2fe9D9dd0251ec5E0727e826Afbb0Db2CBe0D
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000008698690deedb923fa0a674d3f65896b0031bf7c9
Arg [1] : 0000000000000000000000009a919115127ed338c3bfbcdfbe72d4f167fa9e1d
Arg [2] : 0000000000000000000000006490e12d480549d333499236ff2ba6676c296011
Arg [3] : 0000000000000000000000006fc2fe9d9dd0251ec5e0727e826afbb0db2cbe0d
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.