Contract 0x0d761163e8BDc22fec278FEa0C7A95e7B2dfa3C3

Contract Overview

Balance:
0 Ether
Txn Hash
Method
Block
From
To
Value
0x585ec6eb558436577c36cd28f322f6091aa361ef2020faee0266ef96e0a5b2370x81fd8c6b110398482021-09-15 12:31:31338 days 11 hrs ago0x9f5dfa502840b41f4fad86ecfa3afd94ecb29aa5 IN 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c30 Ether0.000296455
0x44e51f21fdcb234ee2986c8ddfc0f80aabdd9ef072573dccca01766846809f820x81fd8c6b110346412021-09-14 16:15:44339 days 8 hrs ago0x9f5dfa502840b41f4fad86ecfa3afd94ecb29aa5 IN 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c30 Ether0.000296455
0xf7a26bcfb973418a5c36f354b3dd9f3616a0339f1ec859633998d06c9a0da6550x81fd8c6b110267932021-09-13 9:54:58340 days 14 hrs ago0x9f5dfa502840b41f4fad86ecfa3afd94ecb29aa5 IN 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c30 Ether0.000296455
0xe307727287e9b15336e2b74c21191ad6419c4167672496cd48b8470d7f6ce6780x81fd8c6b110076332021-09-10 11:20:10343 days 13 hrs ago0x9f5dfa502840b41f4fad86ecfa3afd94ecb29aa5 IN 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c30 Ether0.000296275
0x04677debd9779d763693361393dfb1624a79896cc6135f6be9518cbc5ea61a4d0x81fd8c6b110075762021-09-10 11:05:00343 days 13 hrs ago0x9f5dfa502840b41f4fad86ecfa3afd94ecb29aa5 IN 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c30 Ether0.000296335
0x1c7b2d131ce062f572c36b54a7fd64f6ab6b960e747ae551c0913355a596dc760x81fd8c6b110027282021-09-09 15:45:10344 days 8 hrs ago0x9f5dfa502840b41f4fad86ecfa3afd94ecb29aa5 IN 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c30 Ether0.000296455
0xdb84cb21b6bce89bb1ddb129115284414c9ae5b25572b36e1a183f5ebc8953fc0x81fd8c6b110019332021-09-09 13:38:30344 days 10 hrs ago0x9f5dfa502840b41f4fad86ecfa3afd94ecb29aa5 IN 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c30 Ether0.000296395
0x956ca2c105a60c2e2720f0ee7979c47b4d5f2d567921e41e4bf5285bfd2331730x81fd8c6b110019332021-09-09 13:38:30344 days 10 hrs ago0x9f5dfa502840b41f4fad86ecfa3afd94ecb29aa5 IN 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c30 Ether0.000296455
0xbc81f6ecaa34d5706070fe836e2a2b377ed0acea9cc8cb74782cf01952c6d6550x81fd8c6b110019332021-09-09 13:38:30344 days 10 hrs ago0x9f5dfa502840b41f4fad86ecfa3afd94ecb29aa5 IN 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c30 Ether0.000296455
0x133369ff6dc4db160f6aeeb5b05c5bcdc3b6056c34f9974d28da9b6736eaa8fc0x81fd8c6b110019332021-09-09 13:38:30344 days 10 hrs ago0x9f5dfa502840b41f4fad86ecfa3afd94ecb29aa5 IN 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c30 Ether0.000296455
0x66a423d5b47537f51efc6238bcee236b3e9a9dbf5aeed1c05de71b3af8de389d0x81fd8c6b110019332021-09-09 13:38:30344 days 10 hrs ago0x9f5dfa502840b41f4fad86ecfa3afd94ecb29aa5 IN 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c30 Ether0.000296395
0xf66859cb19657e13131f8df35e3af7906181be50de5de5062564b83d465f73cd0x81fd8c6b110019332021-09-09 13:38:30344 days 10 hrs ago0x9f5dfa502840b41f4fad86ecfa3afd94ecb29aa5 IN 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c30 Ether0.000296395
0xd7930bd437d4c5a2d86f7be73ef706c6f4e62d98a154fcf286c47627e32b64aa0x81fd8c6b110019332021-09-09 13:38:30344 days 10 hrs ago0x9f5dfa502840b41f4fad86ecfa3afd94ecb29aa5 IN 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c30 Ether0.000296395
0x5c39a31391c939ecffc9301efbbd1bc113d9ef77dd98ae382769f1c8c1e2d7160x81fd8c6b110019332021-09-09 13:38:30344 days 10 hrs ago0x9f5dfa502840b41f4fad86ecfa3afd94ecb29aa5 IN 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c30 Ether0.000296455
0x4fff2f310eca311396ffa676f4af970252ae2c6fb70c504ab6e3093592bc6d180x81fd8c6b110019332021-09-09 13:38:30344 days 10 hrs ago0x9f5dfa502840b41f4fad86ecfa3afd94ecb29aa5 IN 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c30 Ether0.000296455
0x6b6aacb29e98b810b501a1d70250250d3038cd8f44307f298138bd6e360cf1aa0x81fd8c6b110019332021-09-09 13:38:30344 days 10 hrs ago0x9f5dfa502840b41f4fad86ecfa3afd94ecb29aa5 IN 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c30 Ether0.000296395
0xc0efd01b673558ae7bd4e63328c6fc5af29ffc3d2ad4d3b45596aca76cc5046c0x81fd8c6b110019332021-09-09 13:38:30344 days 10 hrs ago0x9f5dfa502840b41f4fad86ecfa3afd94ecb29aa5 IN 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c30 Ether0.000296455
0x585589debc07a326135cf2960fed0f4c77413e9b32a0014924f261cbc98311000x81fd8c6b110019332021-09-09 13:38:30344 days 10 hrs ago0x9f5dfa502840b41f4fad86ecfa3afd94ecb29aa5 IN 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c30 Ether0.000296455
0xe2be88bc216bd7fe3115b986c3d53d7c4384cfa99a6ac1c9de8923d7e9691f560x81fd8c6b110019332021-09-09 13:38:30344 days 10 hrs ago0x9f5dfa502840b41f4fad86ecfa3afd94ecb29aa5 IN 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c30 Ether0.000296455
0x76ec08277af9ecd0daf4f2255ff346c390567d727ab420505823f016a4f991b10x81fd8c6b110019272021-09-09 13:37:01344 days 10 hrs ago0x9f5dfa502840b41f4fad86ecfa3afd94ecb29aa5 IN 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c30 Ether0.000326035.5
0xcfe1d69aded91545028c6429fedc5acbbcead845d2b1e8a401ef02d2cc48db610x81fd8c6b110019262021-09-09 13:36:55344 days 10 hrs ago0x9f5dfa502840b41f4fad86ecfa3afd94ecb29aa5 IN 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c30 Ether0.000326035.5
0xde7bd43a7ceee101a6e4d411810b54e3de611e0e5336644982ffe6d6ca0fe1040x81fd8c6b110019092021-09-09 13:34:17344 days 10 hrs ago0x9f5dfa502840b41f4fad86ecfa3afd94ecb29aa5 IN 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c30 Ether0.00032615.5
0x3cd64d5567d2afc42350bd368f696bb38d25db8e3369ec38f779664d25f9f8c70x81fd8c6b110019042021-09-09 13:32:46344 days 10 hrs ago0x9f5dfa502840b41f4fad86ecfa3afd94ecb29aa5 IN 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c30 Ether0.00032615.5
0x717f5a77c02be319d0ce3635f084f6087c9107489644c699cbbd565d9a8c2ead0x81fd8c6b110018942021-09-09 13:31:45344 days 10 hrs ago0x9f5dfa502840b41f4fad86ecfa3afd94ecb29aa5 IN 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c30 Ether0.00032615.5
0x07a87bf12bd5ca8e29388ced3920cc95778c62d8f198891a40662ffad2dd0beb0x81fd8c6b110018872021-09-09 13:30:38344 days 10 hrs ago0x9f5dfa502840b41f4fad86ecfa3afd94ecb29aa5 IN 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c30 Ether0.00032615.5
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x3e2b90e2f02f48f3a2db94403767f3b7c58971f6200bc958e31fbec715e5a1ce122195502022-04-26 13:24:52115 days 10 hrs ago 0xacdbd2d740a053adeada55fe2a56bcc1eb3018820x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c30 Ether
0x79e72d67ac4dc0283a47c5ee09db2a70203967adbfcc8dc8079d640aeb13d17c114431172021-11-17 12:58:18275 days 11 hrs ago 0xce08635cc6477f3634551db7613cc4f36b4e49dc0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c30 Ether
0x7a37daa9e98f163fa6bacf9c80b87ae568b64eea61089341194dc29e8e00cb6e112209732021-10-13 8:55:16310 days 15 hrs ago 0xce08635cc6477f3634551db7613cc4f36b4e49dc0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c30 Ether
0x78720de3cda4aa1ea7f586e59994d8b5ebdf54fe78ef492ceb5b0e8d43f5a36c111769382021-10-06 17:56:45317 days 6 hrs ago 0xdcc697f0cbd97123404a58cc1d4614f9f98655780x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c30 Ether
0xfefdfe26d73c2cdf16257c77f2bbdad9e9f83e8601a9c26ad2cf4058a873f296111650062021-10-04 21:38:08319 days 2 hrs ago 0xce08635cc6477f3634551db7613cc4f36b4e49dc0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c30 Ether
0x585ec6eb558436577c36cd28f322f6091aa361ef2020faee0266ef96e0a5b237110398482021-09-15 12:31:31338 days 11 hrs ago 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c3 0x2886d2a190f00aa324ac5bf5a5b90217121d57560 Ether
0x44e51f21fdcb234ee2986c8ddfc0f80aabdd9ef072573dccca01766846809f82110346412021-09-14 16:15:44339 days 8 hrs ago 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c3 0x2886d2a190f00aa324ac5bf5a5b90217121d57560 Ether
0xf7a26bcfb973418a5c36f354b3dd9f3616a0339f1ec859633998d06c9a0da655110267932021-09-13 9:54:58340 days 14 hrs ago 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c3 0x2886d2a190f00aa324ac5bf5a5b90217121d57560 Ether
0xe307727287e9b15336e2b74c21191ad6419c4167672496cd48b8470d7f6ce678110076332021-09-10 11:20:10343 days 13 hrs ago 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c3 0x2886d2a190f00aa324ac5bf5a5b90217121d57560 Ether
0x04677debd9779d763693361393dfb1624a79896cc6135f6be9518cbc5ea61a4d110075762021-09-10 11:05:00343 days 13 hrs ago 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c3 0x2886d2a190f00aa324ac5bf5a5b90217121d57560 Ether
0x1c7b2d131ce062f572c36b54a7fd64f6ab6b960e747ae551c0913355a596dc76110027282021-09-09 15:45:10344 days 8 hrs ago 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c3 0x2886d2a190f00aa324ac5bf5a5b90217121d57560 Ether
0xdb84cb21b6bce89bb1ddb129115284414c9ae5b25572b36e1a183f5ebc8953fc110019332021-09-09 13:38:30344 days 10 hrs ago 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c3 0x2886d2a190f00aa324ac5bf5a5b90217121d57560 Ether
0x956ca2c105a60c2e2720f0ee7979c47b4d5f2d567921e41e4bf5285bfd233173110019332021-09-09 13:38:30344 days 10 hrs ago 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c3 0x2886d2a190f00aa324ac5bf5a5b90217121d57560 Ether
0xbc81f6ecaa34d5706070fe836e2a2b377ed0acea9cc8cb74782cf01952c6d655110019332021-09-09 13:38:30344 days 10 hrs ago 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c3 0x2886d2a190f00aa324ac5bf5a5b90217121d57560 Ether
0x133369ff6dc4db160f6aeeb5b05c5bcdc3b6056c34f9974d28da9b6736eaa8fc110019332021-09-09 13:38:30344 days 10 hrs ago 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c3 0x2886d2a190f00aa324ac5bf5a5b90217121d57560 Ether
0x66a423d5b47537f51efc6238bcee236b3e9a9dbf5aeed1c05de71b3af8de389d110019332021-09-09 13:38:30344 days 10 hrs ago 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c3 0x2886d2a190f00aa324ac5bf5a5b90217121d57560 Ether
0xf66859cb19657e13131f8df35e3af7906181be50de5de5062564b83d465f73cd110019332021-09-09 13:38:30344 days 10 hrs ago 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c3 0x2886d2a190f00aa324ac5bf5a5b90217121d57560 Ether
0xd7930bd437d4c5a2d86f7be73ef706c6f4e62d98a154fcf286c47627e32b64aa110019332021-09-09 13:38:30344 days 10 hrs ago 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c3 0x2886d2a190f00aa324ac5bf5a5b90217121d57560 Ether
0x5c39a31391c939ecffc9301efbbd1bc113d9ef77dd98ae382769f1c8c1e2d716110019332021-09-09 13:38:30344 days 10 hrs ago 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c3 0x2886d2a190f00aa324ac5bf5a5b90217121d57560 Ether
0x4fff2f310eca311396ffa676f4af970252ae2c6fb70c504ab6e3093592bc6d18110019332021-09-09 13:38:30344 days 10 hrs ago 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c3 0x2886d2a190f00aa324ac5bf5a5b90217121d57560 Ether
0x6b6aacb29e98b810b501a1d70250250d3038cd8f44307f298138bd6e360cf1aa110019332021-09-09 13:38:30344 days 10 hrs ago 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c3 0x2886d2a190f00aa324ac5bf5a5b90217121d57560 Ether
0xc0efd01b673558ae7bd4e63328c6fc5af29ffc3d2ad4d3b45596aca76cc5046c110019332021-09-09 13:38:30344 days 10 hrs ago 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c3 0x2886d2a190f00aa324ac5bf5a5b90217121d57560 Ether
0x585589debc07a326135cf2960fed0f4c77413e9b32a0014924f261cbc9831100110019332021-09-09 13:38:30344 days 10 hrs ago 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c3 0x2886d2a190f00aa324ac5bf5a5b90217121d57560 Ether
0xe2be88bc216bd7fe3115b986c3d53d7c4384cfa99a6ac1c9de8923d7e9691f56110019332021-09-09 13:38:30344 days 10 hrs ago 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c3 0x2886d2a190f00aa324ac5bf5a5b90217121d57560 Ether
0x76ec08277af9ecd0daf4f2255ff346c390567d727ab420505823f016a4f991b1110019272021-09-09 13:37:01344 days 10 hrs ago 0x0d761163e8bdc22fec278fea0c7a95e7b2dfa3c3 0x2886d2a190f00aa324ac5bf5a5b90217121d57560 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Starknet

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, Apache-2.0 license

