Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x61014060 | 18023687 | 414 days ago | IN | 0 ETH | 0.10349564 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
OptimismPortal
Compiler Version
v0.8.15+commit.e14f2714
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import { SafeCall } from "../libraries/SafeCall.sol"; import { L2OutputOracle } from "./L2OutputOracle.sol"; import { SystemConfig } from "./SystemConfig.sol"; import { Constants } from "../libraries/Constants.sol"; import { Types } from "../libraries/Types.sol"; import { Hashing } from "../libraries/Hashing.sol"; import { SecureMerkleTrie } from "../libraries/trie/SecureMerkleTrie.sol"; import { AddressAliasHelper } from "../vendor/AddressAliasHelper.sol"; import { ResourceMetering } from "./ResourceMetering.sol"; import { Semver } from "../universal/Semver.sol"; /// @custom:proxied /// @title OptimismPortal /// @notice The OptimismPortal is a low-level contract responsible for passing messages between L1 /// and L2. Messages sent directly to the OptimismPortal have no form of replayability. /// Users are encouraged to use the L1CrossDomainMessenger for a higher-level interface. contract OptimismPortal is Initializable, ResourceMetering, Semver { /// @notice Represents a proven withdrawal. /// @custom:field outputRoot Root of the L2 output this was proven against. /// @custom:field timestamp Timestamp at whcih the withdrawal was proven. /// @custom:field l2OutputIndex Index of the output this was proven against. struct ProvenWithdrawal { bytes32 outputRoot; uint128 timestamp; uint128 l2OutputIndex; } /// @notice Version of the deposit event. uint256 internal constant DEPOSIT_VERSION = 0; /// @notice The L2 gas limit set when eth is deposited using the receive() function. uint64 internal constant RECEIVE_DEFAULT_GAS_LIMIT = 100_000; /// @notice Address of the L2OutputOracle contract. L2OutputOracle public immutable L2_ORACLE; /// @notice Address of the SystemConfig contract. SystemConfig public immutable SYSTEM_CONFIG; /// @notice Address that has the ability to pause and unpause withdrawals. address public immutable GUARDIAN; /// @notice Address of the L2 account which initiated a withdrawal in this transaction. /// If the of this variable is the default L2 sender address, then we are NOT inside of /// a call to finalizeWithdrawalTransaction. address public l2Sender; /// @notice A list of withdrawal hashes which have been successfully finalized. mapping(bytes32 => bool) public finalizedWithdrawals; /// @notice A mapping of withdrawal hashes to `ProvenWithdrawal` data. mapping(bytes32 => ProvenWithdrawal) public provenWithdrawals; /// @notice Determines if cross domain messaging is paused. /// When set to true, withdrawals are paused. /// This may be removed in the future. bool public paused; /// @notice Emitted when a transaction is deposited from L1 to L2. /// The parameters of this event are read by the rollup node and used to derive deposit /// transactions on L2. /// @param from Address that triggered the deposit transaction. /// @param to Address that the deposit transaction is directed to. /// @param version Version of this deposit transaction event. /// @param opaqueData ABI encoded deposit data to be parsed off-chain. event TransactionDeposited( address indexed from, address indexed to, uint256 indexed version, bytes opaqueData ); /// @notice Emitted when a withdrawal transaction is proven. /// @param withdrawalHash Hash of the withdrawal transaction. /// @param from Address that triggered the withdrawal transaction. /// @param to Address that the withdrawal transaction is directed to. event WithdrawalProven( bytes32 indexed withdrawalHash, address indexed from, address indexed to ); /// @notice Emitted when a withdrawal transaction is finalized. /// @param withdrawalHash Hash of the withdrawal transaction. /// @param success Whether the withdrawal transaction was successful. event WithdrawalFinalized(bytes32 indexed withdrawalHash, bool success); /// @notice Emitted when the pause is triggered. /// @param account Address of the account triggering the pause. event Paused(address account); /// @notice Emitted when the pause is lifted. /// @param account Address of the account triggering the unpause. event Unpaused(address account); /// @notice Reverts when paused. modifier whenNotPaused() { require(paused == false, "OptimismPortal: paused"); _; } /// @custom:semver 1.7.2 /// @notice Constructs the OptimismPortal contract. /// @param _l2Oracle Address of the L2OutputOracle contract. /// @param _guardian Address that can pause withdrawals. /// @param _paused Sets the contract's pausability state. /// @param _config Address of the SystemConfig contract. constructor( L2OutputOracle _l2Oracle, address _guardian, bool _paused, SystemConfig _config ) Semver(1, 7, 2) { L2_ORACLE = _l2Oracle; GUARDIAN = _guardian; SYSTEM_CONFIG = _config; initialize(_paused); } /// @notice Initializer. function initialize(bool _paused) public initializer { l2Sender = Constants.DEFAULT_L2_SENDER; paused = _paused; __ResourceMetering_init(); } /// @notice Pauses withdrawals. function pause() external { require(msg.sender == GUARDIAN, "OptimismPortal: only guardian can pause"); paused = true; emit Paused(msg.sender); } /// @notice Unpauses withdrawals. function unpause() external { require(msg.sender == GUARDIAN, "OptimismPortal: only guardian can unpause"); paused = false; emit Unpaused(msg.sender); } /// @notice Computes the minimum gas limit for a deposit. /// The minimum gas limit linearly increases based on the size of the calldata. /// This is to prevent users from creating L2 resource usage without paying for it. /// This function can be used when interacting with the portal to ensure forwards /// compatibility. /// @param _byteCount Number of bytes in the calldata. /// @return The minimum gas limit for a deposit. function minimumGasLimit(uint64 _byteCount) public pure returns (uint64) { return _byteCount * 16 + 21000; } /// @notice Accepts value so that users can send ETH directly to this contract and have the /// funds be deposited to their address on L2. This is intended as a convenience /// function for EOAs. Contracts should call the depositTransaction() function directly /// otherwise any deposited funds will be lost due to address aliasing. // solhint-disable-next-line ordering receive() external payable { depositTransaction(msg.sender, msg.value, RECEIVE_DEFAULT_GAS_LIMIT, false, bytes("")); } /// @notice Accepts ETH value without triggering a deposit to L2. /// This function mainly exists for the sake of the migration between the legacy /// Optimism system and Bedrock. function donateETH() external payable { // Intentionally empty. } /// @notice Getter for the resource config. /// Used internally by the ResourceMetering contract. /// The SystemConfig is the source of truth for the resource config. /// @return ResourceMetering ResourceConfig function _resourceConfig() internal view override returns (ResourceMetering.ResourceConfig memory) { return SYSTEM_CONFIG.resourceConfig(); } /// @notice Proves a withdrawal transaction. /// @param _tx Withdrawal transaction to finalize. /// @param _l2OutputIndex L2 output index to prove against. /// @param _outputRootProof Inclusion proof of the L2ToL1MessagePasser contract's storage root. /// @param _withdrawalProof Inclusion proof of the withdrawal in L2ToL1MessagePasser contract. function proveWithdrawalTransaction( Types.WithdrawalTransaction memory _tx, uint256 _l2OutputIndex, Types.OutputRootProof calldata _outputRootProof, bytes[] calldata _withdrawalProof ) external whenNotPaused { // Prevent users from creating a deposit transaction where this address is the message // sender on L2. Because this is checked here, we do not need to check again in // `finalizeWithdrawalTransaction`. require( _tx.target != address(this), "OptimismPortal: you cannot send messages to the portal contract" ); // Get the output root and load onto the stack to prevent multiple mloads. This will // revert if there is no output root for the given block number. bytes32 outputRoot = L2_ORACLE.getL2Output(_l2OutputIndex).outputRoot; // Verify that the output root can be generated with the elements in the proof. require( outputRoot == Hashing.hashOutputRootProof(_outputRootProof), "OptimismPortal: invalid output root proof" ); // Load the ProvenWithdrawal into memory, using the withdrawal hash as a unique identifier. bytes32 withdrawalHash = Hashing.hashWithdrawal(_tx); ProvenWithdrawal memory provenWithdrawal = provenWithdrawals[withdrawalHash]; // We generally want to prevent users from proving the same withdrawal multiple times // because each successive proof will update the timestamp. A malicious user can take // advantage of this to prevent other users from finalizing their withdrawal. However, // since withdrawals are proven before an output root is finalized, we need to allow users // to re-prove their withdrawal only in the case that the output root for their specified // output index has been updated. require( provenWithdrawal.timestamp == 0 || L2_ORACLE.getL2Output(provenWithdrawal.l2OutputIndex).outputRoot != provenWithdrawal.outputRoot, "OptimismPortal: withdrawal hash has already been proven" ); // Compute the storage slot of the withdrawal hash in the L2ToL1MessagePasser contract. // Refer to the Solidity documentation for more information on how storage layouts are // computed for mappings. bytes32 storageKey = keccak256( abi.encode( withdrawalHash, uint256(0) // The withdrawals mapping is at the first slot in the layout. ) ); // Verify that the hash of this withdrawal was stored in the L2toL1MessagePasser contract // on L2. If this is true, under the assumption that the SecureMerkleTrie does not have // bugs, then we know that this withdrawal was actually triggered on L2 and can therefore // be relayed on L1. require( SecureMerkleTrie.verifyInclusionProof( abi.encode(storageKey), hex"01", _withdrawalProof, _outputRootProof.messagePasserStorageRoot ), "OptimismPortal: invalid withdrawal inclusion proof" ); // Designate the withdrawalHash as proven by storing the `outputRoot`, `timestamp`, and // `l2BlockNumber` in the `provenWithdrawals` mapping. A `withdrawalHash` can only be // proven once unless it is submitted again with a different outputRoot. provenWithdrawals[withdrawalHash] = ProvenWithdrawal({ outputRoot: outputRoot, timestamp: uint128(block.timestamp), l2OutputIndex: uint128(_l2OutputIndex) }); // Emit a `WithdrawalProven` event. emit WithdrawalProven(withdrawalHash, _tx.sender, _tx.target); } /// @notice Finalizes a withdrawal transaction. /// @param _tx Withdrawal transaction to finalize. function finalizeWithdrawalTransaction(Types.WithdrawalTransaction memory _tx) external whenNotPaused { // Make sure that the l2Sender has not yet been set. The l2Sender is set to a value other // than the default value when a withdrawal transaction is being finalized. This check is // a defacto reentrancy guard. require( l2Sender == Constants.DEFAULT_L2_SENDER, "OptimismPortal: can only trigger one withdrawal per transaction" ); // Grab the proven withdrawal from the `provenWithdrawals` map. bytes32 withdrawalHash = Hashing.hashWithdrawal(_tx); ProvenWithdrawal memory provenWithdrawal = provenWithdrawals[withdrawalHash]; // A withdrawal can only be finalized if it has been proven. We know that a withdrawal has // been proven at least once when its timestamp is non-zero. Unproven withdrawals will have // a timestamp of zero. require( provenWithdrawal.timestamp != 0, "OptimismPortal: withdrawal has not been proven yet" ); // As a sanity check, we make sure that the proven withdrawal's timestamp is greater than // starting timestamp inside the L2OutputOracle. Not strictly necessary but extra layer of // safety against weird bugs in the proving step. require( provenWithdrawal.timestamp >= L2_ORACLE.startingTimestamp(), "OptimismPortal: withdrawal timestamp less than L2 Oracle starting timestamp" ); // A proven withdrawal must wait at least the finalization period before it can be // finalized. This waiting period can elapse in parallel with the waiting period for the // output the withdrawal was proven against. In effect, this means that the minimum // withdrawal time is proposal submission time + finalization period. require( _isFinalizationPeriodElapsed(provenWithdrawal.timestamp), "OptimismPortal: proven withdrawal finalization period has not elapsed" ); // Grab the OutputProposal from the L2OutputOracle, will revert if the output that // corresponds to the given index has not been proposed yet. Types.OutputProposal memory proposal = L2_ORACLE.getL2Output( provenWithdrawal.l2OutputIndex ); // Check that the output root that was used to prove the withdrawal is the same as the // current output root for the given output index. An output root may change if it is // deleted by the challenger address and then re-proposed. require( proposal.outputRoot == provenWithdrawal.outputRoot, "OptimismPortal: output root proven is not the same as current output root" ); // Check that the output proposal has also been finalized. require( _isFinalizationPeriodElapsed(proposal.timestamp), "OptimismPortal: output proposal finalization period has not elapsed" ); // Check that this withdrawal has not already been finalized, this is replay protection. require( finalizedWithdrawals[withdrawalHash] == false, "OptimismPortal: withdrawal has already been finalized" ); // Mark the withdrawal as finalized so it can't be replayed. finalizedWithdrawals[withdrawalHash] = true; // Set the l2Sender so contracts know who triggered this withdrawal on L2. l2Sender = _tx.sender; // Trigger the call to the target contract. We use a custom low level method // SafeCall.callWithMinGas to ensure two key properties // 1. Target contracts cannot force this call to run out of gas by returning a very large // amount of data (and this is OK because we don't care about the returndata here). // 2. The amount of gas provided to the execution context of the target is at least the // gas limit specified by the user. If there is not enough gas in the current context // to accomplish this, `callWithMinGas` will revert. bool success = SafeCall.callWithMinGas(_tx.target, _tx.gasLimit, _tx.value, _tx.data); // Reset the l2Sender back to the default value. l2Sender = Constants.DEFAULT_L2_SENDER; // All withdrawals are immediately finalized. Replayability can // be achieved through contracts built on top of this contract emit WithdrawalFinalized(withdrawalHash, success); // Reverting here is useful for determining the exact gas cost to successfully execute the // sub call to the target contract if the minimum gas limit specified by the user would not // be sufficient to execute the sub call. if (success == false && tx.origin == Constants.ESTIMATION_ADDRESS) { revert("OptimismPortal: withdrawal failed"); } } /// @notice Accepts deposits of ETH and data, and emits a TransactionDeposited event for use in /// deriving deposit transactions. Note that if a deposit is made by a contract, its /// address will be aliased when retrieved using `tx.origin` or `msg.sender`. Consider /// using the CrossDomainMessenger contracts for a simpler developer experience. /// @param _to Target address on L2. /// @param _value ETH value to send to the recipient. /// @param _gasLimit Amount of L2 gas to purchase by burning gas on L1. /// @param _isCreation Whether or not the transaction is a contract creation. /// @param _data Data to trigger the recipient with. function depositTransaction( address _to, uint256 _value, uint64 _gasLimit, bool _isCreation, bytes memory _data ) public payable metered(_gasLimit) { // Just to be safe, make sure that people specify address(0) as the target when doing // contract creations. if (_isCreation) { require( _to == address(0), "OptimismPortal: must send to address(0) when creating a contract" ); } // Prevent depositing transactions that have too small of a gas limit. Users should pay // more for more resource usage. require( _gasLimit >= minimumGasLimit(uint64(_data.length)), "OptimismPortal: gas limit too small" ); // Prevent the creation of deposit transactions that have too much calldata. This gives an // upper limit on the size of unsafe blocks over the p2p network. 120kb is chosen to ensure // that the transaction can fit into the p2p network policy of 128kb even though deposit // transactions are not gossipped over the p2p network. require(_data.length <= 120_000, "OptimismPortal: data too large"); // Transform the from-address to its alias if the caller is a contract. address from = msg.sender; if (msg.sender != tx.origin) { from = AddressAliasHelper.applyL1ToL2Alias(msg.sender); } // Compute the opaque data that will be emitted as part of the TransactionDeposited event. // We use opaque data so that we can update the TransactionDeposited event in the future // without breaking the current interface. bytes memory opaqueData = abi.encodePacked( msg.value, _value, _gasLimit, _isCreation, _data ); // Emit a TransactionDeposited event so that the rollup node can derive a deposit // transaction for this deposit. emit TransactionDeposited(from, _to, DEPOSIT_VERSION, opaqueData); } /// @notice Determine if a given output is finalized. /// Reverts if the call to L2_ORACLE.getL2Output reverts. /// Returns a boolean otherwise. /// @param _l2OutputIndex Index of the L2 output to check. /// @return Whether or not the output is finalized. function isOutputFinalized(uint256 _l2OutputIndex) external view returns (bool) { return _isFinalizationPeriodElapsed(L2_ORACLE.getL2Output(_l2OutputIndex).timestamp); } /// @notice Determines whether the finalization period has elapsed with respect to /// the provided block timestamp. /// @param _timestamp Timestamp to check. /// @return Whether or not the finalization period has elapsed. function _isFinalizationPeriodElapsed(uint256 _timestamp) internal view returns (bool) { return block.timestamp > _timestamp + L2_ORACLE.FINALIZATION_PERIOD_SECONDS(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/Address.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] * ``` * 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. Equivalent to `reinitializer(1)`. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!Address.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. * * `initializer` is equivalent to `reinitializer(1)`, so 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. * * 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. */ 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. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; /// @title SafeCall /// @notice Perform low level safe calls library SafeCall { /// @notice Performs a low level call without copying any returndata. /// @dev Passes no calldata to the call context. /// @param _target Address to call /// @param _gas Amount of gas to pass to the call /// @param _value Amount of value to pass to the call function send( address _target, uint256 _gas, uint256 _value ) internal returns (bool) { bool _success; assembly { _success := call( _gas, // gas _target, // recipient _value, // ether value 0, // inloc 0, // inlen 0, // outloc 0 // outlen ) } return _success; } /// @notice Perform a low level call without copying any returndata /// @param _target Address to call /// @param _gas Amount of gas to pass to the call /// @param _value Amount of value to pass to the call /// @param _calldata Calldata to pass to the call function call( address _target, uint256 _gas, uint256 _value, bytes memory _calldata ) internal returns (bool) { bool _success; assembly { _success := call( _gas, // gas _target, // recipient _value, // ether value add(_calldata, 32), // inloc mload(_calldata), // inlen 0, // outloc 0 // outlen ) } return _success; } /// @notice Helper function to determine if there is sufficient gas remaining within the context /// to guarantee that the minimum gas requirement for a call will be met as well as /// optionally reserving a specified amount of gas for after the call has concluded. /// @param _minGas The minimum amount of gas that may be passed to the target context. /// @param _reservedGas Optional amount of gas to reserve for the caller after the execution /// of the target context. /// @return `true` if there is enough gas remaining to safely supply `_minGas` to the target /// context as well as reserve `_reservedGas` for the caller after the execution of /// the target context. /// @dev !!!!! FOOTGUN ALERT !!!!! /// 1.) The 40_000 base buffer is to account for the worst case of the dynamic cost of the /// `CALL` opcode's `address_access_cost`, `positive_value_cost`, and /// `value_to_empty_account_cost` factors with an added buffer of 5,700 gas. It is /// still possible to self-rekt by initiating a withdrawal with a minimum gas limit /// that does not account for the `memory_expansion_cost` & `code_execution_cost` /// factors of the dynamic cost of the `CALL` opcode. /// 2.) This function should *directly* precede the external call if possible. There is an /// added buffer to account for gas consumed between this check and the call, but it /// is only 5,700 gas. /// 3.) Because EIP-150 ensures that a maximum of 63/64ths of the remaining gas in the call /// frame may be passed to a subcontext, we need to ensure that the gas will not be /// truncated. /// 4.) Use wisely. This function is not a silver bullet. function hasMinGas(uint256 _minGas, uint256 _reservedGas) internal view returns (bool) { bool _hasMinGas; assembly { // Equation: gas × 63 ≥ minGas × 64 + 63(40_000 + reservedGas) _hasMinGas := iszero( lt(mul(gas(), 63), add(mul(_minGas, 64), mul(add(40000, _reservedGas), 63))) ) } return _hasMinGas; } /// @notice Perform a low level call without copying any returndata. This function /// will revert if the call cannot be performed with the specified minimum /// gas. /// @param _target Address to call /// @param _minGas The minimum amount of gas that may be passed to the call /// @param _value Amount of value to pass to the call /// @param _calldata Calldata to pass to the call function callWithMinGas( address _target, uint256 _minGas, uint256 _value, bytes memory _calldata ) internal returns (bool) { bool _success; bool _hasMinGas = hasMinGas(_minGas, 0); assembly { // Assertion: gasleft() >= (_minGas * 64) / 63 + 40_000 if iszero(_hasMinGas) { // Store the "Error(string)" selector in scratch space. mstore(0, 0x08c379a0) // Store the pointer to the string length in scratch space. mstore(32, 32) // Store the string. // // SAFETY: // - We pad the beginning of the string with two zero bytes as well as the // length (24) to ensure that we override the free memory pointer at offset // 0x40. This is necessary because the free memory pointer is likely to // be greater than 1 byte when this function is called, but it is incredibly // unlikely that it will be greater than 3 bytes. As for the data within // 0x60, it is ensured that it is 0 due to 0x60 being the zero offset. // - It's fine to clobber the free memory pointer, we're reverting. mstore(88, 0x0000185361666543616c6c3a204e6f7420656e6f75676820676173) // Revert with 'Error("SafeCall: Not enough gas")' revert(28, 100) } // The call will be supplied at least ((_minGas * 64) / 63) gas due to the // above assertion. This ensures that, in all circumstances (except for when the // `_minGas` does not account for the `memory_expansion_cost` and `code_execution_cost` // factors of the dynamic cost of the `CALL` opcode), the call will receive at least // the minimum amount of gas specified. _success := call( gas(), // gas _target, // recipient _value, // ether value add(_calldata, 32), // inloc mload(_calldata), // inlen 0x00, // outloc 0x00 // outlen ) } return _success; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import { Semver } from "../universal/Semver.sol"; import { Types } from "../libraries/Types.sol"; /// @custom:proxied /// @title L2OutputOracle /// @notice The L2OutputOracle contains an array of L2 state outputs, where each output is a /// commitment to the state of the L2 chain. Other contracts like the OptimismPortal use /// these outputs to verify information about the state of L2. contract L2OutputOracle is Initializable, Semver { /// @notice The interval in L2 blocks at which checkpoints must be submitted. /// Although this is immutable, it can safely be modified by upgrading the /// implementation contract. uint256 public immutable SUBMISSION_INTERVAL; /// @notice The time between L2 blocks in seconds. Once set, this value MUST NOT be modified. uint256 public immutable L2_BLOCK_TIME; /// @notice The address of the challenger. Can be updated via upgrade. address public immutable CHALLENGER; /// @notice The address of the proposer. Can be updated via upgrade. address public immutable PROPOSER; /// @notice The minimum time (in seconds) that must elapse before a withdrawal can be finalized. uint256 public immutable FINALIZATION_PERIOD_SECONDS; /// @notice The number of the first L2 block recorded in this contract. uint256 public startingBlockNumber; /// @notice The timestamp of the first L2 block recorded in this contract. uint256 public startingTimestamp; /// @notice An array of L2 output proposals. Types.OutputProposal[] internal l2Outputs; /// @notice Emitted when an output is proposed. /// @param outputRoot The output root. /// @param l2OutputIndex The index of the output in the l2Outputs array. /// @param l2BlockNumber The L2 block number of the output root. /// @param l1Timestamp The L1 timestamp when proposed. event OutputProposed( bytes32 indexed outputRoot, uint256 indexed l2OutputIndex, uint256 indexed l2BlockNumber, uint256 l1Timestamp ); /// @notice Emitted when outputs are deleted. /// @param prevNextOutputIndex Next L2 output index before the deletion. /// @param newNextOutputIndex Next L2 output index after the deletion. event OutputsDeleted(uint256 indexed prevNextOutputIndex, uint256 indexed newNextOutputIndex); /// @custom:semver 1.3.1 /// @notice Constructs the L2OutputOracle contract. /// @param _submissionInterval Interval in blocks at which checkpoints must be submitted. /// @param _l2BlockTime The time per L2 block, in seconds. /// @param _startingBlockNumber The number of the first L2 block. /// @param _startingTimestamp The timestamp of the first L2 block. /// @param _proposer The address of the proposer. /// @param _challenger The address of the challenger. constructor( uint256 _submissionInterval, uint256 _l2BlockTime, uint256 _startingBlockNumber, uint256 _startingTimestamp, address _proposer, address _challenger, uint256 _finalizationPeriodSeconds ) Semver(1, 3, 1) { require(_l2BlockTime > 0, "L2OutputOracle: L2 block time must be greater than 0"); require( _submissionInterval > 0, "L2OutputOracle: submission interval must be greater than 0" ); SUBMISSION_INTERVAL = _submissionInterval; L2_BLOCK_TIME = _l2BlockTime; PROPOSER = _proposer; CHALLENGER = _challenger; FINALIZATION_PERIOD_SECONDS = _finalizationPeriodSeconds; initialize(_startingBlockNumber, _startingTimestamp); } /// @notice Initializer. /// @param _startingBlockNumber Block number for the first recoded L2 block. /// @param _startingTimestamp Timestamp for the first recoded L2 block. function initialize(uint256 _startingBlockNumber, uint256 _startingTimestamp) public initializer { require( _startingTimestamp <= block.timestamp, "L2OutputOracle: starting L2 timestamp must be less than current time" ); startingTimestamp = _startingTimestamp; startingBlockNumber = _startingBlockNumber; } /// @notice Deletes all output proposals after and including the proposal that corresponds to /// the given output index. Only the challenger address can delete outputs. /// @param _l2OutputIndex Index of the first L2 output to be deleted. /// All outputs after this output will also be deleted. // solhint-disable-next-line ordering function deleteL2Outputs(uint256 _l2OutputIndex) external { require( msg.sender == CHALLENGER, "L2OutputOracle: only the challenger address can delete outputs" ); // Make sure we're not *increasing* the length of the array. require( _l2OutputIndex < l2Outputs.length, "L2OutputOracle: cannot delete outputs after the latest output index" ); // Do not allow deleting any outputs that have already been finalized. require( block.timestamp - l2Outputs[_l2OutputIndex].timestamp < FINALIZATION_PERIOD_SECONDS, "L2OutputOracle: cannot delete outputs that have already been finalized" ); uint256 prevNextL2OutputIndex = nextOutputIndex(); // Use assembly to delete the array elements because Solidity doesn't allow it. assembly { sstore(l2Outputs.slot, _l2OutputIndex) } emit OutputsDeleted(prevNextL2OutputIndex, _l2OutputIndex); } /// @notice Accepts an outputRoot and the timestamp of the corresponding L2 block. /// The timestamp must be equal to the current value returned by `nextTimestamp()` in /// order to be accepted. This function may only be called by the Proposer. /// @param _outputRoot The L2 output of the checkpoint block. /// @param _l2BlockNumber The L2 block number that resulted in _outputRoot. /// @param _l1BlockHash A block hash which must be included in the current chain. /// @param _l1BlockNumber The block number with the specified block hash. function proposeL2Output( bytes32 _outputRoot, uint256 _l2BlockNumber, bytes32 _l1BlockHash, uint256 _l1BlockNumber ) external payable { require( msg.sender == PROPOSER, "L2OutputOracle: only the proposer address can propose new outputs" ); require( _l2BlockNumber == nextBlockNumber(), "L2OutputOracle: block number must be equal to next expected block number" ); require( computeL2Timestamp(_l2BlockNumber) < block.timestamp, "L2OutputOracle: cannot propose L2 output in the future" ); require( _outputRoot != bytes32(0), "L2OutputOracle: L2 output proposal cannot be the zero hash" ); if (_l1BlockHash != bytes32(0)) { // This check allows the proposer to propose an output based on a given L1 block, // without fear that it will be reorged out. // It will also revert if the blockheight provided is more than 256 blocks behind the // chain tip (as the hash will return as zero). This does open the door to a griefing // attack in which the proposer's submission is censored until the block is no longer // retrievable, if the proposer is experiencing this attack it can simply leave out the // blockhash value, and delay submission until it is confident that the L1 block is // finalized. require( blockhash(_l1BlockNumber) == _l1BlockHash, "L2OutputOracle: block hash does not match the hash at the expected height" ); } emit OutputProposed(_outputRoot, nextOutputIndex(), _l2BlockNumber, block.timestamp); l2Outputs.push( Types.OutputProposal({ outputRoot: _outputRoot, timestamp: uint128(block.timestamp), l2BlockNumber: uint128(_l2BlockNumber) }) ); } /// @notice Returns an output by index. Needed to return a struct instead of a tuple. /// @param _l2OutputIndex Index of the output to return. /// @return The output at the given index. function getL2Output(uint256 _l2OutputIndex) external view returns (Types.OutputProposal memory) { return l2Outputs[_l2OutputIndex]; } /// @notice Returns the index of the L2 output that checkpoints a given L2 block number. /// Uses a binary search to find the first output greater than or equal to the given /// block. /// @param _l2BlockNumber L2 block number to find a checkpoint for. /// @return Index of the first checkpoint that commits to the given L2 block number. function getL2OutputIndexAfter(uint256 _l2BlockNumber) public view returns (uint256) { // Make sure an output for this block number has actually been proposed. require( _l2BlockNumber <= latestBlockNumber(), "L2OutputOracle: cannot get output for a block that has not been proposed" ); // Make sure there's at least one output proposed. require( l2Outputs.length > 0, "L2OutputOracle: cannot get output as no outputs have been proposed yet" ); // Find the output via binary search, guaranteed to exist. uint256 lo = 0; uint256 hi = l2Outputs.length; while (lo < hi) { uint256 mid = (lo + hi) / 2; if (l2Outputs[mid].l2BlockNumber < _l2BlockNumber) { lo = mid + 1; } else { hi = mid; } } return lo; } /// @notice Returns the L2 output proposal that checkpoints a given L2 block number. /// Uses a binary search to find the first output greater than or equal to the given /// block. /// @param _l2BlockNumber L2 block number to find a checkpoint for. /// @return First checkpoint that commits to the given L2 block number. function getL2OutputAfter(uint256 _l2BlockNumber) external view returns (Types.OutputProposal memory) { return l2Outputs[getL2OutputIndexAfter(_l2BlockNumber)]; } /// @notice Returns the number of outputs that have been proposed. /// Will revert if no outputs have been proposed yet. /// @return The number of outputs that have been proposed. function latestOutputIndex() external view returns (uint256) { return l2Outputs.length - 1; } /// @notice Returns the index of the next output to be proposed. /// @return The index of the next output to be proposed. function nextOutputIndex() public view returns (uint256) { return l2Outputs.length; } /// @notice Returns the block number of the latest submitted L2 output proposal. /// If no proposals been submitted yet then this function will return the starting /// block number. /// @return Latest submitted L2 block number. function latestBlockNumber() public view returns (uint256) { return l2Outputs.length == 0 ? startingBlockNumber : l2Outputs[l2Outputs.length - 1].l2BlockNumber; } /// @notice Computes the block number of the next L2 block that needs to be checkpointed. /// @return Next L2 block number. function nextBlockNumber() public view returns (uint256) { return latestBlockNumber() + SUBMISSION_INTERVAL; } /// @notice Returns the L2 timestamp corresponding to a given L2 block number. /// @param _l2BlockNumber The L2 block number of the target block. /// @return L2 timestamp of the given block. function computeL2Timestamp(uint256 _l2BlockNumber) public view returns (uint256) { return startingTimestamp + ((_l2BlockNumber - startingBlockNumber) * L2_BLOCK_TIME); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; import { OwnableUpgradeable } from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import { Semver } from "../universal/Semver.sol"; import { ResourceMetering } from "./ResourceMetering.sol"; /// @title SystemConfig /// @notice The SystemConfig contract is used to manage configuration of an Optimism network. /// All configuration is stored on L1 and picked up by L2 as part of the derviation of /// the L2 chain. contract SystemConfig is OwnableUpgradeable, Semver { /// @notice Enum representing different types of updates. /// @custom:value BATCHER Represents an update to the batcher hash. /// @custom:value GAS_CONFIG Represents an update to txn fee config on L2. /// @custom:value GAS_LIMIT Represents an update to gas limit on L2. /// @custom:value UNSAFE_BLOCK_SIGNER Represents an update to the signer key for unsafe /// block distrubution. enum UpdateType { BATCHER, GAS_CONFIG, GAS_LIMIT, UNSAFE_BLOCK_SIGNER } /// @notice Version identifier, used for upgrades. uint256 public constant VERSION = 0; /// @notice Storage slot that the unsafe block signer is stored at. /// Storing it at this deterministic storage slot allows for decoupling the storage /// layout from the way that `solc` lays out storage. The `op-node` uses a storage /// proof to fetch this value. bytes32 public constant UNSAFE_BLOCK_SIGNER_SLOT = keccak256("systemconfig.unsafeblocksigner"); /// @notice Fixed L2 gas overhead. Used as part of the L2 fee calculation. uint256 public overhead; /// @notice Dynamic L2 gas overhead. Used as part of the L2 fee calculation. uint256 public scalar; /// @notice Identifier for the batcher. /// For version 1 of this configuration, this is represented as an address left-padded /// with zeros to 32 bytes. bytes32 public batcherHash; /// @notice L2 block gas limit. uint64 public gasLimit; /// @notice The configuration for the deposit fee market. /// Used by the OptimismPortal to meter the cost of buying L2 gas on L1. /// Set as internal with a getter so that the struct is returned instead of a tuple. ResourceMetering.ResourceConfig internal _resourceConfig; /// @notice Emitted when configuration is updated. /// @param version SystemConfig version. /// @param updateType Type of update. /// @param data Encoded update data. event ConfigUpdate(uint256 indexed version, UpdateType indexed updateType, bytes data); /// @custom:semver 1.3.1 /// @notice Constructs the SystemConfig contract. /// @param _owner Initial owner of the contract. /// @param _overhead Initial overhead value. /// @param _scalar Initial scalar value. /// @param _batcherHash Initial batcher hash. /// @param _gasLimit Initial gas limit. /// @param _unsafeBlockSigner Initial unsafe block signer address. /// @param _config Initial resource config. constructor( address _owner, uint256 _overhead, uint256 _scalar, bytes32 _batcherHash, uint64 _gasLimit, address _unsafeBlockSigner, ResourceMetering.ResourceConfig memory _config ) Semver(1, 3, 1) { initialize({ _owner: _owner, _overhead: _overhead, _scalar: _scalar, _batcherHash: _batcherHash, _gasLimit: _gasLimit, _unsafeBlockSigner: _unsafeBlockSigner, _config: _config }); } /// @notice Initializer. /// The resource config must be set before the require check. /// @param _owner Initial owner of the contract. /// @param _overhead Initial overhead value. /// @param _scalar Initial scalar value. /// @param _batcherHash Initial batcher hash. /// @param _gasLimit Initial gas limit. /// @param _unsafeBlockSigner Initial unsafe block signer address. /// @param _config Initial ResourceConfig. function initialize( address _owner, uint256 _overhead, uint256 _scalar, bytes32 _batcherHash, uint64 _gasLimit, address _unsafeBlockSigner, ResourceMetering.ResourceConfig memory _config ) public initializer { __Ownable_init(); transferOwnership(_owner); overhead = _overhead; scalar = _scalar; batcherHash = _batcherHash; gasLimit = _gasLimit; _setUnsafeBlockSigner(_unsafeBlockSigner); _setResourceConfig(_config); require(_gasLimit >= minimumGasLimit(), "SystemConfig: gas limit too low"); } /// @notice Returns the minimum L2 gas limit that can be safely set for the system to /// operate. The L2 gas limit must be larger than or equal to the amount of /// gas that is allocated for deposits per block plus the amount of gas that /// is allocated for the system transaction. /// This function is used to determine if changes to parameters are safe. /// @return uint64 Minimum gas limit. function minimumGasLimit() public view returns (uint64) { return uint64(_resourceConfig.maxResourceLimit) + uint64(_resourceConfig.systemTxMaxGas); } /// @notice High level getter for the unsafe block signer address. /// Unsafe blocks can be propagated across the p2p network if they are signed by the /// key corresponding to this address. /// @return Address of the unsafe block signer. // solhint-disable-next-line ordering function unsafeBlockSigner() external view returns (address) { address addr; bytes32 slot = UNSAFE_BLOCK_SIGNER_SLOT; assembly { addr := sload(slot) } return addr; } /// @notice Updates the unsafe block signer address. /// @param _unsafeBlockSigner New unsafe block signer address. function setUnsafeBlockSigner(address _unsafeBlockSigner) external onlyOwner { _setUnsafeBlockSigner(_unsafeBlockSigner); bytes memory data = abi.encode(_unsafeBlockSigner); emit ConfigUpdate(VERSION, UpdateType.UNSAFE_BLOCK_SIGNER, data); } /// @notice Updates the batcher hash. /// @param _batcherHash New batcher hash. function setBatcherHash(bytes32 _batcherHash) external onlyOwner { batcherHash = _batcherHash; bytes memory data = abi.encode(_batcherHash); emit ConfigUpdate(VERSION, UpdateType.BATCHER, data); } /// @notice Updates gas config. /// @param _overhead New overhead value. /// @param _scalar New scalar value. function setGasConfig(uint256 _overhead, uint256 _scalar) external onlyOwner { overhead = _overhead; scalar = _scalar; bytes memory data = abi.encode(_overhead, _scalar); emit ConfigUpdate(VERSION, UpdateType.GAS_CONFIG, data); } /// @notice Updates the L2 gas limit. /// @param _gasLimit New gas limit. function setGasLimit(uint64 _gasLimit) external onlyOwner { require(_gasLimit >= minimumGasLimit(), "SystemConfig: gas limit too low"); gasLimit = _gasLimit; bytes memory data = abi.encode(_gasLimit); emit ConfigUpdate(VERSION, UpdateType.GAS_LIMIT, data); } /// @notice Low level setter for the unsafe block signer address. /// This function exists to deduplicate code around storing the unsafeBlockSigner /// address in storage. /// @param _unsafeBlockSigner New unsafeBlockSigner value. function _setUnsafeBlockSigner(address _unsafeBlockSigner) internal { bytes32 slot = UNSAFE_BLOCK_SIGNER_SLOT; assembly { sstore(slot, _unsafeBlockSigner) } } /// @notice A getter for the resource config. /// Ensures that the struct is returned instead of a tuple. /// @return ResourceConfig function resourceConfig() external view returns (ResourceMetering.ResourceConfig memory) { return _resourceConfig; } /// @notice An external setter for the resource config. /// In the future, this method may emit an event that the `op-node` picks up /// for when the resource config is changed. /// @param _config The new resource config values. function setResourceConfig(ResourceMetering.ResourceConfig memory _config) external onlyOwner { _setResourceConfig(_config); } /// @notice An internal setter for the resource config. /// Ensures that the config is sane before storing it by checking for invariants. /// @param _config The new resource config. function _setResourceConfig(ResourceMetering.ResourceConfig memory _config) internal { // Min base fee must be less than or equal to max base fee. require( _config.minimumBaseFee <= _config.maximumBaseFee, "SystemConfig: min base fee must be less than max base" ); // Base fee change denominator must be greater than 1. require( _config.baseFeeMaxChangeDenominator > 1, "SystemConfig: denominator must be larger than 1" ); // Max resource limit plus system tx gas must be less than or equal to the L2 gas limit. // The gas limit must be increased before these values can be increased. require( _config.maxResourceLimit + _config.systemTxMaxGas <= gasLimit, "SystemConfig: gas limit too low" ); // Elasticity multiplier must be greater than 0. require( _config.elasticityMultiplier > 0, "SystemConfig: elasticity multiplier cannot be 0" ); // No precision loss when computing target resource limit. require( ((_config.maxResourceLimit / _config.elasticityMultiplier) * _config.elasticityMultiplier) == _config.maxResourceLimit, "SystemConfig: precision loss with target resource limit" ); _resourceConfig = _config; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { ResourceMetering } from "../L1/ResourceMetering.sol"; /// @title Constants /// @notice Constants is a library for storing constants. Simple! Don't put everything in here, just /// the stuff used in multiple contracts. Constants that only apply to a single contract /// should be defined in that contract instead. library Constants { /// @notice Special address to be used as the tx origin for gas estimation calls in the /// OptimismPortal and CrossDomainMessenger calls. You only need to use this address if /// the minimum gas limit specified by the user is not actually enough to execute the /// given message and you're attempting to estimate the actual necessary gas limit. We /// use address(1) because it's the ecrecover precompile and therefore guaranteed to /// never have any code on any EVM chain. address internal constant ESTIMATION_ADDRESS = address(1); /// @notice Value used for the L2 sender storage slot in both the OptimismPortal and the /// CrossDomainMessenger contracts before an actual sender is set. This value is /// non-zero to reduce the gas cost of message passing transactions. address internal constant DEFAULT_L2_SENDER = 0x000000000000000000000000000000000000dEaD; /// @notice Returns the default values for the ResourceConfig. These are the recommended values /// for a production network. function DEFAULT_RESOURCE_CONFIG() internal pure returns (ResourceMetering.ResourceConfig memory) { ResourceMetering.ResourceConfig memory config = ResourceMetering.ResourceConfig({ maxResourceLimit: 20_000_000, elasticityMultiplier: 10, baseFeeMaxChangeDenominator: 8, minimumBaseFee: 1 gwei, systemTxMaxGas: 1_000_000, maximumBaseFee: type(uint128).max }); return config; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @title Types /// @notice Contains various types used throughout the Optimism contract system. library Types { /// @notice OutputProposal represents a commitment to the L2 state. The timestamp is the L1 /// timestamp that the output root is posted. This timestamp is used to verify that the /// finalization period has passed since the output root was submitted. /// @custom:field outputRoot Hash of the L2 output. /// @custom:field timestamp Timestamp of the L1 block that the output root was submitted in. /// @custom:field l2BlockNumber L2 block number that the output corresponds to. struct OutputProposal { bytes32 outputRoot; uint128 timestamp; uint128 l2BlockNumber; } /// @notice Struct representing the elements that are hashed together to generate an output root /// which itself represents a snapshot of the L2 state. /// @custom:field version Version of the output root. /// @custom:field stateRoot Root of the state trie at the block of this output. /// @custom:field messagePasserStorageRoot Root of the message passer storage trie. /// @custom:field latestBlockhash Hash of the block this output was generated from. struct OutputRootProof { bytes32 version; bytes32 stateRoot; bytes32 messagePasserStorageRoot; bytes32 latestBlockhash; } /// @notice Struct representing a deposit transaction (L1 => L2 transaction) created by an end /// user (as opposed to a system deposit transaction generated by the system). /// @custom:field from Address of the sender of the transaction. /// @custom:field to Address of the recipient of the transaction. /// @custom:field isCreation True if the transaction is a contract creation. /// @custom:field value Value to send to the recipient. /// @custom:field mint Amount of ETH to mint. /// @custom:field gasLimit Gas limit of the transaction. /// @custom:field data Data of the transaction. /// @custom:field l1BlockHash Hash of the block the transaction was submitted in. /// @custom:field logIndex Index of the log in the block the transaction was submitted in. struct UserDepositTransaction { address from; address to; bool isCreation; uint256 value; uint256 mint; uint64 gasLimit; bytes data; bytes32 l1BlockHash; uint256 logIndex; } /// @notice Struct representing a withdrawal transaction. /// @custom:field nonce Nonce of the withdrawal transaction /// @custom:field sender Address of the sender of the transaction. /// @custom:field target Address of the recipient of the transaction. /// @custom:field value Value to send to the recipient. /// @custom:field gasLimit Gas limit of the transaction. /// @custom:field data Data of the transaction. struct WithdrawalTransaction { uint256 nonce; address sender; address target; uint256 value; uint256 gasLimit; bytes data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { Types } from "./Types.sol"; import { Encoding } from "./Encoding.sol"; /// @title Hashing /// @notice Hashing handles Optimism's various different hashing schemes. library Hashing { /// @notice Computes the hash of the RLP encoded L2 transaction that would be generated when a /// given deposit is sent to the L2 system. Useful for searching for a deposit in the L2 /// system. /// @param _tx User deposit transaction to hash. /// @return Hash of the RLP encoded L2 deposit transaction. function hashDepositTransaction(Types.UserDepositTransaction memory _tx) internal pure returns (bytes32) { return keccak256(Encoding.encodeDepositTransaction(_tx)); } /// @notice Computes the deposit transaction's "source hash", a value that guarantees the hash /// of the L2 transaction that corresponds to a deposit is unique and is /// deterministically generated from L1 transaction data. /// @param _l1BlockHash Hash of the L1 block where the deposit was included. /// @param _logIndex The index of the log that created the deposit transaction. /// @return Hash of the deposit transaction's "source hash". function hashDepositSource(bytes32 _l1BlockHash, uint256 _logIndex) internal pure returns (bytes32) { bytes32 depositId = keccak256(abi.encode(_l1BlockHash, _logIndex)); return keccak256(abi.encode(bytes32(0), depositId)); } /// @notice Hashes the cross domain message based on the version that is encoded into the /// message nonce. /// @param _nonce Message nonce with version encoded into the first two bytes. /// @param _sender Address of the sender of the message. /// @param _target Address of the target of the message. /// @param _value ETH value to send to the target. /// @param _gasLimit Gas limit to use for the message. /// @param _data Data to send with the message. /// @return Hashed cross domain message. function hashCrossDomainMessage( uint256 _nonce, address _sender, address _target, uint256 _value, uint256 _gasLimit, bytes memory _data ) internal pure returns (bytes32) { (, uint16 version) = Encoding.decodeVersionedNonce(_nonce); if (version == 0) { return hashCrossDomainMessageV0(_target, _sender, _data, _nonce); } else if (version == 1) { return hashCrossDomainMessageV1(_nonce, _sender, _target, _value, _gasLimit, _data); } else { revert("Hashing: unknown cross domain message version"); } } /// @notice Hashes a cross domain message based on the V0 (legacy) encoding. /// @param _target Address of the target of the message. /// @param _sender Address of the sender of the message. /// @param _data Data to send with the message. /// @param _nonce Message nonce. /// @return Hashed cross domain message. function hashCrossDomainMessageV0( address _target, address _sender, bytes memory _data, uint256 _nonce ) internal pure returns (bytes32) { return keccak256(Encoding.encodeCrossDomainMessageV0(_target, _sender, _data, _nonce)); } /// @notice Hashes a cross domain message based on the V1 (current) encoding. /// @param _nonce Message nonce. /// @param _sender Address of the sender of the message. /// @param _target Address of the target of the message. /// @param _value ETH value to send to the target. /// @param _gasLimit Gas limit to use for the message. /// @param _data Data to send with the message. /// @return Hashed cross domain message. function hashCrossDomainMessageV1( uint256 _nonce, address _sender, address _target, uint256 _value, uint256 _gasLimit, bytes memory _data ) internal pure returns (bytes32) { return keccak256( Encoding.encodeCrossDomainMessageV1( _nonce, _sender, _target, _value, _gasLimit, _data ) ); } /// @notice Derives the withdrawal hash according to the encoding in the L2 Withdrawer contract /// @param _tx Withdrawal transaction to hash. /// @return Hashed withdrawal transaction. function hashWithdrawal(Types.WithdrawalTransaction memory _tx) internal pure returns (bytes32) { return keccak256( abi.encode(_tx.nonce, _tx.sender, _tx.target, _tx.value, _tx.gasLimit, _tx.data) ); } /// @notice Hashes the various elements of an output root proof into an output root hash which /// can be used to check if the proof is valid. /// @param _outputRootProof Output root proof which should hash to an output root. /// @return Hashed output root proof. function hashOutputRootProof(Types.OutputRootProof memory _outputRootProof) internal pure returns (bytes32) { return keccak256( abi.encode( _outputRootProof.version, _outputRootProof.stateRoot, _outputRootProof.messagePasserStorageRoot, _outputRootProof.latestBlockhash ) ); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* Library Imports */ import { MerkleTrie } from "./MerkleTrie.sol"; /** * @title SecureMerkleTrie * @notice SecureMerkleTrie is a thin wrapper around the MerkleTrie library that hashes the input * keys. Ethereum's state trie hashes input keys before storing them. */ library SecureMerkleTrie { /** * @notice Verifies a proof that a given key/value pair is present in the Merkle trie. * * @param _key Key of the node to search for, as a hex string. * @param _value Value of the node to search for, as a hex string. * @param _proof Merkle trie inclusion proof for the desired node. Unlike traditional Merkle * trees, this proof is executed top-down and consists of a list of RLP-encoded * nodes that make a path down to the target node. * @param _root Known root of the Merkle trie. Used to verify that the included proof is * correctly constructed. * * @return Whether or not the proof is valid. */ function verifyInclusionProof( bytes memory _key, bytes memory _value, bytes[] memory _proof, bytes32 _root ) internal pure returns (bool) { bytes memory key = _getSecureKey(_key); return MerkleTrie.verifyInclusionProof(key, _value, _proof, _root); } /** * @notice Retrieves the value associated with a given key. * * @param _key Key to search for, as hex bytes. * @param _proof Merkle trie inclusion proof for the key. * @param _root Known root of the Merkle trie. * * @return Value of the key if it exists. */ function get( bytes memory _key, bytes[] memory _proof, bytes32 _root ) internal pure returns (bytes memory) { bytes memory key = _getSecureKey(_key); return MerkleTrie.get(key, _proof, _root); } /** * @notice Computes the hashed version of the input key. * * @param _key Key to hash. * * @return Hashed version of the key. */ function _getSecureKey(bytes memory _key) private pure returns (bytes memory) { return abi.encodePacked(keccak256(_key)); } }
// SPDX-License-Identifier: Apache-2.0 /* * Copyright 2019-2021, Offchain Labs, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ pragma solidity ^0.8.0; library AddressAliasHelper { uint160 constant offset = uint160(0x1111000000000000000000000000000000001111); /// @notice Utility function that converts the address in the L1 that submitted a tx to /// the inbox to the msg.sender viewed in the L2 /// @param l1Address the address in the L1 that triggered the tx to L2 /// @return l2Address L2 address as viewed in msg.sender function applyL1ToL2Alias(address l1Address) internal pure returns (address l2Address) { unchecked { l2Address = address(uint160(l1Address) + offset); } } /// @notice Utility function that converts the msg.sender viewed in the L2 to the /// address in the L1 that submitted a tx to the inbox /// @param l2Address L2 address as viewed in msg.sender /// @return l1Address the address in the L1 that triggered the tx to L2 function undoL1ToL2Alias(address l2Address) internal pure returns (address l1Address) { unchecked { l1Address = address(uint160(l2Address) - offset); } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import { Math } from "@openzeppelin/contracts/utils/math/Math.sol"; import { Burn } from "../libraries/Burn.sol"; import { Arithmetic } from "../libraries/Arithmetic.sol"; /// @custom:upgradeable /// @title ResourceMetering /// @notice ResourceMetering implements an EIP-1559 style resource metering system where pricing /// updates automatically based on current demand. abstract contract ResourceMetering is Initializable { /// @notice Represents the various parameters that control the way in which resources are /// metered. Corresponds to the EIP-1559 resource metering system. /// @custom:field prevBaseFee Base fee from the previous block(s). /// @custom:field prevBoughtGas Amount of gas bought so far in the current block. /// @custom:field prevBlockNum Last block number that the base fee was updated. struct ResourceParams { uint128 prevBaseFee; uint64 prevBoughtGas; uint64 prevBlockNum; } /// @notice Represents the configuration for the EIP-1559 based curve for the deposit gas /// market. These values should be set with care as it is possible to set them in /// a way that breaks the deposit gas market. The target resource limit is defined as /// maxResourceLimit / elasticityMultiplier. This struct was designed to fit within a /// single word. There is additional space for additions in the future. /// @custom:field maxResourceLimit Represents the maximum amount of deposit gas that /// can be purchased per block. /// @custom:field elasticityMultiplier Determines the target resource limit along with /// the resource limit. /// @custom:field baseFeeMaxChangeDenominator Determines max change on fee per block. /// @custom:field minimumBaseFee The min deposit base fee, it is clamped to this /// value. /// @custom:field systemTxMaxGas The amount of gas supplied to the system /// transaction. This should be set to the same /// number that the op-node sets as the gas limit /// for the system transaction. /// @custom:field maximumBaseFee The max deposit base fee, it is clamped to this /// value. struct ResourceConfig { uint32 maxResourceLimit; uint8 elasticityMultiplier; uint8 baseFeeMaxChangeDenominator; uint32 minimumBaseFee; uint32 systemTxMaxGas; uint128 maximumBaseFee; } /// @notice EIP-1559 style gas parameters. ResourceParams public params; /// @notice Reserve extra slots (to a total of 50) in the storage layout for future upgrades. uint256[48] private __gap; /// @notice Meters access to a function based an amount of a requested resource. /// @param _amount Amount of the resource requested. modifier metered(uint64 _amount) { // Record initial gas amount so we can refund for it later. uint256 initialGas = gasleft(); // Run the underlying function. _; // Run the metering function. _metered(_amount, initialGas); } /// @notice An internal function that holds all of the logic for metering a resource. /// @param _amount Amount of the resource requested. /// @param _initialGas The amount of gas before any modifier execution. function _metered(uint64 _amount, uint256 _initialGas) internal { // Update block number and base fee if necessary. uint256 blockDiff = block.number - params.prevBlockNum; ResourceConfig memory config = _resourceConfig(); int256 targetResourceLimit = int256(uint256(config.maxResourceLimit)) / int256(uint256(config.elasticityMultiplier)); if (blockDiff > 0) { // Handle updating EIP-1559 style gas parameters. We use EIP-1559 to restrict the rate // at which deposits can be created and therefore limit the potential for deposits to // spam the L2 system. Fee scheme is very similar to EIP-1559 with minor changes. int256 gasUsedDelta = int256(uint256(params.prevBoughtGas)) - targetResourceLimit; int256 baseFeeDelta = (int256(uint256(params.prevBaseFee)) * gasUsedDelta) / (targetResourceLimit * int256(uint256(config.baseFeeMaxChangeDenominator))); // Update base fee by adding the base fee delta and clamp the resulting value between // min and max. int256 newBaseFee = Arithmetic.clamp({ _value: int256(uint256(params.prevBaseFee)) + baseFeeDelta, _min: int256(uint256(config.minimumBaseFee)), _max: int256(uint256(config.maximumBaseFee)) }); // If we skipped more than one block, we also need to account for every empty block. // Empty block means there was no demand for deposits in that block, so we should // reflect this lack of demand in the fee. if (blockDiff > 1) { // Update the base fee by repeatedly applying the exponent 1-(1/change_denominator) // blockDiff - 1 times. Simulates multiple empty blocks. Clamp the resulting value // between min and max. newBaseFee = Arithmetic.clamp({ _value: Arithmetic.cdexp({ _coefficient: newBaseFee, _denominator: int256(uint256(config.baseFeeMaxChangeDenominator)), _exponent: int256(blockDiff - 1) }), _min: int256(uint256(config.minimumBaseFee)), _max: int256(uint256(config.maximumBaseFee)) }); } // Update new base fee, reset bought gas, and update block number. params.prevBaseFee = uint128(uint256(newBaseFee)); params.prevBoughtGas = 0; params.prevBlockNum = uint64(block.number); } // Make sure we can actually buy the resource amount requested by the user. params.prevBoughtGas += _amount; require( int256(uint256(params.prevBoughtGas)) <= int256(uint256(config.maxResourceLimit)), "ResourceMetering: cannot buy more gas than available gas limit" ); // Determine the amount of ETH to be paid. uint256 resourceCost = uint256(_amount) * uint256(params.prevBaseFee); // We currently charge for this ETH amount as an L1 gas burn, so we convert the ETH amount // into gas by dividing by the L1 base fee. We assume a minimum base fee of 1 gwei to avoid // division by zero for L1s that don't support 1559 or to avoid excessive gas burns during // periods of extremely low L1 demand. One-day average gas fee hasn't dipped below 1 gwei // during any 1 day period in the last 5 years, so should be fine. uint256 gasCost = resourceCost / Math.max(block.basefee, 1 gwei); // Give the user a refund based on the amount of gas they used to do all of the work up to // this point. Since we're at the end of the modifier, this should be pretty accurate. Acts // effectively like a dynamic stipend (with a minimum value). uint256 usedGas = _initialGas - gasleft(); if (gasCost > usedGas) { Burn.gas(gasCost - usedGas); } } /// @notice Virtual function that returns the resource config. /// Contracts that inherit this contract must implement this function. /// @return ResourceConfig function _resourceConfig() internal virtual returns (ResourceConfig memory); /// @notice Sets initial resource parameter values. /// This function must either be called by the initializer function of an upgradeable /// child contract. // solhint-disable-next-line func-name-mixedcase function __ResourceMetering_init() internal onlyInitializing { params = ResourceParams({ prevBaseFee: 1 gwei, prevBoughtGas: 0, prevBlockNum: uint64(block.number) }); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { Strings } from "@openzeppelin/contracts/utils/Strings.sol"; /// @title Semver /// @notice Semver is a simple contract for managing contract versions. contract Semver { /// @notice Contract version number (major). uint256 private immutable MAJOR_VERSION; /// @notice Contract version number (minor). uint256 private immutable MINOR_VERSION; /// @notice Contract version number (patch). uint256 private immutable PATCH_VERSION; /// @param _major Version number (major). /// @param _minor Version number (minor). /// @param _patch Version number (patch). constructor( uint256 _major, uint256 _minor, uint256 _patch ) { MAJOR_VERSION = _major; MINOR_VERSION = _minor; PATCH_VERSION = _patch; } /// @notice Returns the full semver contract version. /// @return Semver contract version as a string. function version() public view returns (string memory) { return string( abi.encodePacked( Strings.toString(MAJOR_VERSION), ".", Strings.toString(MINOR_VERSION), ".", Strings.toString(PATCH_VERSION) ) ); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @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.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../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 anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @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.0; import { Types } from "./Types.sol"; import { Hashing } from "./Hashing.sol"; import { RLPWriter } from "./rlp/RLPWriter.sol"; /// @title Encoding /// @notice Encoding handles Optimism's various different encoding schemes. library Encoding { /// @notice RLP encodes the L2 transaction that would be generated when a given deposit is sent /// to the L2 system. Useful for searching for a deposit in the L2 system. The /// transaction is prefixed with 0x7e to identify its EIP-2718 type. /// @param _tx User deposit transaction to encode. /// @return RLP encoded L2 deposit transaction. function encodeDepositTransaction(Types.UserDepositTransaction memory _tx) internal pure returns (bytes memory) { bytes32 source = Hashing.hashDepositSource(_tx.l1BlockHash, _tx.logIndex); bytes[] memory raw = new bytes[](8); raw[0] = RLPWriter.writeBytes(abi.encodePacked(source)); raw[1] = RLPWriter.writeAddress(_tx.from); raw[2] = _tx.isCreation ? RLPWriter.writeBytes("") : RLPWriter.writeAddress(_tx.to); raw[3] = RLPWriter.writeUint(_tx.mint); raw[4] = RLPWriter.writeUint(_tx.value); raw[5] = RLPWriter.writeUint(uint256(_tx.gasLimit)); raw[6] = RLPWriter.writeBool(false); raw[7] = RLPWriter.writeBytes(_tx.data); return abi.encodePacked(uint8(0x7e), RLPWriter.writeList(raw)); } /// @notice Encodes the cross domain message based on the version that is encoded into the /// message nonce. /// @param _nonce Message nonce with version encoded into the first two bytes. /// @param _sender Address of the sender of the message. /// @param _target Address of the target of the message. /// @param _value ETH value to send to the target. /// @param _gasLimit Gas limit to use for the message. /// @param _data Data to send with the message. /// @return Encoded cross domain message. function encodeCrossDomainMessage( uint256 _nonce, address _sender, address _target, uint256 _value, uint256 _gasLimit, bytes memory _data ) internal pure returns (bytes memory) { (, uint16 version) = decodeVersionedNonce(_nonce); if (version == 0) { return encodeCrossDomainMessageV0(_target, _sender, _data, _nonce); } else if (version == 1) { return encodeCrossDomainMessageV1(_nonce, _sender, _target, _value, _gasLimit, _data); } else { revert("Encoding: unknown cross domain message version"); } } /// @notice Encodes a cross domain message based on the V0 (legacy) encoding. /// @param _target Address of the target of the message. /// @param _sender Address of the sender of the message. /// @param _data Data to send with the message. /// @param _nonce Message nonce. /// @return Encoded cross domain message. function encodeCrossDomainMessageV0( address _target, address _sender, bytes memory _data, uint256 _nonce ) internal pure returns (bytes memory) { return abi.encodeWithSignature( "relayMessage(address,address,bytes,uint256)", _target, _sender, _data, _nonce ); } /// @notice Encodes a cross domain message based on the V1 (current) encoding. /// @param _nonce Message nonce. /// @param _sender Address of the sender of the message. /// @param _target Address of the target of the message. /// @param _value ETH value to send to the target. /// @param _gasLimit Gas limit to use for the message. /// @param _data Data to send with the message. /// @return Encoded cross domain message. function encodeCrossDomainMessageV1( uint256 _nonce, address _sender, address _target, uint256 _value, uint256 _gasLimit, bytes memory _data ) internal pure returns (bytes memory) { return abi.encodeWithSignature( "relayMessage(uint256,address,address,uint256,uint256,bytes)", _nonce, _sender, _target, _value, _gasLimit, _data ); } /// @notice Adds a version number into the first two bytes of a message nonce. /// @param _nonce Message nonce to encode into. /// @param _version Version number to encode into the message nonce. /// @return Message nonce with version encoded into the first two bytes. function encodeVersionedNonce(uint240 _nonce, uint16 _version) internal pure returns (uint256) { uint256 nonce; assembly { nonce := or(shl(240, _version), _nonce) } return nonce; } /// @notice Pulls the version out of a version-encoded nonce. /// @param _nonce Message nonce with version encoded into the first two bytes. /// @return Nonce without encoded version. /// @return Version of the message. function decodeVersionedNonce(uint256 _nonce) internal pure returns (uint240, uint16) { uint240 nonce; uint16 version; assembly { nonce := and(_nonce, 0x0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) version := shr(240, _nonce) } return (nonce, version); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { Bytes } from "../Bytes.sol"; import { RLPReader } from "../rlp/RLPReader.sol"; /** * @title MerkleTrie * @notice MerkleTrie is a small library for verifying standard Ethereum Merkle-Patricia trie * inclusion proofs. By default, this library assumes a hexary trie. One can change the * trie radix constant to support other trie radixes. */ library MerkleTrie { /** * @notice Struct representing a node in the trie. * * @custom:field encoded The RLP-encoded node. * @custom:field decoded The RLP-decoded node. */ struct TrieNode { bytes encoded; RLPReader.RLPItem[] decoded; } /** * @notice Determines the number of elements per branch node. */ uint256 internal constant TREE_RADIX = 16; /** * @notice Branch nodes have TREE_RADIX elements and one value element. */ uint256 internal constant BRANCH_NODE_LENGTH = TREE_RADIX + 1; /** * @notice Leaf nodes and extension nodes have two elements, a `path` and a `value`. */ uint256 internal constant LEAF_OR_EXTENSION_NODE_LENGTH = 2; /** * @notice Prefix for even-nibbled extension node paths. */ uint8 internal constant PREFIX_EXTENSION_EVEN = 0; /** * @notice Prefix for odd-nibbled extension node paths. */ uint8 internal constant PREFIX_EXTENSION_ODD = 1; /** * @notice Prefix for even-nibbled leaf node paths. */ uint8 internal constant PREFIX_LEAF_EVEN = 2; /** * @notice Prefix for odd-nibbled leaf node paths. */ uint8 internal constant PREFIX_LEAF_ODD = 3; /** * @notice Verifies a proof that a given key/value pair is present in the trie. * * @param _key Key of the node to search for, as a hex string. * @param _value Value of the node to search for, as a hex string. * @param _proof Merkle trie inclusion proof for the desired node. Unlike traditional Merkle * trees, this proof is executed top-down and consists of a list of RLP-encoded * nodes that make a path down to the target node. * @param _root Known root of the Merkle trie. Used to verify that the included proof is * correctly constructed. * * @return Whether or not the proof is valid. */ function verifyInclusionProof( bytes memory _key, bytes memory _value, bytes[] memory _proof, bytes32 _root ) internal pure returns (bool) { return Bytes.equal(_value, get(_key, _proof, _root)); } /** * @notice Retrieves the value associated with a given key. * * @param _key Key to search for, as hex bytes. * @param _proof Merkle trie inclusion proof for the key. * @param _root Known root of the Merkle trie. * * @return Value of the key if it exists. */ function get( bytes memory _key, bytes[] memory _proof, bytes32 _root ) internal pure returns (bytes memory) { require(_key.length > 0, "MerkleTrie: empty key"); TrieNode[] memory proof = _parseProof(_proof); bytes memory key = Bytes.toNibbles(_key); bytes memory currentNodeID = abi.encodePacked(_root); uint256 currentKeyIndex = 0; // Proof is top-down, so we start at the first element (root). for (uint256 i = 0; i < proof.length; i++) { TrieNode memory currentNode = proof[i]; // Key index should never exceed total key length or we'll be out of bounds. require( currentKeyIndex <= key.length, "MerkleTrie: key index exceeds total key length" ); if (currentKeyIndex == 0) { // First proof element is always the root node. require( Bytes.equal(abi.encodePacked(keccak256(currentNode.encoded)), currentNodeID), "MerkleTrie: invalid root hash" ); } else if (currentNode.encoded.length >= 32) { // Nodes 32 bytes or larger are hashed inside branch nodes. require( Bytes.equal(abi.encodePacked(keccak256(currentNode.encoded)), currentNodeID), "MerkleTrie: invalid large internal hash" ); } else { // Nodes smaller than 32 bytes aren't hashed. require( Bytes.equal(currentNode.encoded, currentNodeID), "MerkleTrie: invalid internal node hash" ); } if (currentNode.decoded.length == BRANCH_NODE_LENGTH) { if (currentKeyIndex == key.length) { // Value is the last element of the decoded list (for branch nodes). There's // some ambiguity in the Merkle trie specification because bytes(0) is a // valid value to place into the trie, but for branch nodes bytes(0) can exist // even when the value wasn't explicitly placed there. Geth treats a value of // bytes(0) as "key does not exist" and so we do the same. bytes memory value = RLPReader.readBytes(currentNode.decoded[TREE_RADIX]); require( value.length > 0, "MerkleTrie: value length must be greater than zero (branch)" ); // Extra proof elements are not allowed. require( i == proof.length - 1, "MerkleTrie: value node must be last node in proof (branch)" ); return value; } else { // We're not at the end of the key yet. // Figure out what the next node ID should be and continue. uint8 branchKey = uint8(key[currentKeyIndex]); RLPReader.RLPItem memory nextNode = currentNode.decoded[branchKey]; currentNodeID = _getNodeID(nextNode); currentKeyIndex += 1; } } else if (currentNode.decoded.length == LEAF_OR_EXTENSION_NODE_LENGTH) { bytes memory path = _getNodePath(currentNode); uint8 prefix = uint8(path[0]); uint8 offset = 2 - (prefix % 2); bytes memory pathRemainder = Bytes.slice(path, offset); bytes memory keyRemainder = Bytes.slice(key, currentKeyIndex); uint256 sharedNibbleLength = _getSharedNibbleLength(pathRemainder, keyRemainder); // Whether this is a leaf node or an extension node, the path remainder MUST be a // prefix of the key remainder (or be equal to the key remainder) or the proof is // considered invalid. require( pathRemainder.length == sharedNibbleLength, "MerkleTrie: path remainder must share all nibbles with key" ); if (prefix == PREFIX_LEAF_EVEN || prefix == PREFIX_LEAF_ODD) { // Prefix of 2 or 3 means this is a leaf node. For the leaf node to be valid, // the key remainder must be exactly equal to the path remainder. We already // did the necessary byte comparison, so it's more efficient here to check that // the key remainder length equals the shared nibble length, which implies // equality with the path remainder (since we already did the same check with // the path remainder and the shared nibble length). require( keyRemainder.length == sharedNibbleLength, "MerkleTrie: key remainder must be identical to path remainder" ); // Our Merkle Trie is designed specifically for the purposes of the Ethereum // state trie. Empty values are not allowed in the state trie, so we can safely // say that if the value is empty, the key should not exist and the proof is // invalid. bytes memory value = RLPReader.readBytes(currentNode.decoded[1]); require( value.length > 0, "MerkleTrie: value length must be greater than zero (leaf)" ); // Extra proof elements are not allowed. require( i == proof.length - 1, "MerkleTrie: value node must be last node in proof (leaf)" ); return value; } else if (prefix == PREFIX_EXTENSION_EVEN || prefix == PREFIX_EXTENSION_ODD) { // Prefix of 0 or 1 means this is an extension node. We move onto the next node // in the proof and increment the key index by the length of the path remainder // which is equal to the shared nibble length. currentNodeID = _getNodeID(currentNode.decoded[1]); currentKeyIndex += sharedNibbleLength; } else { revert("MerkleTrie: received a node with an unknown prefix"); } } else { revert("MerkleTrie: received an unparseable node"); } } revert("MerkleTrie: ran out of proof elements"); } /** * @notice Parses an array of proof elements into a new array that contains both the original * encoded element and the RLP-decoded element. * * @param _proof Array of proof elements to parse. * * @return Proof parsed into easily accessible structs. */ function _parseProof(bytes[] memory _proof) private pure returns (TrieNode[] memory) { uint256 length = _proof.length; TrieNode[] memory proof = new TrieNode[](length); for (uint256 i = 0; i < length; ) { proof[i] = TrieNode({ encoded: _proof[i], decoded: RLPReader.readList(_proof[i]) }); unchecked { ++i; } } return proof; } /** * @notice Picks out the ID for a node. Node ID is referred to as the "hash" within the * specification, but nodes < 32 bytes are not actually hashed. * * @param _node Node to pull an ID for. * * @return ID for the node, depending on the size of its contents. */ function _getNodeID(RLPReader.RLPItem memory _node) private pure returns (bytes memory) { return _node.length < 32 ? RLPReader.readRawBytes(_node) : RLPReader.readBytes(_node); } /** * @notice Gets the path for a leaf or extension node. * * @param _node Node to get a path for. * * @return Node path, converted to an array of nibbles. */ function _getNodePath(TrieNode memory _node) private pure returns (bytes memory) { return Bytes.toNibbles(RLPReader.readBytes(_node.decoded[0])); } /** * @notice Utility; determines the number of nibbles shared between two nibble arrays. * * @param _a First nibble array. * @param _b Second nibble array. * * @return Number of shared nibbles. */ function _getSharedNibbleLength(bytes memory _a, bytes memory _b) private pure returns (uint256) { uint256 shared; uint256 max = (_a.length < _b.length) ? _a.length : _b.length; for (; shared < max && _a[shared] == _b[shared]; ) { unchecked { ++shared; } } return shared; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. It the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. // We also know that `k`, the position of the most significant bit, is such that `msb(a) = 2**k`. // This gives `2**k < a <= 2**(k+1)` → `2**(k/2) <= sqrt(a) < 2 ** (k/2+1)`. // Using an algorithm similar to the msb conmputation, we are able to compute `result = 2**(k/2)` which is a // good first aproximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1; uint256 x = a; if (x >> 128 > 0) { x >>= 128; result <<= 64; } if (x >> 64 > 0) { x >>= 64; result <<= 32; } if (x >> 32 > 0) { x >>= 32; result <<= 16; } if (x >> 16 > 0) { x >>= 16; result <<= 8; } if (x >> 8 > 0) { x >>= 8; result <<= 4; } if (x >> 4 > 0) { x >>= 4; result <<= 2; } if (x >> 2 > 0) { result <<= 1; } // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { uint256 result = sqrt(a); if (rounding == Rounding.Up && result * result < a) { result += 1; } return result; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; /// @title Burn /// @notice Utilities for burning stuff. library Burn { /// @notice Burns a given amount of ETH. /// @param _amount Amount of ETH to burn. function eth(uint256 _amount) internal { new Burner{ value: _amount }(); } /// @notice Burns a given amount of gas. /// @param _amount Amount of gas to burn. function gas(uint256 _amount) internal view { uint256 i = 0; uint256 initialGas = gasleft(); while (initialGas - gasleft() < _amount) { ++i; } } } /// @title Burner /// @notice Burner self-destructs on creation and sends all ETH to itself, removing all ETH given to /// the contract from the circulating supply. Self-destructing is the only way to remove ETH /// from the circulating supply. contract Burner { constructor() payable { selfdestruct(payable(address(this))); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; import { SignedMath } from "@openzeppelin/contracts/utils/math/SignedMath.sol"; import { FixedPointMathLib } from "@rari-capital/solmate/src/utils/FixedPointMathLib.sol"; /// @title Arithmetic /// @notice Even more math than before. library Arithmetic { /// @notice Clamps a value between a minimum and maximum. /// @param _value The value to clamp. /// @param _min The minimum value. /// @param _max The maximum value. /// @return The clamped value. function clamp( int256 _value, int256 _min, int256 _max ) internal pure returns (int256) { return SignedMath.min(SignedMath.max(_value, _min), _max); } /// @notice (c)oefficient (d)enominator (exp)onentiation function. /// Returns the result of: c * (1 - 1/d)^exp. /// @param _coefficient Coefficient of the function. /// @param _denominator Fractional denominator. /// @param _exponent Power function exponent. /// @return Result of c * (1 - 1/d)^exp. function cdexp( int256 _coefficient, int256 _denominator, int256 _exponent ) internal pure returns (int256) { return (_coefficient * (FixedPointMathLib.powWad(1e18 - (1e18 / _denominator), _exponent * 1e18))) / 1e18; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../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; } /** * @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.7.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] * ``` * 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. Equivalent to `reinitializer(1)`. */ 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. * * `initializer` is equivalent to `reinitializer(1)`, so 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. * * 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. */ 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. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @custom:attribution https://github.com/bakaoh/solidity-rlp-encode * @title RLPWriter * @author RLPWriter is a library for encoding Solidity types to RLP bytes. Adapted from Bakaoh's * RLPEncode library (https://github.com/bakaoh/solidity-rlp-encode) with minor * modifications to improve legibility. */ library RLPWriter { /** * @notice RLP encodes a byte string. * * @param _in The byte string to encode. * * @return The RLP encoded string in bytes. */ function writeBytes(bytes memory _in) internal pure returns (bytes memory) { bytes memory encoded; if (_in.length == 1 && uint8(_in[0]) < 128) { encoded = _in; } else { encoded = abi.encodePacked(_writeLength(_in.length, 128), _in); } return encoded; } /** * @notice RLP encodes a list of RLP encoded byte byte strings. * * @param _in The list of RLP encoded byte strings. * * @return The RLP encoded list of items in bytes. */ function writeList(bytes[] memory _in) internal pure returns (bytes memory) { bytes memory list = _flatten(_in); return abi.encodePacked(_writeLength(list.length, 192), list); } /** * @notice RLP encodes a string. * * @param _in The string to encode. * * @return The RLP encoded string in bytes. */ function writeString(string memory _in) internal pure returns (bytes memory) { return writeBytes(bytes(_in)); } /** * @notice RLP encodes an address. * * @param _in The address to encode. * * @return The RLP encoded address in bytes. */ function writeAddress(address _in) internal pure returns (bytes memory) { return writeBytes(abi.encodePacked(_in)); } /** * @notice RLP encodes a uint. * * @param _in The uint256 to encode. * * @return The RLP encoded uint256 in bytes. */ function writeUint(uint256 _in) internal pure returns (bytes memory) { return writeBytes(_toBinary(_in)); } /** * @notice RLP encodes a bool. * * @param _in The bool to encode. * * @return The RLP encoded bool in bytes. */ function writeBool(bool _in) internal pure returns (bytes memory) { bytes memory encoded = new bytes(1); encoded[0] = (_in ? bytes1(0x01) : bytes1(0x80)); return encoded; } /** * @notice Encode the first byte and then the `len` in binary form if `length` is more than 55. * * @param _len The length of the string or the payload. * @param _offset 128 if item is string, 192 if item is list. * * @return RLP encoded bytes. */ function _writeLength(uint256 _len, uint256 _offset) private pure returns (bytes memory) { bytes memory encoded; if (_len < 56) { encoded = new bytes(1); encoded[0] = bytes1(uint8(_len) + uint8(_offset)); } else { uint256 lenLen; uint256 i = 1; while (_len / i != 0) { lenLen++; i *= 256; } encoded = new bytes(lenLen + 1); encoded[0] = bytes1(uint8(lenLen) + uint8(_offset) + 55); for (i = 1; i <= lenLen; i++) { encoded[i] = bytes1(uint8((_len / (256**(lenLen - i))) % 256)); } } return encoded; } /** * @notice Encode integer in big endian binary form with no leading zeroes. * * @param _x The integer to encode. * * @return RLP encoded bytes. */ function _toBinary(uint256 _x) private pure returns (bytes memory) { bytes memory b = abi.encodePacked(_x); uint256 i = 0; for (; i < 32; i++) { if (b[i] != 0) { break; } } bytes memory res = new bytes(32 - i); for (uint256 j = 0; j < res.length; j++) { res[j] = b[i++]; } return res; } /** * @custom:attribution https://github.com/Arachnid/solidity-stringutils * @notice Copies a piece of memory to another location. * * @param _dest Destination location. * @param _src Source location. * @param _len Length of memory to copy. */ function _memcpy( uint256 _dest, uint256 _src, uint256 _len ) private pure { uint256 dest = _dest; uint256 src = _src; uint256 len = _len; for (; len >= 32; len -= 32) { assembly { mstore(dest, mload(src)) } dest += 32; src += 32; } uint256 mask; unchecked { mask = 256**(32 - len) - 1; } assembly { let srcpart := and(mload(src), not(mask)) let destpart := and(mload(dest), mask) mstore(dest, or(destpart, srcpart)) } } /** * @custom:attribution https://github.com/sammayo/solidity-rlp-encoder * @notice Flattens a list of byte strings into one byte string. * * @param _list List of byte strings to flatten. * * @return The flattened byte string. */ function _flatten(bytes[] memory _list) private pure returns (bytes memory) { if (_list.length == 0) { return new bytes(0); } uint256 len; uint256 i = 0; for (; i < _list.length; i++) { len += _list[i].length; } bytes memory flattened = new bytes(len); uint256 flattenedPtr; assembly { flattenedPtr := add(flattened, 0x20) } for (i = 0; i < _list.length; i++) { bytes memory item = _list[i]; uint256 listPtr; assembly { listPtr := add(item, 0x20) } _memcpy(flattenedPtr, listPtr, item.length); flattenedPtr += _list[i].length; } return flattened; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @title Bytes /// @notice Bytes is a library for manipulating byte arrays. library Bytes { /// @custom:attribution https://github.com/GNSPS/solidity-bytes-utils /// @notice Slices a byte array with a given starting index and length. Returns a new byte array /// as opposed to a pointer to the original array. Will throw if trying to slice more /// bytes than exist in the array. /// @param _bytes Byte array to slice. /// @param _start Starting index of the slice. /// @param _length Length of the slice. /// @return Slice of the input byte array. function slice( bytes memory _bytes, uint256 _start, uint256 _length ) internal pure returns (bytes memory) { unchecked { require(_length + 31 >= _length, "slice_overflow"); require(_start + _length >= _start, "slice_overflow"); require(_bytes.length >= _start + _length, "slice_outOfBounds"); } bytes memory tempBytes; assembly { switch iszero(_length) case 0 { // Get a location of some free memory and store it in tempBytes as // Solidity does for memory variables. tempBytes := mload(0x40) // The first word of the slice result is potentially a partial // word read from the original array. To read it, we calculate // the length of that partial word and start copying that many // bytes into the array. The first word we copy will start with // data we don't care about, but the last `lengthmod` bytes will // land at the beginning of the contents of the new array. When // we're done copying, we overwrite the full first word with // the actual length of the slice. let lengthmod := and(_length, 31) // The multiplication in the next line is necessary // because when slicing multiples of 32 bytes (lengthmod == 0) // the following copy loop was copying the origin's length // and then ending prematurely not copying everything it should. let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod))) let end := add(mc, _length) for { // The multiplication in the next line has the same exact purpose // as the one above. let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start) } lt(mc, end) { mc := add(mc, 0x20) cc := add(cc, 0x20) } { mstore(mc, mload(cc)) } mstore(tempBytes, _length) //update free-memory pointer //allocating the array padded to 32 bytes like the compiler does now mstore(0x40, and(add(mc, 31), not(31))) } //if we want a zero-length slice let's just return a zero-length array default { tempBytes := mload(0x40) //zero out the 32 bytes slice we are about to return //we need to do it because Solidity does not garbage collect mstore(tempBytes, 0) mstore(0x40, add(tempBytes, 0x20)) } } return tempBytes; } /// @notice Slices a byte array with a given starting index up to the end of the original byte /// array. Returns a new array rathern than a pointer to the original. /// @param _bytes Byte array to slice. /// @param _start Starting index of the slice. /// @return Slice of the input byte array. function slice(bytes memory _bytes, uint256 _start) internal pure returns (bytes memory) { if (_start >= _bytes.length) { return bytes(""); } return slice(_bytes, _start, _bytes.length - _start); } /// @notice Converts a byte array into a nibble array by splitting each byte into two nibbles. /// Resulting nibble array will be exactly twice as long as the input byte array. /// @param _bytes Input byte array to convert. /// @return Resulting nibble array. function toNibbles(bytes memory _bytes) internal pure returns (bytes memory) { bytes memory _nibbles; assembly { // Grab a free memory offset for the new array _nibbles := mload(0x40) // Load the length of the passed bytes array from memory let bytesLength := mload(_bytes) // Calculate the length of the new nibble array // This is the length of the input array times 2 let nibblesLength := shl(0x01, bytesLength) // Update the free memory pointer to allocate memory for the new array. // To do this, we add the length of the new array + 32 bytes for the array length // rounded up to the nearest 32 byte boundary to the current free memory pointer. mstore(0x40, add(_nibbles, and(not(0x1F), add(nibblesLength, 0x3F)))) // Store the length of the new array in memory mstore(_nibbles, nibblesLength) // Store the memory offset of the _bytes array's contents on the stack let bytesStart := add(_bytes, 0x20) // Store the memory offset of the nibbles array's contents on the stack let nibblesStart := add(_nibbles, 0x20) // Loop through each byte in the input array for { let i := 0x00 } lt(i, bytesLength) { i := add(i, 0x01) } { // Get the starting offset of the next 2 bytes in the nibbles array let offset := add(nibblesStart, shl(0x01, i)) // Load the byte at the current index within the `_bytes` array let b := byte(0x00, mload(add(bytesStart, i))) // Pull out the first nibble and store it in the new array mstore8(offset, shr(0x04, b)) // Pull out the second nibble and store it in the new array mstore8(add(offset, 0x01), and(b, 0x0F)) } } return _nibbles; } /// @notice Compares two byte arrays by comparing their keccak256 hashes. /// @param _bytes First byte array to compare. /// @param _other Second byte array to compare. /// @return True if the two byte arrays are equal, false otherwise. function equal(bytes memory _bytes, bytes memory _other) internal pure returns (bool) { return keccak256(_bytes) == keccak256(_other); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.8; /** * @custom:attribution https://github.com/hamdiallam/Solidity-RLP * @title RLPReader * @notice RLPReader is a library for parsing RLP-encoded byte arrays into Solidity types. Adapted * from Solidity-RLP (https://github.com/hamdiallam/Solidity-RLP) by Hamdi Allam with * various tweaks to improve readability. */ library RLPReader { /** * Custom pointer type to avoid confusion between pointers and uint256s. */ type MemoryPointer is uint256; /** * @notice RLP item types. * * @custom:value DATA_ITEM Represents an RLP data item (NOT a list). * @custom:value LIST_ITEM Represents an RLP list item. */ enum RLPItemType { DATA_ITEM, LIST_ITEM } /** * @notice Struct representing an RLP item. * * @custom:field length Length of the RLP item. * @custom:field ptr Pointer to the RLP item in memory. */ struct RLPItem { uint256 length; MemoryPointer ptr; } /** * @notice Max list length that this library will accept. */ uint256 internal constant MAX_LIST_LENGTH = 32; /** * @notice Converts bytes to a reference to memory position and length. * * @param _in Input bytes to convert. * * @return Output memory reference. */ function toRLPItem(bytes memory _in) internal pure returns (RLPItem memory) { // Empty arrays are not RLP items. require( _in.length > 0, "RLPReader: length of an RLP item must be greater than zero to be decodable" ); MemoryPointer ptr; assembly { ptr := add(_in, 32) } return RLPItem({ length: _in.length, ptr: ptr }); } /** * @notice Reads an RLP list value into a list of RLP items. * * @param _in RLP list value. * * @return Decoded RLP list items. */ function readList(RLPItem memory _in) internal pure returns (RLPItem[] memory) { (uint256 listOffset, uint256 listLength, RLPItemType itemType) = _decodeLength(_in); require( itemType == RLPItemType.LIST_ITEM, "RLPReader: decoded item type for list is not a list item" ); require( listOffset + listLength == _in.length, "RLPReader: list item has an invalid data remainder" ); // Solidity in-memory arrays can't be increased in size, but *can* be decreased in size by // writing to the length. Since we can't know the number of RLP items without looping over // the entire input, we'd have to loop twice to accurately size this array. It's easier to // simply set a reasonable maximum list length and decrease the size before we finish. RLPItem[] memory out = new RLPItem[](MAX_LIST_LENGTH); uint256 itemCount = 0; uint256 offset = listOffset; while (offset < _in.length) { (uint256 itemOffset, uint256 itemLength, ) = _decodeLength( RLPItem({ length: _in.length - offset, ptr: MemoryPointer.wrap(MemoryPointer.unwrap(_in.ptr) + offset) }) ); // We don't need to check itemCount < out.length explicitly because Solidity already // handles this check on our behalf, we'd just be wasting gas. out[itemCount] = RLPItem({ length: itemLength + itemOffset, ptr: MemoryPointer.wrap(MemoryPointer.unwrap(_in.ptr) + offset) }); itemCount += 1; offset += itemOffset + itemLength; } // Decrease the array size to match the actual item count. assembly { mstore(out, itemCount) } return out; } /** * @notice Reads an RLP list value into a list of RLP items. * * @param _in RLP list value. * * @return Decoded RLP list items. */ function readList(bytes memory _in) internal pure returns (RLPItem[] memory) { return readList(toRLPItem(_in)); } /** * @notice Reads an RLP bytes value into bytes. * * @param _in RLP bytes value. * * @return Decoded bytes. */ function readBytes(RLPItem memory _in) internal pure returns (bytes memory) { (uint256 itemOffset, uint256 itemLength, RLPItemType itemType) = _decodeLength(_in); require( itemType == RLPItemType.DATA_ITEM, "RLPReader: decoded item type for bytes is not a data item" ); require( _in.length == itemOffset + itemLength, "RLPReader: bytes value contains an invalid remainder" ); return _copy(_in.ptr, itemOffset, itemLength); } /** * @notice Reads an RLP bytes value into bytes. * * @param _in RLP bytes value. * * @return Decoded bytes. */ function readBytes(bytes memory _in) internal pure returns (bytes memory) { return readBytes(toRLPItem(_in)); } /** * @notice Reads the raw bytes of an RLP item. * * @param _in RLP item to read. * * @return Raw RLP bytes. */ function readRawBytes(RLPItem memory _in) internal pure returns (bytes memory) { return _copy(_in.ptr, 0, _in.length); } /** * @notice Decodes the length of an RLP item. * * @param _in RLP item to decode. * * @return Offset of the encoded data. * @return Length of the encoded data. * @return RLP item type (LIST_ITEM or DATA_ITEM). */ function _decodeLength(RLPItem memory _in) private pure returns ( uint256, uint256, RLPItemType ) { // Short-circuit if there's nothing to decode, note that we perform this check when // the user creates an RLP item via toRLPItem, but it's always possible for them to bypass // that function and create an RLP item directly. So we need to check this anyway. require( _in.length > 0, "RLPReader: length of an RLP item must be greater than zero to be decodable" ); MemoryPointer ptr = _in.ptr; uint256 prefix; assembly { prefix := byte(0, mload(ptr)) } if (prefix <= 0x7f) { // Single byte. return (0, 1, RLPItemType.DATA_ITEM); } else if (prefix <= 0xb7) { // Short string. // slither-disable-next-line variable-scope uint256 strLen = prefix - 0x80; require( _in.length > strLen, "RLPReader: length of content must be greater than string length (short string)" ); bytes1 firstByteOfContent; assembly { firstByteOfContent := and(mload(add(ptr, 1)), shl(248, 0xff)) } require( strLen != 1 || firstByteOfContent >= 0x80, "RLPReader: invalid prefix, single byte < 0x80 are not prefixed (short string)" ); return (1, strLen, RLPItemType.DATA_ITEM); } else if (prefix <= 0xbf) { // Long string. uint256 lenOfStrLen = prefix - 0xb7; require( _in.length > lenOfStrLen, "RLPReader: length of content must be > than length of string length (long string)" ); bytes1 firstByteOfContent; assembly { firstByteOfContent := and(mload(add(ptr, 1)), shl(248, 0xff)) } require( firstByteOfContent != 0x00, "RLPReader: length of content must not have any leading zeros (long string)" ); uint256 strLen; assembly { strLen := shr(sub(256, mul(8, lenOfStrLen)), mload(add(ptr, 1))) } require( strLen > 55, "RLPReader: length of content must be greater than 55 bytes (long string)" ); require( _in.length > lenOfStrLen + strLen, "RLPReader: length of content must be greater than total length (long string)" ); return (1 + lenOfStrLen, strLen, RLPItemType.DATA_ITEM); } else if (prefix <= 0xf7) { // Short list. // slither-disable-next-line variable-scope uint256 listLen = prefix - 0xc0; require( _in.length > listLen, "RLPReader: length of content must be greater than list length (short list)" ); return (1, listLen, RLPItemType.LIST_ITEM); } else { // Long list. uint256 lenOfListLen = prefix - 0xf7; require( _in.length > lenOfListLen, "RLPReader: length of content must be > than length of list length (long list)" ); bytes1 firstByteOfContent; assembly { firstByteOfContent := and(mload(add(ptr, 1)), shl(248, 0xff)) } require( firstByteOfContent != 0x00, "RLPReader: length of content must not have any leading zeros (long list)" ); uint256 listLen; assembly { listLen := shr(sub(256, mul(8, lenOfListLen)), mload(add(ptr, 1))) } require( listLen > 55, "RLPReader: length of content must be greater than 55 bytes (long list)" ); require( _in.length > lenOfListLen + listLen, "RLPReader: length of content must be greater than total length (long list)" ); return (1 + lenOfListLen, listLen, RLPItemType.LIST_ITEM); } } /** * @notice Copies the bytes from a memory location. * * @param _src Pointer to the location to read from. * @param _offset Offset to start reading from. * @param _length Number of bytes to read. * * @return Copied bytes. */ function _copy( MemoryPointer _src, uint256 _offset, uint256 _length ) private pure returns (bytes memory) { bytes memory out = new bytes(_length); if (_length == 0) { return out; } // Mostly based on Solidity's copy_memory_to_memory: // solhint-disable max-line-length // https://github.com/ethereum/solidity/blob/34dd30d71b4da730488be72ff6af7083cf2a91f6/libsolidity/codegen/YulUtilFunctions.cpp#L102-L114 uint256 src = MemoryPointer.unwrap(_src) + _offset; assembly { let dest := add(out, 32) let i := 0 for { } lt(i, _length) { i := add(i, 32) } { mstore(add(dest, i), mload(add(src, i))) } if gt(i, _length) { mstore(add(dest, _length), 0) } } return out; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; /// @notice Arithmetic library with operations for fixed-point numbers. /// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/FixedPointMathLib.sol) library FixedPointMathLib { /*////////////////////////////////////////////////////////////// SIMPLIFIED FIXED POINT OPERATIONS //////////////////////////////////////////////////////////////*/ uint256 internal constant WAD = 1e18; // The scalar of ETH and most ERC20s. function mulWadDown(uint256 x, uint256 y) internal pure returns (uint256) { return mulDivDown(x, y, WAD); // Equivalent to (x * y) / WAD rounded down. } function mulWadUp(uint256 x, uint256 y) internal pure returns (uint256) { return mulDivUp(x, y, WAD); // Equivalent to (x * y) / WAD rounded up. } function divWadDown(uint256 x, uint256 y) internal pure returns (uint256) { return mulDivDown(x, WAD, y); // Equivalent to (x * WAD) / y rounded down. } function divWadUp(uint256 x, uint256 y) internal pure returns (uint256) { return mulDivUp(x, WAD, y); // Equivalent to (x * WAD) / y rounded up. } function powWad(int256 x, int256 y) internal pure returns (int256) { // Equivalent to x to the power of y because x ** y = (e ** ln(x)) ** y = e ** (ln(x) * y) return expWad((lnWad(x) * y) / int256(WAD)); // Using ln(x) means x must be greater than 0. } function expWad(int256 x) internal pure returns (int256 r) { unchecked { // When the result is < 0.5 we return zero. This happens when // x <= floor(log(0.5e18) * 1e18) ~ -42e18 if (x <= -42139678854452767551) return 0; // When the result is > (2**255 - 1) / 1e18 we can not represent it as an // int. This happens when x >= floor(log((2**255 - 1) / 1e18) * 1e18) ~ 135. if (x >= 135305999368893231589) revert("EXP_OVERFLOW"); // x is now in the range (-42, 136) * 1e18. Convert to (-42, 136) * 2**96 // for more intermediate precision and a binary basis. This base conversion // is a multiplication by 1e18 / 2**96 = 5**18 / 2**78. x = (x << 78) / 5**18; // Reduce range of x to (-½ ln 2, ½ ln 2) * 2**96 by factoring out powers // of two such that exp(x) = exp(x') * 2**k, where k is an integer. // Solving this gives k = round(x / log(2)) and x' = x - k * log(2). int256 k = ((x << 96) / 54916777467707473351141471128 + 2**95) >> 96; x = x - k * 54916777467707473351141471128; // k is in the range [-61, 195]. // Evaluate using a (6, 7)-term rational approximation. // p is made monic, we'll multiply by a scale factor later. int256 y = x + 1346386616545796478920950773328; y = ((y * x) >> 96) + 57155421227552351082224309758442; int256 p = y + x - 94201549194550492254356042504812; p = ((p * y) >> 96) + 28719021644029726153956944680412240; p = p * x + (4385272521454847904659076985693276 << 96); // We leave p in 2**192 basis so we don't need to scale it back up for the division. int256 q = x - 2855989394907223263936484059900; q = ((q * x) >> 96) + 50020603652535783019961831881945; q = ((q * x) >> 96) - 533845033583426703283633433725380; q = ((q * x) >> 96) + 3604857256930695427073651918091429; q = ((q * x) >> 96) - 14423608567350463180887372962807573; q = ((q * x) >> 96) + 26449188498355588339934803723976023; assembly { // Div in assembly because solidity adds a zero check despite the unchecked. // The q polynomial won't have zeros in the domain as all its roots are complex. // No scaling is necessary because p is already 2**96 too large. r := sdiv(p, q) } // r should be in the range (0.09, 0.25) * 2**96. // We now need to multiply r by: // * the scale factor s = ~6.031367120. // * the 2**k factor from the range reduction. // * the 1e18 / 2**96 factor for base conversion. // We do this all at once, with an intermediate result in 2**213 // basis, so the final right shift is always by a positive amount. r = int256((uint256(r) * 3822833074963236453042738258902158003155416615667) >> uint256(195 - k)); } } function lnWad(int256 x) internal pure returns (int256 r) { unchecked { require(x > 0, "UNDEFINED"); // We want to convert x from 10**18 fixed point to 2**96 fixed point. // We do this by multiplying by 2**96 / 10**18. But since // ln(x * C) = ln(x) + ln(C), we can simply do nothing here // and add ln(2**96 / 10**18) at the end. // Reduce range of x to (1, 2) * 2**96 // ln(2^k * x) = k * ln(2) + ln(x) int256 k = int256(log2(uint256(x))) - 96; x <<= uint256(159 - k); x = int256(uint256(x) >> 159); // Evaluate using a (8, 8)-term rational approximation. // p is made monic, we will multiply by a scale factor later. int256 p = x + 3273285459638523848632254066296; p = ((p * x) >> 96) + 24828157081833163892658089445524; p = ((p * x) >> 96) + 43456485725739037958740375743393; p = ((p * x) >> 96) - 11111509109440967052023855526967; p = ((p * x) >> 96) - 45023709667254063763336534515857; p = ((p * x) >> 96) - 14706773417378608786704636184526; p = p * x - (795164235651350426258249787498 << 96); // We leave p in 2**192 basis so we don't need to scale it back up for the division. // q is monic by convention. int256 q = x + 5573035233440673466300451813936; q = ((q * x) >> 96) + 71694874799317883764090561454958; q = ((q * x) >> 96) + 283447036172924575727196451306956; q = ((q * x) >> 96) + 401686690394027663651624208769553; q = ((q * x) >> 96) + 204048457590392012362485061816622; q = ((q * x) >> 96) + 31853899698501571402653359427138; q = ((q * x) >> 96) + 909429971244387300277376558375; assembly { // Div in assembly because solidity adds a zero check despite the unchecked. // The q polynomial is known not to have zeros in the domain. // No scaling required because p is already 2**96 too large. r := sdiv(p, q) } // r is in the range (0, 0.125) * 2**96 // Finalization, we need to: // * multiply by the scale factor s = 5.549… // * add ln(2**96 / 10**18) // * add k * ln(2) // * multiply by 10**18 / 2**96 = 5**18 >> 78 // mul s * 5e18 * 2**96, base is now 5**18 * 2**192 r *= 1677202110996718588342820967067443963516166; // add ln(2) * k * 5e18 * 2**192 r += 16597577552685614221487285958193947469193820559219878177908093499208371 * k; // add ln(2**96 / 10**18) * 5e18 * 2**192 r += 600920179829731861736702779321621459595472258049074101567377883020018308; // base conversion: mul 2**18 / 2**192 r >>= 174; } } /*////////////////////////////////////////////////////////////// LOW LEVEL FIXED POINT OPERATIONS //////////////////////////////////////////////////////////////*/ function mulDivDown( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 z) { assembly { // Store x * y in z for now. z := mul(x, y) // Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y)) if iszero(and(iszero(iszero(denominator)), or(iszero(x), eq(div(z, x), y)))) { revert(0, 0) } // Divide z by the denominator. z := div(z, denominator) } } function mulDivUp( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 z) { assembly { // Store x * y in z for now. z := mul(x, y) // Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y)) if iszero(and(iszero(iszero(denominator)), or(iszero(x), eq(div(z, x), y)))) { revert(0, 0) } // First, divide z - 1 by the denominator and add 1. // We allow z - 1 to underflow if z is 0, because we multiply the // end result by 0 if z is zero, ensuring we return 0 if z is zero. z := mul(iszero(iszero(z)), add(div(sub(z, 1), denominator), 1)) } } function rpow( uint256 x, uint256 n, uint256 scalar ) internal pure returns (uint256 z) { assembly { switch x case 0 { switch n case 0 { // 0 ** 0 = 1 z := scalar } default { // 0 ** n = 0 z := 0 } } default { switch mod(n, 2) case 0 { // If n is even, store scalar in z for now. z := scalar } default { // If n is odd, store x in z for now. z := x } // Shifting right by 1 is like dividing by 2. let half := shr(1, scalar) for { // Shift n right by 1 before looping to halve it. n := shr(1, n) } n { // Shift n right by 1 each iteration to halve it. n := shr(1, n) } { // Revert immediately if x ** 2 would overflow. // Equivalent to iszero(eq(div(xx, x), x)) here. if shr(128, x) { revert(0, 0) } // Store x squared. let xx := mul(x, x) // Round to the nearest number. let xxRound := add(xx, half) // Revert if xx + half overflowed. if lt(xxRound, xx) { revert(0, 0) } // Set x to scaled xxRound. x := div(xxRound, scalar) // If n is even: if mod(n, 2) { // Compute z * x. let zx := mul(z, x) // If z * x overflowed: if iszero(eq(div(zx, x), z)) { // Revert if x is non-zero. if iszero(iszero(x)) { revert(0, 0) } } // Round to the nearest number. let zxRound := add(zx, half) // Revert if zx + half overflowed. if lt(zxRound, zx) { revert(0, 0) } // Return properly scaled zxRound. z := div(zxRound, scalar) } } } } } /*////////////////////////////////////////////////////////////// GENERAL NUMBER UTILITIES //////////////////////////////////////////////////////////////*/ function sqrt(uint256 x) internal pure returns (uint256 z) { assembly { let y := x // We start y at x, which will help us make our initial estimate. z := 181 // The "correct" value is 1, but this saves a multiplication later. // This segment is to get a reasonable initial estimate for the Babylonian method. With a bad // start, the correct # of bits increases ~linearly each iteration instead of ~quadratically. // We check y >= 2^(k + 8) but shift right by k bits // each branch to ensure that if x >= 256, then y >= 256. if iszero(lt(y, 0x10000000000000000000000000000000000)) { y := shr(128, y) z := shl(64, z) } if iszero(lt(y, 0x1000000000000000000)) { y := shr(64, y) z := shl(32, z) } if iszero(lt(y, 0x10000000000)) { y := shr(32, y) z := shl(16, z) } if iszero(lt(y, 0x1000000)) { y := shr(16, y) z := shl(8, z) } // Goal was to get z*z*y within a small factor of x. More iterations could // get y in a tighter range. Currently, we will have y in [256, 256*2^16). // We ensured y >= 256 so that the relative difference between y and y+1 is small. // That's not possible if x < 256 but we can just verify those cases exhaustively. // Now, z*z*y <= x < z*z*(y+1), and y <= 2^(16+8), and either y >= 256, or x < 256. // Correctness can be checked exhaustively for x < 256, so we assume y >= 256. // Then z*sqrt(y) is within sqrt(257)/sqrt(256) of sqrt(x), or about 20bps. // For s in the range [1/256, 256], the estimate f(s) = (181/1024) * (s+1) is in the range // (1/2.84 * sqrt(s), 2.84 * sqrt(s)), with largest error when s = 1 and when s = 256 or 1/256. // Since y is in [256, 256*2^16), let a = y/65536, so that a is in [1/256, 256). Then we can estimate // sqrt(y) using sqrt(65536) * 181/1024 * (a + 1) = 181/4 * (y + 65536)/65536 = 181 * (y + 65536)/2^18. // There is no overflow risk here since y < 2^136 after the first branch above. z := shr(18, mul(z, add(y, 65536))) // A mul() is saved from starting z at 181. // Given the worst case multiplicative error of 2.84 above, 7 iterations should be enough. z := shr(1, add(z, div(x, z))) z := shr(1, add(z, div(x, z))) z := shr(1, add(z, div(x, z))) z := shr(1, add(z, div(x, z))) z := shr(1, add(z, div(x, z))) z := shr(1, add(z, div(x, z))) z := shr(1, add(z, div(x, z))) // If x+1 is a perfect square, the Babylonian method cycles between // floor(sqrt(x)) and ceil(sqrt(x)). This statement ensures we return floor. // See: https://en.wikipedia.org/wiki/Integer_square_root#Using_only_integer_division // Since the ceil is rare, we save gas on the assignment and repeat division in the rare case. // If you don't care whether the floor or ceil square root is returned, you can remove this statement. z := sub(z, lt(div(x, z), z)) } } function log2(uint256 x) internal pure returns (uint256 r) { require(x > 0, "UNDEFINED"); assembly { r := shl(7, lt(0xffffffffffffffffffffffffffffffff, x)) r := or(r, shl(6, lt(0xffffffffffffffff, shr(r, x)))) r := or(r, shl(5, lt(0xffffffff, shr(r, x)))) r := or(r, shl(4, lt(0xffff, shr(r, x)))) r := or(r, shl(3, lt(0xff, shr(r, x)))) r := or(r, shl(2, lt(0xf, shr(r, x)))) r := or(r, shl(1, lt(0x3, shr(r, x)))) r := or(r, lt(0x1, shr(r, x))) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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 * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
{ "remappings": [ "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "@rari-capital/solmate/=lib/solmate/", "@cwia/=lib/clones-with-immutable-args/src/", "forge-std/=lib/forge-std/src/", "ds-test/=lib/forge-std/lib/ds-test/src/", "clones-with-immutable-args/=node_modules/clones-with-immutable-args/", "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/", "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "solmate/=lib/solmate/src/" ], "optimizer": { "enabled": true, "runs": 999999 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "none" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "evmVersion": "london", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract L2OutputOracle","name":"_l2Oracle","type":"address"},{"internalType":"address","name":"_guardian","type":"address"},{"internalType":"bool","name":"_paused","type":"bool"},{"internalType":"contract SystemConfig","name":"_config","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"version","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"opaqueData","type":"bytes"}],"name":"TransactionDeposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"withdrawalHash","type":"bytes32"},{"indexed":false,"internalType":"bool","name":"success","type":"bool"}],"name":"WithdrawalFinalized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"withdrawalHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"WithdrawalProven","type":"event"},{"inputs":[],"name":"GUARDIAN","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"L2_ORACLE","outputs":[{"internalType":"contract L2OutputOracle","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SYSTEM_CONFIG","outputs":[{"internalType":"contract SystemConfig","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"uint64","name":"_gasLimit","type":"uint64"},{"internalType":"bool","name":"_isCreation","type":"bool"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"depositTransaction","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"donateETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"gasLimit","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct Types.WithdrawalTransaction","name":"_tx","type":"tuple"}],"name":"finalizeWithdrawalTransaction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"finalizedWithdrawals","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_l2OutputIndex","type":"uint256"}],"name":"isOutputFinalized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"l2Sender","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"_byteCount","type":"uint64"}],"name":"minimumGasLimit","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"params","outputs":[{"internalType":"uint128","name":"prevBaseFee","type":"uint128"},{"internalType":"uint64","name":"prevBoughtGas","type":"uint64"},{"internalType":"uint64","name":"prevBlockNum","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"gasLimit","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct Types.WithdrawalTransaction","name":"_tx","type":"tuple"},{"internalType":"uint256","name":"_l2OutputIndex","type":"uint256"},{"components":[{"internalType":"bytes32","name":"version","type":"bytes32"},{"internalType":"bytes32","name":"stateRoot","type":"bytes32"},{"internalType":"bytes32","name":"messagePasserStorageRoot","type":"bytes32"},{"internalType":"bytes32","name":"latestBlockhash","type":"bytes32"}],"internalType":"struct Types.OutputRootProof","name":"_outputRootProof","type":"tuple"},{"internalType":"bytes[]","name":"_withdrawalProof","type":"bytes[]"}],"name":"proveWithdrawalTransaction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"provenWithdrawals","outputs":[{"internalType":"bytes32","name":"outputRoot","type":"bytes32"},{"internalType":"uint128","name":"timestamp","type":"uint128"},{"internalType":"uint128","name":"l2OutputIndex","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
6101406040523480156200001257600080fd5b50604051620059c8380380620059c8833981016040819052620000359162000296565b6001608052600760a052600260c0526001600160a01b0380851660e052838116610120528116610100526200006a8262000074565b5050505062000302565b600054610100900460ff1615808015620000955750600054600160ff909116105b80620000c55750620000b230620001cb60201b62001c891760201c565b158015620000c5575060005460ff166001145b6200012e5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805460ff19166001179055801562000152576000805461ff0019166101001790555b603280546001600160a01b03191661dead1790556035805483151560ff1990911617905562000180620001da565b8015620001c7576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b6001600160a01b03163b151590565b600054610100900460ff16620002475760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b606482015260840162000125565b60408051606081018252633b9aca0080825260006020830152436001600160401b031691909201819052600160c01b0217600155565b6001600160a01b03811681146200029357600080fd5b50565b60008060008060808587031215620002ad57600080fd5b8451620002ba816200027d565b6020860151909450620002cd816200027d565b60408601519093508015158114620002e457600080fd5b6060860151909250620002f7816200027d565b939692955090935050565b60805160a05160c05160e051610100516101205161563762000391600039600081816102690152818161079d01526110a00152600081816104c801526123d701526000818161016a01528181610a0601528181610be701528181610ffc015281816113b60152818161162801526121c301526000610f6701526000610f3e01526000610f1501526156376000f3fe60806040526004361061012c5760003560e01c80638c3152e9116100a5578063cff0ab9611610074578063e965084c11610059578063e965084c14610417578063e9e05c42146104a3578063f0498750146104b657600080fd5b8063cff0ab9614610356578063d53a822f146103f757600080fd5b80638c3152e9146102a05780639bf62d82146102c0578063a14238e7146102ed578063a35d99df1461031d57600080fd5b80635c975abb116100fc578063724c184c116100e1578063724c184c146102575780638456cb591461028b5780638b4c40b01461015157600080fd5b80635c975abb1461020d5780636dbffb781461023757600080fd5b80621c2ff6146101585780633f4ba83a146101b65780634870496f146101cb57806354fd4d50146101eb57600080fd5b36610153576101513334620186a06000604051806020016040528060008152506104ea565b005b600080fd5b34801561016457600080fd5b5061018c7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156101c257600080fd5b50610151610785565b3480156101d757600080fd5b506101516101e6366004614be9565b6108a8565b3480156101f757600080fd5b50610200610f0e565b6040516101ad9190614d3f565b34801561021957600080fd5b506035546102279060ff1681565b60405190151581526020016101ad565b34801561024357600080fd5b50610227610252366004614d52565b610fb1565b34801561026357600080fd5b5061018c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561029757600080fd5b50610151611088565b3480156102ac57600080fd5b506101516102bb366004614d6b565b6111a8565b3480156102cc57600080fd5b5060325461018c9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156102f957600080fd5b50610227610308366004614d52565b60336020526000908152604090205460ff1681565b34801561032957600080fd5b5061033d610338366004614db8565b611a83565b60405167ffffffffffffffff90911681526020016101ad565b34801561036257600080fd5b506001546103be906fffffffffffffffffffffffffffffffff81169067ffffffffffffffff7001000000000000000000000000000000008204811691780100000000000000000000000000000000000000000000000090041683565b604080516fffffffffffffffffffffffffffffffff909416845267ffffffffffffffff92831660208501529116908201526060016101ad565b34801561040357600080fd5b50610151610412366004614de3565b611a9c565b34801561042357600080fd5b50610475610432366004614d52565b603460205260009081526040902080546001909101546fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041683565b604080519384526fffffffffffffffffffffffffffffffff92831660208501529116908201526060016101ad565b6101516104b1366004614dfe565b6104ea565b3480156104c257600080fd5b5061018c7f000000000000000000000000000000000000000000000000000000000000000081565b8260005a905083156105a15773ffffffffffffffffffffffffffffffffffffffff8716156105a157604080517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482015260248101919091527f4f7074696d69736d506f7274616c3a206d7573742073656e6420746f2061646460448201527f72657373283029207768656e206372656174696e67206120636f6e747261637460648201526084015b60405180910390fd5b6105ab8351611a83565b67ffffffffffffffff168567ffffffffffffffff16101561064e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f4f7074696d69736d506f7274616c3a20676173206c696d697420746f6f20736d60448201527f616c6c00000000000000000000000000000000000000000000000000000000006064820152608401610598565b6201d4c0835111156106bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f4f7074696d69736d506f7274616c3a206461746120746f6f206c6172676500006044820152606401610598565b333281146106dd575033731111000000000000000000000000000000001111015b600034888888886040516020016106f8959493929190614e77565b604051602081830303815290604052905060008973ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fb3813568d9991fc951961fcb4c784893574240a28925604d09fc577c55bb7c32846040516107689190614d3f565b60405180910390a4505061077c8282611ca5565b50505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461084a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4f7074696d69736d506f7274616c3a206f6e6c7920677561726469616e20636160448201527f6e20756e706175736500000000000000000000000000000000000000000000006064820152608401610598565b603580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556040513381527f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa906020015b60405180910390a1565b60355460ff1615610915576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f7074696d69736d506f7274616c3a20706175736564000000000000000000006044820152606401610598565b3073ffffffffffffffffffffffffffffffffffffffff16856040015173ffffffffffffffffffffffffffffffffffffffff16036109d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603f60248201527f4f7074696d69736d506f7274616c3a20796f752063616e6e6f742073656e642060448201527f6d6573736167657320746f2074686520706f7274616c20636f6e7472616374006064820152608401610598565b6040517fa25ae557000000000000000000000000000000000000000000000000000000008152600481018590526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063a25ae55790602401606060405180830381865afa158015610a62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a869190614efc565b519050610aa0610a9b36869003860186614f61565b611fd2565b8114610b2e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4f7074696d69736d506f7274616c3a20696e76616c6964206f7574707574207260448201527f6f6f742070726f6f6600000000000000000000000000000000000000000000006064820152608401610598565b6000610b398761202e565b6000818152603460209081526040918290208251606081018452815481526001909101546fffffffffffffffffffffffffffffffff8082169383018490527001000000000000000000000000000000009091041692810192909252919250901580610c6b5750805160408083015190517fa25ae5570000000000000000000000000000000000000000000000000000000081526fffffffffffffffffffffffffffffffff90911660048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063a25ae55790602401606060405180830381865afa158015610c43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c679190614efc565b5114155b610cf7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f4f7074696d69736d506f7274616c3a207769746864726177616c20686173682060448201527f68617320616c7265616479206265656e2070726f76656e0000000000000000006064820152608401610598565b60408051602081018490526000918101829052606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201209083018190529250610dc09101604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152828201909152600182527f0100000000000000000000000000000000000000000000000000000000000000602083015290610db6888a614fc7565b8a6040013561205e565b610e4c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4f7074696d69736d506f7274616c3a20696e76616c696420776974686472617760448201527f616c20696e636c7573696f6e2070726f6f6600000000000000000000000000006064820152608401610598565b604080516060810182528581526fffffffffffffffffffffffffffffffff42811660208084019182528c831684860190815260008981526034835286812095518655925190518416700100000000000000000000000000000000029316929092176001909301929092558b830151908c0151925173ffffffffffffffffffffffffffffffffffffffff918216939091169186917f67a6208cfcc0801d50f6cbe764733f4fddf66ac0b04442061a8a8c0cb6b63f629190a4505050505050505050565b6060610f397f0000000000000000000000000000000000000000000000000000000000000000612082565b610f627f0000000000000000000000000000000000000000000000000000000000000000612082565b610f8b7f0000000000000000000000000000000000000000000000000000000000000000612082565b604051602001610f9d9392919061504b565b604051602081830303815290604052905090565b6040517fa25ae557000000000000000000000000000000000000000000000000000000008152600481018290526000906110829073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063a25ae55790602401606060405180830381865afa158015611043573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110679190614efc565b602001516fffffffffffffffffffffffffffffffff166121bf565b92915050565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461114d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4f7074696d69736d506f7274616c3a206f6e6c7920677561726469616e20636160448201527f6e207061757365000000000000000000000000000000000000000000000000006064820152608401610598565b603580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556040513381527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589060200161089e565b60355460ff1615611215576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f7074696d69736d506f7274616c3a20706175736564000000000000000000006044820152606401610598565b60325473ffffffffffffffffffffffffffffffffffffffff1661dead146112be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603f60248201527f4f7074696d69736d506f7274616c3a2063616e206f6e6c79207472696767657260448201527f206f6e65207769746864726177616c20706572207472616e73616374696f6e006064820152608401610598565b60006112c98261202e565b60008181526034602090815260408083208151606081018352815481526001909101546fffffffffffffffffffffffffffffffff808216948301859052700100000000000000000000000000000000909104169181019190915292935090036113b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4f7074696d69736d506f7274616c3a207769746864726177616c20686173206e60448201527f6f74206265656e2070726f76656e2079657400000000000000000000000000006064820152608401610598565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663887862726040518163ffffffff1660e01b8152600401602060405180830381865afa15801561141f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061144391906150c1565b81602001516fffffffffffffffffffffffffffffffff16101561150e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604b60248201527f4f7074696d69736d506f7274616c3a207769746864726177616c2074696d657360448201527f74616d70206c657373207468616e204c32204f7261636c65207374617274696e60648201527f672074696d657374616d70000000000000000000000000000000000000000000608482015260a401610598565b61152d81602001516fffffffffffffffffffffffffffffffff166121bf565b6115df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604560248201527f4f7074696d69736d506f7274616c3a2070726f76656e2077697468647261776160448201527f6c2066696e616c697a6174696f6e20706572696f6420686173206e6f7420656c60648201527f6170736564000000000000000000000000000000000000000000000000000000608482015260a401610598565b60408181015190517fa25ae5570000000000000000000000000000000000000000000000000000000081526fffffffffffffffffffffffffffffffff90911660048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063a25ae55790602401606060405180830381865afa158015611684573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a89190614efc565b8251815191925014611762576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604960248201527f4f7074696d69736d506f7274616c3a206f757470757420726f6f742070726f7660448201527f656e206973206e6f74207468652073616d652061732063757272656e74206f7560648201527f7470757420726f6f740000000000000000000000000000000000000000000000608482015260a401610598565b61178181602001516fffffffffffffffffffffffffffffffff166121bf565b611833576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f4f7074696d69736d506f7274616c3a206f75747075742070726f706f73616c2060448201527f66696e616c697a6174696f6e20706572696f6420686173206e6f7420656c617060648201527f7365640000000000000000000000000000000000000000000000000000000000608482015260a401610598565b60008381526033602052604090205460ff16156118d2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f4f7074696d69736d506f7274616c3a207769746864726177616c20686173206160448201527f6c7265616479206265656e2066696e616c697a656400000000000000000000006064820152608401610598565b600083815260336020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055908601516032805473ffffffffffffffffffffffffffffffffffffffff9092167fffffffffffffffffffffffff00000000000000000000000000000000000000009092169190911790558501516080860151606087015160a088015161197493929190612262565b603280547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead17905560405190915084907fdb5c7652857aa163daadd670e116628fb42e869d8ac4251ef8971d9e5727df1b906119d990841515815260200190565b60405180910390a2801580156119ef5750326001145b15611a7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4f7074696d69736d506f7274616c3a207769746864726177616c206661696c6560448201527f64000000000000000000000000000000000000000000000000000000000000006064820152608401610598565b5050505050565b6000611a90826010615109565b61108290615208615139565b600054610100900460ff1615808015611abc5750600054600160ff909116105b80611ad65750303b158015611ad6575060005460ff166001145b611b62576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610598565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015611bc057600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b603280547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead179055603580548315157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00909116179055611c226122c0565b8015611c8557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b600154600090611cdb907801000000000000000000000000000000000000000000000000900467ffffffffffffffff1643615165565b90506000611ce76123a3565b90506000816020015160ff16826000015163ffffffff16611d0891906151ab565b90508215611e3f57600154600090611d3f908390700100000000000000000000000000000000900467ffffffffffffffff16615213565b90506000836040015160ff1683611d569190615287565b600154611d769084906fffffffffffffffffffffffffffffffff16615287565b611d8091906151ab565b600154909150600090611dd190611daa9084906fffffffffffffffffffffffffffffffff16615343565b866060015163ffffffff168760a001516fffffffffffffffffffffffffffffffff16612469565b90506001861115611e0057611dfd611daa82876040015160ff1660018a611df89190615165565b612488565b90505b6fffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000067ffffffffffffffff4316021760015550505b60018054869190601090611e72908490700100000000000000000000000000000000900467ffffffffffffffff16615139565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550816000015163ffffffff16600160000160109054906101000a900467ffffffffffffffff1667ffffffffffffffff161315611f55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f5265736f757263654d65746572696e673a2063616e6e6f7420627579206d6f7260448201527f6520676173207468616e20617661696c61626c6520676173206c696d697400006064820152608401610598565b600154600090611f81906fffffffffffffffffffffffffffffffff1667ffffffffffffffff88166153b7565b90506000611f9348633b9aca006124dd565b611f9d90836153f4565b905060005a611fac9088615165565b905080821115611fc857611fc8611fc38284615165565b6124f4565b5050505050505050565b60008160000151826020015183604001518460600151604051602001612011949392919093845260208401929092526040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b80516020808301516040808501516060860151608087015160a08801519351600097612011979096959101615408565b60008061206a86612522565b905061207881868686612554565b9695505050505050565b6060816000036120c557505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156120ef57806120d98161545f565b91506120e89050600a836153f4565b91506120c9565b60008167ffffffffffffffff81111561210a5761210a614a0f565b6040519080825280601f01601f191660200182016040528015612134576020820181803683370190505b5090505b84156121b757612149600183615165565b9150612156600a86615497565b6121619060306154ab565b60f81b818381518110612176576121766154c3565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506121b0600a866153f4565b9450612138565b949350505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663f4daa2916040518163ffffffff1660e01b8152600401602060405180830381865afa15801561222c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061225091906150c1565b61225a90836154ab565b421192915050565b6000806000612272866000612584565b9050806122a8576308c379a06000526020805278185361666543616c6c3a204e6f7420656e6f756768206761736058526064601cfd5b600080855160208701888b5af1979650505050505050565b600054610100900460ff16612357576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610598565b60408051606081018252633b9aca00808252600060208301524367ffffffffffffffff169190920181905278010000000000000000000000000000000000000000000000000217600155565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a08101919091527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663cc731b026040518163ffffffff1660e01b815260040160c060405180830381865afa158015612440573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124649190615517565b905090565b600061247e61247885856125a2565b836125b2565b90505b9392505050565b6000670de0b6b3a76400006124c96124a085836151ab565b6124b290670de0b6b3a7640000615213565b6124c485670de0b6b3a7640000615287565b6125c1565b6124d39086615287565b61247e91906151ab565b6000818310156124ed5781612481565b5090919050565b6000805a90505b825a6125079083615165565b101561251d576125168261545f565b91506124fb565b505050565b6060818051906020012060405160200161253e91815260200190565b6040516020818303038152906040529050919050565b600061257b846125658786866125f2565b8051602091820120825192909101919091201490565b95945050505050565b600080603f83619c4001026040850201603f5a021015949350505050565b6000818312156124ed5781612481565b60008183126124ed5781612481565b6000612481670de0b6b3a7640000836125d98661307a565b6125e39190615287565b6125ed91906151ab565b6132be565b6060600084511161265f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4d65726b6c65547269653a20656d707479206b657900000000000000000000006044820152606401610598565b600061266a846134fd565b90506000612677866135ec565b905060008460405160200161268e91815260200190565b60405160208183030381529060405290506000805b8451811015612ff15760008582815181106126c0576126c06154c3565b60200260200101519050845183111561275b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f4d65726b6c65547269653a206b657920696e646578206578636565647320746f60448201527f74616c206b6579206c656e6774680000000000000000000000000000000000006064820152608401610598565b8260000361281457805180516020918201206040516127a99261278392910190815260200190565b604051602081830303815290604052858051602091820120825192909101919091201490565b61280f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4d65726b6c65547269653a20696e76616c696420726f6f7420686173680000006044820152606401610598565b61296b565b8051516020116128ca578051805160209182012060405161283e9261278392910190815260200190565b61280f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4d65726b6c65547269653a20696e76616c6964206c6172676520696e7465726e60448201527f616c2068617368000000000000000000000000000000000000000000000000006064820152608401610598565b80518451602080870191909120825191909201201461296b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4d65726b6c65547269653a20696e76616c696420696e7465726e616c206e6f6460448201527f65206861736800000000000000000000000000000000000000000000000000006064820152608401610598565b612977601060016154ab565b81602001515103612b585784518303612af05760006129b382602001516010815181106129a6576129a66154c3565b602002602001015161364f565b90506000815111612a46576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603b60248201527f4d65726b6c65547269653a2076616c7565206c656e677468206d75737420626560448201527f2067726561746572207468616e207a65726f20286272616e63682900000000006064820152608401610598565b60018751612a549190615165565b8314612ae2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f4d65726b6c65547269653a2076616c7565206e6f6465206d757374206265206c60448201527f617374206e6f646520696e2070726f6f6620286272616e6368290000000000006064820152608401610598565b965061248195505050505050565b6000858481518110612b0457612b046154c3565b602001015160f81c60f81b60f81c9050600082602001518260ff1681518110612b2f57612b2f6154c3565b60200260200101519050612b42816137af565b9550612b4f6001866154ab565b94505050612fde565b600281602001515103612f56576000612b70826137d4565b9050600081600081518110612b8757612b876154c3565b016020015160f81c90506000612b9e6002836155b6565b612ba99060026155d8565b90506000612bba848360ff166137f8565b90506000612bc88a896137f8565b90506000612bd6838361382e565b905080835114612c68576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f4d65726b6c65547269653a20706174682072656d61696e646572206d7573742060448201527f736861726520616c6c206e6962626c65732077697468206b65790000000000006064820152608401610598565b60ff851660021480612c7d575060ff85166003145b15612e715780825114612d12576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603d60248201527f4d65726b6c65547269653a206b65792072656d61696e646572206d757374206260448201527f65206964656e746963616c20746f20706174682072656d61696e6465720000006064820152608401610598565b6000612d2e88602001516001815181106129a6576129a66154c3565b90506000815111612dc1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f4d65726b6c65547269653a2076616c7565206c656e677468206d75737420626560448201527f2067726561746572207468616e207a65726f20286c65616629000000000000006064820152608401610598565b60018d51612dcf9190615165565b8914612e5d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f4d65726b6c65547269653a2076616c7565206e6f6465206d757374206265206c60448201527f617374206e6f646520696e2070726f6f6620286c6561662900000000000000006064820152608401610598565b9c506124819b505050505050505050505050565b60ff85161580612e84575060ff85166001145b15612ec357612eb08760200151600181518110612ea357612ea36154c3565b60200260200101516137af565b9950612ebc818a6154ab565b9850612f4b565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4d65726b6c65547269653a2072656365697665642061206e6f6465207769746860448201527f20616e20756e6b6e6f776e2070726566697800000000000000000000000000006064820152608401610598565b505050505050612fde565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f4d65726b6c65547269653a20726563656976656420616e20756e70617273656160448201527f626c65206e6f64650000000000000000000000000000000000000000000000006064820152608401610598565b5080612fe98161545f565b9150506126a3565b506040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4d65726b6c65547269653a2072616e206f7574206f662070726f6f6620656c6560448201527f6d656e74730000000000000000000000000000000000000000000000000000006064820152608401610598565b60008082136130e5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f554e444546494e454400000000000000000000000000000000000000000000006044820152606401610598565b600060606130f2846138dd565b03609f8181039490941b90931c6c465772b2bbbb5f824b15207a3081018102606090811d6d0388eaa27412d5aca026815d636e018202811d6d0df99ac502031bf953eff472fdcc018202811d6d13cdffb29d51d99322bdff5f2211018202811d6d0a0f742023def783a307a986912e018202811d6d01920d8043ca89b5239253284e42018202811d6c0b7a86d7375468fac667a0a527016c29508e458543d8aa4df2abee7883018302821d6d0139601a2efabe717e604cbb4894018302821d6d02247f7a7b6594320649aa03aba1018302821d7fffffffffffffffffffffffffffffffffffffff73c0c716a594e00d54e3c4cbc9018302821d7ffffffffffffffffffffffffffffffffffffffdc7b88c420e53a9890533129f6f01830290911d7fffffffffffffffffffffffffffffffffffffff465fda27eb4d63ded474e5f832019091027ffffffffffffffff5f6af8f7b3396644f18e157960000000000000000000000000105711340daa0d5f769dba1915cef59f0815a5506027d0267a36c0c95b3975ab3ee5b203a7614a3f75373f047d803ae7b6687f2b393909302929092017d57115e47018c7177eebf7cd370a3356a1b7863008a5ae8028c72b88642840160ae1d92915050565b60007ffffffffffffffffffffffffffffffffffffffffffffffffdb731c958f34d94c182136132ef57506000919050565b680755bf798b4a1bf1e58212613361576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4558505f4f564552464c4f5700000000000000000000000000000000000000006044820152606401610598565b6503782dace9d9604e83901b059150600060606bb17217f7d1cf79abc9e3b39884821b056b80000000000000000000000001901d6bb17217f7d1cf79abc9e3b39881029093037fffffffffffffffffffffffffffffffffffffffdbf3ccf1604d263450f02a550481018102606090811d6d0277594991cfc85f6e2461837cd9018202811d7fffffffffffffffffffffffffffffffffffffe5adedaa1cb095af9e4da10e363c018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d7ffffffffffffffffffffffffffffffffffffd38dc772608b0ae56cce01296c0eb018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084017ffffffffffffffffffffffffffffffffffffffe2c69812cf03b0763fd454a8f7e010290911d6e0587f503bb6ea29d25fcb7401964500190910279d835ebba824c98fb31b83b2ca45c000000000000000000000000010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b805160609060008167ffffffffffffffff81111561351d5761351d614a0f565b60405190808252806020026020018201604052801561356257816020015b604080518082019091526060808252602082015281526020019060019003908161353b5790505b50905060005b828110156135e457604051806040016040528086838151811061358d5761358d6154c3565b602002602001015181526020016135bc8784815181106135af576135af6154c3565b60200260200101516139b3565b8152508282815181106135d1576135d16154c3565b6020908102919091010152600101613568565b509392505050565b606080604051905082518060011b603f8101601f1916830160405280835250602084016020830160005b83811015613644578060011b82018184015160001a8060041c8253600f811660018301535050600101613616565b509295945050505050565b6060600080600061365f856139c6565b91945092509050600081600181111561367a5761367a6155fb565b14613707576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f524c505265616465723a206465636f646564206974656d207479706520666f7260448201527f206279746573206973206e6f7420612064617461206974656d000000000000006064820152608401610598565b61371182846154ab565b8551146137a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f524c505265616465723a2062797465732076616c756520636f6e7461696e732060448201527f616e20696e76616c69642072656d61696e6465720000000000000000000000006064820152608401610598565b61257b85602001518484614433565b606060208260000151106137cb576137c68261364f565b611082565b611082826144d4565b60606110826137f383602001516000815181106129a6576129a66154c3565b6135ec565b6060825182106138175750604080516020810190915260008152611082565b61248183838486516138299190615165565b6144ea565b60008060008351855110613843578351613846565b84515b90505b80821080156138cd5750838281518110613865576138656154c3565b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168583815181106138a4576138a46154c3565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016145b156135e457816001019150613849565b6000808211613948576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f554e444546494e454400000000000000000000000000000000000000000000006044820152606401610598565b5060016fffffffffffffffffffffffffffffffff821160071b82811c67ffffffffffffffff1060061b1782811c63ffffffff1060051b1782811c61ffff1060041b1782811c60ff10600390811b90911783811c600f1060021b1783811c909110821b1791821c111790565b60606110826139c1836146c2565b6147ab565b600080600080846000015111613a84576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620616e20524c50206974656d60448201527f206d7573742062652067726561746572207468616e207a65726f20746f20626560648201527f206465636f6461626c6500000000000000000000000000000000000000000000608482015260a401610598565b6020840151805160001a607f8111613aa957600060016000945094509450505061442c565b60b78111613cb7576000613abe608083615165565b905080876000015111613b79576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604e60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20737472696e67206c656e6774682060648201527f2873686f727420737472696e6729000000000000000000000000000000000000608482015260a401610598565b6001838101517fff00000000000000000000000000000000000000000000000000000000000000169082141580613bf257507f80000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000821610155b613ca4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604d60248201527f524c505265616465723a20696e76616c6964207072656669782c2073696e676c60448201527f652062797465203c203078383020617265206e6f74207072656669786564202860648201527f73686f727420737472696e672900000000000000000000000000000000000000608482015260a401610598565b506001955093506000925061442c915050565b60bf8111614005576000613ccc60b783615165565b905080876000015111613d87576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605160248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f74206265203e207468616e206c656e677468206f6620737472696e67206c656e60648201527f67746820286c6f6e6720737472696e6729000000000000000000000000000000608482015260a401610598565b60018301517fff00000000000000000000000000000000000000000000000000000000000000166000819003613e65576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f74206e6f74206861766520616e79206c656164696e67207a65726f7320286c6f60648201527f6e6720737472696e672900000000000000000000000000000000000000000000608482015260a401610598565b600184015160088302610100031c60378111613f29576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604860248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20353520627974657320286c6f6e6760648201527f20737472696e6729000000000000000000000000000000000000000000000000608482015260a401610598565b613f3381846154ab565b895111613fe8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604c60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20746f74616c206c656e677468202860648201527f6c6f6e6720737472696e67290000000000000000000000000000000000000000608482015260a401610598565b613ff38360016154ab565b975095506000945061442c9350505050565b60f781116140e657600061401a60c083615165565b9050808760000151116140d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e206c697374206c656e67746820287360648201527f686f7274206c6973742900000000000000000000000000000000000000000000608482015260a401610598565b60019550935084925061442c915050565b60006140f360f783615165565b9050808760000151116141ae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604d60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f74206265203e207468616e206c656e677468206f66206c697374206c656e677460648201527f6820286c6f6e67206c6973742900000000000000000000000000000000000000608482015260a401610598565b60018301517fff0000000000000000000000000000000000000000000000000000000000000016600081900361428c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604860248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f74206e6f74206861766520616e79206c656164696e67207a65726f7320286c6f60648201527f6e67206c69737429000000000000000000000000000000000000000000000000608482015260a401610598565b600184015160088302610100031c60378111614350576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604660248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20353520627974657320286c6f6e6760648201527f206c697374290000000000000000000000000000000000000000000000000000608482015260a401610598565b61435a81846154ab565b89511161440f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20746f74616c206c656e677468202860648201527f6c6f6e67206c6973742900000000000000000000000000000000000000000000608482015260a401610598565b61441a8360016154ab565b975095506001945061442c9350505050565b9193909250565b606060008267ffffffffffffffff81111561445057614450614a0f565b6040519080825280601f01601f19166020018201604052801561447a576020820181803683370190505b5090508260000361448c579050612481565b600061449885876154ab565b90506020820160005b858110156144b95782810151828201526020016144a1565b858111156144c8576000868301525b50919695505050505050565b6060611082826020015160008460000151614433565b60608182601f011015614559576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f770000000000000000000000000000000000006044820152606401610598565b8282840110156145c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f770000000000000000000000000000000000006044820152606401610598565b81830184511015614632576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f736c6963655f6f75744f66426f756e64730000000000000000000000000000006044820152606401610598565b60608215801561465157604051915060008252602082016040526146b9565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561468a578051835260209283019201614672565b5050858452601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016604052505b50949350505050565b6040805180820190915260008082526020820152600082511161478d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620616e20524c50206974656d60448201527f206d7573742062652067726561746572207468616e207a65726f20746f20626560648201527f206465636f6461626c6500000000000000000000000000000000000000000000608482015260a401610598565b50604080518082019091528151815260209182019181019190915290565b606060008060006147bb856139c6565b9194509250905060018160018111156147d6576147d66155fb565b14614863576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f524c505265616465723a206465636f646564206974656d207479706520666f7260448201527f206c697374206973206e6f742061206c697374206974656d00000000000000006064820152608401610598565b845161486f83856154ab565b146148fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f524c505265616465723a206c697374206974656d2068617320616e20696e766160448201527f6c696420646174612072656d61696e64657200000000000000000000000000006064820152608401610598565b6040805160208082526104208201909252600091816020015b60408051808201909152600080825260208201528152602001906001900390816149155790505090506000845b8751811015614a03576000806149886040518060400160405280858d6000015161496c9190615165565b8152602001858d6020015161498191906154ab565b90526139c6565b5091509150604051806040016040528083836149a491906154ab565b8152602001848c602001516149b991906154ab565b8152508585815181106149ce576149ce6154c3565b60209081029190910101526149e46001856154ab565b93506149f081836154ab565b6149fa90846154ab565b92505050614942565b50815295945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715614a8557614a85614a0f565b604052919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114614ab157600080fd5b919050565b600082601f830112614ac757600080fd5b813567ffffffffffffffff811115614ae157614ae1614a0f565b614b1260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601614a3e565b818152846020838601011115614b2757600080fd5b816020850160208301376000918101602001919091529392505050565b600060c08284031215614b5657600080fd5b60405160c0810167ffffffffffffffff8282108183111715614b7a57614b7a614a0f565b8160405282935084358352614b9160208601614a8d565b6020840152614ba260408601614a8d565b6040840152606085013560608401526080850135608084015260a0850135915080821115614bcf57600080fd5b50614bdc85828601614ab6565b60a0830152505092915050565b600080600080600085870360e0811215614c0257600080fd5b863567ffffffffffffffff80821115614c1a57600080fd5b614c268a838b01614b44565b97506020890135965060807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc084011215614c5f57600080fd5b60408901955060c0890135925080831115614c7957600080fd5b828901925089601f840112614c8d57600080fd5b8235915080821115614c9e57600080fd5b508860208260051b8401011115614cb457600080fd5b959894975092955050506020019190565b60005b83811015614ce0578181015183820152602001614cc8565b83811115614cef576000848401525b50505050565b60008151808452614d0d816020860160208601614cc5565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006124816020830184614cf5565b600060208284031215614d6457600080fd5b5035919050565b600060208284031215614d7d57600080fd5b813567ffffffffffffffff811115614d9457600080fd5b6121b784828501614b44565b803567ffffffffffffffff81168114614ab157600080fd5b600060208284031215614dca57600080fd5b61248182614da0565b80358015158114614ab157600080fd5b600060208284031215614df557600080fd5b61248182614dd3565b600080600080600060a08688031215614e1657600080fd5b614e1f86614a8d565b945060208601359350614e3460408701614da0565b9250614e4260608701614dd3565b9150608086013567ffffffffffffffff811115614e5e57600080fd5b614e6a88828901614ab6565b9150509295509295909350565b8581528460208201527fffffffffffffffff0000000000000000000000000000000000000000000000008460c01b16604082015282151560f81b604882015260008251614ecb816049850160208701614cc5565b919091016049019695505050505050565b80516fffffffffffffffffffffffffffffffff81168114614ab157600080fd5b600060608284031215614f0e57600080fd5b6040516060810181811067ffffffffffffffff82111715614f3157614f31614a0f565b60405282518152614f4460208401614edc565b6020820152614f5560408401614edc565b60408201529392505050565b600060808284031215614f7357600080fd5b6040516080810181811067ffffffffffffffff82111715614f9657614f96614a0f565b8060405250823581526020830135602082015260408301356040820152606083013560608201528091505092915050565b600067ffffffffffffffff80841115614fe257614fe2614a0f565b8360051b6020614ff3818301614a3e565b86815291850191818101903684111561500b57600080fd5b865b8481101561503f578035868111156150255760008081fd5b61503136828b01614ab6565b84525091830191830161500d565b50979650505050505050565b6000845161505d818460208901614cc5565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551615099816001850160208a01614cc5565b600192019182015283516150b4816002840160208801614cc5565b0160020195945050505050565b6000602082840312156150d357600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600067ffffffffffffffff80831681851681830481118215151615615130576151306150da565b02949350505050565b600067ffffffffffffffff80831681851680830382111561515c5761515c6150da565b01949350505050565b600082821015615177576151776150da565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826151ba576151ba61517c565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83147f80000000000000000000000000000000000000000000000000000000000000008314161561520e5761520e6150da565b500590565b6000808312837f80000000000000000000000000000000000000000000000000000000000000000183128115161561524d5761524d6150da565b837f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff018313811615615281576152816150da565b50500390565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000841360008413858304851182821616156152c8576152c86150da565b7f80000000000000000000000000000000000000000000000000000000000000006000871286820588128184161615615303576153036150da565b6000871292508782058712848416161561531f5761531f6150da565b87850587128184161615615335576153356150da565b505050929093029392505050565b6000808212827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0384138115161561537d5761537d6150da565b827f80000000000000000000000000000000000000000000000000000000000000000384128116156153b1576153b16150da565b50500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156153ef576153ef6150da565b500290565b6000826154035761540361517c565b500490565b868152600073ffffffffffffffffffffffffffffffffffffffff808816602084015280871660408401525084606083015283608083015260c060a083015261545360c0830184614cf5565b98975050505050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203615490576154906150da565b5060010190565b6000826154a6576154a661517c565b500690565b600082198211156154be576154be6150da565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b805163ffffffff81168114614ab157600080fd5b805160ff81168114614ab157600080fd5b600060c0828403121561552957600080fd5b60405160c0810181811067ffffffffffffffff8211171561554c5761554c614a0f565b604052615558836154f2565b815261556660208401615506565b602082015261557760408401615506565b6040820152615588606084016154f2565b6060820152615599608084016154f2565b60808201526155aa60a08401614edc565b60a08201529392505050565b600060ff8316806155c9576155c961517c565b8060ff84160691505092915050565b600060ff821660ff8416808210156155f2576155f26150da565b90039392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea164736f6c634300080f000a000000000000000000000000909e51211e959339efb14b36f5a50955a8ae37700000000000000000000000004a4962275df8c60a80d3a25faec5aa7de116a7460000000000000000000000000000000000000000000000000000000000000001000000000000000000000000f761cc49bb127ab666899b41cdc4e62fa50cd9ca
Deployed Bytecode
0x60806040526004361061012c5760003560e01c80638c3152e9116100a5578063cff0ab9611610074578063e965084c11610059578063e965084c14610417578063e9e05c42146104a3578063f0498750146104b657600080fd5b8063cff0ab9614610356578063d53a822f146103f757600080fd5b80638c3152e9146102a05780639bf62d82146102c0578063a14238e7146102ed578063a35d99df1461031d57600080fd5b80635c975abb116100fc578063724c184c116100e1578063724c184c146102575780638456cb591461028b5780638b4c40b01461015157600080fd5b80635c975abb1461020d5780636dbffb781461023757600080fd5b80621c2ff6146101585780633f4ba83a146101b65780634870496f146101cb57806354fd4d50146101eb57600080fd5b36610153576101513334620186a06000604051806020016040528060008152506104ea565b005b600080fd5b34801561016457600080fd5b5061018c7f000000000000000000000000909e51211e959339efb14b36f5a50955a8ae377081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156101c257600080fd5b50610151610785565b3480156101d757600080fd5b506101516101e6366004614be9565b6108a8565b3480156101f757600080fd5b50610200610f0e565b6040516101ad9190614d3f565b34801561021957600080fd5b506035546102279060ff1681565b60405190151581526020016101ad565b34801561024357600080fd5b50610227610252366004614d52565b610fb1565b34801561026357600080fd5b5061018c7f0000000000000000000000004a4962275df8c60a80d3a25faec5aa7de116a74681565b34801561029757600080fd5b50610151611088565b3480156102ac57600080fd5b506101516102bb366004614d6b565b6111a8565b3480156102cc57600080fd5b5060325461018c9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156102f957600080fd5b50610227610308366004614d52565b60336020526000908152604090205460ff1681565b34801561032957600080fd5b5061033d610338366004614db8565b611a83565b60405167ffffffffffffffff90911681526020016101ad565b34801561036257600080fd5b506001546103be906fffffffffffffffffffffffffffffffff81169067ffffffffffffffff7001000000000000000000000000000000008204811691780100000000000000000000000000000000000000000000000090041683565b604080516fffffffffffffffffffffffffffffffff909416845267ffffffffffffffff92831660208501529116908201526060016101ad565b34801561040357600080fd5b50610151610412366004614de3565b611a9c565b34801561042357600080fd5b50610475610432366004614d52565b603460205260009081526040902080546001909101546fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041683565b604080519384526fffffffffffffffffffffffffffffffff92831660208501529116908201526060016101ad565b6101516104b1366004614dfe565b6104ea565b3480156104c257600080fd5b5061018c7f000000000000000000000000f761cc49bb127ab666899b41cdc4e62fa50cd9ca81565b8260005a905083156105a15773ffffffffffffffffffffffffffffffffffffffff8716156105a157604080517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482015260248101919091527f4f7074696d69736d506f7274616c3a206d7573742073656e6420746f2061646460448201527f72657373283029207768656e206372656174696e67206120636f6e747261637460648201526084015b60405180910390fd5b6105ab8351611a83565b67ffffffffffffffff168567ffffffffffffffff16101561064e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f4f7074696d69736d506f7274616c3a20676173206c696d697420746f6f20736d60448201527f616c6c00000000000000000000000000000000000000000000000000000000006064820152608401610598565b6201d4c0835111156106bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f4f7074696d69736d506f7274616c3a206461746120746f6f206c6172676500006044820152606401610598565b333281146106dd575033731111000000000000000000000000000000001111015b600034888888886040516020016106f8959493929190614e77565b604051602081830303815290604052905060008973ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fb3813568d9991fc951961fcb4c784893574240a28925604d09fc577c55bb7c32846040516107689190614d3f565b60405180910390a4505061077c8282611ca5565b50505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004a4962275df8c60a80d3a25faec5aa7de116a746161461084a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4f7074696d69736d506f7274616c3a206f6e6c7920677561726469616e20636160448201527f6e20756e706175736500000000000000000000000000000000000000000000006064820152608401610598565b603580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556040513381527f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa906020015b60405180910390a1565b60355460ff1615610915576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f7074696d69736d506f7274616c3a20706175736564000000000000000000006044820152606401610598565b3073ffffffffffffffffffffffffffffffffffffffff16856040015173ffffffffffffffffffffffffffffffffffffffff16036109d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603f60248201527f4f7074696d69736d506f7274616c3a20796f752063616e6e6f742073656e642060448201527f6d6573736167657320746f2074686520706f7274616c20636f6e7472616374006064820152608401610598565b6040517fa25ae557000000000000000000000000000000000000000000000000000000008152600481018590526000907f000000000000000000000000909e51211e959339efb14b36f5a50955a8ae377073ffffffffffffffffffffffffffffffffffffffff169063a25ae55790602401606060405180830381865afa158015610a62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a869190614efc565b519050610aa0610a9b36869003860186614f61565b611fd2565b8114610b2e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4f7074696d69736d506f7274616c3a20696e76616c6964206f7574707574207260448201527f6f6f742070726f6f6600000000000000000000000000000000000000000000006064820152608401610598565b6000610b398761202e565b6000818152603460209081526040918290208251606081018452815481526001909101546fffffffffffffffffffffffffffffffff8082169383018490527001000000000000000000000000000000009091041692810192909252919250901580610c6b5750805160408083015190517fa25ae5570000000000000000000000000000000000000000000000000000000081526fffffffffffffffffffffffffffffffff90911660048201527f000000000000000000000000909e51211e959339efb14b36f5a50955a8ae377073ffffffffffffffffffffffffffffffffffffffff169063a25ae55790602401606060405180830381865afa158015610c43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c679190614efc565b5114155b610cf7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f4f7074696d69736d506f7274616c3a207769746864726177616c20686173682060448201527f68617320616c7265616479206265656e2070726f76656e0000000000000000006064820152608401610598565b60408051602081018490526000918101829052606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201209083018190529250610dc09101604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152828201909152600182527f0100000000000000000000000000000000000000000000000000000000000000602083015290610db6888a614fc7565b8a6040013561205e565b610e4c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4f7074696d69736d506f7274616c3a20696e76616c696420776974686472617760448201527f616c20696e636c7573696f6e2070726f6f6600000000000000000000000000006064820152608401610598565b604080516060810182528581526fffffffffffffffffffffffffffffffff42811660208084019182528c831684860190815260008981526034835286812095518655925190518416700100000000000000000000000000000000029316929092176001909301929092558b830151908c0151925173ffffffffffffffffffffffffffffffffffffffff918216939091169186917f67a6208cfcc0801d50f6cbe764733f4fddf66ac0b04442061a8a8c0cb6b63f629190a4505050505050505050565b6060610f397f0000000000000000000000000000000000000000000000000000000000000001612082565b610f627f0000000000000000000000000000000000000000000000000000000000000007612082565b610f8b7f0000000000000000000000000000000000000000000000000000000000000002612082565b604051602001610f9d9392919061504b565b604051602081830303815290604052905090565b6040517fa25ae557000000000000000000000000000000000000000000000000000000008152600481018290526000906110829073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000909e51211e959339efb14b36f5a50955a8ae3770169063a25ae55790602401606060405180830381865afa158015611043573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110679190614efc565b602001516fffffffffffffffffffffffffffffffff166121bf565b92915050565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004a4962275df8c60a80d3a25faec5aa7de116a746161461114d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4f7074696d69736d506f7274616c3a206f6e6c7920677561726469616e20636160448201527f6e207061757365000000000000000000000000000000000000000000000000006064820152608401610598565b603580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556040513381527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589060200161089e565b60355460ff1615611215576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f7074696d69736d506f7274616c3a20706175736564000000000000000000006044820152606401610598565b60325473ffffffffffffffffffffffffffffffffffffffff1661dead146112be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603f60248201527f4f7074696d69736d506f7274616c3a2063616e206f6e6c79207472696767657260448201527f206f6e65207769746864726177616c20706572207472616e73616374696f6e006064820152608401610598565b60006112c98261202e565b60008181526034602090815260408083208151606081018352815481526001909101546fffffffffffffffffffffffffffffffff808216948301859052700100000000000000000000000000000000909104169181019190915292935090036113b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4f7074696d69736d506f7274616c3a207769746864726177616c20686173206e60448201527f6f74206265656e2070726f76656e2079657400000000000000000000000000006064820152608401610598565b7f000000000000000000000000909e51211e959339efb14b36f5a50955a8ae377073ffffffffffffffffffffffffffffffffffffffff1663887862726040518163ffffffff1660e01b8152600401602060405180830381865afa15801561141f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061144391906150c1565b81602001516fffffffffffffffffffffffffffffffff16101561150e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604b60248201527f4f7074696d69736d506f7274616c3a207769746864726177616c2074696d657360448201527f74616d70206c657373207468616e204c32204f7261636c65207374617274696e60648201527f672074696d657374616d70000000000000000000000000000000000000000000608482015260a401610598565b61152d81602001516fffffffffffffffffffffffffffffffff166121bf565b6115df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604560248201527f4f7074696d69736d506f7274616c3a2070726f76656e2077697468647261776160448201527f6c2066696e616c697a6174696f6e20706572696f6420686173206e6f7420656c60648201527f6170736564000000000000000000000000000000000000000000000000000000608482015260a401610598565b60408181015190517fa25ae5570000000000000000000000000000000000000000000000000000000081526fffffffffffffffffffffffffffffffff90911660048201526000907f000000000000000000000000909e51211e959339efb14b36f5a50955a8ae377073ffffffffffffffffffffffffffffffffffffffff169063a25ae55790602401606060405180830381865afa158015611684573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a89190614efc565b8251815191925014611762576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604960248201527f4f7074696d69736d506f7274616c3a206f757470757420726f6f742070726f7660448201527f656e206973206e6f74207468652073616d652061732063757272656e74206f7560648201527f7470757420726f6f740000000000000000000000000000000000000000000000608482015260a401610598565b61178181602001516fffffffffffffffffffffffffffffffff166121bf565b611833576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f4f7074696d69736d506f7274616c3a206f75747075742070726f706f73616c2060448201527f66696e616c697a6174696f6e20706572696f6420686173206e6f7420656c617060648201527f7365640000000000000000000000000000000000000000000000000000000000608482015260a401610598565b60008381526033602052604090205460ff16156118d2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f4f7074696d69736d506f7274616c3a207769746864726177616c20686173206160448201527f6c7265616479206265656e2066696e616c697a656400000000000000000000006064820152608401610598565b600083815260336020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055908601516032805473ffffffffffffffffffffffffffffffffffffffff9092167fffffffffffffffffffffffff00000000000000000000000000000000000000009092169190911790558501516080860151606087015160a088015161197493929190612262565b603280547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead17905560405190915084907fdb5c7652857aa163daadd670e116628fb42e869d8ac4251ef8971d9e5727df1b906119d990841515815260200190565b60405180910390a2801580156119ef5750326001145b15611a7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4f7074696d69736d506f7274616c3a207769746864726177616c206661696c6560448201527f64000000000000000000000000000000000000000000000000000000000000006064820152608401610598565b5050505050565b6000611a90826010615109565b61108290615208615139565b600054610100900460ff1615808015611abc5750600054600160ff909116105b80611ad65750303b158015611ad6575060005460ff166001145b611b62576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610598565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015611bc057600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b603280547fffffffffffffffffffffffff00000000000000000000000000000000000000001661dead179055603580548315157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00909116179055611c226122c0565b8015611c8557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b73ffffffffffffffffffffffffffffffffffffffff163b151590565b600154600090611cdb907801000000000000000000000000000000000000000000000000900467ffffffffffffffff1643615165565b90506000611ce76123a3565b90506000816020015160ff16826000015163ffffffff16611d0891906151ab565b90508215611e3f57600154600090611d3f908390700100000000000000000000000000000000900467ffffffffffffffff16615213565b90506000836040015160ff1683611d569190615287565b600154611d769084906fffffffffffffffffffffffffffffffff16615287565b611d8091906151ab565b600154909150600090611dd190611daa9084906fffffffffffffffffffffffffffffffff16615343565b866060015163ffffffff168760a001516fffffffffffffffffffffffffffffffff16612469565b90506001861115611e0057611dfd611daa82876040015160ff1660018a611df89190615165565b612488565b90505b6fffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000067ffffffffffffffff4316021760015550505b60018054869190601090611e72908490700100000000000000000000000000000000900467ffffffffffffffff16615139565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550816000015163ffffffff16600160000160109054906101000a900467ffffffffffffffff1667ffffffffffffffff161315611f55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603e60248201527f5265736f757263654d65746572696e673a2063616e6e6f7420627579206d6f7260448201527f6520676173207468616e20617661696c61626c6520676173206c696d697400006064820152608401610598565b600154600090611f81906fffffffffffffffffffffffffffffffff1667ffffffffffffffff88166153b7565b90506000611f9348633b9aca006124dd565b611f9d90836153f4565b905060005a611fac9088615165565b905080821115611fc857611fc8611fc38284615165565b6124f4565b5050505050505050565b60008160000151826020015183604001518460600151604051602001612011949392919093845260208401929092526040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b80516020808301516040808501516060860151608087015160a08801519351600097612011979096959101615408565b60008061206a86612522565b905061207881868686612554565b9695505050505050565b6060816000036120c557505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156120ef57806120d98161545f565b91506120e89050600a836153f4565b91506120c9565b60008167ffffffffffffffff81111561210a5761210a614a0f565b6040519080825280601f01601f191660200182016040528015612134576020820181803683370190505b5090505b84156121b757612149600183615165565b9150612156600a86615497565b6121619060306154ab565b60f81b818381518110612176576121766154c3565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506121b0600a866153f4565b9450612138565b949350505050565b60007f000000000000000000000000909e51211e959339efb14b36f5a50955a8ae377073ffffffffffffffffffffffffffffffffffffffff1663f4daa2916040518163ffffffff1660e01b8152600401602060405180830381865afa15801561222c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061225091906150c1565b61225a90836154ab565b421192915050565b6000806000612272866000612584565b9050806122a8576308c379a06000526020805278185361666543616c6c3a204e6f7420656e6f756768206761736058526064601cfd5b600080855160208701888b5af1979650505050505050565b600054610100900460ff16612357576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610598565b60408051606081018252633b9aca00808252600060208301524367ffffffffffffffff169190920181905278010000000000000000000000000000000000000000000000000217600155565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a08101919091527f000000000000000000000000f761cc49bb127ab666899b41cdc4e62fa50cd9ca73ffffffffffffffffffffffffffffffffffffffff1663cc731b026040518163ffffffff1660e01b815260040160c060405180830381865afa158015612440573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124649190615517565b905090565b600061247e61247885856125a2565b836125b2565b90505b9392505050565b6000670de0b6b3a76400006124c96124a085836151ab565b6124b290670de0b6b3a7640000615213565b6124c485670de0b6b3a7640000615287565b6125c1565b6124d39086615287565b61247e91906151ab565b6000818310156124ed5781612481565b5090919050565b6000805a90505b825a6125079083615165565b101561251d576125168261545f565b91506124fb565b505050565b6060818051906020012060405160200161253e91815260200190565b6040516020818303038152906040529050919050565b600061257b846125658786866125f2565b8051602091820120825192909101919091201490565b95945050505050565b600080603f83619c4001026040850201603f5a021015949350505050565b6000818312156124ed5781612481565b60008183126124ed5781612481565b6000612481670de0b6b3a7640000836125d98661307a565b6125e39190615287565b6125ed91906151ab565b6132be565b6060600084511161265f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4d65726b6c65547269653a20656d707479206b657900000000000000000000006044820152606401610598565b600061266a846134fd565b90506000612677866135ec565b905060008460405160200161268e91815260200190565b60405160208183030381529060405290506000805b8451811015612ff15760008582815181106126c0576126c06154c3565b60200260200101519050845183111561275b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f4d65726b6c65547269653a206b657920696e646578206578636565647320746f60448201527f74616c206b6579206c656e6774680000000000000000000000000000000000006064820152608401610598565b8260000361281457805180516020918201206040516127a99261278392910190815260200190565b604051602081830303815290604052858051602091820120825192909101919091201490565b61280f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4d65726b6c65547269653a20696e76616c696420726f6f7420686173680000006044820152606401610598565b61296b565b8051516020116128ca578051805160209182012060405161283e9261278392910190815260200190565b61280f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4d65726b6c65547269653a20696e76616c6964206c6172676520696e7465726e60448201527f616c2068617368000000000000000000000000000000000000000000000000006064820152608401610598565b80518451602080870191909120825191909201201461296b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4d65726b6c65547269653a20696e76616c696420696e7465726e616c206e6f6460448201527f65206861736800000000000000000000000000000000000000000000000000006064820152608401610598565b612977601060016154ab565b81602001515103612b585784518303612af05760006129b382602001516010815181106129a6576129a66154c3565b602002602001015161364f565b90506000815111612a46576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603b60248201527f4d65726b6c65547269653a2076616c7565206c656e677468206d75737420626560448201527f2067726561746572207468616e207a65726f20286272616e63682900000000006064820152608401610598565b60018751612a549190615165565b8314612ae2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f4d65726b6c65547269653a2076616c7565206e6f6465206d757374206265206c60448201527f617374206e6f646520696e2070726f6f6620286272616e6368290000000000006064820152608401610598565b965061248195505050505050565b6000858481518110612b0457612b046154c3565b602001015160f81c60f81b60f81c9050600082602001518260ff1681518110612b2f57612b2f6154c3565b60200260200101519050612b42816137af565b9550612b4f6001866154ab565b94505050612fde565b600281602001515103612f56576000612b70826137d4565b9050600081600081518110612b8757612b876154c3565b016020015160f81c90506000612b9e6002836155b6565b612ba99060026155d8565b90506000612bba848360ff166137f8565b90506000612bc88a896137f8565b90506000612bd6838361382e565b905080835114612c68576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f4d65726b6c65547269653a20706174682072656d61696e646572206d7573742060448201527f736861726520616c6c206e6962626c65732077697468206b65790000000000006064820152608401610598565b60ff851660021480612c7d575060ff85166003145b15612e715780825114612d12576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603d60248201527f4d65726b6c65547269653a206b65792072656d61696e646572206d757374206260448201527f65206964656e746963616c20746f20706174682072656d61696e6465720000006064820152608401610598565b6000612d2e88602001516001815181106129a6576129a66154c3565b90506000815111612dc1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f4d65726b6c65547269653a2076616c7565206c656e677468206d75737420626560448201527f2067726561746572207468616e207a65726f20286c65616629000000000000006064820152608401610598565b60018d51612dcf9190615165565b8914612e5d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f4d65726b6c65547269653a2076616c7565206e6f6465206d757374206265206c60448201527f617374206e6f646520696e2070726f6f6620286c6561662900000000000000006064820152608401610598565b9c506124819b505050505050505050505050565b60ff85161580612e84575060ff85166001145b15612ec357612eb08760200151600181518110612ea357612ea36154c3565b60200260200101516137af565b9950612ebc818a6154ab565b9850612f4b565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4d65726b6c65547269653a2072656365697665642061206e6f6465207769746860448201527f20616e20756e6b6e6f776e2070726566697800000000000000000000000000006064820152608401610598565b505050505050612fde565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f4d65726b6c65547269653a20726563656976656420616e20756e70617273656160448201527f626c65206e6f64650000000000000000000000000000000000000000000000006064820152608401610598565b5080612fe98161545f565b9150506126a3565b506040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4d65726b6c65547269653a2072616e206f7574206f662070726f6f6620656c6560448201527f6d656e74730000000000000000000000000000000000000000000000000000006064820152608401610598565b60008082136130e5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f554e444546494e454400000000000000000000000000000000000000000000006044820152606401610598565b600060606130f2846138dd565b03609f8181039490941b90931c6c465772b2bbbb5f824b15207a3081018102606090811d6d0388eaa27412d5aca026815d636e018202811d6d0df99ac502031bf953eff472fdcc018202811d6d13cdffb29d51d99322bdff5f2211018202811d6d0a0f742023def783a307a986912e018202811d6d01920d8043ca89b5239253284e42018202811d6c0b7a86d7375468fac667a0a527016c29508e458543d8aa4df2abee7883018302821d6d0139601a2efabe717e604cbb4894018302821d6d02247f7a7b6594320649aa03aba1018302821d7fffffffffffffffffffffffffffffffffffffff73c0c716a594e00d54e3c4cbc9018302821d7ffffffffffffffffffffffffffffffffffffffdc7b88c420e53a9890533129f6f01830290911d7fffffffffffffffffffffffffffffffffffffff465fda27eb4d63ded474e5f832019091027ffffffffffffffff5f6af8f7b3396644f18e157960000000000000000000000000105711340daa0d5f769dba1915cef59f0815a5506027d0267a36c0c95b3975ab3ee5b203a7614a3f75373f047d803ae7b6687f2b393909302929092017d57115e47018c7177eebf7cd370a3356a1b7863008a5ae8028c72b88642840160ae1d92915050565b60007ffffffffffffffffffffffffffffffffffffffffffffffffdb731c958f34d94c182136132ef57506000919050565b680755bf798b4a1bf1e58212613361576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4558505f4f564552464c4f5700000000000000000000000000000000000000006044820152606401610598565b6503782dace9d9604e83901b059150600060606bb17217f7d1cf79abc9e3b39884821b056b80000000000000000000000001901d6bb17217f7d1cf79abc9e3b39881029093037fffffffffffffffffffffffffffffffffffffffdbf3ccf1604d263450f02a550481018102606090811d6d0277594991cfc85f6e2461837cd9018202811d7fffffffffffffffffffffffffffffffffffffe5adedaa1cb095af9e4da10e363c018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d7ffffffffffffffffffffffffffffffffffffd38dc772608b0ae56cce01296c0eb018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084017ffffffffffffffffffffffffffffffffffffffe2c69812cf03b0763fd454a8f7e010290911d6e0587f503bb6ea29d25fcb7401964500190910279d835ebba824c98fb31b83b2ca45c000000000000000000000000010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b805160609060008167ffffffffffffffff81111561351d5761351d614a0f565b60405190808252806020026020018201604052801561356257816020015b604080518082019091526060808252602082015281526020019060019003908161353b5790505b50905060005b828110156135e457604051806040016040528086838151811061358d5761358d6154c3565b602002602001015181526020016135bc8784815181106135af576135af6154c3565b60200260200101516139b3565b8152508282815181106135d1576135d16154c3565b6020908102919091010152600101613568565b509392505050565b606080604051905082518060011b603f8101601f1916830160405280835250602084016020830160005b83811015613644578060011b82018184015160001a8060041c8253600f811660018301535050600101613616565b509295945050505050565b6060600080600061365f856139c6565b91945092509050600081600181111561367a5761367a6155fb565b14613707576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f524c505265616465723a206465636f646564206974656d207479706520666f7260448201527f206279746573206973206e6f7420612064617461206974656d000000000000006064820152608401610598565b61371182846154ab565b8551146137a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f524c505265616465723a2062797465732076616c756520636f6e7461696e732060448201527f616e20696e76616c69642072656d61696e6465720000000000000000000000006064820152608401610598565b61257b85602001518484614433565b606060208260000151106137cb576137c68261364f565b611082565b611082826144d4565b60606110826137f383602001516000815181106129a6576129a66154c3565b6135ec565b6060825182106138175750604080516020810190915260008152611082565b61248183838486516138299190615165565b6144ea565b60008060008351855110613843578351613846565b84515b90505b80821080156138cd5750838281518110613865576138656154c3565b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168583815181106138a4576138a46154c3565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016145b156135e457816001019150613849565b6000808211613948576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f554e444546494e454400000000000000000000000000000000000000000000006044820152606401610598565b5060016fffffffffffffffffffffffffffffffff821160071b82811c67ffffffffffffffff1060061b1782811c63ffffffff1060051b1782811c61ffff1060041b1782811c60ff10600390811b90911783811c600f1060021b1783811c909110821b1791821c111790565b60606110826139c1836146c2565b6147ab565b600080600080846000015111613a84576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620616e20524c50206974656d60448201527f206d7573742062652067726561746572207468616e207a65726f20746f20626560648201527f206465636f6461626c6500000000000000000000000000000000000000000000608482015260a401610598565b6020840151805160001a607f8111613aa957600060016000945094509450505061442c565b60b78111613cb7576000613abe608083615165565b905080876000015111613b79576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604e60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20737472696e67206c656e6774682060648201527f2873686f727420737472696e6729000000000000000000000000000000000000608482015260a401610598565b6001838101517fff00000000000000000000000000000000000000000000000000000000000000169082141580613bf257507f80000000000000000000000000000000000000000000000000000000000000007fff00000000000000000000000000000000000000000000000000000000000000821610155b613ca4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604d60248201527f524c505265616465723a20696e76616c6964207072656669782c2073696e676c60448201527f652062797465203c203078383020617265206e6f74207072656669786564202860648201527f73686f727420737472696e672900000000000000000000000000000000000000608482015260a401610598565b506001955093506000925061442c915050565b60bf8111614005576000613ccc60b783615165565b905080876000015111613d87576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605160248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f74206265203e207468616e206c656e677468206f6620737472696e67206c656e60648201527f67746820286c6f6e6720737472696e6729000000000000000000000000000000608482015260a401610598565b60018301517fff00000000000000000000000000000000000000000000000000000000000000166000819003613e65576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f74206e6f74206861766520616e79206c656164696e67207a65726f7320286c6f60648201527f6e6720737472696e672900000000000000000000000000000000000000000000608482015260a401610598565b600184015160088302610100031c60378111613f29576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604860248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20353520627974657320286c6f6e6760648201527f20737472696e6729000000000000000000000000000000000000000000000000608482015260a401610598565b613f3381846154ab565b895111613fe8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604c60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20746f74616c206c656e677468202860648201527f6c6f6e6720737472696e67290000000000000000000000000000000000000000608482015260a401610598565b613ff38360016154ab565b975095506000945061442c9350505050565b60f781116140e657600061401a60c083615165565b9050808760000151116140d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e206c697374206c656e67746820287360648201527f686f7274206c6973742900000000000000000000000000000000000000000000608482015260a401610598565b60019550935084925061442c915050565b60006140f360f783615165565b9050808760000151116141ae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604d60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f74206265203e207468616e206c656e677468206f66206c697374206c656e677460648201527f6820286c6f6e67206c6973742900000000000000000000000000000000000000608482015260a401610598565b60018301517fff0000000000000000000000000000000000000000000000000000000000000016600081900361428c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604860248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f74206e6f74206861766520616e79206c656164696e67207a65726f7320286c6f60648201527f6e67206c69737429000000000000000000000000000000000000000000000000608482015260a401610598565b600184015160088302610100031c60378111614350576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604660248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20353520627974657320286c6f6e6760648201527f206c697374290000000000000000000000000000000000000000000000000000608482015260a401610598565b61435a81846154ab565b89511161440f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620636f6e74656e74206d757360448201527f742062652067726561746572207468616e20746f74616c206c656e677468202860648201527f6c6f6e67206c6973742900000000000000000000000000000000000000000000608482015260a401610598565b61441a8360016154ab565b975095506001945061442c9350505050565b9193909250565b606060008267ffffffffffffffff81111561445057614450614a0f565b6040519080825280601f01601f19166020018201604052801561447a576020820181803683370190505b5090508260000361448c579050612481565b600061449885876154ab565b90506020820160005b858110156144b95782810151828201526020016144a1565b858111156144c8576000868301525b50919695505050505050565b6060611082826020015160008460000151614433565b60608182601f011015614559576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f770000000000000000000000000000000000006044820152606401610598565b8282840110156145c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736c6963655f6f766572666c6f770000000000000000000000000000000000006044820152606401610598565b81830184511015614632576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f736c6963655f6f75744f66426f756e64730000000000000000000000000000006044820152606401610598565b60608215801561465157604051915060008252602082016040526146b9565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561468a578051835260209283019201614672565b5050858452601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016604052505b50949350505050565b6040805180820190915260008082526020820152600082511161478d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604a60248201527f524c505265616465723a206c656e677468206f6620616e20524c50206974656d60448201527f206d7573742062652067726561746572207468616e207a65726f20746f20626560648201527f206465636f6461626c6500000000000000000000000000000000000000000000608482015260a401610598565b50604080518082019091528151815260209182019181019190915290565b606060008060006147bb856139c6565b9194509250905060018160018111156147d6576147d66155fb565b14614863576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f524c505265616465723a206465636f646564206974656d207479706520666f7260448201527f206c697374206973206e6f742061206c697374206974656d00000000000000006064820152608401610598565b845161486f83856154ab565b146148fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f524c505265616465723a206c697374206974656d2068617320616e20696e766160448201527f6c696420646174612072656d61696e64657200000000000000000000000000006064820152608401610598565b6040805160208082526104208201909252600091816020015b60408051808201909152600080825260208201528152602001906001900390816149155790505090506000845b8751811015614a03576000806149886040518060400160405280858d6000015161496c9190615165565b8152602001858d6020015161498191906154ab565b90526139c6565b5091509150604051806040016040528083836149a491906154ab565b8152602001848c602001516149b991906154ab565b8152508585815181106149ce576149ce6154c3565b60209081029190910101526149e46001856154ab565b93506149f081836154ab565b6149fa90846154ab565b92505050614942565b50815295945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715614a8557614a85614a0f565b604052919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114614ab157600080fd5b919050565b600082601f830112614ac757600080fd5b813567ffffffffffffffff811115614ae157614ae1614a0f565b614b1260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601614a3e565b818152846020838601011115614b2757600080fd5b816020850160208301376000918101602001919091529392505050565b600060c08284031215614b5657600080fd5b60405160c0810167ffffffffffffffff8282108183111715614b7a57614b7a614a0f565b8160405282935084358352614b9160208601614a8d565b6020840152614ba260408601614a8d565b6040840152606085013560608401526080850135608084015260a0850135915080821115614bcf57600080fd5b50614bdc85828601614ab6565b60a0830152505092915050565b600080600080600085870360e0811215614c0257600080fd5b863567ffffffffffffffff80821115614c1a57600080fd5b614c268a838b01614b44565b97506020890135965060807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc084011215614c5f57600080fd5b60408901955060c0890135925080831115614c7957600080fd5b828901925089601f840112614c8d57600080fd5b8235915080821115614c9e57600080fd5b508860208260051b8401011115614cb457600080fd5b959894975092955050506020019190565b60005b83811015614ce0578181015183820152602001614cc8565b83811115614cef576000848401525b50505050565b60008151808452614d0d816020860160208601614cc5565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006124816020830184614cf5565b600060208284031215614d6457600080fd5b5035919050565b600060208284031215614d7d57600080fd5b813567ffffffffffffffff811115614d9457600080fd5b6121b784828501614b44565b803567ffffffffffffffff81168114614ab157600080fd5b600060208284031215614dca57600080fd5b61248182614da0565b80358015158114614ab157600080fd5b600060208284031215614df557600080fd5b61248182614dd3565b600080600080600060a08688031215614e1657600080fd5b614e1f86614a8d565b945060208601359350614e3460408701614da0565b9250614e4260608701614dd3565b9150608086013567ffffffffffffffff811115614e5e57600080fd5b614e6a88828901614ab6565b9150509295509295909350565b8581528460208201527fffffffffffffffff0000000000000000000000000000000000000000000000008460c01b16604082015282151560f81b604882015260008251614ecb816049850160208701614cc5565b919091016049019695505050505050565b80516fffffffffffffffffffffffffffffffff81168114614ab157600080fd5b600060608284031215614f0e57600080fd5b6040516060810181811067ffffffffffffffff82111715614f3157614f31614a0f565b60405282518152614f4460208401614edc565b6020820152614f5560408401614edc565b60408201529392505050565b600060808284031215614f7357600080fd5b6040516080810181811067ffffffffffffffff82111715614f9657614f96614a0f565b8060405250823581526020830135602082015260408301356040820152606083013560608201528091505092915050565b600067ffffffffffffffff80841115614fe257614fe2614a0f565b8360051b6020614ff3818301614a3e565b86815291850191818101903684111561500b57600080fd5b865b8481101561503f578035868111156150255760008081fd5b61503136828b01614ab6565b84525091830191830161500d565b50979650505050505050565b6000845161505d818460208901614cc5565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551615099816001850160208a01614cc5565b600192019182015283516150b4816002840160208801614cc5565b0160020195945050505050565b6000602082840312156150d357600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600067ffffffffffffffff80831681851681830481118215151615615130576151306150da565b02949350505050565b600067ffffffffffffffff80831681851680830382111561515c5761515c6150da565b01949350505050565b600082821015615177576151776150da565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826151ba576151ba61517c565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83147f80000000000000000000000000000000000000000000000000000000000000008314161561520e5761520e6150da565b500590565b6000808312837f80000000000000000000000000000000000000000000000000000000000000000183128115161561524d5761524d6150da565b837f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff018313811615615281576152816150da565b50500390565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000841360008413858304851182821616156152c8576152c86150da565b7f80000000000000000000000000000000000000000000000000000000000000006000871286820588128184161615615303576153036150da565b6000871292508782058712848416161561531f5761531f6150da565b87850587128184161615615335576153356150da565b505050929093029392505050565b6000808212827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0384138115161561537d5761537d6150da565b827f80000000000000000000000000000000000000000000000000000000000000000384128116156153b1576153b16150da565b50500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156153ef576153ef6150da565b500290565b6000826154035761540361517c565b500490565b868152600073ffffffffffffffffffffffffffffffffffffffff808816602084015280871660408401525084606083015283608083015260c060a083015261545360c0830184614cf5565b98975050505050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203615490576154906150da565b5060010190565b6000826154a6576154a661517c565b500690565b600082198211156154be576154be6150da565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b805163ffffffff81168114614ab157600080fd5b805160ff81168114614ab157600080fd5b600060c0828403121561552957600080fd5b60405160c0810181811067ffffffffffffffff8211171561554c5761554c614a0f565b604052615558836154f2565b815261556660208401615506565b602082015261557760408401615506565b6040820152615588606084016154f2565b6060820152615599608084016154f2565b60808201526155aa60a08401614edc565b60a08201529392505050565b600060ff8316806155c9576155c961517c565b8060ff84160691505092915050565b600060ff821660ff8416808210156155f2576155f26150da565b90039392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea164736f6c634300080f000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000909e51211e959339efb14b36f5a50955a8ae37700000000000000000000000004a4962275df8c60a80d3a25faec5aa7de116a7460000000000000000000000000000000000000000000000000000000000000001000000000000000000000000f761cc49bb127ab666899b41cdc4e62fa50cd9ca
-----Decoded View---------------
Arg [0] : _l2Oracle (address): 0x909E51211e959339EFb14b36f5A50955a8ae3770
Arg [1] : _guardian (address): 0x4a4962275DF8C60a80d3a25faEc5AA7De116A746
Arg [2] : _paused (bool): True
Arg [3] : _config (address): 0xF761Cc49bB127AB666899b41CDC4E62fA50cD9ca
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000909e51211e959339efb14b36f5a50955a8ae3770
Arg [1] : 0000000000000000000000004a4962275df8c60a80d3a25faec5aa7de116a746
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [3] : 000000000000000000000000f761cc49bb127ab666899b41cdc4e62fa50cd9ca
Deployed Bytecode Sourcemap
1054:19866:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7058:86;7077:10;7089:9;1784:7;7127:5;7134:9;;;;;;;;;;;;7058:18;:86::i;:::-;1054:19866;;;;;1854:41;;;;;;;;;;;;;;;;;;212:42:28;200:55;;;182:74;;170:2;155:18;1854:41:1;;;;;;;;5807:180;;;;;;;;;;;;;:::i;8268:3838::-;;;;;;;;;;-1:-1:-1;8268:3838:1;;;;;:::i;:::-;;:::i;972:372:16:-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;2863:18:1:-;;;;;;;;;;-1:-1:-1;2863:18:1;;;;;;;;;;;4644:14:28;;4637:22;4619:41;;4607:2;4592:18;2863::1;4479:187:28;20303:181:1;;;;;;;;;;-1:-1:-1;20303:181:1;;;;;:::i;:::-;;:::i;2085:33::-;;;;;;;;;;;;;;;5590:173;;;;;;;;;;;;;:::i;12219:4963::-;;;;;;;;;;-1:-1:-1;12219:4963:1;;;;;:::i;:::-;;:::i;2374:23::-;;;;;;;;;;-1:-1:-1;2374:23:1;;;;;;;;2488:52;;;;;;;;;;-1:-1:-1;2488:52:1;;;;;:::i;:::-;;;;;;;;;;;;;;;;6480:120;;;;;;;;;;-1:-1:-1;6480:120:1;;;;;:::i;:::-;;:::i;:::-;;;6189:18:28;6177:31;;;6159:50;;6147:2;6132:18;6480:120:1;6015:200:28;2997:28:2;;;;;;;;;;-1:-1:-1;2997:28:2;;;;;;;;;;;;;;;;;;;;;;;;;6448:34:28;6436:47;;;6418:66;;6503:18;6557:15;;;6552:2;6537:18;;6530:43;6609:15;;6589:18;;;6582:43;6406:2;6391:18;2997:28:2;6220:411:28;5379:169:1;;;;;;;;;;-1:-1:-1;5379:169:1;;;;;:::i;:::-;;:::i;2622:61::-;;;;;;;;;;-1:-1:-1;2622:61:1;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7188:25:28;;;7232:34;7302:15;;;7297:2;7282:18;;7275:43;7354:15;;7334:18;;;7327:43;7176:2;7161:18;2622:61:1;6986:390:28;17912:2093:1;;;;;;:::i;:::-;;:::i;1956:43::-;;;;;;;;;;;;;;;17912:2093;18094:9;3415:18:2;3436:9;3415:30;;18244:11:1::1;18240:182;;;18296:17;::::0;::::1;::::0;18271:140:::1;;;::::0;;::::1;::::0;;8444:2:28;18271:140:1::1;::::0;::::1;8426:21:28::0;8463:18;;;8456:30;;;;8522:34;8502:18;;;8495:62;8593:34;8573:18;;;8566:62;8645:19;;18271:140:1::1;;;;;;;;;18603:37;18626:5;:12;18603:15;:37::i;:::-;18590:50;;:9;:50;;;;18569:132;;;::::0;::::1;::::0;;8877:2:28;18569:132:1::1;::::0;::::1;8859:21:28::0;8916:2;8896:18;;;8889:30;8955:34;8935:18;;;8928:62;9026:5;9006:18;;;8999:33;9049:19;;18569:132:1::1;8675:399:28::0;18569:132:1::1;19096:7;19080:5;:12;:23;;19072:66;;;::::0;::::1;::::0;;9281:2:28;19072:66:1::1;::::0;::::1;9263:21:28::0;9320:2;9300:18;;;9293:30;9359:32;9339:18;;;9332:60;9409:18;;19072:66:1::1;9079:354:28::0;19072:66:1::1;19244:10;19282:9;19268:23:::0;::::1;19264:108;;-1:-1:-1::0;19350:10:1::1;741:42:17::0;1213:27;19264:108:1::1;19629:23;19685:9;19708:6;19728:9;19751:11;19776:5;19655:136;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;19629:162;;1634:1;19965:3;19938:60;;19959:4;19938:60;;;19987:10;19938:60;;;;;;:::i;:::-;;;;;;;;18105:1900;;3546:29:2::0;3555:7;3564:10;3546:8;:29::i;:::-;3337:245;17912:2093:1;;;;;;:::o;5807:180::-;5853:10;:22;5867:8;5853:22;;5845:76;;;;;;;10510:2:28;5845:76:1;;;10492:21:28;10549:2;10529:18;;;10522:30;10588:34;10568:18;;;10561:62;10659:11;10639:18;;;10632:39;10688:19;;5845:76:1;10308:405:28;5845:76:1;5931:6;:14;;;;;;5960:20;;5969:10;182:74:28;;5960:20:1;;170:2:28;155:18;5960:20:1;;;;;;;;5807:180::o;8268:3838::-;4667:6;;;;:15;4659:50;;;;;;;10920:2:28;4659:50:1;;;10902:21:28;10959:2;10939:18;;;10932:30;10998:24;10978:18;;;10971:52;11040:18;;4659:50:1;10718:346:28;4659:50:1;8793:4:::1;8771:27;;:3;:10;;;:27;;::::0;8750:137:::1;;;::::0;::::1;::::0;;11271:2:28;8750:137:1::1;::::0;::::1;11253:21:28::0;11310:2;11290:18;;;11283:30;11349:34;11329:18;;;11322:62;11420:33;11400:18;;;11393:61;11471:19;;8750:137:1::1;11069:427:28::0;8750:137:1::1;9085:37;::::0;;;;::::1;::::0;::::1;11647:25:28::0;;;9064:18:1::1;::::0;9085:9:::1;:21;;::::0;::::1;::::0;11620:18:28;;9085:37:1::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:48:::0;;-1:-1:-1;9267:45:1::1;;;::::0;;::::1;::::0;::::1;9295:16:::0;9267:45:::1;:::i;:::-;:27;:45::i;:::-;9253:10;:59;9232:147;;;::::0;::::1;::::0;;13353:2:28;9232:147:1::1;::::0;::::1;13335:21:28::0;13392:2;13372:18;;;13365:30;13431:34;13411:18;;;13404:62;13502:11;13482:18;;;13475:39;13531:19;;9232:147:1::1;13151:405:28::0;9232:147:1::1;9490:22;9515:27;9538:3;9515:22;:27::i;:::-;9552:40;9595:33:::0;;;:17:::1;:33;::::0;;;;;;;;9552:76;;::::1;::::0;::::1;::::0;;;;;;::::1;::::0;;::::1;::::0;::::1;::::0;;::::1;::::0;;::::1;::::0;;;;;;::::1;;::::0;;;;;;;9490:52;;-1:-1:-1;9552:76:1;10182:31;;:162:::1;;-1:-1:-1::0;10317:27:1;;10255:30:::1;::::0;;::::1;::::0;10233:53;;;;;13737:34:28;13725:47;;;10233:53:1::1;::::0;::::1;13707:66:28::0;10233:9:1::1;:21;;::::0;::::1;::::0;13680:18:28;;10233:53:1::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:64:::0;:111:::1;;10182:162;10161:264;;;::::0;::::1;::::0;;13986:2:28;10161:264:1::1;::::0;::::1;13968:21:28::0;14025:2;14005:18;;;13998:30;14064:34;14044:18;;;14037:62;14135:25;14115:18;;;14108:53;14178:19;;10161:264:1::1;13784:419:28::0;10161:264:1::1;10705:147;::::0;;::::1;::::0;::::1;14382:25:28::0;;;10661:18:1::1;14423::28::0;;;14416:34;;;14355:18;;10705:147:1::1;::::0;;;;;::::1;::::0;;;;;;10682:180;;10705:147:::1;10682:180:::0;;::::1;::::0;11270:22;;::::1;11647:25:28::0;;;10682:180:1;-1:-1:-1;11215:209:1::1;::::0;11620:18:28;11270:22:1::1;::::0;;;;;::::1;::::0;;;11215:209;;::::1;::::0;;;::::1;::::0;;::::1;11270:22;11215:209:::0;::::1;::::0;11270:22;11215:209:::1;11335:16:::0;;11215:209:::1;:::i;:::-;11369:16;:41;;;11215:37;:209::i;:::-;11194:306;;;::::0;::::1;::::0;;15784:2:28;11194:306:1::1;::::0;::::1;15766:21:28::0;15823:2;15803:18;;;15796:30;15862:34;15842:18;;;15835:62;15933:20;15913:18;;;15906:48;15971:19;;11194:306:1::1;15582:414:28::0;11194:306:1::1;11818:165;::::0;;::::1;::::0;::::1;::::0;;;;;::::1;11904:15;11818:165:::0;::::1;;::::0;;::::1;::::0;;;;;::::1;::::0;;;;;;-1:-1:-1;11782:33:1;;;:17:::1;:33:::0;;;;;:201;;;;;;;;;::::1;::::0;::::1;::::0;::::1;::::0;;;::::1;;::::0;;::::1;::::0;;;;12088:10;;::::1;::::0;12076;;::::1;::::0;12043:56;;::::1;::::0;;::::1;::::0;;;::::1;::::0;11800:14;;12043:56:::1;::::0;-1:-1:-1;12043:56:1::1;8513:3593;;;;8268:3838:::0;;;;;:::o;972:372:16:-;1012:13;1118:31;1135:13;1118:16;:31::i;:::-;1196;1213:13;1196:16;:31::i;:::-;1274;1291:13;1274:16;:31::i;:::-;1080:243;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;1037:300;;972:372;:::o;20303:181:1:-;20429:37;;;;;;;;11647:25:28;;;20377:4:1;;20400:77;;20429:21;:9;:21;;;;11620:18:28;;20429:37:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:47;;;20400:77;;:28;:77::i;:::-;20393:84;20303:181;-1:-1:-1;;20303:181:1:o;5590:173::-;5634:10;:22;5648:8;5634:22;;5626:74;;;;;;;17168:2:28;5626:74:1;;;17150:21:28;17207:2;17187:18;;;17180:30;17246:34;17226:18;;;17219:62;17317:9;17297:18;;;17290:37;17344:19;;5626:74:1;16966:403:28;5626:74:1;5710:6;:13;;;;5719:4;5710:13;;;5738:18;;5745:10;182:74:28;;5738:18:1;;170:2:28;155:18;5738::1;14:248:28;12219:4963:1;4667:6;;;;:15;4659:50;;;;;;;10920:2:28;4659:50:1;;;10902:21:28;10959:2;10939:18;;;10932:30;10998:24;10978:18;;;10971:52;11040:18;;4659:50:1;10718:346:28;4659:50:1;12607:8:::1;::::0;:39:::1;:8;1337:42:7;12607:39:1;12586:149;;;::::0;::::1;::::0;;17576:2:28;12586:149:1::1;::::0;::::1;17558:21:28::0;17615:2;17595:18;;;17588:30;17654:34;17634:18;;;17627:62;17725:33;17705:18;;;17698:61;17776:19;;12586:149:1::1;17374:427:28::0;12586:149:1::1;12818:22;12843:27;12866:3;12843:22;:27::i;:::-;12880:40;12923:33:::0;;;:17:::1;:33;::::0;;;;;;;12880:76;;::::1;::::0;::::1;::::0;;;;;;::::1;::::0;;::::1;::::0;::::1;::::0;;::::1;::::0;;::::1;::::0;;;;;;::::1;;::::0;;;;;;;12818:52;;-1:-1:-1;13219:31:1;;13198:128:::1;;;::::0;::::1;::::0;;18008:2:28;13198:128:1::1;::::0;::::1;17990:21:28::0;18047:2;18027:18;;;18020:30;18086:34;18066:18;;;18059:62;18157:20;18137:18;;;18130:48;18195:19;;13198:128:1::1;17806:414:28::0;13198:128:1::1;13643:9;:27;;;:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;13613:16;:26;;;:59;;;;13592:181;;;::::0;::::1;::::0;;18616:2:28;13592:181:1::1;::::0;::::1;18598:21:28::0;18655:2;18635:18;;;18628:30;18694:34;18674:18;;;18667:62;18765:34;18745:18;;;18738:62;18837:13;18816:19;;;18809:42;18868:19;;13592:181:1::1;18414:479:28::0;13592:181:1::1;14163:56;14192:16;:26;;;14163:56;;:28;:56::i;:::-;14142:172;;;::::0;::::1;::::0;;19100:2:28;14142:172:1::1;::::0;::::1;19082:21:28::0;19139:2;19119:18;;;19112:30;19178:34;19158:18;;;19151:62;19249:34;19229:18;;;19222:62;19321:7;19300:19;;;19293:36;19346:19;;14142:172:1::1;18898:473:28::0;14142:172:1::1;14559:30;::::0;;::::1;::::0;14524:75;;;;;13737:34:28;13725:47;;;14524:75:1::1;::::0;::::1;13707:66:28::0;14485:36:1::1;::::0;14524:9:::1;:21;;::::0;::::1;::::0;13680:18:28;;14524:75:1::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;14910:27:::0;;14887:19;;14485:114;;-1:-1:-1;14887:50:1::1;14866:170;;;::::0;::::1;::::0;;19578:2:28;14866:170:1::1;::::0;::::1;19560:21:28::0;19617:2;19597:18;;;19590:30;19656:34;19636:18;;;19629:62;19727:34;19707:18;;;19700:62;19799:11;19778:19;;;19771:40;19828:19;;14866:170:1::1;19376:477:28::0;14866:170:1::1;15135:48;15164:8;:18;;;15135:48;;:28;:48::i;:::-;15114:162;;;::::0;::::1;::::0;;20060:2:28;15114:162:1::1;::::0;::::1;20042:21:28::0;20099:2;20079:18;;;20072:30;20138:34;20118:18;;;20111:62;20209:34;20189:18;;;20182:62;20281:5;20260:19;;;20253:34;20304:19;;15114:162:1::1;19858:471:28::0;15114:162:1::1;15405:36;::::0;;;:20:::1;:36;::::0;;;;;::::1;;:45;15384:145;;;::::0;::::1;::::0;;20536:2:28;15384:145:1::1;::::0;::::1;20518:21:28::0;20575:2;20555:18;;;20548:30;20614:34;20594:18;;;20587:62;20685:23;20665:18;;;20658:51;20726:19;;15384:145:1::1;20334:417:28::0;15384:145:1::1;15609:36;::::0;;;:20:::1;:36;::::0;;;;;;;:43;;;::::1;15648:4;15609:43;::::0;;15757:10;;::::1;::::0;15746:8:::1;:21:::0;;::::1;::::0;;::::1;::::0;;;::::1;::::0;;;::::1;::::0;;16426:10;::::1;::::0;16438:12:::1;::::0;::::1;::::0;16452:9:::1;::::0;::::1;::::0;16463:8:::1;::::0;::::1;::::0;16402:70:::1;::::0;16426:10;16438:12;16452:9;16402:23:::1;:70::i;:::-;16540:8;:38:::0;;;::::1;1337:42:7;16540:38:1;::::0;;16737:44:::1;::::0;16387:85;;-1:-1:-1;16757:14:1;;16737:44:::1;::::0;::::1;::::0;16387:85;4644:14:28;4637:22;4619:41;;4607:2;4592:18;;4479:187;16737:44:1::1;;;;;;;;17045:16:::0;::::1;::::0;::::1;:61;;-1:-1:-1::0;17065:9:1::1;1015:1:7;17065:41:1;17045:61;17041:135;;;17122:43;::::0;::::1;::::0;;20958:2:28;17122:43:1::1;::::0;::::1;20940:21:28::0;20997:2;20977:18;;;20970:30;21036:34;21016:18;;;21009:62;21107:3;21087:18;;;21080:31;21128:19;;17122:43:1::1;20756:397:28::0;17041:135:1::1;12341:4841;;;;12219:4963:::0;:::o;6480:120::-;6545:6;6570:15;:10;6583:2;6570:15;:::i;:::-;:23;;6588:5;6570:23;:::i;5379:169::-;3100:19:22;3123:13;;;;;;3122:14;;3168:34;;;;-1:-1:-1;3186:12:22;;3201:1;3186:12;;;;:16;3168:34;3167:97;;;-1:-1:-1;3236:4:22;1465:19:23;:23;;;3208:55:22;;-1:-1:-1;3246:12:22;;;;;:17;3208:55;3146:190;;;;;;;22065:2:28;3146:190:22;;;22047:21:28;22104:2;22084:18;;;22077:30;22143:34;22123:18;;;22116:62;22214:16;22194:18;;;22187:44;22248:19;;3146:190:22;21863:410:28;3146:190:22;3346:12;:16;;;;3361:1;3346:16;;;3372:65;;;;3406:13;:20;;;;;;;;3372:65;5442:8:1::1;:38:::0;;;::::1;1337:42:7;5442:38:1;::::0;;5490:6:::1;:16:::0;;;::::1;;::::0;;;::::1;;::::0;;5516:25:::1;:23;:25::i;:::-;3461:14:22::0;3457:99;;;3507:5;3491:21;;;;;;3531:14;;-1:-1:-1;22430:36:28;;3531:14:22;;22418:2:28;22403:18;3531:14:22;;;;;;;3457:99;3090:472;5379:169:1;:::o;1175:320:23:-;1465:19;;;:23;;;1175:320::o;3815:4037:2:-;3982:6;:19;3947:17;;3967:34;;3982:19;;;;;3967:12;:34;:::i;:::-;3947:54;;4012:28;4043:17;:15;:17::i;:::-;4012:48;;4070:26;4169:6;:27;;;4161:36;;4114:6;:23;;;4106:32;;4099:99;;;;:::i;:::-;4070:128;-1:-1:-1;4213:13:2;;4209:2229;;4570:6;:20;4533:19;;4555:59;;4595:19;;4570:20;;;;;4555:59;:::i;:::-;4533:81;;4628:19;4759:6;:34;;;4751:43;;4722:19;:73;;;;:::i;:::-;4666:6;:18;4651:50;;4689:12;;4666:18;;4651:50;:::i;:::-;4650:146;;;;:::i;:::-;5015:6;:18;4628:168;;-1:-1:-1;4937:17:2;;4957:232;;5000:50;;4628:168;;5015:18;;5000:50;:::i;:::-;5089:6;:21;;;5081:30;;5151:6;:21;;;5143:30;;4957:16;:232::i;:::-;4937:252;;5466:1;5454:9;:13;5450:741;;;5739:437;5786:239;5843:10;5908:6;:34;;;5900:43;;6000:1;5988:9;:13;;;;:::i;:::-;5786:16;:239::i;5739:437::-;5726:450;;5450:741;6284:49;;6385:42;6347:24;6414:12;6385:42;;;6284:6;6385:42;-1:-1:-1;;4209:2229:2;6532:6;:31;;6556:7;;6532:6;:20;;:31;;6556:7;;6532:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;6650:6;:23;;;6642:32;;6609:6;:20;;;;;;;;;;;;6601:29;;6594:81;;6573:190;;;;;;;24717:2:28;6573:190:2;;;24699:21:28;24756:2;24736:18;;;24729:30;24795:34;24775:18;;;24768:62;24866:32;24846:18;;;24839:60;24916:19;;6573:190:2;24515:426:28;6573:190:2;6875:6;:18;6825:20;;6848:46;;6875:18;;6848:16;;;:46;:::i;:::-;6825:69;;7376:15;7409:31;7418:13;7433:6;7409:8;:31::i;:::-;7394:46;;:12;:46;:::i;:::-;7376:64;;7720:15;7752:9;7738:23;;:11;:23;:::i;:::-;7720:41;;7785:7;7775;:17;7771:75;;;7808:27;7817:17;7827:7;7817;:17;:::i;:::-;7808:8;:27::i;:::-;3879:3973;;;;;;3815:4037;;:::o;5159:452:9:-;5282:7;5383:16;:24;;;5429:16;:26;;;5477:16;:41;;;5540:16;:32;;;5351:239;;;;;;;;;;25535:25:28;;;25591:2;25576:18;;25569:34;;;;25634:2;25619:18;;25612:34;25677:2;25662:18;;25655:34;25522:3;25507:19;;25304:391;5351:239:9;;;;;;;;;;;;;5324:280;;;;;;5305:299;;5159:452;;;:::o;4584:281::-;4775:9;;4786:10;;;;;4798;;;;;4810:9;;;;4821:12;;;;4835:8;;;;4764:80;;4695:7;;4764:80;;4775:9;;4786:10;4835:8;4764:80;;:::i;1082:306:15:-;1251:4;1267:16;1286:19;1300:4;1286:13;:19::i;:::-;1267:38;;1322:59;1354:3;1359:6;1367;1375:5;1322:31;:59::i;:::-;1315:66;1082:306;-1:-1:-1;;;;;;1082:306:15:o;392:703:24:-;448:13;665:5;674:1;665:10;661:51;;-1:-1:-1;;691:10:24;;;;;;;;;;;;;;;;;;392:703::o;661:51::-;736:5;721:12;775:75;782:9;;775:75;;807:8;;;;:::i;:::-;;-1:-1:-1;829:10:24;;-1:-1:-1;837:2:24;829:10;;:::i;:::-;;;775:75;;;859:19;891:6;881:17;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;881:17:24;;859:39;;908:150;915:10;;908:150;;941:11;951:1;941:11;;:::i;:::-;;-1:-1:-1;1009:10:24;1017:2;1009:5;:10;:::i;:::-;996:24;;:2;:24;:::i;:::-;983:39;;966:6;973;966:14;;;;;;;;:::i;:::-;;;;:56;;;;;;;;;;-1:-1:-1;1036:11:24;1045:2;1036:11;;:::i;:::-;;;908:150;;;1081:6;392:703;-1:-1:-1;;;;392:703:24:o;20737:181:1:-;20818:4;20872:9;:37;;;:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;20859:52;;:10;:52;:::i;:::-;20841:15;:70;;20737:181;-1:-1:-1;;20737:181:1:o;4421:2252:10:-;4575:4;4591:13;4614:15;4632:21;4642:7;4651:1;4632:9;:21::i;:::-;4614:39;;4764:10;4754:1146;;4876:10;4873:1;4866:21;4991:2;4987;4980:14;5729:56;5725:2;5718:68;5882:3;5878:2;5871:15;4754:1146;6604:4;6572;6535:9;6529:16;6499:2;6488:9;6484:18;6445:6;6407:7;6377:5;6355:277;6343:289;4421:2252;-1:-1:-1;;;;;;;4421:2252:10:o;8360:224:2:-;4888:13:22;;;;;;;4880:69;;;;;;;27202:2:28;4880:69:22;;;27184:21:28;27241:2;27221:18;;;27214:30;27280:34;27260:18;;;27253:62;27351:13;27331:18;;;27324:41;27382:19;;4880:69:22;27000:407:28;4880:69:22;8440:137:2::1;::::0;;::::1;::::0;::::1;::::0;;8482:6:::1;8440:137:::0;;;-1:-1:-1;8440:137:2::1;::::0;::::1;::::0;8553:12:::1;8440:137;;::::0;;;;;;;8431:146;::::1;;:6;:146:::0;8360:224::o;7691:189:1:-;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7843:13:1;:28;;;:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7836:37;;7691:189;:::o;537:191:4:-;646:6;671:50;686:28;701:6;709:4;686:14;:28::i;:::-;716:4;671:14;:50::i;:::-;664:57;;537:191;;;;;;:::o;1070:286::-;1198:6;1345:4;1268:72;1301:19;1308:12;1345:4;1301:19;:::i;:::-;1293:28;;:4;:28;:::i;:::-;1323:16;:9;1335:4;1323:16;:::i;:::-;1268:24;:72::i;:::-;1236:105;;:12;:105;:::i;:::-;1235:114;;;;:::i;413:105:25:-;471:7;502:1;497;:6;;:14;;510:1;497:14;;;-1:-1:-1;506:1:25;;490:21;-1:-1:-1;413:105:25:o;407:192:5:-;461:9;484:18;505:9;484:30;;524:69;556:7;544:9;531:22;;:10;:22;:::i;:::-;:32;524:69;;;579:3;;;:::i;:::-;;;524:69;;;451:148;;407:192;:::o;2116:135:15:-;2180:12;2238:4;2228:15;;;;;;2211:33;;;;;;28770:19:28;;28814:2;28805:12;;28641:182;2211:33:15;;;;;;;;;;;;;2204:40;;2116:135;;;:::o;2396:244:14:-;2565:4;2588:45;2600:6;2608:24;2612:4;2618:6;2626:5;2608:3;:24::i;:::-;6815:17:6;;;;;;;6794;;;;;;;;;;:38;;6691:148;2588:45:14;2581:52;2396:244;-1:-1:-1;;;;;2396:244:14:o;3587:395:10:-;3668:4;3684:15;3920:2;3905:12;3898:5;3894:24;3890:33;3885:2;3876:7;3872:16;3868:56;3863:2;3856:5;3852:14;3849:76;3825:114;;3587:395;-1:-1:-1;;;;3587:395:10:o;311:102:26:-;367:6;397:1;392;:6;;:14;;405:1;392:14;;491:101;547:6;576:1;572;:5;:13;;584:1;572:13;;1208:273:27;1267:6;1391:36;491:4;1410:1;1399:8;1405:1;1399:5;:8::i;:::-;:12;;;;:::i;:::-;1398:28;;;;:::i;:::-;1391:6;:36::i;2954:6741:14:-;3077:12;3123:1;3109:4;:11;:15;3101:49;;;;;;;29030:2:28;3101:49:14;;;29012:21:28;29069:2;29049:18;;;29042:30;29108:23;29088:18;;;29081:51;29149:18;;3101:49:14;28828:345:28;3101:49:14;3161:23;3187:19;3199:6;3187:11;:19::i;:::-;3161:45;;3216:16;3235:21;3251:4;3235:15;:21::i;:::-;3216:40;;3266:26;3312:5;3295:23;;;;;;28770:19:28;;28814:2;28805:12;;28641:182;3295:23:14;;;;;;;;;;;;;3266:52;;3328:23;3442:9;3437:6194;3461:5;:12;3457:1;:16;3437:6194;;;3494:27;3524:5;3530:1;3524:8;;;;;;;;:::i;:::-;;;;;;;3494:38;;3680:3;:10;3661:15;:29;;3636:134;;;;;;;29380:2:28;3636:134:14;;;29362:21:28;29419:2;29399:18;;;29392:30;29458:34;29438:18;;;29431:62;29529:16;29509:18;;;29502:44;29563:19;;3636:134:14;29178:410:28;3636:134:14;3789:15;3808:1;3789:20;3785:895;;3961:19;;3951:30;;;;;;;3934:48;;3922:76;;3934:48;;3951:30;3934:48;28770:19:28;;;28814:2;28805:12;;28641:182;3934:48:14;;;;;;;;;;;;;3984:13;6815:17:6;;;;;;;6794;;;;;;;;;;:38;;6691:148;3922:76:14;3893:176;;;;;;;29795:2:28;3893:176:14;;;29777:21:28;29834:2;29814:18;;;29807:30;29873:31;29853:18;;;29846:59;29922:18;;3893:176:14;29593:353:28;3893:176:14;3785:895;;;4094:19;;:26;4124:2;-1:-1:-1;4090:590:14;;4290:19;;4280:30;;;;;;;4263:48;;4251:76;;4263:48;;4280:30;4263:48;28770:19:28;;;28814:2;28805:12;;28641:182;4251:76:14;4222:186;;;;;;;30153:2:28;4222:186:14;;;30135:21:28;30192:2;30172:18;;;30165:30;30231:34;30211:18;;;30204:62;30302:9;30282:18;;;30275:37;30329:19;;4222:186:14;29951:403:28;4090:590:14;4550:19;;6815:17:6;;;;;;;;;;6794;;;;;;;:38;4509:156:14;;;;;;;30561:2:28;4509:156:14;;;30543:21:28;30600:2;30580:18;;;30573:30;30639:34;30619:18;;;30612:62;30710:8;30690:18;;;30683:36;30736:19;;4509:156:14;30359:402:28;4509:156:14;990:14;842:2;1003:1;990:14;:::i;:::-;4698:11;:19;;;:26;:48;4694:4927;;4789:3;:10;4770:15;:29;4766:1496;;5289:18;5310:52;5330:11;:19;;;842:2;5330:31;;;;;;;;:::i;:::-;;;;;;;5310:19;:52::i;:::-;5289:73;;5432:1;5417:5;:12;:16;5384:158;;;;;;;30968:2:28;5384:158:14;;;30950:21:28;31007:2;30987:18;;;30980:30;31046:34;31026:18;;;31019:62;31117:29;31097:18;;;31090:57;31164:19;;5384:158:14;30766:423:28;5384:158:14;5679:1;5664:5;:12;:16;;;;:::i;:::-;5659:1;:21;5626:162;;;;;;;31396:2:28;5626:162:14;;;31378:21:28;31435:2;31415:18;;;31408:30;31474:34;31454:18;;;31447:62;31545:28;31525:18;;;31518:56;31591:19;;5626:162:14;31194:422:28;5626:162:14;5818:5;-1:-1:-1;5811:12:14;;-1:-1:-1;;;;;;5811:12:14;4766:1496;6010:15;6034:3;6038:15;6034:20;;;;;;;;:::i;:::-;;;;;;;;;6028:27;;6010:45;;6077:33;6113:11;:19;;;6133:9;6113:30;;;;;;;;;;:::i;:::-;;;;;;;6077:66;;6181:20;6192:8;6181:10;:20::i;:::-;6165:36;-1:-1:-1;6223:20:14;6242:1;6223:20;;:::i;:::-;;;5848:414;;4694:4927;;;1174:1;6286:11;:19;;;:26;:59;6282:3339;;6365:17;6385:25;6398:11;6385:12;:25::i;:::-;6365:45;;6428:12;6449:4;6454:1;6449:7;;;;;;;;:::i;:::-;;;;;;;;-1:-1:-1;6475:12:14;6495:10;6504:1;6449:7;6495:10;:::i;:::-;6490:16;;:1;:16;:::i;:::-;6475:31;;6524:26;6553:25;6565:4;6571:6;6553:25;;:11;:25::i;:::-;6524:54;;6596:25;6624:33;6636:3;6641:15;6624:11;:33::i;:::-;6596:61;;6675:26;6704:51;6727:13;6742:12;6704:22;:51::i;:::-;6675:80;;7062:18;7038:13;:20;:42;7009:171;;;;;;;32185:2:28;7009:171:14;;;32167:21:28;32224:2;32204:18;;;32197:30;32263:34;32243:18;;;32236:62;32334:28;32314:18;;;32307:56;32380:19;;7009:171:14;31983:422:28;7009:171:14;7203:26;;;1561:1;7203:26;;:55;;-1:-1:-1;7233:25:14;;;1682:1;7233:25;7203:55;7199:2319;;;7899:18;7876:12;:19;:41;7843:185;;;;;;;32612:2:28;7843:185:14;;;32594:21:28;32651:2;32631:18;;;32624:30;32690:34;32670:18;;;32663:62;32761:31;32741:18;;;32734:59;32810:19;;7843:185:14;32410:425:28;7843:185:14;8377:18;8398:43;8418:11;:19;;;8438:1;8418:22;;;;;;;;:::i;8398:43::-;8377:64;;8511:1;8496:5;:12;:16;8463:156;;;;;;;33042:2:28;8463:156:14;;;33024:21:28;33081:2;33061:18;;;33054:30;33120:34;33100:18;;;33093:62;33191:27;33171:18;;;33164:55;33236:19;;8463:156:14;32840:421:28;8463:156:14;8756:1;8741:5;:12;:16;;;;:::i;:::-;8736:1;:21;8703:160;;;;;;;33468:2:28;8703:160:14;;;33450:21:28;33507:2;33487:18;;;33480:30;33546:34;33526:18;;;33519:62;33617:26;33597:18;;;33590:54;33661:19;;8703:160:14;33266:420:28;8703:160:14;8893:5;-1:-1:-1;8886:12:14;;-1:-1:-1;;;;;;;;;;;;8886:12:14;7199:2319;8927:31;;;;;:65;;-1:-1:-1;8962:30:14;;;1438:1;8962:30;8927:65;8923:595;;;9299:34;9310:11;:19;;;9330:1;9310:22;;;;;;;;:::i;:::-;;;;;;;9299:10;:34::i;:::-;9283:50;-1:-1:-1;9355:37:14;9374:18;9355:37;;:::i;:::-;;;8923:595;;;9439:60;;;;;33893:2:28;9439:60:14;;;33875:21:28;33932:2;33912:18;;;33905:30;33971:34;33951:18;;;33944:62;34042:20;34022:18;;;34015:48;34080:19;;9439:60:14;33691:414:28;8923:595:14;6347:3185;;;;;;6282:3339;;;9556:50;;;;;34312:2:28;9556:50:14;;;34294:21:28;34351:2;34331:18;;;34324:30;34390:34;34370:18;;;34363:62;34461:10;34441:18;;;34434:38;34489:19;;9556:50:14;34110:404:28;6282:3339:14;-1:-1:-1;3475:3:14;;;;:::i;:::-;;;;3437:6194;;;-1:-1:-1;9641:47:14;;;;;34721:2:28;9641:47:14;;;34703:21:28;34760:2;34740:18;;;34733:30;34799:34;34779:18;;;34772:62;34870:7;34850:18;;;34843:35;34895:19;;9641:47:14;34519:401:28;4596:2947:27;4644:8;4700:1;4696;:5;4688:27;;;;;;;35127:2:28;4688:27:27;;;35109:21:28;35166:1;35146:18;;;35139:29;35204:11;35184:18;;;35177:39;35233:18;;4688:27:27;34925:332:28;4688:27:27;5107:8;5145:2;5125:16;5138:1;5125:4;:16::i;:::-;5118:29;5175:3;:7;;;5161:22;;;;5208:17;;;6001:31;5997:35;;6052:5;;5459:2;6051:13;;;6068:32;6050:50;6120:5;;6119:13;;6136:33;6118:51;6189:5;;6188:13;;6205:33;6187:51;6258:5;;6257:13;;6274:33;6256:51;6327:5;;6326:13;;6343:32;6325:50;6395:5;;6394:13;;6411:30;6393:48;5398:31;5394:35;;5449:5;;5448:13;;5465:32;5447:50;5517:5;;5516:13;;5533:32;5515:50;5585:5;;5584:13;;5583:50;;5653:5;;5652:13;;5651:50;;5721:5;;5720:13;;;5719:50;;5787:5;;;:46;;6735:10;7125:43;7120:48;7232:71;:75;;;;7227:80;;;;7380:72;7375:77;7523:3;7517:9;;;-1:-1:-1;;4596:2947:27:o;1487:3103::-;1536:8;1718:21;1713:1;:26;1709:40;;-1:-1:-1;1748:1:27;;1487:3103;-1:-1:-1;1487:3103:27:o;1709:40::-;1948:21;1943:1;:26;1939:54;;1971:22;;;;;35464:2:28;1971:22:27;;;35446:21:28;35503:2;35483:18;;;35476:30;35542:14;35522:18;;;35515:42;35574:18;;1971:22:27;35262:336:28;1939:54:27;2266:5;2260:2;2255:7;;;2254:17;;-1:-1:-1;2535:8:27;2601:2;2559:29;2548:7;;;2547:41;2591:5;2547:49;2546:57;;2629:29;2625:33;;2621:37;;;3300:35;;;3355:5;;2935:2;3354:13;;;3371:32;3353:50;3423:5;;3422:13;;3421:51;;3492:5;;3491:13;;3508:34;3490:52;3562:5;;3561:13;;3560:53;;3633:5;;3632:13;;3649:35;3631:53;2941:32;2874:31;2870:35;;2925:5;;2924:13;;2923:50;;;2998:5;;;:40;;3058:5;3057:13;;;3074:35;3056:53;3127:5;;;3136:40;3127:50;4002:10;4502:49;4489:62;4564:3;:7;;;;4488:84;;;;;;-1:-1:-1;;1487:3103:27:o;10004:422:14:-;10116:13;;10070:17;;10099:14;10116:13;10165:22;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;;;;;;;10165:22:14;;;;;;;;;;;;;;;;10139:48;;10202:9;10197:201;10221:6;10217:1;:10;10197:201;;;10256:72;;;;;;;;10276:6;10283:1;10276:9;;;;;;;;:::i;:::-;;;;;;;10256:72;;;;10296:29;10315:6;10322:1;10315:9;;;;;;;;:::i;:::-;;;;;;;10296:18;:29::i;:::-;10256:72;;;10245:5;10251:1;10245:8;;;;;;;;:::i;:::-;;;;;;;;;;:83;10370:3;;10197:201;;;-1:-1:-1;10414:5:14;10004:422;-1:-1:-1;;;10004:422:14:o;4398:2034:6:-;4461:12;4485:21;4616:4;4610:11;4598:23;;4729:6;4723:13;4902:11;4896:4;4892:22;5261:4;5246:13;5242:24;5235:4;5231:9;5227:40;5217:8;5213:55;5207:4;5200:69;5359:13;5349:8;5342:31;;5500:4;5492:6;5488:17;5637:4;5627:8;5623:19;5744:4;5713:678;5769:11;5766:1;5763:18;5713:678;;;5976:1;5970:4;5966:12;5952;5948:31;6118:1;6106:10;6102:18;6096:25;6090:4;6085:37;6241:1;6235:4;6231:12;6223:6;6215:29;6371:4;6368:1;6364:12;6357:4;6349:6;6345:17;6337:40;-1:-1:-1;;5812:4:6;5805:12;5713:678;;;-1:-1:-1;6417:8:6;;4398:2034;-1:-1:-1;;;;;4398:2034:6:o;4325:527:12:-;4387:12;4412:18;4432;4452:20;4476:18;4490:3;4476:13;:18::i;:::-;4411:83;;-1:-1:-1;4411:83:12;-1:-1:-1;4411:83:12;-1:-1:-1;4538:21:12;4526:8;:33;;;;;;;;:::i;:::-;;4505:137;;;;;;;35994:2:28;4505:137:12;;;35976:21:28;36033:2;36013:18;;;36006:30;36072:34;36052:18;;;36045:62;36143:27;36123:18;;;36116:55;36188:19;;4505:137:12;35792:421:28;4505:137:12;4688:23;4701:10;4688;:23;:::i;:::-;4674:10;;:37;4653:136;;;;;;;36420:2:28;4653:136:12;;;36402:21:28;36459:2;36439:18;;;36432:30;36498:34;36478:18;;;36471:62;36569:22;36549:18;;;36542:50;36609:19;;4653:136:12;36218:416:28;4653:136:12;4807:38;4813:3;:7;;;4822:10;4834;4807:5;:38::i;10745:190:14:-;10819:12;10865:2;10850:5;:12;;;:17;:78;;10902:26;10922:5;10902:19;:26::i;:::-;10850:78;;;10870:29;10893:5;10870:22;:29::i;11134:159::-;11201:12;11232:54;11248:37;11268:5;:13;;;11282:1;11268:16;;;;;;;;:::i;11248:37::-;11232:15;:54::i;3871:237:6:-;3946:12;3984:6;:13;3974:6;:23;3970:70;;-1:-1:-1;4020:9:6;;;;;;;;;-1:-1:-1;4020:9:6;;4013:16;;3970:70;4056:45;4062:6;4070;4094;4078;:13;:22;;;;:::i;:::-;4056:5;:45::i;11536:385:14:-;11648:7;11671:14;11695:11;11722:2;:9;11710:2;:9;:21;11709:47;;11747:2;:9;11709:47;;;11735:2;:9;11709:47;11695:61;;11766:126;11782:3;11773:6;:12;:40;;;;;11803:2;11806:6;11803:10;;;;;;;;:::i;:::-;;;;;;;;;11789:24;;;:2;11792:6;11789:10;;;;;;;;:::i;:::-;;;;;;;:24;11773:40;11766:126;;;11859:8;;;;;11766:126;;15328:575:27;15376:9;15409:1;15405;:5;15397:27;;;;;;;35127:2:28;15397:27:27;;;35109:21:28;35166:1;35146:18;;;35139:29;35204:11;35184:18;;;35177:39;35233:18;;15397:27:27;34925:332:28;15397:27:27;-1:-1:-1;15821:1:27;15473:34;-1:-1:-1;;15467:1:27;15463:49;15566:9;;;15546:18;15543:33;15540:1;15536:41;15530:48;15624:9;;;15612:10;15609:25;15606:1;15602:33;15596:40;15678:9;;;15670:6;15667:21;15664:1;15660:29;15654:36;15730:9;;;15724:4;15721:19;15718:1;15714:27;;;15708:34;;;15781:9;;;15776:3;15773:18;15770:1;15766:26;15760:33;15832:9;;;15824:18;;;15817:26;;15811:33;15876:9;;;-1:-1:-1;15862:25:27;;15328:575::o;4047:125:12:-;4106:16;4141:24;4150:14;4160:3;4150:9;:14::i;:::-;4141:8;:24::i;5678:4323::-;5780:7;5801;5822:11;6174:1;6161:3;:10;;;:14;6140:135;;;;;;;36841:2:28;6140:135:12;;;36823:21:28;36880:2;36860:18;;;36853:30;36919:34;36899:18;;;36892:62;36990:34;36970:18;;;36963:62;37062:12;37041:19;;;37034:41;37092:19;;6140:135:12;36639:478:28;6140:135:12;6306:7;;;;6388:10;;6286:17;6380:19;6433:4;6423:14;;6419:3576;;6489:1;6492;6495:21;6481:36;;;;;;;;;;6419:3576;6548:4;6538:6;:14;6534:3461;;6654:14;6671:13;6680:4;6671:6;:13;:::i;:::-;6654:30;;6737:6;6724:3;:10;;;:19;6699:156;;;;;;;37324:2:28;6699:156:12;;;37306:21:28;37363:2;37343:18;;;37336:30;37402:34;37382:18;;;37375:62;37473:34;37453:18;;;37446:62;37545:16;37524:19;;;37517:45;37579:19;;6699:156:12;37122:482:28;6699:156:12;6977:1;6968:11;;;6962:18;6982:14;6958:39;;7050:11;;;;:41;;-1:-1:-1;7065:26:12;;;;;;7050:41;7025:177;;;;;;;37811:2:28;7025:177:12;;;37793:21:28;37850:2;37830:18;;;37823:30;37889:34;37869:18;;;37862:62;37960:34;37940:18;;;37933:62;38032:15;38011:19;;;38004:44;38065:19;;7025:177:12;37609:481:28;7025:177:12;-1:-1:-1;7225:1:12;;-1:-1:-1;7228:6:12;-1:-1:-1;7236:21:12;;-1:-1:-1;7217:41:12;;-1:-1:-1;;7217:41:12;6534:3461;7289:4;7279:6;:14;7275:2720;;7337:19;7359:13;7368:4;7359:6;:13;:::i;:::-;7337:35;;7425:11;7412:3;:10;;;:24;7387:164;;;;;;;38297:2:28;7387:164:12;;;38279:21:28;38336:2;38316:18;;;38309:30;38375:34;38355:18;;;38348:62;38446:34;38426:18;;;38419:62;38518:19;38497;;;38490:48;38555:19;;7387:164:12;38095:485:28;7387:164:12;7673:1;7664:11;;7658:18;7678:14;7654:39;7566:25;7746:26;;;7721:159;;;;;;;38787:2:28;7721:159:12;;;38769:21:28;38826:2;38806:18;;;38799:30;38865:34;38845:18;;;38838:62;38936:34;38916:18;;;38909:62;39008:12;38987:19;;;38980:41;39038:19;;7721:159:12;38585:478:28;7721:159:12;8010:1;8001:11;;7995:18;7977:1;7973:19;;7968:3;7964:29;7960:54;8076:2;8067:11;;8042:142;;;;;;;39270:2:28;8042:142:12;;;39252:21:28;39309:2;39289:18;;;39282:30;39348:34;39328:18;;;39321:62;39419:34;39399:18;;;39392:62;39491:10;39470:19;;;39463:39;39519:19;;8042:142:12;39068:476:28;8042:142:12;8237:20;8251:6;8237:11;:20;:::i;:::-;8224:10;;:33;8199:168;;;;;;;39751:2:28;8199:168:12;;;39733:21:28;39790:2;39770:18;;;39763:30;39829:34;39809:18;;;39802:62;39900:34;39880:18;;;39873:62;39972:14;39951:19;;;39944:43;40004:19;;8199:168:12;39549:480:28;8199:168:12;8390:15;8394:11;8390:1;:15;:::i;:::-;8382:55;-1:-1:-1;8407:6:12;-1:-1:-1;8415:21:12;;-1:-1:-1;8382:55:12;;-1:-1:-1;;;;8382:55:12;7275:2720;8468:4;8458:6;:14;8454:1541;;8571:15;8589:13;8598:4;8589:6;:13;:::i;:::-;8571:31;;8655:7;8642:3;:10;;;:20;8617:153;;;;;;;40236:2:28;8617:153:12;;;40218:21:28;40275:2;40255:18;;;40248:30;40314:34;40294:18;;;40287:62;40385:34;40365:18;;;40358:62;40457:12;40436:19;;;40429:41;40487:19;;8617:153:12;40034:478:28;8617:153:12;8793:1;;-1:-1:-1;8796:7:12;-1:-1:-1;8793:1:12;;-1:-1:-1;8785:42:12;;-1:-1:-1;;8785:42:12;8454:1541;8884:20;8907:13;8916:4;8907:6;:13;:::i;:::-;8884:36;;8973:12;8960:3;:10;;;:25;8935:161;;;;;;;40719:2:28;8935:161:12;;;40701:21:28;40758:2;40738:18;;;40731:30;40797:34;40777:18;;;40770:62;40868:34;40848:18;;;40841:62;40940:15;40919:19;;;40912:44;40973:19;;8935:161:12;40517:481:28;8935:161:12;9218:1;9209:11;;9203:18;9223:14;9199:39;9111:25;9291:26;;;9266:157;;;;;;;41205:2:28;9266:157:12;;;41187:21:28;41244:2;41224:18;;;41217:30;41283:34;41263:18;;;41256:62;41354:34;41334:18;;;41327:62;41426:10;41405:19;;;41398:39;41454:19;;9266:157:12;41003:476:28;9266:157:12;9556:1;9547:11;;9541:18;9522:1;9518:20;;9513:3;9509:30;9505:55;9623:2;9613:12;;9588:141;;;;;;;41686:2:28;9588:141:12;;;41668:21:28;41725:2;41705:18;;;41698:30;41764:34;41744:18;;;41737:62;41835:34;41815:18;;;41808:62;41907:8;41886:19;;;41879:37;41933:19;;9588:141:12;41484:474:28;9588:141:12;9782:22;9797:7;9782:12;:22;:::i;:::-;9769:10;;:35;9744:168;;;;;;;42165:2:28;9744:168:12;;;42147:21:28;42204:2;42184:18;;;42177:30;42243:34;42223:18;;;42216:62;42314:34;42294:18;;;42287:62;42386:12;42365:19;;;42358:41;42416:19;;9744:168:12;41963:478:28;9744:168:12;9935:16;9939:12;9935:1;:16;:::i;:::-;9927:57;-1:-1:-1;9953:7:12;-1:-1:-1;9962:21:12;;-1:-1:-1;9927:57:12;;-1:-1:-1;;;;9927:57:12;5678:4323;;;;;;:::o;10281:933::-;10402:12;10426:16;10455:7;10445:18;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10445:18:12;;10426:37;;10477:7;10488:1;10477:12;10473:53;;10512:3;-1:-1:-1;10505:10:12;;10473:53;10785:11;10799:36;10828:7;10820:4;10799:36;:::i;:::-;10785:50;;10889:2;10884:3;10880:12;10914:1;10928:156;10955:7;10952:1;10949:14;10928:156;;;11057:11;;;11051:18;11037:12;;;11030:40;10994:2;10987:10;10928:156;;;11107:7;11104:1;11101:14;11098:79;;;11161:1;11151:7;11145:4;11141:18;11134:29;11098:79;-1:-1:-1;11204:3:12;;10281:933;-1:-1:-1;;;;;;10281:933:12:o;5281:132::-;5346:12;5377:29;5383:3;:7;;;5392:1;5395:3;:10;;;5377:5;:29::i;660:2882:6:-;782:12;854:7;838;848:2;838:12;:23;;830:50;;;;;;;42648:2:28;830:50:6;;;42630:21:28;42687:2;42667:18;;;42660:30;42726:16;42706:18;;;42699:44;42760:18;;830:50:6;42446:338:28;830:50:6;922:6;911:7;902:6;:16;:26;;894:53;;;;;;;42648:2:28;894:53:6;;;42630:21:28;42687:2;42667:18;;;42660:30;42726:16;42706:18;;;42699:44;42760:18;;894:53:6;42446:338:28;894:53:6;995:7;986:6;:16;969:6;:13;:33;;961:63;;;;;;;42991:2:28;961:63:6;;;42973:21:28;43030:2;43010:18;;;43003:30;43069:19;43049:18;;;43042:47;43106:18;;961:63:6;42789:341:28;961:63:6;1045:22;1108:15;;1136:1967;;;;3244:4;3238:11;3225:24;;3431:1;3420:9;3413:20;3479:4;3468:9;3464:20;3458:4;3451:34;1101:2398;;1136:1967;1318:4;1312:11;1299:24;;1977:2;1968:7;1964:16;2359:9;2352:17;2346:4;2342:28;2330:9;2319;2315:25;2311:60;2407:7;2403:2;2399:16;2659:6;2645:9;2638:17;2632:4;2628:28;2616:9;2608:6;2604:22;2600:57;2596:70;2433:425;2692:3;2688:2;2685:11;2433:425;;;2830:9;;2819:21;;2733:4;2725:13;;;;2765;2433:425;;;-1:-1:-1;;2876:26:6;;;3084:2;3067:11;3080:7;3063:25;3057:4;3050:39;-1:-1:-1;1101:2398:6;-1:-1:-1;3526:9:6;660:2882;-1:-1:-1;;;;660:2882:6:o;1385:419:12:-;-1:-1:-1;;;;;;;;;;;;;;;;;1548:1:12;1535:3;:10;:14;1514:135;;;;;;;36841:2:28;1514:135:12;;;36823:21:28;36880:2;36860:18;;;36853:30;36919:34;36899:18;;;36892:62;36990:34;36970:18;;;36963:62;37062:12;37041:19;;;37034:41;37092:19;;1514:135:12;36639:478:28;1514:135:12;-1:-1:-1;1756:41:12;;;;;;;;;1774:10;;1756:41;;1726:2;1717:12;;;1756:41;;;;;;;;1385:419::o;1978:1895::-;2039:16;2068:18;2088;2108:20;2132:18;2146:3;2132:13;:18::i;:::-;2067:83;;-1:-1:-1;2067:83:12;-1:-1:-1;2067:83:12;-1:-1:-1;2194:21:12;2182:8;:33;;;;;;;;:::i;:::-;;2161:136;;;;;;;43337:2:28;2161:136:12;;;43319:21:28;43376:2;43356:18;;;43349:30;43415:34;43395:18;;;43388:62;43486:26;43466:18;;;43459:54;43530:19;;2161:136:12;43135:420:28;2161:136:12;2356:10;;2329:23;2342:10;2329;:23;:::i;:::-;:37;2308:134;;;;;;;43762:2:28;2308:134:12;;;43744:21:28;43801:2;43781:18;;;43774:30;43840:34;43820:18;;;43813:62;43911:20;43891:18;;;43884:48;43949:19;;2308:134:12;43560:414:28;2308:134:12;2868:30;;;1188:2;2868:30;;;;;;;;;2845:20;;2868:30;;;;-1:-1:-1;;;;;;;;;;;;;;;;;2868:30:12;;;;;;;;;;;;;;-1:-1:-1;2845:53:12;-1:-1:-1;2909:17:12;2957:10;2977:737;2993:10;;2984:19;;2977:737;;;3020:18;3040;3064:206;3095:161;;;;;;;;3146:6;3133:3;:10;;;:19;;;;:::i;:::-;3095:161;;;;3230:6;3219:3;:7;;;3198:38;;;;:::i;:::-;3095:161;;3064:13;:206::i;:::-;3019:251;;;;;3474:153;;;;;;;;3521:10;3508;:23;;;;:::i;:::-;3474:153;;;;3605:6;3594:3;:7;;;3573:38;;;;:::i;:::-;3474:153;;;3457:3;3461:9;3457:14;;;;;;;;:::i;:::-;;;;;;;;;;:170;3642:14;3655:1;3642:14;;:::i;:::-;;-1:-1:-1;3680:23:12;3693:10;3680;:23;:::i;:::-;3670:33;;;;:::i;:::-;;;3005:709;;2977:737;;;-1:-1:-1;3814:22:12;;3821:3;1978:1895;-1:-1:-1;;;;;1978:1895:12:o;267:184:28:-;319:77;316:1;309:88;416:4;413:1;406:15;440:4;437:1;430:15;456:334;527:2;521:9;583:2;573:13;;588:66;569:86;557:99;;686:18;671:34;;707:22;;;668:62;665:88;;;733:18;;:::i;:::-;769:2;762:22;456:334;;-1:-1:-1;456:334:28:o;795:196::-;863:20;;923:42;912:54;;902:65;;892:93;;981:1;978;971:12;892:93;795:196;;;:::o;996:589::-;1038:5;1091:3;1084:4;1076:6;1072:17;1068:27;1058:55;;1109:1;1106;1099:12;1058:55;1145:6;1132:20;1171:18;1167:2;1164:26;1161:52;;;1193:18;;:::i;:::-;1237:114;1345:4;1276:66;1269:4;1265:2;1261:13;1257:86;1253:97;1237:114;:::i;:::-;1376:2;1367:7;1360:19;1422:3;1415:4;1410:2;1402:6;1398:15;1394:26;1391:35;1388:55;;;1439:1;1436;1429:12;1388:55;1504:2;1497:4;1489:6;1485:17;1478:4;1469:7;1465:18;1452:55;1552:1;1527:16;;;1545:4;1523:27;1516:38;;;;1531:7;996:589;-1:-1:-1;;;996:589:28:o;1590:898::-;1658:5;1706:4;1694:9;1689:3;1685:19;1681:30;1678:50;;;1724:1;1721;1714:12;1678:50;1757:2;1751:9;1799:4;1791:6;1787:17;1823:18;1891:6;1879:10;1876:22;1871:2;1859:10;1856:18;1853:46;1850:72;;;1902:18;;:::i;:::-;1942:10;1938:2;1931:22;1971:6;1962:15;;2014:9;2001:23;1993:6;1986:39;2058:38;2092:2;2081:9;2077:18;2058:38;:::i;:::-;2053:2;2045:6;2041:15;2034:63;2130:38;2164:2;2153:9;2149:18;2130:38;:::i;:::-;2125:2;2117:6;2113:15;2106:63;2230:2;2219:9;2215:18;2202:32;2197:2;2189:6;2185:15;2178:57;2297:3;2286:9;2282:19;2269:33;2263:3;2255:6;2251:16;2244:59;2354:3;2343:9;2339:19;2326:33;2312:47;;2382:2;2374:6;2371:14;2368:34;;;2398:1;2395;2388:12;2368:34;;2436:45;2477:3;2468:6;2457:9;2453:22;2436:45;:::i;:::-;2430:3;2422:6;2418:16;2411:71;;;1590:898;;;;:::o;2493:1171::-;2691:6;2699;2707;2715;2723;2767:9;2758:7;2754:23;2797:3;2793:2;2789:12;2786:32;;;2814:1;2811;2804:12;2786:32;2854:9;2841:23;2883:18;2924:2;2916:6;2913:14;2910:34;;;2940:1;2937;2930:12;2910:34;2963:72;3027:7;3018:6;3007:9;3003:22;2963:72;:::i;:::-;2953:82;;3082:2;3071:9;3067:18;3054:32;3044:42;;3179:3;3110:66;3106:2;3102:75;3098:85;3095:105;;;3196:1;3193;3186:12;3095:105;3234:2;3223:9;3219:18;3209:28;;3290:3;3279:9;3275:19;3262:33;3246:49;;3320:2;3310:8;3307:16;3304:36;;;3336:1;3333;3326:12;3304:36;3374:8;3363:9;3359:24;3349:34;;3421:7;3414:4;3410:2;3406:13;3402:27;3392:55;;3443:1;3440;3433:12;3392:55;3483:2;3470:16;3456:30;;3509:2;3501:6;3498:14;3495:34;;;3525:1;3522;3515:12;3495:34;;3578:7;3573:2;3563:6;3560:1;3556:14;3552:2;3548:23;3544:32;3541:45;3538:65;;;3599:1;3596;3589:12;3538:65;2493:1171;;;;-1:-1:-1;2493:1171:28;;-1:-1:-1;;;3630:2:28;3622:11;;3652:6;2493:1171::o;3669:258::-;3741:1;3751:113;3765:6;3762:1;3759:13;3751:113;;;3841:11;;;3835:18;3822:11;;;3815:39;3787:2;3780:10;3751:113;;;3882:6;3879:1;3876:13;3873:48;;;3917:1;3908:6;3903:3;3899:16;3892:27;3873:48;;3669:258;;;:::o;3932:317::-;3974:3;4012:5;4006:12;4039:6;4034:3;4027:19;4055:63;4111:6;4104:4;4099:3;4095:14;4088:4;4081:5;4077:16;4055:63;:::i;:::-;4163:2;4151:15;4168:66;4147:88;4138:98;;;;4238:4;4134:109;;3932:317;-1:-1:-1;;3932:317:28:o;4254:220::-;4403:2;4392:9;4385:21;4366:4;4423:45;4464:2;4453:9;4449:18;4441:6;4423:45;:::i;4671:180::-;4730:6;4783:2;4771:9;4762:7;4758:23;4754:32;4751:52;;;4799:1;4796;4789:12;4751:52;-1:-1:-1;4822:23:28;;4671:180;-1:-1:-1;4671:180:28:o;5087:373::-;5185:6;5238:2;5226:9;5217:7;5213:23;5209:32;5206:52;;;5254:1;5251;5244:12;5206:52;5294:9;5281:23;5327:18;5319:6;5316:30;5313:50;;;5359:1;5356;5349:12;5313:50;5382:72;5446:7;5437:6;5426:9;5422:22;5382:72;:::i;5650:171::-;5717:20;;5777:18;5766:30;;5756:41;;5746:69;;5811:1;5808;5801:12;5826:184;5884:6;5937:2;5925:9;5916:7;5912:23;5908:32;5905:52;;;5953:1;5950;5943:12;5905:52;5976:28;5994:9;5976:28;:::i;6636:160::-;6701:20;;6757:13;;6750:21;6740:32;;6730:60;;6786:1;6783;6776:12;6801:180;6857:6;6910:2;6898:9;6889:7;6885:23;6881:32;6878:52;;;6926:1;6923;6916:12;6878:52;6949:26;6965:9;6949:26;:::i;7381:604::-;7481:6;7489;7497;7505;7513;7566:3;7554:9;7545:7;7541:23;7537:33;7534:53;;;7583:1;7580;7573:12;7534:53;7606:29;7625:9;7606:29;:::i;:::-;7596:39;;7682:2;7671:9;7667:18;7654:32;7644:42;;7705:37;7738:2;7727:9;7723:18;7705:37;:::i;:::-;7695:47;;7761:35;7792:2;7781:9;7777:18;7761:35;:::i;:::-;7751:45;;7847:3;7836:9;7832:19;7819:33;7875:18;7867:6;7864:30;7861:50;;;7907:1;7904;7897:12;7861:50;7930:49;7971:7;7962:6;7951:9;7947:22;7930:49;:::i;:::-;7920:59;;;7381:604;;;;;;;;:::o;9438:642::-;9701:6;9696:3;9689:19;9738:6;9733:2;9728:3;9724:12;9717:28;9797:66;9788:6;9783:3;9779:16;9775:89;9770:2;9765:3;9761:12;9754:111;9918:6;9911:14;9904:22;9899:3;9895:32;9890:2;9885:3;9881:12;9874:54;9671:3;9957:6;9951:13;9973:60;10026:6;10021:2;10016:3;10012:12;10007:2;9999:6;9995:15;9973:60;:::i;:::-;10053:16;;;;10071:2;10049:25;;9438:642;-1:-1:-1;;;;;;9438:642:28:o;11683:192::-;11762:13;;11815:34;11804:46;;11794:57;;11784:85;;11865:1;11862;11855:12;11880:615;11982:6;12035:2;12023:9;12014:7;12010:23;12006:32;12003:52;;;12051:1;12048;12041:12;12003:52;12084:2;12078:9;12126:2;12118:6;12114:15;12195:6;12183:10;12180:22;12159:18;12147:10;12144:34;12141:62;12138:88;;;12206:18;;:::i;:::-;12242:2;12235:22;12281:16;;12266:32;;12331:49;12376:2;12361:18;;12331:49;:::i;:::-;12326:2;12318:6;12314:15;12307:74;12414:49;12459:2;12448:9;12444:18;12414:49;:::i;:::-;12409:2;12397:15;;12390:74;12401:6;11880:615;-1:-1:-1;;;11880:615:28:o;12500:646::-;12592:6;12645:3;12633:9;12624:7;12620:23;12616:33;12613:53;;;12662:1;12659;12652:12;12613:53;12695:2;12689:9;12737:3;12729:6;12725:16;12807:6;12795:10;12792:22;12771:18;12759:10;12756:34;12753:62;12750:88;;;12818:18;;:::i;:::-;12858:10;12854:2;12847:22;;12906:9;12893:23;12885:6;12878:39;12978:2;12967:9;12963:18;12950:32;12945:2;12937:6;12933:15;12926:57;13044:2;13033:9;13029:18;13016:32;13011:2;13003:6;12999:15;12992:57;13110:2;13099:9;13095:18;13082:32;13077:2;13069:6;13065:15;13058:57;13134:6;13124:16;;;12500:646;;;;:::o;14643:934::-;14779:9;14813:18;14854:2;14846:6;14843:14;14840:40;;;14860:18;;:::i;:::-;14906:6;14903:1;14899:14;14932:4;14956:28;14980:2;14976;14972:11;14956:28;:::i;:::-;15018:19;;;15088:14;;;;15053:12;;;;15125:14;15114:26;;15111:46;;;15153:1;15150;15143:12;15111:46;15177:5;15191:353;15207:6;15202:3;15199:15;15191:353;;;15293:3;15280:17;15329:2;15316:11;15313:19;15310:109;;;15373:1;15402:2;15398;15391:14;15310:109;15444:57;15486:14;15472:11;15465:5;15461:23;15444:57;:::i;:::-;15432:70;;-1:-1:-1;15522:12:28;;;;15224;;15191:353;;;-1:-1:-1;15566:5:28;14643:934;-1:-1:-1;;;;;;;14643:934:28:o;16001:960::-;16430:3;16468:6;16462:13;16484:53;16530:6;16525:3;16518:4;16510:6;16506:17;16484:53;:::i;:::-;16568:6;16563:3;16559:16;16546:29;;16594:3;16620:2;16613:5;16606:17;16654:6;16648:13;16670:65;16726:8;16722:1;16715:5;16711:13;16704:4;16696:6;16692:17;16670:65;:::i;:::-;16798:1;16754:20;;16790:10;;;16783:22;16830:13;;16852:62;16830:13;16901:1;16893:10;;16886:4;16874:17;;16852:62;:::i;:::-;16934:17;16953:1;16930:25;;16001:960;-1:-1:-1;;;;;16001:960:28:o;18225:184::-;18295:6;18348:2;18336:9;18327:7;18323:23;18319:32;18316:52;;;18364:1;18361;18354:12;18316:52;-1:-1:-1;18387:16:28;;18225:184;-1:-1:-1;18225:184:28:o;21158:::-;21210:77;21207:1;21200:88;21307:4;21304:1;21297:15;21331:4;21328:1;21321:15;21347:270;21386:7;21418:18;21463:2;21460:1;21456:10;21493:2;21490:1;21486:10;21549:3;21545:2;21541:12;21536:3;21533:21;21526:3;21519:11;21512:19;21508:47;21505:73;;;21558:18;;:::i;:::-;21598:13;;21347:270;-1:-1:-1;;;;21347:270:28:o;21622:236::-;21661:3;21689:18;21734:2;21731:1;21727:10;21764:2;21761:1;21757:10;21795:3;21791:2;21787:12;21782:3;21779:21;21776:47;;;21803:18;;:::i;:::-;21839:13;;21622:236;-1:-1:-1;;;;21622:236:28:o;22477:125::-;22517:4;22545:1;22542;22539:8;22536:34;;;22550:18;;:::i;:::-;-1:-1:-1;22587:9:28;;22477:125::o;22607:184::-;22659:77;22656:1;22649:88;22756:4;22753:1;22746:15;22780:4;22777:1;22770:15;22796:308;22835:1;22861;22851:35;;22866:18;;:::i;:::-;22983:66;22980:1;22977:73;22908:66;22905:1;22902:73;22898:153;22895:179;;;23054:18;;:::i;:::-;-1:-1:-1;23088:10:28;;22796:308::o;23109:369::-;23148:4;23184:1;23181;23177:9;23293:1;23225:66;23221:74;23218:1;23214:82;23209:2;23202:10;23198:99;23195:125;;;23300:18;;:::i;:::-;23419:1;23351:66;23347:74;23344:1;23340:82;23336:2;23332:91;23329:117;;;23426:18;;:::i;:::-;-1:-1:-1;;23463:9:28;;23109:369::o;23483:655::-;23522:7;23554:66;23646:1;23643;23639:9;23674:1;23671;23667:9;23719:1;23715:2;23711:10;23708:1;23705:17;23700:2;23696;23692:11;23688:35;23685:61;;;23726:18;;:::i;:::-;23765:66;23857:1;23854;23850:9;23904:1;23900:2;23895:11;23892:1;23888:19;23883:2;23879;23875:11;23871:37;23868:63;;;23911:18;;:::i;:::-;23957:1;23954;23950:9;23940:19;;24004:1;24000:2;23995:11;23992:1;23988:19;23983:2;23979;23975:11;23971:37;23968:63;;;24011:18;;:::i;:::-;24076:1;24072:2;24067:11;24064:1;24060:19;24055:2;24051;24047:11;24043:37;24040:63;;;24083:18;;:::i;:::-;-1:-1:-1;;;24123:9:28;;;;;23483:655;-1:-1:-1;;;23483:655:28:o;24143:367::-;24182:3;24217:1;24214;24210:9;24326:1;24258:66;24254:74;24251:1;24247:82;24242:2;24235:10;24231:99;24228:125;;;24333:18;;:::i;:::-;24452:1;24384:66;24380:74;24377:1;24373:82;24369:2;24365:91;24362:117;;;24459:18;;:::i;:::-;-1:-1:-1;;24495:9:28;;24143:367::o;24946:228::-;24986:7;25112:1;25044:66;25040:74;25037:1;25034:81;25029:1;25022:9;25015:17;25011:105;25008:131;;;25119:18;;:::i;:::-;-1:-1:-1;25159:9:28;;24946:228::o;25179:120::-;25219:1;25245;25235:35;;25250:18;;:::i;:::-;-1:-1:-1;25284:9:28;;25179:120::o;25700:656::-;25987:6;25976:9;25969:25;25950:4;26013:42;26103:2;26095:6;26091:15;26086:2;26075:9;26071:18;26064:43;26155:2;26147:6;26143:15;26138:2;26127:9;26123:18;26116:43;;26195:6;26190:2;26179:9;26175:18;26168:34;26239:6;26233:3;26222:9;26218:19;26211:35;26283:3;26277;26266:9;26262:19;26255:32;26304:46;26345:3;26334:9;26330:19;26322:6;26304:46;:::i;:::-;26296:54;25700:656;-1:-1:-1;;;;;;;;25700:656:28:o;26361:195::-;26400:3;26431:66;26424:5;26421:77;26418:103;;26501:18;;:::i;:::-;-1:-1:-1;26548:1:28;26537:13;;26361:195::o;26561:112::-;26593:1;26619;26609:35;;26624:18;;:::i;:::-;-1:-1:-1;26658:9:28;;26561:112::o;26678:128::-;26718:3;26749:1;26745:6;26742:1;26739:13;26736:39;;;26755:18;;:::i;:::-;-1:-1:-1;26791:9:28;;26678:128::o;26811:184::-;26863:77;26860:1;26853:88;26960:4;26957:1;26950:15;26984:4;26981:1;26974:15;27412:167;27490:13;;27543:10;27532:22;;27522:33;;27512:61;;27569:1;27566;27559:12;27584:160;27661:13;;27714:4;27703:16;;27693:27;;27683:55;;27734:1;27731;27724:12;27749:887;27851:6;27904:3;27892:9;27883:7;27879:23;27875:33;27872:53;;;27921:1;27918;27911:12;27872:53;27954:2;27948:9;27996:3;27988:6;27984:16;28066:6;28054:10;28051:22;28030:18;28018:10;28015:34;28012:62;28009:88;;;28077:18;;:::i;:::-;28113:2;28106:22;28152:39;28181:9;28152:39;:::i;:::-;28144:6;28137:55;28225:47;28268:2;28257:9;28253:18;28225:47;:::i;:::-;28220:2;28212:6;28208:15;28201:72;28306:47;28349:2;28338:9;28334:18;28306:47;:::i;:::-;28301:2;28293:6;28289:15;28282:72;28387:48;28431:2;28420:9;28416:18;28387:48;:::i;:::-;28382:2;28374:6;28370:15;28363:73;28470:49;28514:3;28503:9;28499:19;28470:49;:::i;:::-;28464:3;28456:6;28452:16;28445:75;28554:50;28599:3;28588:9;28584:19;28554:50;:::i;:::-;28548:3;28536:16;;28529:76;28540:6;27749:887;-1:-1:-1;;;27749:887:28:o;31621:157::-;31651:1;31685:4;31682:1;31678:12;31709:3;31699:37;;31716:18;;:::i;:::-;31768:3;31761:4;31758:1;31754:12;31750:22;31745:27;;;31621:157;;;;:::o;31783:195::-;31821:4;31858;31855:1;31851:12;31890:4;31887:1;31883:12;31915:3;31910;31907:12;31904:38;;;31922:18;;:::i;:::-;31959:13;;;31783:195;-1:-1:-1;;;31783:195:28:o;35603:184::-;35655:77;35652:1;35645:88;35752:4;35749:1;35742:15;35776:4;35773:1;35766:15
Swarm Source
none
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 27 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.