Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Name:
OneStepProofEntry
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 100 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// Copyright 2021-2022, Offchain Labs, Inc. // For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; import "../state/Deserialize.sol"; import "../state/Machine.sol"; import "../state/MerkleProof.sol"; import "./IOneStepProver.sol"; import "./IOneStepProofEntry.sol"; contract OneStepProofEntry is IOneStepProofEntry { using MerkleProofLib for MerkleProof; using MachineLib for Machine; IOneStepProver public prover0; IOneStepProver public proverMem; IOneStepProver public proverMath; IOneStepProver public proverHostIo; constructor( IOneStepProver prover0_, IOneStepProver proverMem_, IOneStepProver proverMath_, IOneStepProver proverHostIo_ ) { prover0 = prover0_; proverMem = proverMem_; proverMath = proverMath_; proverHostIo = proverHostIo_; } function proveOneStep( ExecutionContext calldata execCtx, uint256 machineStep, bytes32 beforeHash, bytes calldata proof ) external view override returns (bytes32 afterHash) { Machine memory mach; Module memory mod; MerkleProof memory modProof; Instruction memory inst; { uint256 offset = 0; (mach, offset) = Deserialize.machine(proof, offset); require(mach.hash() == beforeHash, "MACHINE_BEFORE_HASH"); if (mach.status != MachineStatus.RUNNING) { // Machine is halted. // WARNING: at this point, most machine fields are unconstrained. return mach.hash(); } if (machineStep + 1 == OneStepProofEntryLib.MAX_STEPS) { mach.status = MachineStatus.ERRORED; return mach.hash(); } (mod, offset) = Deserialize.module(proof, offset); (modProof, offset) = Deserialize.merkleProof(proof, offset); require( modProof.computeRootFromModule(mach.moduleIdx, mod) == mach.modulesRoot, "MODULES_ROOT" ); { MerkleProof memory instProof; MerkleProof memory funcProof; (inst, offset) = Deserialize.instruction(proof, offset); (instProof, offset) = Deserialize.merkleProof(proof, offset); (funcProof, offset) = Deserialize.merkleProof(proof, offset); bytes32 codeHash = instProof.computeRootFromInstruction(mach.functionPc, inst); bytes32 recomputedRoot = funcProof.computeRootFromFunction( mach.functionIdx, codeHash ); require(recomputedRoot == mod.functionsMerkleRoot, "BAD_FUNCTIONS_ROOT"); } proof = proof[offset:]; } uint256 oldModIdx = mach.moduleIdx; mach.functionPc += 1; uint16 opcode = inst.opcode; IOneStepProver prover; if ( (opcode >= Instructions.I32_LOAD && opcode <= Instructions.I64_LOAD32_U) || (opcode >= Instructions.I32_STORE && opcode <= Instructions.I64_STORE32) || opcode == Instructions.MEMORY_SIZE || opcode == Instructions.MEMORY_GROW ) { prover = proverMem; } else if ( (opcode == Instructions.I32_EQZ || opcode == Instructions.I64_EQZ) || (opcode >= Instructions.I32_RELOP_BASE && opcode <= Instructions.I32_RELOP_BASE + Instructions.IRELOP_LAST) || (opcode >= Instructions.I32_UNOP_BASE && opcode <= Instructions.I32_UNOP_BASE + Instructions.IUNOP_LAST) || (opcode >= Instructions.I32_ADD && opcode <= Instructions.I32_ROTR) || (opcode >= Instructions.I64_RELOP_BASE && opcode <= Instructions.I64_RELOP_BASE + Instructions.IRELOP_LAST) || (opcode >= Instructions.I64_UNOP_BASE && opcode <= Instructions.I64_UNOP_BASE + Instructions.IUNOP_LAST) || (opcode >= Instructions.I64_ADD && opcode <= Instructions.I64_ROTR) || (opcode == Instructions.I32_WRAP_I64) || (opcode == Instructions.I64_EXTEND_I32_S || opcode == Instructions.I64_EXTEND_I32_U) || (opcode >= Instructions.I32_EXTEND_8S && opcode <= Instructions.I64_EXTEND_32S) || (opcode >= Instructions.I32_REINTERPRET_F32 && opcode <= Instructions.F64_REINTERPRET_I64) ) { prover = proverMath; } else if ( (opcode >= Instructions.GET_GLOBAL_STATE_BYTES32 && opcode <= Instructions.SET_GLOBAL_STATE_U64) || (opcode >= Instructions.READ_PRE_IMAGE && opcode <= Instructions.HALT_AND_SET_FINISHED) ) { prover = proverHostIo; } else { prover = prover0; } (mach, mod) = prover.executeOneStep(execCtx, mach, mod, inst, proof); mach.modulesRoot = modProof.computeRootFromModule(oldModIdx, mod); return mach.hash(); } }
// Copyright 2021-2022, Offchain Labs, Inc. // For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 // solhint-disable-next-line compiler-version pragma solidity >=0.6.9 <0.9.0; import "./IOwnable.sol"; interface IBridge { /// @dev This is an instruction to offchain readers to inform them where to look /// for sequencer inbox batch data. This is not the type of data (eg. das, brotli encoded, or blob versioned hash) /// and this enum is not used in the state transition function, rather it informs an offchain /// reader where to find the data so that they can supply it to the replay binary enum BatchDataLocation { /// @notice The data can be found in the transaction call data TxInput, /// @notice The data can be found in an event emitted during the transaction SeparateBatchEvent, /// @notice This batch contains no data NoData, /// @notice The data can be found in the 4844 data blobs on this transaction Blob } struct TimeBounds { uint64 minTimestamp; uint64 maxTimestamp; uint64 minBlockNumber; uint64 maxBlockNumber; } event MessageDelivered( uint256 indexed messageIndex, bytes32 indexed beforeInboxAcc, address inbox, uint8 kind, address sender, bytes32 messageDataHash, uint256 baseFeeL1, uint64 timestamp ); event BridgeCallTriggered( address indexed outbox, address indexed to, uint256 value, bytes data ); event InboxToggle(address indexed inbox, bool enabled); event OutboxToggle(address indexed outbox, bool enabled); event SequencerInboxUpdated(address newSequencerInbox); event RollupUpdated(address rollup); function allowedDelayedInboxList(uint256) external returns (address); function allowedOutboxList(uint256) external returns (address); /// @dev Accumulator for delayed inbox messages; tail represents hash of the current state; each element represents the inclusion of a new message. function delayedInboxAccs(uint256) external view returns (bytes32); /// @dev Accumulator for sequencer inbox messages; tail represents hash of the current state; each element represents the inclusion of a new message. function sequencerInboxAccs(uint256) external view returns (bytes32); function rollup() external view returns (IOwnable); function sequencerInbox() external view returns (address); function activeOutbox() external view returns (address); function allowedDelayedInboxes(address inbox) external view returns (bool); function allowedOutboxes(address outbox) external view returns (bool); function sequencerReportedSubMessageCount() external view returns (uint256); function executeCall( address to, uint256 value, bytes calldata data ) external returns (bool success, bytes memory returnData); function delayedMessageCount() external view returns (uint256); function sequencerMessageCount() external view returns (uint256); // ---------- onlySequencerInbox functions ---------- function enqueueSequencerMessage( bytes32 dataHash, uint256 afterDelayedMessagesRead, uint256 prevMessageCount, uint256 newMessageCount ) external returns ( uint256 seqMessageIndex, bytes32 beforeAcc, bytes32 delayedAcc, bytes32 acc ); /** * @dev Allows the sequencer inbox to submit a delayed message of the batchPostingReport type * This is done through a separate function entrypoint instead of allowing the sequencer inbox * to call `enqueueDelayedMessage` to avoid the gas overhead of an extra SLOAD in either * every delayed inbox or every sequencer inbox call. */ function submitBatchSpendingReport(address batchPoster, bytes32 dataHash) external returns (uint256 msgNum); // ---------- onlyRollupOrOwner functions ---------- function setSequencerInbox(address _sequencerInbox) external; function setDelayedInbox(address inbox, bool enabled) external; function setOutbox(address inbox, bool enabled) external; function updateRollupAddress(IOwnable _rollup) external; }
// Copyright 2021-2022, Offchain Labs, Inc. // For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 // solhint-disable-next-line compiler-version pragma solidity >=0.6.9 <0.9.0; interface IDelayedMessageProvider { /// @dev event emitted when a inbox message is added to the Bridge's delayed accumulator event InboxMessageDelivered(uint256 indexed messageNum, bytes data); /// @dev event emitted when a inbox message is added to the Bridge's delayed accumulator /// same as InboxMessageDelivered but the batch data is available in tx.input event InboxMessageDeliveredFromOrigin(uint256 indexed messageNum); }
// Copyright 2021-2022, Offchain Labs, Inc. // For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 // solhint-disable-next-line compiler-version pragma solidity >=0.4.21 <0.9.0; interface IOwnable { function owner() external view returns (address); }
// Copyright 2021-2022, Offchain Labs, Inc. // For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 // solhint-disable-next-line compiler-version pragma solidity >=0.6.9 <0.9.0; pragma experimental ABIEncoderV2; import "../libraries/IGasRefunder.sol"; import "./IDelayedMessageProvider.sol"; import "./IBridge.sol"; interface ISequencerInbox is IDelayedMessageProvider { struct MaxTimeVariation { uint256 delayBlocks; uint256 futureBlocks; uint256 delaySeconds; uint256 futureSeconds; } event SequencerBatchDelivered( uint256 indexed batchSequenceNumber, bytes32 indexed beforeAcc, bytes32 indexed afterAcc, bytes32 delayedAcc, uint256 afterDelayedMessagesRead, IBridge.TimeBounds timeBounds, IBridge.BatchDataLocation dataLocation ); event OwnerFunctionCalled(uint256 indexed id); /// @dev a separate event that emits batch data when this isn't easily accessible in the tx.input event SequencerBatchData(uint256 indexed batchSequenceNumber, bytes data); /// @dev a valid keyset was added event SetValidKeyset(bytes32 indexed keysetHash, bytes keysetBytes); /// @dev a keyset was invalidated event InvalidateKeyset(bytes32 indexed keysetHash); function totalDelayedMessagesRead() external view returns (uint256); function bridge() external view returns (IBridge); /// @dev The size of the batch header // solhint-disable-next-line func-name-mixedcase function HEADER_LENGTH() external view returns (uint256); /// @dev If the first batch data byte after the header has this bit set, /// the sequencer inbox has authenticated the data. Currently only used for 4844 blob support. /// See: https://github.com/OffchainLabs/nitro/blob/69de0603abf6f900a4128cab7933df60cad54ded/arbstate/das_reader.go // solhint-disable-next-line func-name-mixedcase function DATA_AUTHENTICATED_FLAG() external view returns (bytes1); /// @dev If the first data byte after the header has this bit set, /// then the batch data is to be found in 4844 data blobs /// See: https://github.com/OffchainLabs/nitro/blob/69de0603abf6f900a4128cab7933df60cad54ded/arbstate/das_reader.go // solhint-disable-next-line func-name-mixedcase function DATA_BLOB_HEADER_FLAG() external view returns (bytes1); /// @dev If the first data byte after the header has this bit set, /// then the batch data is a das message /// See: https://github.com/OffchainLabs/nitro/blob/69de0603abf6f900a4128cab7933df60cad54ded/arbstate/das_reader.go // solhint-disable-next-line func-name-mixedcase function DAS_MESSAGE_HEADER_FLAG() external view returns (bytes1); /// @dev If the first data byte after the header has this bit set, /// then the batch data is a das message that employs a merklesization strategy /// See: https://github.com/OffchainLabs/nitro/blob/69de0603abf6f900a4128cab7933df60cad54ded/arbstate/das_reader.go // solhint-disable-next-line func-name-mixedcase function TREE_DAS_MESSAGE_HEADER_FLAG() external view returns (bytes1); /// @dev If the first data byte after the header has this bit set, /// then the batch data has been brotli compressed /// See: https://github.com/OffchainLabs/nitro/blob/69de0603abf6f900a4128cab7933df60cad54ded/arbstate/das_reader.go // solhint-disable-next-line func-name-mixedcase function BROTLI_MESSAGE_HEADER_FLAG() external view returns (bytes1); /// @dev If the first data byte after the header has this bit set, /// then the batch data uses a zero heavy encoding /// See: https://github.com/OffchainLabs/nitro/blob/69de0603abf6f900a4128cab7933df60cad54ded/arbstate/das_reader.go // solhint-disable-next-line func-name-mixedcase function ZERO_HEAVY_MESSAGE_HEADER_FLAG() external view returns (bytes1); function rollup() external view returns (IOwnable); function isBatchPoster(address) external view returns (bool); function isSequencer(address) external view returns (bool); function maxDataSize() external view returns (uint256); /// @notice The batch poster manager has the ability to change the batch poster addresses /// This enables the batch poster to do key rotation function batchPosterManager() external view returns (address); struct DasKeySetInfo { bool isValidKeyset; uint64 creationBlock; } /// @dev returns 4 uint256 to be compatible with older version function maxTimeVariation() external view returns ( uint256 delayBlocks, uint256 futureBlocks, uint256 delaySeconds, uint256 futureSeconds ); function dasKeySetInfo(bytes32) external view returns (bool, uint64); /// @notice Remove force inclusion delay after a L1 chainId fork function removeDelayAfterFork() external; /// @notice Force messages from the delayed inbox to be included in the chain /// Callable by any address, but message can only be force-included after maxTimeVariation.delayBlocks and /// maxTimeVariation.delaySeconds has elapsed. As part of normal behaviour the sequencer will include these /// messages so it's only necessary to call this if the sequencer is down, or not including any delayed messages. /// @param _totalDelayedMessagesRead The total number of messages to read up to /// @param kind The kind of the last message to be included /// @param l1BlockAndTime The l1 block and the l1 timestamp of the last message to be included /// @param baseFeeL1 The l1 gas price of the last message to be included /// @param sender The sender of the last message to be included /// @param messageDataHash The messageDataHash of the last message to be included function forceInclusion( uint256 _totalDelayedMessagesRead, uint8 kind, uint64[2] calldata l1BlockAndTime, uint256 baseFeeL1, address sender, bytes32 messageDataHash ) external; function inboxAccs(uint256 index) external view returns (bytes32); function batchCount() external view returns (uint256); function isValidKeysetHash(bytes32 ksHash) external view returns (bool); /// @notice the creation block is intended to still be available after a keyset is deleted function getKeysetCreationBlock(bytes32 ksHash) external view returns (uint256); // ---------- BatchPoster functions ---------- function addSequencerL2BatchFromOrigin( uint256 sequenceNumber, bytes calldata data, uint256 afterDelayedMessagesRead, IGasRefunder gasRefunder ) external; function addSequencerL2BatchFromOrigin( uint256 sequenceNumber, bytes calldata data, uint256 afterDelayedMessagesRead, IGasRefunder gasRefunder, uint256 prevMessageCount, uint256 newMessageCount ) external; function addSequencerL2Batch( uint256 sequenceNumber, bytes calldata data, uint256 afterDelayedMessagesRead, IGasRefunder gasRefunder, uint256 prevMessageCount, uint256 newMessageCount ) external; function addSequencerL2BatchFromBlobs( uint256 sequenceNumber, uint256 afterDelayedMessagesRead, IGasRefunder gasRefunder, uint256 prevMessageCount, uint256 newMessageCount ) external; // ---------- onlyRollupOrOwner functions ---------- /** * @notice Set max delay for sequencer inbox * @param maxTimeVariation_ the maximum time variation parameters */ function setMaxTimeVariation(MaxTimeVariation memory maxTimeVariation_) external; /** * @notice Updates whether an address is authorized to be a batch poster at the sequencer inbox * @param addr the address * @param isBatchPoster_ if the specified address should be authorized as a batch poster */ function setIsBatchPoster(address addr, bool isBatchPoster_) external; /** * @notice Makes Data Availability Service keyset valid * @param keysetBytes bytes of the serialized keyset */ function setValidKeyset(bytes calldata keysetBytes) external; /** * @notice Invalidates a Data Availability Service keyset * @param ksHash hash of the keyset */ function invalidateKeysetHash(bytes32 ksHash) external; /** * @notice Updates whether an address is authorized to be a sequencer. * @dev The IsSequencer information is used only off-chain by the nitro node to validate sequencer feed signer. * @param addr the address * @param isSequencer_ if the specified address should be authorized as a sequencer */ function setIsSequencer(address addr, bool isSequencer_) external; /** * @notice Updates the batch poster manager, the address which has the ability to rotate batch poster keys * @param newBatchPosterManager The new batch poster manager to be set */ function setBatchPosterManager(address newBatchPosterManager) external; /// @notice Allows the rollup owner to sync the rollup address function updateRollupAddress() external; // ---------- initializer ---------- function initialize(IBridge bridge_, MaxTimeVariation calldata maxTimeVariation_) external; }
// Copyright 2021-2022, Offchain Labs, Inc. // For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 // solhint-disable-next-line compiler-version pragma solidity >=0.6.9 <0.9.0; interface IGasRefunder { function onGasSpent( address payable spender, uint256 gasUsed, uint256 calldataSize ) external returns (bool success); }
// Copyright 2021-2022, Offchain Labs, Inc. // For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; import "./IOneStepProver.sol"; library OneStepProofEntryLib { uint256 internal constant MAX_STEPS = 1 << 43; } interface IOneStepProofEntry { function proveOneStep( ExecutionContext calldata execCtx, uint256 machineStep, bytes32 beforeHash, bytes calldata proof ) external view returns (bytes32 afterHash); }
// Copyright 2021-2022, Offchain Labs, Inc. // For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; import "../state/Machine.sol"; import "../state/Module.sol"; import "../state/Instructions.sol"; import "../state/GlobalState.sol"; import "../bridge/ISequencerInbox.sol"; import "../bridge/IBridge.sol"; struct ExecutionContext { uint256 maxInboxMessagesRead; IBridge bridge; } abstract contract IOneStepProver { function executeOneStep( ExecutionContext memory execCtx, Machine calldata mach, Module calldata mod, Instruction calldata instruction, bytes calldata proof ) external view virtual returns (Machine memory result, Module memory resultMod); }
// Copyright 2021-2022, Offchain Labs, Inc. // For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; import "./Value.sol"; import "./ValueStack.sol"; import "./Machine.sol"; import "./Instructions.sol"; import "./StackFrame.sol"; import "./MerkleProof.sol"; import "./ModuleMemoryCompact.sol"; import "./Module.sol"; import "./GlobalState.sol"; library Deserialize { function u8(bytes calldata proof, uint256 startOffset) internal pure returns (uint8 ret, uint256 offset) { offset = startOffset; ret = uint8(proof[offset]); offset++; } function u16(bytes calldata proof, uint256 startOffset) internal pure returns (uint16 ret, uint256 offset) { offset = startOffset; for (uint256 i = 0; i < 16 / 8; i++) { ret <<= 8; ret |= uint8(proof[offset]); offset++; } } function u32(bytes calldata proof, uint256 startOffset) internal pure returns (uint32 ret, uint256 offset) { offset = startOffset; for (uint256 i = 0; i < 32 / 8; i++) { ret <<= 8; ret |= uint8(proof[offset]); offset++; } } function u64(bytes calldata proof, uint256 startOffset) internal pure returns (uint64 ret, uint256 offset) { offset = startOffset; for (uint256 i = 0; i < 64 / 8; i++) { ret <<= 8; ret |= uint8(proof[offset]); offset++; } } function u256(bytes calldata proof, uint256 startOffset) internal pure returns (uint256 ret, uint256 offset) { offset = startOffset; for (uint256 i = 0; i < 256 / 8; i++) { ret <<= 8; ret |= uint8(proof[offset]); offset++; } } function b32(bytes calldata proof, uint256 startOffset) internal pure returns (bytes32 ret, uint256 offset) { offset = startOffset; uint256 retInt; (retInt, offset) = u256(proof, offset); ret = bytes32(retInt); } function value(bytes calldata proof, uint256 startOffset) internal pure returns (Value memory val, uint256 offset) { offset = startOffset; uint8 typeInt = uint8(proof[offset]); offset++; require(typeInt <= uint8(ValueLib.maxValueType()), "BAD_VALUE_TYPE"); uint256 contents; (contents, offset) = u256(proof, offset); val = Value({valueType: ValueType(typeInt), contents: contents}); } function valueStack(bytes calldata proof, uint256 startOffset) internal pure returns (ValueStack memory stack, uint256 offset) { offset = startOffset; bytes32 remainingHash; (remainingHash, offset) = b32(proof, offset); uint256 provedLength; (provedLength, offset) = u256(proof, offset); Value[] memory proved = new Value[](provedLength); for (uint256 i = 0; i < proved.length; i++) { (proved[i], offset) = value(proof, offset); } stack = ValueStack({proved: ValueArray(proved), remainingHash: remainingHash}); } function instruction(bytes calldata proof, uint256 startOffset) internal pure returns (Instruction memory inst, uint256 offset) { offset = startOffset; uint16 opcode; uint256 data; (opcode, offset) = u16(proof, offset); (data, offset) = u256(proof, offset); inst = Instruction({opcode: opcode, argumentData: data}); } function stackFrame(bytes calldata proof, uint256 startOffset) internal pure returns (StackFrame memory window, uint256 offset) { offset = startOffset; Value memory returnPc; bytes32 localsMerkleRoot; uint32 callerModule; uint32 callerModuleInternals; (returnPc, offset) = value(proof, offset); (localsMerkleRoot, offset) = b32(proof, offset); (callerModule, offset) = u32(proof, offset); (callerModuleInternals, offset) = u32(proof, offset); window = StackFrame({ returnPc: returnPc, localsMerkleRoot: localsMerkleRoot, callerModule: callerModule, callerModuleInternals: callerModuleInternals }); } function stackFrameWindow(bytes calldata proof, uint256 startOffset) internal pure returns (StackFrameWindow memory window, uint256 offset) { offset = startOffset; bytes32 remainingHash; (remainingHash, offset) = b32(proof, offset); StackFrame[] memory proved; if (proof[offset] != 0) { offset++; proved = new StackFrame[](1); (proved[0], offset) = stackFrame(proof, offset); } else { offset++; proved = new StackFrame[](0); } window = StackFrameWindow({proved: proved, remainingHash: remainingHash}); } function moduleMemory(bytes calldata proof, uint256 startOffset) internal pure returns (ModuleMemory memory mem, uint256 offset) { offset = startOffset; uint64 size; uint64 maxSize; bytes32 root; (size, offset) = u64(proof, offset); (maxSize, offset) = u64(proof, offset); (root, offset) = b32(proof, offset); mem = ModuleMemory({size: size, maxSize: maxSize, merkleRoot: root}); } function module(bytes calldata proof, uint256 startOffset) internal pure returns (Module memory mod, uint256 offset) { offset = startOffset; bytes32 globalsMerkleRoot; ModuleMemory memory mem; bytes32 tablesMerkleRoot; bytes32 functionsMerkleRoot; uint32 internalsOffset; (globalsMerkleRoot, offset) = b32(proof, offset); (mem, offset) = moduleMemory(proof, offset); (tablesMerkleRoot, offset) = b32(proof, offset); (functionsMerkleRoot, offset) = b32(proof, offset); (internalsOffset, offset) = u32(proof, offset); mod = Module({ globalsMerkleRoot: globalsMerkleRoot, moduleMemory: mem, tablesMerkleRoot: tablesMerkleRoot, functionsMerkleRoot: functionsMerkleRoot, internalsOffset: internalsOffset }); } function globalState(bytes calldata proof, uint256 startOffset) internal pure returns (GlobalState memory state, uint256 offset) { offset = startOffset; // using constant ints for array size requires newer solidity bytes32[2] memory bytes32Vals; uint64[2] memory u64Vals; for (uint8 i = 0; i < GlobalStateLib.BYTES32_VALS_NUM; i++) { (bytes32Vals[i], offset) = b32(proof, offset); } for (uint8 i = 0; i < GlobalStateLib.U64_VALS_NUM; i++) { (u64Vals[i], offset) = u64(proof, offset); } state = GlobalState({bytes32Vals: bytes32Vals, u64Vals: u64Vals}); } function machine(bytes calldata proof, uint256 startOffset) internal pure returns (Machine memory mach, uint256 offset) { offset = startOffset; MachineStatus status; { uint8 statusU8; (statusU8, offset) = u8(proof, offset); if (statusU8 == 0) { status = MachineStatus.RUNNING; } else if (statusU8 == 1) { status = MachineStatus.FINISHED; } else if (statusU8 == 2) { status = MachineStatus.ERRORED; } else if (statusU8 == 3) { status = MachineStatus.TOO_FAR; } else { revert("UNKNOWN_MACH_STATUS"); } } ValueStack memory values; ValueStack memory internalStack; bytes32 globalStateHash; uint32 moduleIdx; uint32 functionIdx; uint32 functionPc; StackFrameWindow memory frameStack; bytes32 modulesRoot; (values, offset) = valueStack(proof, offset); (internalStack, offset) = valueStack(proof, offset); (frameStack, offset) = stackFrameWindow(proof, offset); (globalStateHash, offset) = b32(proof, offset); (moduleIdx, offset) = u32(proof, offset); (functionIdx, offset) = u32(proof, offset); (functionPc, offset) = u32(proof, offset); (modulesRoot, offset) = b32(proof, offset); mach = Machine({ status: status, valueStack: values, internalStack: internalStack, frameStack: frameStack, globalStateHash: globalStateHash, moduleIdx: moduleIdx, functionIdx: functionIdx, functionPc: functionPc, modulesRoot: modulesRoot }); } function merkleProof(bytes calldata proof, uint256 startOffset) internal pure returns (MerkleProof memory merkle, uint256 offset) { offset = startOffset; uint8 length; (length, offset) = u8(proof, offset); bytes32[] memory counterparts = new bytes32[](length); for (uint8 i = 0; i < length; i++) { (counterparts[i], offset) = b32(proof, offset); } merkle = MerkleProof(counterparts); } }
// Copyright 2021-2022, Offchain Labs, Inc. // For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; struct GlobalState { bytes32[2] bytes32Vals; uint64[2] u64Vals; } library GlobalStateLib { uint16 internal constant BYTES32_VALS_NUM = 2; uint16 internal constant U64_VALS_NUM = 2; function hash(GlobalState memory state) internal pure returns (bytes32) { return keccak256( abi.encodePacked( "Global state:", state.bytes32Vals[0], state.bytes32Vals[1], state.u64Vals[0], state.u64Vals[1] ) ); } function getBlockHash(GlobalState memory state) internal pure returns (bytes32) { return state.bytes32Vals[0]; } function getSendRoot(GlobalState memory state) internal pure returns (bytes32) { return state.bytes32Vals[1]; } function getInboxPosition(GlobalState memory state) internal pure returns (uint64) { return state.u64Vals[0]; } function getPositionInMessage(GlobalState memory state) internal pure returns (uint64) { return state.u64Vals[1]; } function isEmpty(GlobalState calldata state) internal pure returns (bool) { return (state.bytes32Vals[0] == bytes32(0) && state.bytes32Vals[1] == bytes32(0) && state.u64Vals[0] == 0 && state.u64Vals[1] == 0); } }
// Copyright 2021-2022, Offchain Labs, Inc. // For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; struct Instruction { uint16 opcode; uint256 argumentData; } library Instructions { uint16 internal constant UNREACHABLE = 0x00; uint16 internal constant NOP = 0x01; uint16 internal constant RETURN = 0x0F; uint16 internal constant CALL = 0x10; uint16 internal constant CALL_INDIRECT = 0x11; uint16 internal constant LOCAL_GET = 0x20; uint16 internal constant LOCAL_SET = 0x21; uint16 internal constant GLOBAL_GET = 0x23; uint16 internal constant GLOBAL_SET = 0x24; uint16 internal constant I32_LOAD = 0x28; uint16 internal constant I64_LOAD = 0x29; uint16 internal constant F32_LOAD = 0x2A; uint16 internal constant F64_LOAD = 0x2B; uint16 internal constant I32_LOAD8_S = 0x2C; uint16 internal constant I32_LOAD8_U = 0x2D; uint16 internal constant I32_LOAD16_S = 0x2E; uint16 internal constant I32_LOAD16_U = 0x2F; uint16 internal constant I64_LOAD8_S = 0x30; uint16 internal constant I64_LOAD8_U = 0x31; uint16 internal constant I64_LOAD16_S = 0x32; uint16 internal constant I64_LOAD16_U = 0x33; uint16 internal constant I64_LOAD32_S = 0x34; uint16 internal constant I64_LOAD32_U = 0x35; uint16 internal constant I32_STORE = 0x36; uint16 internal constant I64_STORE = 0x37; uint16 internal constant F32_STORE = 0x38; uint16 internal constant F64_STORE = 0x39; uint16 internal constant I32_STORE8 = 0x3A; uint16 internal constant I32_STORE16 = 0x3B; uint16 internal constant I64_STORE8 = 0x3C; uint16 internal constant I64_STORE16 = 0x3D; uint16 internal constant I64_STORE32 = 0x3E; uint16 internal constant MEMORY_SIZE = 0x3F; uint16 internal constant MEMORY_GROW = 0x40; uint16 internal constant DROP = 0x1A; uint16 internal constant SELECT = 0x1B; uint16 internal constant I32_CONST = 0x41; uint16 internal constant I64_CONST = 0x42; uint16 internal constant F32_CONST = 0x43; uint16 internal constant F64_CONST = 0x44; uint16 internal constant I32_EQZ = 0x45; uint16 internal constant I32_RELOP_BASE = 0x46; uint16 internal constant IRELOP_EQ = 0; uint16 internal constant IRELOP_NE = 1; uint16 internal constant IRELOP_LT_S = 2; uint16 internal constant IRELOP_LT_U = 3; uint16 internal constant IRELOP_GT_S = 4; uint16 internal constant IRELOP_GT_U = 5; uint16 internal constant IRELOP_LE_S = 6; uint16 internal constant IRELOP_LE_U = 7; uint16 internal constant IRELOP_GE_S = 8; uint16 internal constant IRELOP_GE_U = 9; uint16 internal constant IRELOP_LAST = IRELOP_GE_U; uint16 internal constant I64_EQZ = 0x50; uint16 internal constant I64_RELOP_BASE = 0x51; uint16 internal constant I32_UNOP_BASE = 0x67; uint16 internal constant IUNOP_CLZ = 0; uint16 internal constant IUNOP_CTZ = 1; uint16 internal constant IUNOP_POPCNT = 2; uint16 internal constant IUNOP_LAST = IUNOP_POPCNT; uint16 internal constant I32_ADD = 0x6A; uint16 internal constant I32_SUB = 0x6B; uint16 internal constant I32_MUL = 0x6C; uint16 internal constant I32_DIV_S = 0x6D; uint16 internal constant I32_DIV_U = 0x6E; uint16 internal constant I32_REM_S = 0x6F; uint16 internal constant I32_REM_U = 0x70; uint16 internal constant I32_AND = 0x71; uint16 internal constant I32_OR = 0x72; uint16 internal constant I32_XOR = 0x73; uint16 internal constant I32_SHL = 0x74; uint16 internal constant I32_SHR_S = 0x75; uint16 internal constant I32_SHR_U = 0x76; uint16 internal constant I32_ROTL = 0x77; uint16 internal constant I32_ROTR = 0x78; uint16 internal constant I64_UNOP_BASE = 0x79; uint16 internal constant I64_ADD = 0x7C; uint16 internal constant I64_SUB = 0x7D; uint16 internal constant I64_MUL = 0x7E; uint16 internal constant I64_DIV_S = 0x7F; uint16 internal constant I64_DIV_U = 0x80; uint16 internal constant I64_REM_S = 0x81; uint16 internal constant I64_REM_U = 0x82; uint16 internal constant I64_AND = 0x83; uint16 internal constant I64_OR = 0x84; uint16 internal constant I64_XOR = 0x85; uint16 internal constant I64_SHL = 0x86; uint16 internal constant I64_SHR_S = 0x87; uint16 internal constant I64_SHR_U = 0x88; uint16 internal constant I64_ROTL = 0x89; uint16 internal constant I64_ROTR = 0x8A; uint16 internal constant I32_WRAP_I64 = 0xA7; uint16 internal constant I64_EXTEND_I32_S = 0xAC; uint16 internal constant I64_EXTEND_I32_U = 0xAD; uint16 internal constant I32_REINTERPRET_F32 = 0xBC; uint16 internal constant I64_REINTERPRET_F64 = 0xBD; uint16 internal constant F32_REINTERPRET_I32 = 0xBE; uint16 internal constant F64_REINTERPRET_I64 = 0xBF; uint16 internal constant I32_EXTEND_8S = 0xC0; uint16 internal constant I32_EXTEND_16S = 0xC1; uint16 internal constant I64_EXTEND_8S = 0xC2; uint16 internal constant I64_EXTEND_16S = 0xC3; uint16 internal constant I64_EXTEND_32S = 0xC4; uint16 internal constant INIT_FRAME = 0x8002; uint16 internal constant ARBITRARY_JUMP = 0x8003; uint16 internal constant ARBITRARY_JUMP_IF = 0x8004; uint16 internal constant MOVE_FROM_STACK_TO_INTERNAL = 0x8005; uint16 internal constant MOVE_FROM_INTERNAL_TO_STACK = 0x8006; uint16 internal constant DUP = 0x8008; uint16 internal constant CROSS_MODULE_CALL = 0x8009; uint16 internal constant CALLER_MODULE_INTERNAL_CALL = 0x800A; uint16 internal constant GET_GLOBAL_STATE_BYTES32 = 0x8010; uint16 internal constant SET_GLOBAL_STATE_BYTES32 = 0x8011; uint16 internal constant GET_GLOBAL_STATE_U64 = 0x8012; uint16 internal constant SET_GLOBAL_STATE_U64 = 0x8013; uint16 internal constant READ_PRE_IMAGE = 0x8020; uint16 internal constant READ_INBOX_MESSAGE = 0x8021; uint16 internal constant HALT_AND_SET_FINISHED = 0x8022; uint256 internal constant INBOX_INDEX_SEQUENCER = 0; uint256 internal constant INBOX_INDEX_DELAYED = 1; function hash(Instruction memory inst) internal pure returns (bytes32) { return keccak256(abi.encodePacked("Instruction:", inst.opcode, inst.argumentData)); } }
// Copyright 2021-2022, Offchain Labs, Inc. // For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; import "./ValueStack.sol"; import "./Instructions.sol"; import "./StackFrame.sol"; enum MachineStatus { RUNNING, FINISHED, ERRORED, TOO_FAR } struct Machine { MachineStatus status; ValueStack valueStack; ValueStack internalStack; StackFrameWindow frameStack; bytes32 globalStateHash; uint32 moduleIdx; uint32 functionIdx; uint32 functionPc; bytes32 modulesRoot; } library MachineLib { using StackFrameLib for StackFrameWindow; using ValueStackLib for ValueStack; function hash(Machine memory mach) internal pure returns (bytes32) { // Warning: the non-running hashes are replicated in Challenge if (mach.status == MachineStatus.RUNNING) { return keccak256( abi.encodePacked( "Machine running:", mach.valueStack.hash(), mach.internalStack.hash(), mach.frameStack.hash(), mach.globalStateHash, mach.moduleIdx, mach.functionIdx, mach.functionPc, mach.modulesRoot ) ); } else if (mach.status == MachineStatus.FINISHED) { return keccak256(abi.encodePacked("Machine finished:", mach.globalStateHash)); } else if (mach.status == MachineStatus.ERRORED) { return keccak256(abi.encodePacked("Machine errored:")); } else if (mach.status == MachineStatus.TOO_FAR) { return keccak256(abi.encodePacked("Machine too far:")); } else { revert("BAD_MACH_STATUS"); } } }
// Copyright 2021-2022, Offchain Labs, Inc. // For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; import "./Value.sol"; import "./Instructions.sol"; import "./Module.sol"; struct MerkleProof { bytes32[] counterparts; } library MerkleProofLib { using ModuleLib for Module; using ValueLib for Value; function computeRootFromValue( MerkleProof memory proof, uint256 index, Value memory leaf ) internal pure returns (bytes32) { return computeRootUnsafe(proof, index, leaf.hash(), "Value merkle tree:"); } function computeRootFromInstruction( MerkleProof memory proof, uint256 index, Instruction memory inst ) internal pure returns (bytes32) { return computeRootUnsafe(proof, index, Instructions.hash(inst), "Instruction merkle tree:"); } function computeRootFromFunction( MerkleProof memory proof, uint256 index, bytes32 codeRoot ) internal pure returns (bytes32) { bytes32 h = keccak256(abi.encodePacked("Function:", codeRoot)); return computeRootUnsafe(proof, index, h, "Function merkle tree:"); } function computeRootFromMemory( MerkleProof memory proof, uint256 index, bytes32 contents ) internal pure returns (bytes32) { bytes32 h = keccak256(abi.encodePacked("Memory leaf:", contents)); return computeRootUnsafe(proof, index, h, "Memory merkle tree:"); } function computeRootFromElement( MerkleProof memory proof, uint256 index, bytes32 funcTypeHash, Value memory val ) internal pure returns (bytes32) { bytes32 h = keccak256(abi.encodePacked("Table element:", funcTypeHash, val.hash())); return computeRootUnsafe(proof, index, h, "Table element merkle tree:"); } function computeRootFromTable( MerkleProof memory proof, uint256 index, uint8 tableType, uint64 tableSize, bytes32 elementsRoot ) internal pure returns (bytes32) { bytes32 h = keccak256(abi.encodePacked("Table:", tableType, tableSize, elementsRoot)); return computeRootUnsafe(proof, index, h, "Table merkle tree:"); } function computeRootFromModule( MerkleProof memory proof, uint256 index, Module memory mod ) internal pure returns (bytes32) { return computeRootUnsafe(proof, index, mod.hash(), "Module merkle tree:"); } // WARNING: leafHash must be computed in such a way that it cannot be a non-leaf hash. function computeRootUnsafe( MerkleProof memory proof, uint256 index, bytes32 leafHash, string memory prefix ) internal pure returns (bytes32 h) { h = leafHash; for (uint256 layer = 0; layer < proof.counterparts.length; layer++) { if (index & 1 == 0) { h = keccak256(abi.encodePacked(prefix, h, proof.counterparts[layer])); } else { h = keccak256(abi.encodePacked(prefix, proof.counterparts[layer], h)); } index >>= 1; } } }
// Copyright 2021-2022, Offchain Labs, Inc. // For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; import "./ModuleMemoryCompact.sol"; struct Module { bytes32 globalsMerkleRoot; ModuleMemory moduleMemory; bytes32 tablesMerkleRoot; bytes32 functionsMerkleRoot; uint32 internalsOffset; } library ModuleLib { using ModuleMemoryCompactLib for ModuleMemory; function hash(Module memory mod) internal pure returns (bytes32) { return keccak256( abi.encodePacked( "Module:", mod.globalsMerkleRoot, mod.moduleMemory.hash(), mod.tablesMerkleRoot, mod.functionsMerkleRoot, mod.internalsOffset ) ); } }
// Copyright 2021-2022, Offchain Labs, Inc. // For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; struct ModuleMemory { uint64 size; uint64 maxSize; bytes32 merkleRoot; } library ModuleMemoryCompactLib { function hash(ModuleMemory memory mem) internal pure returns (bytes32) { return keccak256(abi.encodePacked("Memory:", mem.size, mem.maxSize, mem.merkleRoot)); } }
// Copyright 2021-2022, Offchain Labs, Inc. // For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; import "./Value.sol"; struct StackFrame { Value returnPc; bytes32 localsMerkleRoot; uint32 callerModule; uint32 callerModuleInternals; } struct StackFrameWindow { StackFrame[] proved; bytes32 remainingHash; } library StackFrameLib { using ValueLib for Value; function hash(StackFrame memory frame) internal pure returns (bytes32) { return keccak256( abi.encodePacked( "Stack frame:", frame.returnPc.hash(), frame.localsMerkleRoot, frame.callerModule, frame.callerModuleInternals ) ); } function hash(StackFrameWindow memory window) internal pure returns (bytes32 h) { h = window.remainingHash; for (uint256 i = 0; i < window.proved.length; i++) { h = keccak256(abi.encodePacked("Stack frame stack:", hash(window.proved[i]), h)); } } function peek(StackFrameWindow memory window) internal pure returns (StackFrame memory) { require(window.proved.length == 1, "BAD_WINDOW_LENGTH"); return window.proved[0]; } function pop(StackFrameWindow memory window) internal pure returns (StackFrame memory frame) { require(window.proved.length == 1, "BAD_WINDOW_LENGTH"); frame = window.proved[0]; window.proved = new StackFrame[](0); } function push(StackFrameWindow memory window, StackFrame memory frame) internal pure { StackFrame[] memory newProved = new StackFrame[](window.proved.length + 1); for (uint256 i = 0; i < window.proved.length; i++) { newProved[i] = window.proved[i]; } newProved[window.proved.length] = frame; window.proved = newProved; } }
// Copyright 2021-2022, Offchain Labs, Inc. // For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; enum ValueType { I32, I64, F32, F64, REF_NULL, FUNC_REF, INTERNAL_REF } struct Value { ValueType valueType; uint256 contents; } library ValueLib { function hash(Value memory val) internal pure returns (bytes32) { return keccak256(abi.encodePacked("Value:", val.valueType, val.contents)); } function maxValueType() internal pure returns (ValueType) { return ValueType.INTERNAL_REF; } function assumeI32(Value memory val) internal pure returns (uint32) { uint256 uintval = uint256(val.contents); require(val.valueType == ValueType.I32, "NOT_I32"); require(uintval < (1 << 32), "BAD_I32"); return uint32(uintval); } function assumeI64(Value memory val) internal pure returns (uint64) { uint256 uintval = uint256(val.contents); require(val.valueType == ValueType.I64, "NOT_I64"); require(uintval < (1 << 64), "BAD_I64"); return uint64(uintval); } function newRefNull() internal pure returns (Value memory) { return Value({valueType: ValueType.REF_NULL, contents: 0}); } function newI32(uint32 x) internal pure returns (Value memory) { return Value({valueType: ValueType.I32, contents: uint256(x)}); } function newI64(uint64 x) internal pure returns (Value memory) { return Value({valueType: ValueType.I64, contents: uint256(x)}); } function newBoolean(bool x) internal pure returns (Value memory) { if (x) { return newI32(uint32(1)); } else { return newI32(uint32(0)); } } }
// Copyright 2021-2022, Offchain Labs, Inc. // For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; import "./Value.sol"; struct ValueArray { Value[] inner; } library ValueArrayLib { function get(ValueArray memory arr, uint256 index) internal pure returns (Value memory) { return arr.inner[index]; } function set( ValueArray memory arr, uint256 index, Value memory val ) internal pure { arr.inner[index] = val; } function length(ValueArray memory arr) internal pure returns (uint256) { return arr.inner.length; } function push(ValueArray memory arr, Value memory val) internal pure { Value[] memory newInner = new Value[](arr.inner.length + 1); for (uint256 i = 0; i < arr.inner.length; i++) { newInner[i] = arr.inner[i]; } newInner[arr.inner.length] = val; arr.inner = newInner; } function pop(ValueArray memory arr) internal pure returns (Value memory popped) { popped = arr.inner[arr.inner.length - 1]; Value[] memory newInner = new Value[](arr.inner.length - 1); for (uint256 i = 0; i < newInner.length; i++) { newInner[i] = arr.inner[i]; } arr.inner = newInner; } }
// Copyright 2021-2022, Offchain Labs, Inc. // For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE // SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; import "./Value.sol"; import "./ValueArray.sol"; struct ValueStack { ValueArray proved; bytes32 remainingHash; } library ValueStackLib { using ValueLib for Value; using ValueArrayLib for ValueArray; function hash(ValueStack memory stack) internal pure returns (bytes32 h) { h = stack.remainingHash; uint256 len = stack.proved.length(); for (uint256 i = 0; i < len; i++) { h = keccak256(abi.encodePacked("Value stack:", stack.proved.get(i).hash(), h)); } } function peek(ValueStack memory stack) internal pure returns (Value memory) { uint256 len = stack.proved.length(); return stack.proved.get(len - 1); } function pop(ValueStack memory stack) internal pure returns (Value memory) { return stack.proved.pop(); } function push(ValueStack memory stack, Value memory val) internal pure { return stack.proved.push(val); } }
{ "optimizer": { "enabled": true, "runs": 100 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IOneStepProver","name":"prover0_","type":"address"},{"internalType":"contract IOneStepProver","name":"proverMem_","type":"address"},{"internalType":"contract IOneStepProver","name":"proverMath_","type":"address"},{"internalType":"contract IOneStepProver","name":"proverHostIo_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"components":[{"internalType":"uint256","name":"maxInboxMessagesRead","type":"uint256"},{"internalType":"contract IBridge","name":"bridge","type":"address"}],"internalType":"struct ExecutionContext","name":"execCtx","type":"tuple"},{"internalType":"uint256","name":"machineStep","type":"uint256"},{"internalType":"bytes32","name":"beforeHash","type":"bytes32"},{"internalType":"bytes","name":"proof","type":"bytes"}],"name":"proveOneStep","outputs":[{"internalType":"bytes32","name":"afterHash","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"prover0","outputs":[{"internalType":"contract IOneStepProver","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proverHostIo","outputs":[{"internalType":"contract IOneStepProver","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proverMath","outputs":[{"internalType":"contract IOneStepProver","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proverMem","outputs":[{"internalType":"contract IOneStepProver","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162002378380380620023788339810160408190526200003491620000a5565b600080546001600160a01b039586166001600160a01b031991821617909155600180549486169482169490941790935560028054928516928416929092179091556003805491909316911617905562000102565b80516001600160a01b0381168114620000a057600080fd5b919050565b60008060008060808587031215620000bc57600080fd5b620000c78562000088565b9350620000d76020860162000088565b9250620000e76040860162000088565b9150620000f76060860162000088565b905092959194509250565b61226680620001126000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80631f128bc01461005c57806330a5509f1461008c5780635d3adcfb1461009f5780635f52fd7c146100c057806366e5d9c3146100d3575b600080fd5b60015461006f906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b60005461006f906001600160a01b031681565b6100b26100ad3660046117fb565b6100e6565b604051908152602001610083565b60035461006f906001600160a01b031681565b60025461006f906001600160a01b031681565b60006100f06116f7565b6100f8611769565b6040805160208101909152606081526040805180820190915260008082526020820152600061012888888361069c565b9095509050886101378661086b565b1461017f5760405162461bcd60e51b815260206004820152601360248201527209a828690929c8abe848a8c9ea48abe9082a69606b1b60448201526064015b60405180910390fd5b60008551600381111561019457610194611896565b146101ae576101a28561086b565b95505050505050610693565b650800000000006101c08b60016118c2565b14156101d357600285526101a28561086b565b6101de888883610a5a565b90945090506101ee888883610b06565b809250819450505084610100015161021b8660a0015163ffffffff168686610be09092919063ffffffff16565b146102575760405162461bcd60e51b815260206004820152600c60248201526b1353d115531154d7d493d3d560a21b6044820152606401610176565b6040805160208101909152606081526040805160208101909152606081526102808a8a85610c29565b90945092506102908a8a85610b06565b9350915061029f8a8a85610b06565b809450819250505060006102c88860e0015163ffffffff168685610c839092919063ffffffff16565b905060006102eb8960c0015163ffffffff168385610cc99092919063ffffffff16565b9050876060015181146103355760405162461bcd60e51b815260206004820152601260248201527110905117d1955390d51253d394d7d493d3d560721b6044820152606401610176565b506103489250899150839050818b6118da565b975097505060008460a0015163ffffffff16905060018560e00181815161036f9190611904565b63ffffffff1690525081516000602861ffff8316108015906103965750603561ffff831611155b806103b65750603661ffff8316108015906103b65750603e61ffff831611155b806103c5575061ffff8216603f145b806103d4575061ffff82166040145b156103eb57506001546001600160a01b03166105e0565b61ffff821660451480610402575061ffff82166050145b806104305750604661ffff83161080159061043057506104246009604661192c565b61ffff168261ffff1611155b8061045e5750606761ffff83161080159061045e57506104526002606761192c565b61ffff168261ffff1611155b8061047e5750606a61ffff83161080159061047e5750607861ffff831611155b806104ac5750605161ffff8316108015906104ac57506104a06009605161192c565b61ffff168261ffff1611155b806104da5750607961ffff8316108015906104da57506104ce6002607961192c565b61ffff168261ffff1611155b806104fa5750607c61ffff8316108015906104fa5750608a61ffff831611155b80610509575061ffff821660a7145b80610526575061ffff821660ac1480610526575061ffff821660ad145b80610546575060c061ffff831610801590610546575060c461ffff831611155b80610566575060bc61ffff831610801590610566575060bf61ffff831611155b1561057d57506002546001600160a01b03166105e0565b61801061ffff831610801590610599575061801361ffff831611155b806105bb575061802061ffff8316108015906105bb575061802261ffff831611155b156105d257506003546001600160a01b03166105e0565b506000546001600160a01b03165b806001600160a01b031663da78e7d18e8989888f8f6040518763ffffffff1660e01b815260040161061696959493929190611a8b565b60006040518083038186803b15801561062e57600080fd5b505afa158015610642573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261066a9190810190612042565b909750955061067a858488610be0565b6101008801526106898761086b565b9750505050505050505b95945050505050565b6106a46116f7565b816000806106b3878785610d3e565b9350905060ff81166106c85760009150610745565b8060ff16600114156106dd5760019150610745565b8060ff16600214156106f25760029150610745565b8060ff16600314156107075760039150610745565b60405162461bcd60e51b8152602060048201526013602482015272554e4b4e4f574e5f4d4143485f53544154555360681b6044820152606401610176565b5061074e6117ba565b6107566117ba565b60008060008061077760408051808201909152606081526000602082015290565b60006107848e8e8c610d74565b9a5097506107938e8e8c610d74565b9a5096506107a28e8e8c610e73565b9a5091506107b18e8e8c610f9b565b9a5095506107c08e8e8c610fb7565b9a5094506107cf8e8e8c610fb7565b9a5093506107de8e8e8c610fb7565b9a5092506107ed8e8e8c610f9b565b809b5081925050506040518061012001604052808a600381111561081357610813611896565b81526020018981526020018881526020018381526020018781526020018663ffffffff1681526020018563ffffffff1681526020018463ffffffff168152602001828152509a50505050505050505050935093915050565b6000808251600381111561088157610881611896565b141561095057610894826020015161101b565b6108a1836040015161101b565b6108ae84606001516110a0565b608085015160a086015160c087015160e0808901516101008a01516040516f26b0b1b434b73290393ab73734b7339d60811b602082015260308101999099526050890197909752607088019590955260908701939093526001600160e01b031991831b821660b0870152821b811660b486015291901b1660b883015260bc82015260dc015b604051602081830303815290604052805190602001209050919050565b60018251600381111561096557610965611896565b141561099d5760808201516040517026b0b1b434b732903334b734b9b432b21d60791b60208201526031810191909152605101610933565b6002825160038111156109b2576109b2611896565b14156109dc576040516f26b0b1b434b7329032b93937b932b21d60811b6020820152603001610933565b6003825160038111156109f1576109f1611896565b1415610a1b576040516f26b0b1b434b732903a37b7903330b91d60811b6020820152603001610933565b60405162461bcd60e51b815260206004820152600f60248201526e4241445f4d4143485f53544154555360881b6044820152606401610176565b919050565b610a62611769565b604080516060810182526000808252602082018190529181018290528391906000806000610a918a8a88610f9b565b96509450610aa08a8a88611139565b96509350610aaf8a8a88610f9b565b96509250610abe8a8a88610f9b565b96509150610acd8a8a88610fb7565b6040805160a08101825297885260208801969096529486019390935250606084015263ffffffff16608083015290969095509350505050565b604080516020810190915260608152816000610b23868684610d3e565b92509050600060ff82166001600160401b03811115610b4457610b44611c19565b604051908082528060200260200182016040528015610b6d578160200160208202803683370190505b50905060005b8260ff168160ff161015610bc457610b8c888886610f9b565b838360ff1681518110610ba157610ba1612164565b602002602001018196508281525050508080610bbc9061217a565b915050610b73565b5060405180602001604052808281525093505050935093915050565b6000610c218484610bf0856111b4565b6040518060400160405280601381526020017226b7b23ab6329036b2b935b632903a3932b29d60691b815250611221565b949350505050565b604080518082019091526000808252602082015281600080610c4c8787856112f3565b93509150610c5b87878561134c565b6040805180820190915261ffff90941684526020840191909152919791965090945050505050565b6000610c218484610c93856113a1565b6040518060400160405280601881526020017724b739ba393ab1ba34b7b71036b2b935b632903a3932b29d60411b815250611221565b60405168233ab731ba34b7b71d60b91b602082015260298101829052600090819060490160405160208183030381529060405280519060200120905061069385858360405180604001604052806015815260200174233ab731ba34b7b71036b2b935b632903a3932b29d60591b815250611221565b600081848482818110610d5357610d53612164565b919091013560f81c9250819050610d698161219a565b915050935093915050565b610d7c6117ba565b816000610d8a868684610f9b565b925090506000610d9b87878561134c565b935090506000816001600160401b03811115610db957610db9611c19565b604051908082528060200260200182016040528015610dfe57816020015b6040805180820190915260008082526020820152815260200190600190039081610dd75790505b50905060005b8151811015610e4c57610e188989876113eb565b838381518110610e2a57610e2a612164565b6020026020010181975082905250508080610e449061219a565b915050610e04565b50604080516060810182529081019182529081526020810192909252509590945092505050565b604080518082019091526060815260006020820152816000610e96868684610f9b565b925090506060868684818110610eae57610eae612164565b909101356001600160f81b031916159050610f365782610ecd8161219a565b604080516001808252818301909252919550909150816020015b610eef6117d8565b815260200190600190039081610ee7579050509050610f0f8787856114e7565b82600081518110610f2257610f22612164565b602002602001018195508290525050610f7a565b82610f408161219a565b60408051600080825260208201909252919550909150610f76565b610f636117d8565b815260200190600190039081610f5b5790505b5090505b60405180604001604052808281526020018381525093505050935093915050565b60008181610faa86868461134c565b9097909650945050505050565b600081815b60048110156110125760088363ffffffff16901b9250858583818110610fe457610fe4612164565b919091013560f81c93909317925081610ffc8161219a565b925050808061100a9061219a565b915050610fbc565b50935093915050565b60208101518151515160005b818110156110995783516110449061103f9083611580565b6115b8565b6040516b2b30b63ab29039ba30b1b59d60a11b6020820152602c810191909152604c8101849052606c0160405160208183030381529060405280519060200120925080806110919061219a565b915050611027565b5050919050565b602081015160005b825151811015611133576110d8836000015182815181106110cb576110cb612164565b60200260200101516115d5565b6040517129ba30b1b590333930b6b29039ba30b1b59d60711b6020820152603281019190915260528101839052607201604051602081830303815290604052805190602001209150808061112b9061219a565b9150506110a8565b50919050565b60408051606081018252600080825260208201819052918101919091528160008080611166888886611645565b94509250611175888886611645565b94509150611184888886610f9b565b604080516060810182526001600160401b0396871681529490951660208501529383015250969095509350505050565b600081600001516111c883602001516116a3565b6040848101516060860151608087015192516626b7b23ab6329d60c91b6020820152602781019590955260478501939093526067840152608783019190915260e01b6001600160e01b03191660a782015260ab01610933565b8160005b8551518110156112ea57600185166112865782828760000151838151811061124f5761124f612164565b6020026020010151604051602001611269939291906121b5565b6040516020818303038152906040528051906020012091506112d1565b828660000151828151811061129d5761129d612164565b6020026020010151836040516020016112b8939291906121b5565b6040516020818303038152906040528051906020012091505b60019490941c93806112e28161219a565b915050611225565b50949350505050565b600081815b60028110156110125760088361ffff16901b925085858381811061131e5761131e612164565b919091013560f81c939093179250816113368161219a565b92505080806113449061219a565b9150506112f8565b600081815b602081101561101257600883901b925085858381811061137357611373612164565b919091013560f81c9390931792508161138b8161219a565b92505080806113999061219a565b915050611351565b6000816000015182602001516040516020016109339291906b24b739ba393ab1ba34b7b71d60a11b815260f09290921b6001600160f01b031916600c830152600e820152602e0190565b604080518082019091526000808252602082015281600085858381811061141457611414612164565b919091013560f81c915082905061142a8161219a565b925050611435600690565b600681111561144657611446611896565b60ff168160ff16111561148c5760405162461bcd60e51b815260206004820152600e60248201526d4241445f56414c55455f5459504560901b6044820152606401610176565b600061149987878561134c565b809450819250505060405180604001604052808360ff1660068111156114c1576114c1611896565b60068111156114d2576114d2611896565b81526020018281525093505050935093915050565b6114ef6117d8565b8161150a604080518082019091526000808252602082015290565b600080600061151a8989876113eb565b95509350611529898987610f9b565b95509250611538898987610fb7565b95509150611547898987610fb7565b60408051608081018252968752602087019590955263ffffffff9384169486019490945290911660608401525090969095509350505050565b604080518082019091526000808252602082015282518051839081106115a8576115a8612164565b6020026020010151905092915050565b6000816000015182602001516040516020016109339291906121fb565b60006115e482600001516115b8565b602080840151604080860151606087015191516b29ba30b1b590333930b6b29d60a11b94810194909452602c840194909452604c8301919091526001600160e01b031960e093841b8116606c840152921b9091166070820152607401610933565b600081815b6008811015611012576008836001600160401b0316901b925085858381811061167557611675612164565b919091013560f81c9390931792508161168d8161219a565b925050808061169b9061219a565b91505061164a565b805160208083015160408085015190516626b2b6b7b93c9d60c91b938101939093526001600160c01b031960c094851b811660278501529190931b16602f8201526037810191909152600090605701610933565b60408051610120810190915280600081526020016117136117ba565b81526020016117206117ba565b815260200161174060408051808201909152606081526000602082015290565b815260006020820181905260408201819052606082018190526080820181905260a09091015290565b6040805160a08101909152600081526020810161179f604080516060810182526000808252602082018190529181019190915290565b81526000602082018190526040820181905260609091015290565b60408051606080820183529181019182529081526000602082015290565b6040805160c0810190915260006080820181815260a0830191909152819061179f565b600080600080600085870360a081121561181457600080fd5b604081121561182257600080fd5b50859450604086013593506060860135925060808601356001600160401b038082111561184e57600080fd5b818801915088601f83011261186257600080fd5b81358181111561187157600080fd5b89602082850101111561188357600080fd5b9699959850939650602001949392505050565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082198211156118d5576118d56118ac565b500190565b600080858511156118ea57600080fd5b838611156118f757600080fd5b5050820193919092039150565b600063ffffffff808316818516808303821115611923576119236118ac565b01949350505050565b600061ffff808316818516808303821115611923576119236118ac565b6004811061195957611959611896565b9052565b80516007811061196f5761196f611896565b8252602090810151910152565b805160408084529051602084830181905281516060860181905260009392820191849160808801905b808410156119cc576119b882865161195d565b9382019360019390930192908501906119a5565b509581015196019590955250919392505050565b8051604080845281518482018190526000926060916020918201918388019190865b82811015611a4b578451611a1785825161195d565b80830151858901528781015163ffffffff90811688870152908701511660808501529381019360a090930192600101611a02565b509687015197909601969096525093949350505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b8635815260006101a060208901356001600160a01b038116808214611aaf57600080fd5b8060208601525050806040840152611aca8184018951611949565b5060208701516101206101c0840152611ae76102c084018261197c565b9050604088015161019f1980858403016101e0860152611b07838361197c565b925060608a01519150808584030161020086015250611b2682826119e0565b915050608088015161022084015260a0880151611b4c61024085018263ffffffff169052565b5060c088015163ffffffff81166102608501525060e088015163ffffffff8116610280850152506101008801516102a0840152611be160608401888051825260208101516001600160401b0380825116602085015280602083015116604085015250604081015160608401525060408101516080830152606081015160a083015263ffffffff60808201511660c08301525050565b855161ffff166101408401526020860151610160840152828103610180840152611c0c818587611a62565b9998505050505050505050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715611c5157611c51611c19565b60405290565b604051602081016001600160401b0381118282101715611c5157611c51611c19565b604051608081016001600160401b0381118282101715611c5157611c51611c19565b60405160a081016001600160401b0381118282101715611c5157611c51611c19565b604051606081016001600160401b0381118282101715611c5157611c51611c19565b60405161012081016001600160401b0381118282101715611c5157611c51611c19565b604051601f8201601f191681016001600160401b0381118282101715611d2a57611d2a611c19565b604052919050565b805160048110610a5557600080fd5b60006001600160401b03821115611d5a57611d5a611c19565b5060051b60200190565b600060408284031215611d7657600080fd5b611d7e611c2f565b9050815160078110611d8f57600080fd5b808252506020820151602082015292915050565b60006040808385031215611db657600080fd5b611dbe611c2f565b915082516001600160401b0380821115611dd757600080fd5b81850191506020808388031215611ded57600080fd5b611df5611c57565b835183811115611e0457600080fd5b80850194505087601f850112611e1957600080fd5b83519250611e2e611e2984611d41565b611d02565b83815260069390931b84018201928281019089851115611e4d57600080fd5b948301945b84861015611e7357611e648a87611d64565b82529486019490830190611e52565b8252508552948501519484019490945250909392505050565b805163ffffffff81168114610a5557600080fd5b60006040808385031215611eb357600080fd5b611ebb611c2f565b915082516001600160401b03811115611ed357600080fd5b8301601f81018513611ee457600080fd5b80516020611ef4611e2983611d41565b82815260a09283028401820192828201919089851115611f1357600080fd5b948301945b84861015611f7c5780868b031215611f305760008081fd5b611f38611c79565b611f428b88611d64565b815287870151858201526060611f59818901611e8c565b89830152611f6960808901611e8c565b9082015283529485019491830191611f18565b50808752505080860151818601525050505092915050565b80516001600160401b0381168114610a5557600080fd5b600081830360e0811215611fbe57600080fd5b611fc6611c9b565b8351815291506060601f1982011215611fde57600080fd5b50611fe7611cbd565b611ff360208401611f94565b815261200160408401611f94565b602082015260608301516040820152806020830152506080820151604082015260a0820151606082015261203760c08301611e8c565b608082015292915050565b60008061010080848603121561205757600080fd5b83516001600160401b038082111561206e57600080fd5b90850190610120828803121561208357600080fd5b61208b611cdf565b61209483611d32565b81526020830151828111156120a857600080fd5b6120b489828601611da3565b6020830152506040830151828111156120cc57600080fd5b6120d889828601611da3565b6040830152506060830151828111156120f057600080fd5b6120fc89828601611ea0565b6060830152506080830151608082015261211860a08401611e8c565b60a082015261212960c08401611e8c565b60c082015261213a60e08401611e8c565b60e082015283830151848201528095505050505061215b8460208501611fab565b90509250929050565b634e487b7160e01b600052603260045260246000fd5b600060ff821660ff811415612191576121916118ac565b60010192915050565b60006000198214156121ae576121ae6118ac565b5060010190565b6000845160005b818110156121d657602081880181015185830152016121bc565b818111156121e5576000828501525b5091909101928352506020820152604001919050565b652b30b63ab29d60d11b815260006007841061221957612219611896565b5060f89290921b600683015260078201526027019056fea2646970667358221220700823cc910eeee191650902368f52a36b4136c62bc727da6ef5233ea8d9d43e64736f6c6343000809003300000000000000000000000072b166070781a552d7b95a907ef59ca05d3d5a620000000000000000000000008b73ef238adab31ebc7c05423d243c345241a22f00000000000000000000000090ec62de2eb7c7512a22bd2d55926ad6ba609f3800000000000000000000000017e7f68ce50a77e55c7834ddf31aef86403b8010
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100575760003560e01c80631f128bc01461005c57806330a5509f1461008c5780635d3adcfb1461009f5780635f52fd7c146100c057806366e5d9c3146100d3575b600080fd5b60015461006f906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b60005461006f906001600160a01b031681565b6100b26100ad3660046117fb565b6100e6565b604051908152602001610083565b60035461006f906001600160a01b031681565b60025461006f906001600160a01b031681565b60006100f06116f7565b6100f8611769565b6040805160208101909152606081526040805180820190915260008082526020820152600061012888888361069c565b9095509050886101378661086b565b1461017f5760405162461bcd60e51b815260206004820152601360248201527209a828690929c8abe848a8c9ea48abe9082a69606b1b60448201526064015b60405180910390fd5b60008551600381111561019457610194611896565b146101ae576101a28561086b565b95505050505050610693565b650800000000006101c08b60016118c2565b14156101d357600285526101a28561086b565b6101de888883610a5a565b90945090506101ee888883610b06565b809250819450505084610100015161021b8660a0015163ffffffff168686610be09092919063ffffffff16565b146102575760405162461bcd60e51b815260206004820152600c60248201526b1353d115531154d7d493d3d560a21b6044820152606401610176565b6040805160208101909152606081526040805160208101909152606081526102808a8a85610c29565b90945092506102908a8a85610b06565b9350915061029f8a8a85610b06565b809450819250505060006102c88860e0015163ffffffff168685610c839092919063ffffffff16565b905060006102eb8960c0015163ffffffff168385610cc99092919063ffffffff16565b9050876060015181146103355760405162461bcd60e51b815260206004820152601260248201527110905117d1955390d51253d394d7d493d3d560721b6044820152606401610176565b506103489250899150839050818b6118da565b975097505060008460a0015163ffffffff16905060018560e00181815161036f9190611904565b63ffffffff1690525081516000602861ffff8316108015906103965750603561ffff831611155b806103b65750603661ffff8316108015906103b65750603e61ffff831611155b806103c5575061ffff8216603f145b806103d4575061ffff82166040145b156103eb57506001546001600160a01b03166105e0565b61ffff821660451480610402575061ffff82166050145b806104305750604661ffff83161080159061043057506104246009604661192c565b61ffff168261ffff1611155b8061045e5750606761ffff83161080159061045e57506104526002606761192c565b61ffff168261ffff1611155b8061047e5750606a61ffff83161080159061047e5750607861ffff831611155b806104ac5750605161ffff8316108015906104ac57506104a06009605161192c565b61ffff168261ffff1611155b806104da5750607961ffff8316108015906104da57506104ce6002607961192c565b61ffff168261ffff1611155b806104fa5750607c61ffff8316108015906104fa5750608a61ffff831611155b80610509575061ffff821660a7145b80610526575061ffff821660ac1480610526575061ffff821660ad145b80610546575060c061ffff831610801590610546575060c461ffff831611155b80610566575060bc61ffff831610801590610566575060bf61ffff831611155b1561057d57506002546001600160a01b03166105e0565b61801061ffff831610801590610599575061801361ffff831611155b806105bb575061802061ffff8316108015906105bb575061802261ffff831611155b156105d257506003546001600160a01b03166105e0565b506000546001600160a01b03165b806001600160a01b031663da78e7d18e8989888f8f6040518763ffffffff1660e01b815260040161061696959493929190611a8b565b60006040518083038186803b15801561062e57600080fd5b505afa158015610642573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261066a9190810190612042565b909750955061067a858488610be0565b6101008801526106898761086b565b9750505050505050505b95945050505050565b6106a46116f7565b816000806106b3878785610d3e565b9350905060ff81166106c85760009150610745565b8060ff16600114156106dd5760019150610745565b8060ff16600214156106f25760029150610745565b8060ff16600314156107075760039150610745565b60405162461bcd60e51b8152602060048201526013602482015272554e4b4e4f574e5f4d4143485f53544154555360681b6044820152606401610176565b5061074e6117ba565b6107566117ba565b60008060008061077760408051808201909152606081526000602082015290565b60006107848e8e8c610d74565b9a5097506107938e8e8c610d74565b9a5096506107a28e8e8c610e73565b9a5091506107b18e8e8c610f9b565b9a5095506107c08e8e8c610fb7565b9a5094506107cf8e8e8c610fb7565b9a5093506107de8e8e8c610fb7565b9a5092506107ed8e8e8c610f9b565b809b5081925050506040518061012001604052808a600381111561081357610813611896565b81526020018981526020018881526020018381526020018781526020018663ffffffff1681526020018563ffffffff1681526020018463ffffffff168152602001828152509a50505050505050505050935093915050565b6000808251600381111561088157610881611896565b141561095057610894826020015161101b565b6108a1836040015161101b565b6108ae84606001516110a0565b608085015160a086015160c087015160e0808901516101008a01516040516f26b0b1b434b73290393ab73734b7339d60811b602082015260308101999099526050890197909752607088019590955260908701939093526001600160e01b031991831b821660b0870152821b811660b486015291901b1660b883015260bc82015260dc015b604051602081830303815290604052805190602001209050919050565b60018251600381111561096557610965611896565b141561099d5760808201516040517026b0b1b434b732903334b734b9b432b21d60791b60208201526031810191909152605101610933565b6002825160038111156109b2576109b2611896565b14156109dc576040516f26b0b1b434b7329032b93937b932b21d60811b6020820152603001610933565b6003825160038111156109f1576109f1611896565b1415610a1b576040516f26b0b1b434b732903a37b7903330b91d60811b6020820152603001610933565b60405162461bcd60e51b815260206004820152600f60248201526e4241445f4d4143485f53544154555360881b6044820152606401610176565b919050565b610a62611769565b604080516060810182526000808252602082018190529181018290528391906000806000610a918a8a88610f9b565b96509450610aa08a8a88611139565b96509350610aaf8a8a88610f9b565b96509250610abe8a8a88610f9b565b96509150610acd8a8a88610fb7565b6040805160a08101825297885260208801969096529486019390935250606084015263ffffffff16608083015290969095509350505050565b604080516020810190915260608152816000610b23868684610d3e565b92509050600060ff82166001600160401b03811115610b4457610b44611c19565b604051908082528060200260200182016040528015610b6d578160200160208202803683370190505b50905060005b8260ff168160ff161015610bc457610b8c888886610f9b565b838360ff1681518110610ba157610ba1612164565b602002602001018196508281525050508080610bbc9061217a565b915050610b73565b5060405180602001604052808281525093505050935093915050565b6000610c218484610bf0856111b4565b6040518060400160405280601381526020017226b7b23ab6329036b2b935b632903a3932b29d60691b815250611221565b949350505050565b604080518082019091526000808252602082015281600080610c4c8787856112f3565b93509150610c5b87878561134c565b6040805180820190915261ffff90941684526020840191909152919791965090945050505050565b6000610c218484610c93856113a1565b6040518060400160405280601881526020017724b739ba393ab1ba34b7b71036b2b935b632903a3932b29d60411b815250611221565b60405168233ab731ba34b7b71d60b91b602082015260298101829052600090819060490160405160208183030381529060405280519060200120905061069385858360405180604001604052806015815260200174233ab731ba34b7b71036b2b935b632903a3932b29d60591b815250611221565b600081848482818110610d5357610d53612164565b919091013560f81c9250819050610d698161219a565b915050935093915050565b610d7c6117ba565b816000610d8a868684610f9b565b925090506000610d9b87878561134c565b935090506000816001600160401b03811115610db957610db9611c19565b604051908082528060200260200182016040528015610dfe57816020015b6040805180820190915260008082526020820152815260200190600190039081610dd75790505b50905060005b8151811015610e4c57610e188989876113eb565b838381518110610e2a57610e2a612164565b6020026020010181975082905250508080610e449061219a565b915050610e04565b50604080516060810182529081019182529081526020810192909252509590945092505050565b604080518082019091526060815260006020820152816000610e96868684610f9b565b925090506060868684818110610eae57610eae612164565b909101356001600160f81b031916159050610f365782610ecd8161219a565b604080516001808252818301909252919550909150816020015b610eef6117d8565b815260200190600190039081610ee7579050509050610f0f8787856114e7565b82600081518110610f2257610f22612164565b602002602001018195508290525050610f7a565b82610f408161219a565b60408051600080825260208201909252919550909150610f76565b610f636117d8565b815260200190600190039081610f5b5790505b5090505b60405180604001604052808281526020018381525093505050935093915050565b60008181610faa86868461134c565b9097909650945050505050565b600081815b60048110156110125760088363ffffffff16901b9250858583818110610fe457610fe4612164565b919091013560f81c93909317925081610ffc8161219a565b925050808061100a9061219a565b915050610fbc565b50935093915050565b60208101518151515160005b818110156110995783516110449061103f9083611580565b6115b8565b6040516b2b30b63ab29039ba30b1b59d60a11b6020820152602c810191909152604c8101849052606c0160405160208183030381529060405280519060200120925080806110919061219a565b915050611027565b5050919050565b602081015160005b825151811015611133576110d8836000015182815181106110cb576110cb612164565b60200260200101516115d5565b6040517129ba30b1b590333930b6b29039ba30b1b59d60711b6020820152603281019190915260528101839052607201604051602081830303815290604052805190602001209150808061112b9061219a565b9150506110a8565b50919050565b60408051606081018252600080825260208201819052918101919091528160008080611166888886611645565b94509250611175888886611645565b94509150611184888886610f9b565b604080516060810182526001600160401b0396871681529490951660208501529383015250969095509350505050565b600081600001516111c883602001516116a3565b6040848101516060860151608087015192516626b7b23ab6329d60c91b6020820152602781019590955260478501939093526067840152608783019190915260e01b6001600160e01b03191660a782015260ab01610933565b8160005b8551518110156112ea57600185166112865782828760000151838151811061124f5761124f612164565b6020026020010151604051602001611269939291906121b5565b6040516020818303038152906040528051906020012091506112d1565b828660000151828151811061129d5761129d612164565b6020026020010151836040516020016112b8939291906121b5565b6040516020818303038152906040528051906020012091505b60019490941c93806112e28161219a565b915050611225565b50949350505050565b600081815b60028110156110125760088361ffff16901b925085858381811061131e5761131e612164565b919091013560f81c939093179250816113368161219a565b92505080806113449061219a565b9150506112f8565b600081815b602081101561101257600883901b925085858381811061137357611373612164565b919091013560f81c9390931792508161138b8161219a565b92505080806113999061219a565b915050611351565b6000816000015182602001516040516020016109339291906b24b739ba393ab1ba34b7b71d60a11b815260f09290921b6001600160f01b031916600c830152600e820152602e0190565b604080518082019091526000808252602082015281600085858381811061141457611414612164565b919091013560f81c915082905061142a8161219a565b925050611435600690565b600681111561144657611446611896565b60ff168160ff16111561148c5760405162461bcd60e51b815260206004820152600e60248201526d4241445f56414c55455f5459504560901b6044820152606401610176565b600061149987878561134c565b809450819250505060405180604001604052808360ff1660068111156114c1576114c1611896565b60068111156114d2576114d2611896565b81526020018281525093505050935093915050565b6114ef6117d8565b8161150a604080518082019091526000808252602082015290565b600080600061151a8989876113eb565b95509350611529898987610f9b565b95509250611538898987610fb7565b95509150611547898987610fb7565b60408051608081018252968752602087019590955263ffffffff9384169486019490945290911660608401525090969095509350505050565b604080518082019091526000808252602082015282518051839081106115a8576115a8612164565b6020026020010151905092915050565b6000816000015182602001516040516020016109339291906121fb565b60006115e482600001516115b8565b602080840151604080860151606087015191516b29ba30b1b590333930b6b29d60a11b94810194909452602c840194909452604c8301919091526001600160e01b031960e093841b8116606c840152921b9091166070820152607401610933565b600081815b6008811015611012576008836001600160401b0316901b925085858381811061167557611675612164565b919091013560f81c9390931792508161168d8161219a565b925050808061169b9061219a565b91505061164a565b805160208083015160408085015190516626b2b6b7b93c9d60c91b938101939093526001600160c01b031960c094851b811660278501529190931b16602f8201526037810191909152600090605701610933565b60408051610120810190915280600081526020016117136117ba565b81526020016117206117ba565b815260200161174060408051808201909152606081526000602082015290565b815260006020820181905260408201819052606082018190526080820181905260a09091015290565b6040805160a08101909152600081526020810161179f604080516060810182526000808252602082018190529181019190915290565b81526000602082018190526040820181905260609091015290565b60408051606080820183529181019182529081526000602082015290565b6040805160c0810190915260006080820181815260a0830191909152819061179f565b600080600080600085870360a081121561181457600080fd5b604081121561182257600080fd5b50859450604086013593506060860135925060808601356001600160401b038082111561184e57600080fd5b818801915088601f83011261186257600080fd5b81358181111561187157600080fd5b89602082850101111561188357600080fd5b9699959850939650602001949392505050565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082198211156118d5576118d56118ac565b500190565b600080858511156118ea57600080fd5b838611156118f757600080fd5b5050820193919092039150565b600063ffffffff808316818516808303821115611923576119236118ac565b01949350505050565b600061ffff808316818516808303821115611923576119236118ac565b6004811061195957611959611896565b9052565b80516007811061196f5761196f611896565b8252602090810151910152565b805160408084529051602084830181905281516060860181905260009392820191849160808801905b808410156119cc576119b882865161195d565b9382019360019390930192908501906119a5565b509581015196019590955250919392505050565b8051604080845281518482018190526000926060916020918201918388019190865b82811015611a4b578451611a1785825161195d565b80830151858901528781015163ffffffff90811688870152908701511660808501529381019360a090930192600101611a02565b509687015197909601969096525093949350505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b8635815260006101a060208901356001600160a01b038116808214611aaf57600080fd5b8060208601525050806040840152611aca8184018951611949565b5060208701516101206101c0840152611ae76102c084018261197c565b9050604088015161019f1980858403016101e0860152611b07838361197c565b925060608a01519150808584030161020086015250611b2682826119e0565b915050608088015161022084015260a0880151611b4c61024085018263ffffffff169052565b5060c088015163ffffffff81166102608501525060e088015163ffffffff8116610280850152506101008801516102a0840152611be160608401888051825260208101516001600160401b0380825116602085015280602083015116604085015250604081015160608401525060408101516080830152606081015160a083015263ffffffff60808201511660c08301525050565b855161ffff166101408401526020860151610160840152828103610180840152611c0c818587611a62565b9998505050505050505050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715611c5157611c51611c19565b60405290565b604051602081016001600160401b0381118282101715611c5157611c51611c19565b604051608081016001600160401b0381118282101715611c5157611c51611c19565b60405160a081016001600160401b0381118282101715611c5157611c51611c19565b604051606081016001600160401b0381118282101715611c5157611c51611c19565b60405161012081016001600160401b0381118282101715611c5157611c51611c19565b604051601f8201601f191681016001600160401b0381118282101715611d2a57611d2a611c19565b604052919050565b805160048110610a5557600080fd5b60006001600160401b03821115611d5a57611d5a611c19565b5060051b60200190565b600060408284031215611d7657600080fd5b611d7e611c2f565b9050815160078110611d8f57600080fd5b808252506020820151602082015292915050565b60006040808385031215611db657600080fd5b611dbe611c2f565b915082516001600160401b0380821115611dd757600080fd5b81850191506020808388031215611ded57600080fd5b611df5611c57565b835183811115611e0457600080fd5b80850194505087601f850112611e1957600080fd5b83519250611e2e611e2984611d41565b611d02565b83815260069390931b84018201928281019089851115611e4d57600080fd5b948301945b84861015611e7357611e648a87611d64565b82529486019490830190611e52565b8252508552948501519484019490945250909392505050565b805163ffffffff81168114610a5557600080fd5b60006040808385031215611eb357600080fd5b611ebb611c2f565b915082516001600160401b03811115611ed357600080fd5b8301601f81018513611ee457600080fd5b80516020611ef4611e2983611d41565b82815260a09283028401820192828201919089851115611f1357600080fd5b948301945b84861015611f7c5780868b031215611f305760008081fd5b611f38611c79565b611f428b88611d64565b815287870151858201526060611f59818901611e8c565b89830152611f6960808901611e8c565b9082015283529485019491830191611f18565b50808752505080860151818601525050505092915050565b80516001600160401b0381168114610a5557600080fd5b600081830360e0811215611fbe57600080fd5b611fc6611c9b565b8351815291506060601f1982011215611fde57600080fd5b50611fe7611cbd565b611ff360208401611f94565b815261200160408401611f94565b602082015260608301516040820152806020830152506080820151604082015260a0820151606082015261203760c08301611e8c565b608082015292915050565b60008061010080848603121561205757600080fd5b83516001600160401b038082111561206e57600080fd5b90850190610120828803121561208357600080fd5b61208b611cdf565b61209483611d32565b81526020830151828111156120a857600080fd5b6120b489828601611da3565b6020830152506040830151828111156120cc57600080fd5b6120d889828601611da3565b6040830152506060830151828111156120f057600080fd5b6120fc89828601611ea0565b6060830152506080830151608082015261211860a08401611e8c565b60a082015261212960c08401611e8c565b60c082015261213a60e08401611e8c565b60e082015283830151848201528095505050505061215b8460208501611fab565b90509250929050565b634e487b7160e01b600052603260045260246000fd5b600060ff821660ff811415612191576121916118ac565b60010192915050565b60006000198214156121ae576121ae6118ac565b5060010190565b6000845160005b818110156121d657602081880181015185830152016121bc565b818111156121e5576000828501525b5091909101928352506020820152604001919050565b652b30b63ab29d60d11b815260006007841061221957612219611896565b5060f89290921b600683015260078201526027019056fea2646970667358221220700823cc910eeee191650902368f52a36b4136c62bc727da6ef5233ea8d9d43e64736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000072b166070781a552d7b95a907ef59ca05d3d5a620000000000000000000000008b73ef238adab31ebc7c05423d243c345241a22f00000000000000000000000090ec62de2eb7c7512a22bd2d55926ad6ba609f3800000000000000000000000017e7f68ce50a77e55c7834ddf31aef86403b8010
-----Decoded View---------------
Arg [0] : prover0_ (address): 0x72B166070781a552D7b95a907eF59ca05d3D5a62
Arg [1] : proverMem_ (address): 0x8b73Ef238ADaB31EBC7c05423d243c345241a22f
Arg [2] : proverMath_ (address): 0x90eC62De2EB7C7512a22bD2D55926AD6bA609F38
Arg [3] : proverHostIo_ (address): 0x17e7F68ce50A77e55C7834ddF31AEf86403B8010
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000072b166070781a552d7b95a907ef59ca05d3d5a62
Arg [1] : 0000000000000000000000008b73ef238adab31ebc7c05423d243c345241a22f
Arg [2] : 00000000000000000000000090ec62de2eb7c7512a22bd2d55926ad6ba609f38
Arg [3] : 00000000000000000000000017e7f68ce50a77e55c7834ddf31aef86403b8010
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.