Contract Source Code (Solidity Multiple files format)

File 5 of 6: Starknet.sol
/*
  Copyright 2019-2021 StarkWare Industries Ltd.

  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

  https://www.starkware.co/open-source-license/

  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.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.11;
pragma experimental ABIEncoderV2;

import "IFactRegistry.sol";
import "Identity.sol";
import "Output.sol";
import "StarknetState.sol";
import "OnchainDataFactTreeEncoder.sol";

contract Starknet is
    Identity
{
    using StarknetState for StarknetState.State;
    StarknetState.State internal state;
    IFactRegistry verifier;
    uint256 programHash;
    mapping (bytes32 => uint256) public l2ToL1Messages;
    mapping (bytes32 => uint256) public l1ToL2Messages;

    // Logs the new state following a state update.
    event LogStateUpdate(
        uint256 globalRoot,
        int256 sequenceNumber
    );

    // Logs a stateTransitionFact that was used to update the state.
    event LogStateTransitionFact(
        bytes32 stateTransitionFact
    );

    // An event that is raised when a message is sent from L1 to L2.
    event LogMessageToL2(
        address indexed from_address,
        uint256 indexed to_address,
        uint256 indexed selector,
        uint256[] payload
    );

    // This event needs to be compatible with the one defined in Output.sol.
    event LogMessageToL1(
        uint256 indexed from_address,
        address indexed to_address,
        uint256[] payload
    );

    /**
      The Starknet contract constructor.

      Arguments:
        programHash_ - The program hash of the StarkNet OS.
        verifier_ - The address of a SHARP verifier fact registry.
        initialState - The initial state of the system.
    */
    constructor(
        uint256 programHash_, IFactRegistry verifier_,
        StarknetState.State memory initialState) public
    {
        programHash = programHash_;
        verifier = verifier_;
        state = initialState;
    }

    /**
      Returns a string that identifies the contract.
    */
    function identify() external override pure returns (string memory) {
        return "StarkWare_Starknet_2021_1";
    }

    /**
      Returns the current state root.
    */
    function stateRoot() external view returns (uint256) {
        return state.globalRoot;
    }

    /**
      Returns the current sequence number.
    */
    function stateSequenceNumber() external view returns (int256) {
        return state.sequenceNumber;
    }

    /**
      Updates the state of the StarkNet, based on a proof of the 
      StarkNet OS that the state transition is valid.

      Arguments:
        sequenceNumber - The expected sequence number of the new block.
        programOutput - The main part of the StarkNet OS program output.
        data_availability_fact - An encoding of the on-chain data associated
        with the 'programOutput'.
    */
    function updateState(
        int256 sequenceNumber, uint256[] calldata programOutput,
        OnchainDataFactTreeEncoder.DataAvailabilityFact calldata data_availability_fact) public
    {
        // Validate program output.
        StarknetOutput.validate(programOutput);

        bytes32 stateTransitionFact = OnchainDataFactTreeEncoder.encodeFactWithOnchainData(
            programOutput, data_availability_fact);
        bytes32 sharpFact = keccak256(abi.encode(programHash, stateTransitionFact));
        require(verifier.isValid(sharpFact), "NO_STATE_TRANSITION_PROOF");
        emit LogStateTransitionFact(stateTransitionFact);

        // Process L2 -> L1 messages.
        uint256 outputOffset = StarknetOutput.HEADER_SIZE;
        outputOffset += StarknetOutput.processMessages(
            /*isL2ToL1*/ true, programOutput[outputOffset:], l2ToL1Messages);

        // Process L1 -> L2 messages.
        outputOffset += StarknetOutput.processMessages(
            /*isL2ToL1*/ false, programOutput[outputOffset:], l1ToL2Messages);

        require(
            outputOffset == programOutput.length,
            "STARKNET_OUTPUT_TOO_LONG");

        // Perform state update.
        state.update(sequenceNumber, programOutput);
        emit LogStateUpdate(state.globalRoot, state.sequenceNumber);
    }

    /**
      Sends a message to an L2 contract.
    */
    function sendMessageToL2(
        uint256 to_address,
        uint256 selector,
        uint256[] calldata payload
    ) external {
        emit LogMessageToL2(msg.sender, to_address, selector, payload);
        // Note that the selector is prepended to the payload.
        bytes32 msgHash = keccak256(
            abi.encodePacked(
                uint256(msg.sender),
                to_address,
                1 + payload.length,
                selector,
                payload
            )
        );
        l1ToL2Messages[msgHash] += 1;
    }

    /**
      Consumes a message that was sent from an L2 contract.
    */
    function consumeMessageFromL2(
        uint256 from_address,
        uint256[] calldata payload
    ) external {
        bytes32 msgHash = keccak256(
            abi.encodePacked(
                from_address,
                uint256(msg.sender),
                payload.length,
                payload)
        );

        require(l2ToL1Messages[msgHash] > 0, "INVALID_MESSAGE_TO_CONSUME");
        l2ToL1Messages[msgHash] -= 1;
    }
}

File 1 of 6: Identity.sol
/*
  Copyright 2019-2021 StarkWare Industries Ltd.

  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

  https://www.starkware.co/open-source-license/

  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.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.11;

interface Identity {
    /*
      Allows a caller to ensure that the provided address is of the expected type and version.
    */
    function identify()
        external pure
        returns (string memory);
}

File 2 of 6: IFactRegistry.sol
/*
  Copyright 2019-2021 StarkWare Industries Ltd.

  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

  https://www.starkware.co/open-source-license/

  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.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.11;

/*
  The Fact Registry design pattern is a way to separate cryptographic verification from the
  business logic of the contract flow.

  A fact registry holds a hash table of verified "facts" which are represented by a hash of claims
  that the registry hash check and found valid. This table may be queried by accessing the
  isValid() function of the registry with a given hash.

  In addition, each fact registry exposes a registry specific function for submitting new claims
  together with their proofs. The information submitted varies from one registry to the other
  depending of the type of fact requiring verification.

  For further reading on the Fact Registry design pattern see this
  `StarkWare blog post <https://medium.com/starkware/the-fact-registry-a64aafb598b6>`_.
*/
interface IFactRegistry {
    /*
      Returns true if the given fact was previously registered in the contract.
    */
    function isValid(bytes32 fact)
        external view
        returns(bool);
}

File 3 of 6: OnchainDataFactTreeEncoder.sol
/*
  Copyright 2019-2021 StarkWare Industries Ltd.

  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

  https://www.starkware.co/open-source-license/

  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.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.11;

library OnchainDataFactTreeEncoder {
    struct DataAvailabilityFact {
        uint256 onchainDataHash;
        uint256 onchainDataSize;
    }

    // The number of additional words appended to the public input when using the
    // OnchainDataFactTreeEncoder format.
    uint256 internal constant ONCHAIN_DATA_FACT_ADDITIONAL_WORDS = 2;

    /*
      Encodes a GPS fact Merkle tree where the root has two children.
      The left child contains the data we care about and the right child contains
      on-chain data for the fact.
    */
    function encodeFactWithOnchainData(
        uint256[] calldata programOutput, DataAvailabilityFact memory factData
    )
        internal pure
        returns (bytes32)
    {
        // The state transition fact is computed as a Merkle tree, as defined in
        // GpsOutputParser.
        //
        // In our case the fact tree looks as follows:
        //   The root has two children.
        //   The left child is a leaf that includes the main part - the information regarding
        //   the state transition required by this contract.
        //   The right child contains the onchain-data which shouldn't be accessed by this
        //   contract, so we are only given its hash and length
        //   (it may be a leaf or an inner node, this has no effect on this contract).

        // Compute the hash without the two additional fields.
        uint256 mainPublicInputLen = programOutput.length;
        bytes32 mainPublicInputHash = keccak256(abi.encodePacked(programOutput));

        // Compute the hash of the fact Merkle tree.
        bytes32 hashResult = keccak256(
            abi.encodePacked(
                mainPublicInputHash,
                mainPublicInputLen,
                factData.onchainDataHash,
                mainPublicInputLen + factData.onchainDataSize
            )
        );
        // Add one to the hash to indicate it represents an inner node, rather than a leaf.
        return bytes32(uint256(hashResult) + 1);
    }
}

File 4 of 6: Output.sol
/*
  Copyright 2019-2021 StarkWare Industries Ltd.

  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

  https://www.starkware.co/open-source-license/

  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.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.11;

library MerkleUpdateOutput {
    /**
      Returns the previous Merkle root.
    */
    function getPrevRoot(uint256[] calldata merkle_update_data)
        internal
        pure
        returns (uint256)
    {
        return merkle_update_data[0];
    }

    /**
      Returns the new Merkle root.
    */
    function getNewRoot(uint256[] calldata merkle_update_data)
        internal
        pure
        returns (uint256)
    {
        return merkle_update_data[1];
    }
}

library StarknetOutput {
    uint256 internal constant MERKLE_UPDATE_OFFSET = 0;
    uint256 internal constant HEADER_SIZE = 2;

    uint256 constant MESSAGE_FROM_ADDRESS_OFFSET = 0;
    uint256 constant MESSAGE_TO_ADDRESS_OFFSET = 1;
    uint256 constant MESSAGE_PAYLOAD_SIZE_OFFSET = 2;
    uint256 constant MESSAGE_PREFIX_SIZE = 3;

    // An event that is raised when a message is sent from L2 to L1.
    event LogMessageToL1(
        uint256 indexed from_address,
        address indexed to_address,
        uint256[] payload
    );

    /**
      Does a sanity check of the output_data length.
    */
    function validate(uint256[] calldata output_data) internal pure {
        require(output_data.length > HEADER_SIZE, "STARKNET_OUTPUT_TOO_SHORT");
    }

    /**
      Returns a slice of the 'output_data' with the merkle update information.
    */
    function getMerkleUpdate(uint256[] calldata output_data)
        internal
        pure
        returns (uint256[] calldata)
    {
        return output_data[MERKLE_UPDATE_OFFSET:MERKLE_UPDATE_OFFSET + 2];
    }

    /**
      Processes a message segment from the program output.
      The format of a message segment is the length of the messages in words followed
      by the concatenation of all the messages.

      The 'messages' mapping is updated according to the messages and the direction ('isL2ToL1').
    */
    function processMessages(
        bool isL2ToL1,
        uint256[] calldata programOutputSlice,
        mapping (bytes32 => uint256) storage messages
    ) internal returns (uint256) {
        uint256 message_segment_size = programOutputSlice[0];
        require(message_segment_size < 2**30, "INVALID_MESSAGE_SEGMENT_SIZE");

        uint256 offset = 1;
        uint256 message_segment_end = offset + message_segment_size;
        while (offset < message_segment_end) {
            uint256 payloadLengthOffset = offset + MESSAGE_PAYLOAD_SIZE_OFFSET;
            require (
                payloadLengthOffset < programOutputSlice.length,
                "MESSAGE_TOO_SHORT");

            uint256 payloadLengh = programOutputSlice[payloadLengthOffset];
            require(payloadLengh < 2**30, "INVALID_PAYLOAD_LENGTH");

            uint256 endOffset = offset + MESSAGE_PREFIX_SIZE + payloadLengh;
            require (
                endOffset <= programOutputSlice.length,
                "TRUNCATED_MESSAGE_PAYLOAD");

            bytes32 messageHash = keccak256(abi.encodePacked(
                programOutputSlice[offset:endOffset]));
            if (isL2ToL1) {
                emit LogMessageToL1(
                    programOutputSlice[offset + MESSAGE_FROM_ADDRESS_OFFSET],
                    address(programOutputSlice[offset + MESSAGE_TO_ADDRESS_OFFSET]),
                    (uint256[])(programOutputSlice[
                        offset + MESSAGE_PREFIX_SIZE: endOffset]));
                messages[messageHash] += 1;
            } else {
                require(messages[messageHash] > 0, "INVALID_MESSAGE_TO_CONSUME");
                messages[messageHash] -= 1;
            }

            offset = endOffset;
        }
        require(
            offset == message_segment_end,
            "INVALID_MESSAGE_SEGMENT_SIZE");

        return offset;
    }
}

File 6 of 6: StarknetState.sol
/*
  Copyright 2019-2021 StarkWare Industries Ltd.

  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

  https://www.starkware.co/open-source-license/

  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.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.11;

import "Output.sol";

library StarknetState {
    struct State {
        uint256 globalRoot;
        int256 sequenceNumber;
    }

    /**
      Validates that the 'sequenceNumber' and the previous root are consistent with the
      current state and updates the state.
    */
    function update(
        State storage state, int256 sequenceNumber, uint256[] calldata starknetOutput) internal {
        // Check the sequenceNumber first as the error is less ambiguous then INVALID_PREVIOUS_ROOT.
        state.sequenceNumber += 1;
        require(state.sequenceNumber == sequenceNumber, "INVALID_SEQUENCE_NUMBER");

        uint256[] calldata merkle_update = StarknetOutput.getMerkleUpdate(starknetOutput);
        require(
            state.globalRoot == MerkleUpdateOutput.getPrevRoot(merkle_update),
            "INVALID_PREVIOUS_ROOT");
        state.globalRoot = MerkleUpdateOutput.getNewRoot(merkle_update);
    }
}

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"programHash_","type":"uint256"},{"internalType":"contract IFactRegistry","name":"verifier_","type":"address"},{"components":[{"internalType":"uint256","name":"globalRoot","type":"uint256"},{"internalType":"int256","name":"sequenceNumber","type":"int256"}],"internalType":"struct StarknetState.State","name":"initialState","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"from_address","type":"uint256"},{"indexed":true,"internalType":"address","name":"to_address","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"payload","type":"uint256[]"}],"name":"LogMessageToL1","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from_address","type":"address"},{"indexed":true,"internalType":"uint256","name":"to_address","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"selector","type":"uint256"},{"indexed":false,"internalType":"uint256[]","name":"payload","type":"uint256[]"}],"name":"LogMessageToL2","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"stateTransitionFact","type":"bytes32"}],"name":"LogStateTransitionFact","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"globalRoot","type":"uint256"},{"indexed":false,"internalType":"int256","name":"sequenceNumber","type":"int256"}],"name":"LogStateUpdate","type":"event"},{"inputs":[{"internalType":"uint256","name":"from_address","type":"uint256"},{"internalType":"uint256[]","name":"payload","type":"uint256[]"}],"name":"consumeMessageFromL2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"identify","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"l1ToL2Messages","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"l2ToL1Messages","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"to_address","type":"uint256"},{"internalType":"uint256","name":"selector","type":"uint256"},{"internalType":"uint256[]","name":"payload","type":"uint256[]"}],"name":"sendMessageToL2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stateRoot","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stateSequenceNumber","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int256","name":"sequenceNumber","type":"int256"},{"internalType":"uint256[]","name":"programOutput","type":"uint256[]"},{"components":[{"internalType":"uint256","name":"onchainDataHash","type":"uint256"},{"internalType":"uint256","name":"onchainDataSize","type":"uint256"}],"internalType":"struct OnchainDataFactTreeEncoder.DataAvailabilityFact","name":"data_availability_fact","type":"tuple"}],"name":"updateState","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50604051610e80380380610e8083398101604081905261002f91610066565b600392909255600280546001600160a01b0319166001600160a01b03929092169190911790558051600055602001516001556100e8565b6000806000838503608081121561007b578384fd5b845160208601519094506001600160a01b0381168114610099578384fd5b92506040603f19820112156100ac578182fd5b50604080519081016001600160401b03811182821017156100cb578283fd5b604090815285015181526060909401516020850152509093909250565b610d89806100f76000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c80639588eca21161005b5780639588eca2146100f1578063a46efaf3146100f9578063a5cab7691461010c578063eeb728661461011457610088565b80632c9dd5c01461008d5780633e3aa6c5146100a257806377c7d7a9146100b557806381fd8c6b146100de575b600080fd5b6100a061009b366004610928565b610129565b005b6100a06100b0366004610972565b6101ad565b6100c86100c3366004610862565b610245565b6040516100d59190610ab3565b60405180910390f35b6100a06100ec36600461087a565b610257565b6100c8610426565b6100c8610107366004610862565b61042c565b6100c861043e565b61011c610444565b6040516100d59190610abc565b6040516000906101459085903390859087908290602001610a1e565b60408051601f198184030181529181528151602092830120600081815260049093529120549091506101925760405162461bcd60e51b815260040161018990610ce3565b60405180910390fd5b60009081526004602052604090208054600019019055505050565b8284336001600160a01b03167f474d2456b41fc1146ae05ba36e794e448efd2f172a9128ca1c8c6dbdb22b62f785856040516101ea929190610a79565b60405180910390a460405160009061021390339087906001860190889088908890602001610a48565b60408051601f198184030181529181528151602092830120600090815260059092529020805460010190555050505050565b60056020526000908152604090205481565b610261838361047b565b600061027c8484610277368690038601866108de565b61049f565b9050600060035482604051602001610295929190610d1a565b60408051601f19818403018152908290528051602090910120600254636a93856760e01b83529092506001600160a01b031690636a938567906102dc908490600401610ab3565b60206040518083038186803b1580156102f457600080fd5b505afa158015610308573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061032c919061083b565b6103485760405162461bcd60e51b815260040161018990610cac565b7f9866f8ddfe70bb512b2f2b28b49d4017c43f7ba775f1a20c61c13eea8cdac111826040516103779190610ab3565b60405180910390a1600261039960016103928784818b610d28565b600461051a565b016103b260006103ab8784818b610d28565b600561051a565b018481146103d25760405162461bcd60e51b815260040161018990610c07565b6103df6000888888610736565b6000546001546040517fe8012213bb931d3efa0a954cfb0d7b75f2a5e2358ba5f7d3edfb0154f6e7a56892610415929091610d1a565b60405180910390a150505050505050565b60005490565b60046020526000908152604090205481565b60015490565b60408051808201909152601981527f537461726b576172655f537461726b6e65745f323032315f3100000000000000602082015290565b6002811161049b5760405162461bcd60e51b815260040161018990610c3e565b5050565b604051600090839082906104b990879084906020016109ee565b604051602081830303815290604052805190602001209050600081838660000151876020015186016040516020016104f49493929190610a03565b60408051808303601f190181529190528051602090910120600101979650505050505050565b6000808484600081811061052a57fe5b905060200201359050634000000081106105565760405162461bcd60e51b815260040161018990610bd0565b60018181015b8082101561070c57600282018681106105875760405162461bcd60e51b815260040161018990610b0f565b600088888381811061059557fe5b905060200201359050634000000081106105c15760405162461bcd60e51b815260040161018990610ba0565b838101600301888111156105e75760405162461bcd60e51b815260040161018990610c75565b60006105f582878c8e610d28565b6040516020016106069291906109ee565b6040516020818303038152906040528051906020012090508b156106bf578a8a6001880181811061063357fe5b905060200201356001600160a01b03168b8b6000890181811061065257fe5b905060200201357f4264ac208b5fde633ccdd42e0f12c3d6d443a4f3779bbf886925b94665b63a228d8d60038b0190879261068f93929190610d28565b60405161069d929190610a79565b60405180910390a3600081815260208a90526040902080546001019055610701565b600081815260208a905260409020546106ea5760405162461bcd60e51b815260040161018990610ce3565b600081815260208a90526040902080546000190190555b50935061055c915050565b80821461072b5760405162461bcd60e51b815260040161018990610bd0565b509695505050505050565b600184810180549091019081905583146107625760405162461bcd60e51b815260040161018990610b3a565b36600061076f84846107b0565b9150915061077d82826107cc565b86541461079c5760405162461bcd60e51b815260040161018990610b71565b6107a682826107ea565b9095555050505050565b3660006107c06002828587610d28565b915091505b9250929050565b6000828260008181106107db57fe5b90506020020135905092915050565b6000828260018181106107db57fe5b60008083601f84011261080a578182fd5b50813567ffffffffffffffff811115610821578182fd5b60208301915083602080830285010111156107c557600080fd5b60006020828403121561084c578081fd5b8151801515811461085b578182fd5b9392505050565b600060208284031215610873578081fd5b5035919050565b6000806000808486036080811215610890578384fd5b85359450602086013567ffffffffffffffff8111156108ad578485fd5b6108b9888289016107f9565b9095509350506040603f19820112156108d0578182fd5b509295919450926040019150565b6000604082840312156108ef578081fd5b6040516040810181811067ffffffffffffffff8211171561090e578283fd5b604052823581526020928301359281019290925250919050565b60008060006040848603121561093c578283fd5b83359250602084013567ffffffffffffffff811115610959578283fd5b610965868287016107f9565b9497909650939450505050565b60008060008060608587031215610987578384fd5b8435935060208501359250604085013567ffffffffffffffff8111156109ab578283fd5b6109b7878288016107f9565b95989497509550505050565b60006001600160fb1b038311156109d8578081fd5b6020830280838637939093019283525090919050565b60006109fb8284866109c3565b949350505050565b93845260208401929092526040830152606082015260800190565b6000868252856020830152846040830152610a3d6060830184866109c3565b979650505050505050565b6000878252866020830152856040830152846060830152610a6d6080830184866109c3565b98975050505050505050565b6020808252810182905260006001600160fb1b03831115610a98578081fd5b60208302808560408501379190910160400190815292915050565b90815260200190565b6000602080835283518082850152825b81811015610ae857858101830151858201604001528201610acc565b81811115610af95783604083870101525b50601f01601f1916929092016040019392505050565b602080825260119082015270135154d4d051d157d513d3d7d4d213d495607a1b604082015260600190565b60208082526017908201527f494e56414c49445f53455155454e43455f4e554d424552000000000000000000604082015260600190565b6020808252601590820152741253959053125117d41491559253d554d7d493d3d5605a1b604082015260600190565b6020808252601690820152750929cac82989288bea082b2989e8288be988a9c8ea8960531b604082015260600190565b6020808252601c908201527f494e56414c49445f4d4553534147455f5345474d454e545f53495a4500000000604082015260600190565b60208082526018908201527f535441524b4e45545f4f55545055545f544f4f5f4c4f4e470000000000000000604082015260600190565b60208082526019908201527f535441524b4e45545f4f55545055545f544f4f5f53484f525400000000000000604082015260600190565b60208082526019908201527f5452554e43415445445f4d4553534147455f5041594c4f414400000000000000604082015260600190565b60208082526019908201527f4e4f5f53544154455f5452414e534954494f4e5f50524f4f4600000000000000604082015260600190565b6020808252601a908201527f494e56414c49445f4d4553534147455f544f5f434f4e53554d45000000000000604082015260600190565b918252602082015260400190565b60008085851115610d37578182fd5b83861115610d43578182fd5b505060208302019391909203915056fea264697066735822122092aea9096b9a4762c12e949abe06c05d12c8f9d8b4890fd2f4ef4996ad9afb6664736f6c634300060c003304870a9a2b3d80c1fad860e36511c45a553e3582a0782af1e2b96ebf09393a940000000000000000000000002886d2a190f00aa324ac5bf5a5b90217121d575604d148157dccb4af33a3e5fab742946f81061da6a6cb5294f14e723967c0f17dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

04870a9a2b3d80c1fad860e36511c45a553e3582a0782af1e2b96ebf09393a940000000000000000000000002886d2a190f00aa324ac5bf5a5b90217121d575604d148157dccb4af33a3e5fab742946f81061da6a6cb5294f14e723967c0f17dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff

-----Decoded View---------------
Arg [0] : programHash_ (uint256): 2047848921927131476771559133645343929683360467755431985140631000810618698388
Arg [1] : verifier_ (address): 0x2886d2a190f00aa324ac5bf5a5b90217121d5756
Arg [2] : initialState (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 04870a9a2b3d80c1fad860e36511c45a553e3582a0782af1e2b96ebf09393a94
Arg [1] : 0000000000000000000000002886d2a190f00aa324ac5bf5a5b90217121d5756
Arg [2] : 04d148157dccb4af33a3e5fab742946f81061da6a6cb5294f14e723967c0f17d
Arg [3] : ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff


Deployed ByteCode Sourcemap

838:4896:4:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5297:435;;;;;;:::i;:::-;;:::i;:::-;;4663:553;;;;;;:::i;:::-;;:::i;1076:50::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3289:1312;;;;;;:::i;:::-;;:::i;2611:93::-;;;:::i;1020:50::-;;;;;;:::i;:::-;;:::i;2768:106::-;;;:::i;2434:118::-;;;:::i;:::-;;;;;;;:::i;5297:435::-;5459:141;;5418:15;;5459:141;;5493:12;;5531:10;;5560:7;;;;;;5459:141;;;:::i;:::-;;;;-1:-1:-1;;5459:141:4;;;;;;;;;5436:174;;5459:141;5436:174;;;;5655:1;5629:23;;;:14;:23;;;;;;5436:174;;-1:-1:-1;5621:66:4;;;;-1:-1:-1;;;5621:66:4;;;;;;;:::i;:::-;;;;;;;;;5697:23;;;;:14;:23;;;;;:28;;-1:-1:-1;;5697:28:4;;;-1:-1:-1;;;5297:435:4:o;4663:553::-;4847:8;4835:10;4823;-1:-1:-1;;;;;4808:57:4;;4857:7;;4808:57;;;;;;;:::i;:::-;;;;;;;;4979:182;;4938:15;;4979:182;;5021:10;;5050;;5078:1;:18;;;5114:8;;5082:7;;;;4979:182;;;:::i;:::-;;;;-1:-1:-1;;4979:182:4;;;;;;;;;4956:215;;4979:182;4956:215;;;;5181:23;;;;:14;:23;;;;;:28;;5208:1;5181:28;;;-1:-1:-1;;;;;4663:553:4:o;1076:50::-;;;;;;;;;;;;;:::o;3289:1312::-;3522:38;3546:13;;3522:23;:38::i;:::-;3571:27;3601:104;3667:13;;3601:104;;;;;;;3682:22;3601:104;:::i;:::-;:52;:104::i;:::-;3571:134;;3715:17;3756:11;;3769:19;3745:44;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;3745:44:4;;;;;;;;;;3735:55;;3745:44;3735:55;;;;3808:8;;-1:-1:-1;;;3808:27:4;;3735:55;;-1:-1:-1;;;;;;3808:8:4;;:16;;:27;;3735:55;;3808:27;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3800:65;;;;-1:-1:-1;;;3800:65:4;;;;;;;:::i;:::-;3880:43;3903:19;3880:43;;;;;;:::i;:::-;;;;;;;;1264:1:3;4047:108:4;4104:4;4110:28;:13;1264:1:3;4110:13:4;;:28;:::i;:::-;4140:14;4047:30;:108::i;:::-;4031:124;4220:109;4277:5;4284:28;:13;4031:124;4284:13;;:28;:::i;:::-;4314:14;4220:30;:109::i;:::-;4204:125;4361:36;;;4340:98;;;;-1:-1:-1;;;4340:98:4;;;;;;;:::i;:::-;4482:43;:5;4495:14;4511:13;;4482:12;:43::i;:::-;4555:5;:16;4573:20;;4540:54;;;;;;4555:16;;4540:54;:::i;:::-;;;;;;;;3289:1312;;;;;;;:::o;2611:93::-;2655:7;2681:16;2611:93;:::o;1020:50::-;;;;;;;;;;;;;:::o;2768:106::-;2847:20;;2768:106;:::o;2434:118::-;2511:34;;;;;;;;;;;;;;;;;2434:118;:::o;1750:151:3:-;1264:1;1832:32;;1824:70;;;;-1:-1:-1;;;1824:70:3;;;;;;;:::i;:::-;1750:151;;:::o;1205:1464:2:-;2163:31;;1365:7;;2093:13;;1365:7;;2163:31;;2093:13;;;;2163:31;;;:::i;:::-;;;;;;;;;;;;;2153:42;;;;;;2123:72;;2259:18;2337:19;2374:18;2410:8;:24;;;2473:8;:24;;;2452:18;:45;2303:208;;;;;;;;;;;:::i;:::-;;;;;;;-1:-1:-1;;2303:208:2;;;;;;2280:241;;2303:208;2280:241;;;;2660:1;2638:23;;1205:1464;-1:-1:-1;;;;;;;1205:1464:2:o;2524:1873:3:-;2698:7;2717:28;2748:18;;2767:1;2748:21;;;;;;;;;;;;;2717:52;;2810:5;2787:20;:28;2779:69;;;;-1:-1:-1;;;2779:69:3;;;;;;;:::i;:::-;2876:1;2917:29;;;2956:1306;2972:19;2963:6;:28;2956:1306;;;1425:1;3037:36;;3113:47;;;3087:111;;;;-1:-1:-1;;;3087:111:3;;;;;;;:::i;:::-;3213:20;3236:18;;3255:19;3236:39;;;;;;;;;;;;;3213:62;;3312:5;3297:12;:20;3289:55;;;;-1:-1:-1;;;3289:55:3;;;;;;;:::i;:::-;3379:43;;;1471:1;3379:43;3462:38;;;;3436:110;;;;-1:-1:-1;;;3436:110:3;;;;;;;:::i;:::-;3561:19;3627:36;3653:9;3646:6;3627:18;;:36;:::i;:::-;3593:71;;;;;;;;;:::i;:::-;;;;;;;;;;;;;3583:82;;;;;;3561:104;;3683:8;3679:540;;;3838:18;;1371:1;3857:6;:34;3838:54;;;;;;;;;;;;;-1:-1:-1;;;;;3716:297:3;3752:18;;1319:1;3771:6;:36;3752:56;;;;;;;;;;;;;3716:297;3927:18;;1471:1;3971:6;:28;3927:84;4001:9;3927:84;;;;;;;:::i;:::-;3716:297;;;;;;;:::i;:::-;;;;;;;;4031:21;;;;;;;;;;;:26;;4056:1;4031:26;;;3679:540;;;4128:1;4104:21;;;;;;;;;;;4096:64;;;;-1:-1:-1;;;4096:64:3;;;;;;;:::i;:::-;4178:21;;;;;;;;;;;:26;;-1:-1:-1;;4178:26:3;;;3679:540;-1:-1:-1;4242:9:3;-1:-1:-1;2956:1306:3;;-1:-1:-1;;2956:1306:3;;4302:19;4292:6;:29;4271:95;;;;-1:-1:-1;;;4271:95:3;;;;;;;:::i;:::-;-1:-1:-1;4384:6:3;2524:1873;-1:-1:-1;;;;;;2524:1873:3:o;943:639:5:-;1191:1;1167:20;;;:25;;;;;;;;;1210:38;;1202:74;;;;-1:-1:-1;;;1202:74:5;;;;;;;:::i;:::-;1287:32;;1322:46;1353:14;;1322:30;:46::i;:::-;1287:81;;;;1419:45;1450:13;;1419:30;:45::i;:::-;1399:16;;:65;1378:124;;;;-1:-1:-1;;;1378:124:5;;;;;;;:::i;:::-;1531:44;1561:13;;1531:29;:44::i;:::-;1512:63;;;-1:-1:-1;;;;;943:639:5:o;2001:210:3:-;2105:18;;2146:58;2202:1;2105:18;2146:11;;:58;:::i;:::-;2139:65;;;;2001:210;;;;;;:::o;750:165::-;857:7;887:18;;906:1;887:21;;;;;;;;;;;;;880:28;;750:165;;;;:::o;971:164::-;1077:7;1107:18;;1126:1;1107:21;;;;;;23:352:-1;;;153:3;146:4;138:6;134:17;130:27;120:2;;-1:-1;;161:12;120:2;-1:-1;191:20;;231:18;220:30;;217:2;;;-1:-1;;253:12;217:2;297:4;289:6;285:17;273:29;;348:3;297:4;;332:6;328:17;289:6;314:32;;311:41;308:2;;;365:1;;355:12;1734:257;;1846:2;1834:9;1825:7;1821:23;1817:32;1814:2;;;-1:-1;;1852:12;1814:2;464:6;458:13;21657:5;20616:13;20609:21;21635:5;21632:32;21622:2;;-1:-1;;21668:12;21622:2;1904:71;1808:183;-1:-1;;;1808:183::o;1998:241::-;;2102:2;2090:9;2081:7;2077:23;2073:32;2070:2;;;-1:-1;;2108:12;2070:2;-1:-1;585:20;;2064:175;-1:-1;2064:175::o;2246:722::-;;;;;2444:9;2435:7;2431:23;2456:3;2431:23;2427:33;2424:2;;;-1:-1;;2463:12;2424:2;734:6;721:20;2515:62;;2642:2;2631:9;2627:18;2614:32;2666:18;2658:6;2655:30;2652:2;;;-1:-1;;2688:12;2652:2;2726:80;2798:7;2789:6;2778:9;2774:22;2726:80;:::i;:::-;2708:98;;-1:-1;2708:98;-1:-1;;2843:2;-1:-1;;957:16;;953:25;950:2;;;-1:-1;;981:12;950:2;-1:-1;2418:550;;;;-1:-1;2418:550;2843:2;2920:22;;-1:-1;2418:550::o;2975:313::-;;3115:2;3103:9;3094:7;3090:23;3086:32;3083:2;;;-1:-1;;3121:12;3083:2;3115;19344:9;3115:2;19380:6;19376:17;19487:6;19475:10;19472:22;19451:18;19439:10;19436:34;19433:62;19430:2;;;-1:-1;;19498:12;19430:2;3115;19517:22;1664:20;;1339:75;;1486:2;1540:22;;;1664:20;1501:16;;;1494:75;;;;-1:-1;1346:16;3077:211;-1:-1;3077:211::o;3295:522::-;;;;3451:2;3439:9;3430:7;3426:23;3422:32;3419:2;;;-1:-1;;3457:12;3419:2;1677:6;1664:20;3509:63;;3637:2;3626:9;3622:18;3609:32;3661:18;3653:6;3650:30;3647:2;;;-1:-1;;3683:12;3647:2;3721:80;3793:7;3784:6;3773:9;3769:22;3721:80;:::i;:::-;3413:404;;3703:98;;-1:-1;3703:98;;-1:-1;;;;3413:404::o;3824:647::-;;;;;3997:2;3985:9;3976:7;3972:23;3968:32;3965:2;;;-1:-1;;4003:12;3965:2;1677:6;1664:20;4055:63;;4155:2;4198:9;4194:22;1664:20;4163:63;;4291:2;4280:9;4276:18;4263:32;4315:18;4307:6;4304:30;4301:2;;;-1:-1;;4337:12;4301:2;4375:80;4447:7;4438:6;4427:9;4423:22;4375:80;:::i;:::-;3959:512;;;;-1:-1;4357:98;-1:-1;;;;3959:512::o;5015:503::-;;-1:-1;;;;;5299:78;;5296:2;;;-1:-1;;5380:12;5296:2;5423:4;5415:6;5411:17;20960:6;20955:3;20950;20937:30;20998:16;;;;20991:27;;;-1:-1;20998:16;;5165:353;-1:-1;5165:353::o;9881:355::-;;10076:135;10207:3;10198:6;10190;10076:135;:::i;:::-;10221:10;10057:179;-1:-1;;;;10057:179::o;10611:670::-;5597:37;;;10920:2;10911:12;;5597:37;;;;11022:12;;;5597:37;11133:12;;;5597:37;11244:12;;;10811:470::o;11288:772::-;;5627:5;5604:3;5597:37;5627:5;11657:2;11652:3;11648:12;5597:37;5627:5;11759:12;11652:3;11759:12;5597:37;11900:135;11870:12;11652:3;11870:12;12022:6;12014;11900:135;:::i;:::-;12045:10;11548:512;-1:-1;;;;;;;11548:512::o;12067:911::-;;5627:5;5604:3;5597:37;5627:5;12464:2;12459:3;12455:12;5597:37;5627:5;12566:12;12459:3;12566:12;5597:37;5627:5;12677:12;12459:3;12677:12;5597:37;12818:135;12788:12;12459:3;12788:12;12940:6;12932;12818:135;:::i;:::-;12963:10;12355:623;-1:-1;;;;;;;;12355:623::o;12985:390::-;13172:2;13186:47;;;13157:18;;19799:19;;;12985:390;-1:-1;;;;;4757:78;;4754:2;;;-1:-1;;4838:12;4754:2;13172;4873:6;4869:17;20960:6;20955:3;19839:14;13161:9;19839:14;20937:30;20998:16;;;;19839:14;20998:16;20991:27;;;20998:16;13143:232;-1:-1;;13143:232::o;13382:222::-;5597:37;;;13509:2;13494:18;;13480:124::o;13836:310::-;;13983:2;;14004:17;13997:47;6067:5;19639:12;19811:6;13983:2;13972:9;13968:18;19799:19;-1:-1;21105:101;21119:6;21116:1;21113:13;21105:101;;;21186:11;;;;;21180:18;21167:11;;;19839:14;21167:11;21160:39;21134:10;;21105:101;;;21221:6;21218:1;21215:13;21212:2;;;-1:-1;19839:14;21277:6;13972:9;21268:16;;21261:27;21212:2;-1:-1;21555:7;21539:14;-1:-1;;21535:28;6225:39;;;;19839:14;6225:39;;13954:192;-1:-1;;;13954:192::o;14153:416::-;14353:2;14367:47;;;6501:2;14338:18;;;19799:19;-1:-1;;;19839:14;;;6517:40;6576:12;;;14324:245::o;14576:416::-;14776:2;14790:47;;;6827:2;14761:18;;;19799:19;6863:25;19839:14;;;6843:46;6908:12;;;14747:245::o;14999:416::-;15199:2;15213:47;;;7159:2;15184:18;;;19799:19;-1:-1;;;19839:14;;;7175:44;7238:12;;;15170:245::o;15422:416::-;15622:2;15636:47;;;7489:2;15607:18;;;19799:19;-1:-1;;;19839:14;;;7505:45;7569:12;;;15593:245::o;15845:416::-;16045:2;16059:47;;;7820:2;16030:18;;;19799:19;7856:30;19839:14;;;7836:51;7906:12;;;16016:245::o;16268:416::-;16468:2;16482:47;;;8157:2;16453:18;;;19799:19;8193:26;19839:14;;;8173:47;8239:12;;;16439:245::o;16691:416::-;16891:2;16905:47;;;8490:2;16876:18;;;19799:19;8526:27;19839:14;;;8506:48;8573:12;;;16862:245::o;17114:416::-;17314:2;17328:47;;;8824:2;17299:18;;;19799:19;8860:27;19839:14;;;8840:48;8907:12;;;17285:245::o;17537:416::-;17737:2;17751:47;;;9158:2;17722:18;;;19799:19;9194:27;19839:14;;;9174:48;9241:12;;;17708:245::o;17960:416::-;18160:2;18174:47;;;9492:2;18145:18;;;19799:19;9528:28;19839:14;;;9508:49;9576:12;;;18131:245::o;18612:333::-;5597:37;;;18931:2;18916:18;;5597:37;18767:2;18752:18;;18738:207::o;20208:335::-;;;20374:8;20362:10;20359:24;20356:2;;;-1:-1;;20386:12;20356:2;20421:6;20411:8;20408:20;20405:2;;;-1:-1;;20431:12;20405:2;-1:-1;;20491:2;20475:19;;20463:32;;20513:25;;;;;-1:-1;20350:193::o

Swarm Source

ipfs://92aea9096b9a4762c12e949abe06c05d12c8f9d8b4890fd2f4ef4996ad9afb66
Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
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.