ETH Price: $2,436.21 (-1.17%)

Contract

0x4FAAfff294F9303B0eAdDc9d23821DBf39b7Ec82

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Sponsored

Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
1075583402023-07-30 11:10:57436 days ago1690715457
0x4FAAfff2...f39b7Ec82
0.0005161 ETH
1075583162023-07-30 11:10:09436 days ago1690715409
0x4FAAfff2...f39b7Ec82
0.000337783201072 ETH
1075581262023-07-30 11:03:49436 days ago1690715029
0x4FAAfff2...f39b7Ec82
0.000717432869907 ETH
1075580832023-07-30 11:02:23436 days ago1690714943
0x4FAAfff2...f39b7Ec82
0.000813296515628 ETH
1075580082023-07-30 10:59:53436 days ago1690714793
0x4FAAfff2...f39b7Ec82
0.000337580492314 ETH
1075579322023-07-30 10:57:21436 days ago1690714641
0x4FAAfff2...f39b7Ec82
0.000337580492314 ETH
1075578142023-07-30 10:53:25436 days ago1690714405
0x4FAAfff2...f39b7Ec82
0.000337580492314 ETH
1075577872023-07-30 10:52:31436 days ago1690714351
0x4FAAfff2...f39b7Ec82
0 ETH
1075577872023-07-30 10:52:31436 days ago1690714351
0x4FAAfff2...f39b7Ec82
0 ETH
1075577842023-07-30 10:52:25436 days ago1690714345
0x4FAAfff2...f39b7Ec82
0 ETH
1075576842023-07-30 10:49:05436 days ago1690714145
0x4FAAfff2...f39b7Ec82
0.000337580492314 ETH
1075574082023-07-30 10:39:53436 days ago1690713593
0x4FAAfff2...f39b7Ec82
0 ETH
1075574082023-07-30 10:39:53436 days ago1690713593
0x4FAAfff2...f39b7Ec82
0 ETH
1075574042023-07-30 10:39:45436 days ago1690713585
0x4FAAfff2...f39b7Ec82
0 ETH
1075571592023-07-30 10:31:35436 days ago1690713095
0x4FAAfff2...f39b7Ec82
0.000337575559302 ETH
1075569632023-07-30 10:25:03436 days ago1690712703
0x4FAAfff2...f39b7Ec82
0.000337580492314 ETH
1075569612023-07-30 10:24:59436 days ago1690712699
0x4FAAfff2...f39b7Ec82
0.000337580492314 ETH
1075569512023-07-30 10:24:39436 days ago1690712679
0x4FAAfff2...f39b7Ec82
0.000334593553536 ETH
1075569082023-07-30 10:23:13436 days ago1690712593
0x4FAAfff2...f39b7Ec82
0.000718718955854 ETH
1075568782023-07-30 10:22:13436 days ago1690712533
0x4FAAfff2...f39b7Ec82
0 ETH
1075568782023-07-30 10:22:13436 days ago1690712533
0x4FAAfff2...f39b7Ec82
0 ETH
1075568732023-07-30 10:22:03436 days ago1690712523
0x4FAAfff2...f39b7Ec82
0 ETH
1075567822023-07-30 10:19:01436 days ago1690712341
0x4FAAfff2...f39b7Ec82
0.000491441316648 ETH
1075567322023-07-30 10:17:21436 days ago1690712241
0x4FAAfff2...f39b7Ec82
0.000813296515628 ETH
1075566622023-07-30 10:15:01436 days ago1690712101
0x4FAAfff2...f39b7Ec82
0.000491441316648 ETH
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
HolographOperator

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 999999 runs

Other Settings:
default evmVersion
File 1 of 24 : HolographOperator.sol
// SPDX-License-Identifier: UNLICENSED
/*

                         ┌───────────┐
                         │ HOLOGRAPH │
                         └───────────┘
╔═════════════════════════════════════════════════════════════╗
║                                                             ║
║                            / ^ \                            ║
║                            ~~*~~            ¸               ║
║                         [ '<>:<>' ]         │░░░            ║
║               ╔╗           _/"\_           ╔╣               ║
║             ┌─╬╬─┐          """          ┌─╬╬─┐             ║
║          ┌─┬┘ ╠╣ └┬─┐       \_/       ┌─┬┘ ╠╣ └┬─┐          ║
║       ┌─┬┘ │  ╠╣  │ └┬─┐           ┌─┬┘ │  ╠╣  │ └┬─┐       ║
║    ┌─┬┘ │  │  ╠╣  │  │ └┬─┐     ┌─┬┘ │  │  ╠╣  │  │ └┬─┐    ║
║ ┌─┬┘ │  │  │  ╠╣  │  │  │ └┬┐ ┌┬┘ │  │  │  ╠╣  │  │  │ └┬─┐ ║
╠┬┘ │  │  │  │  ╠╣  │  │  │  │└¤┘│  │  │  │  ╠╣  │  │  │  │ └┬╣
║│  │  │  │  │  ╠╣  │  │  │  │   │  │  │  │  ╠╣  │  │  │  │  │║
╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣
╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣
║               ╠╣                           ╠╣               ║
║               ╠╣                           ╠╣               ║
║    ,          ╠╣     ,        ,'      *    ╠╣               ║
║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║
╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝
     - one protocol, one bridge = infinite possibilities -


 ***************************************************************

 DISCLAIMER: U.S Patent Pending

 LICENSE: Holograph Limited Public License (H-LPL)

 https://holograph.xyz/licenses/h-lpl/1.0.0

 This license governs use of the accompanying software. If you
 use the software, you accept this license. If you do not accept
 the license, you are not permitted to use the software.

 1. Definitions

 The terms "reproduce," "reproduction," "derivative works," and
 "distribution" have the same meaning here as under U.S.
 copyright law. A "contribution" is the original software, or
 any additions or changes to the software. A "contributor" is
 any person that distributes its contribution under this
 license. "Licensed patents" are a contributor’s patent claims
 that read directly on its contribution.

 2. Grant of Rights

 A) Copyright Grant- Subject to the terms of this license,
 including the license conditions and limitations in sections 3
 and 4, each contributor grants you a non-exclusive, worldwide,
 royalty-free copyright license to reproduce its contribution,
 prepare derivative works of its contribution, and distribute
 its contribution or any derivative works that you create.
 B) Patent Grant- Subject to the terms of this license,
 including the license conditions and limitations in section 3,
 each contributor grants you a non-exclusive, worldwide,
 royalty-free license under its licensed patents to make, have
 made, use, sell, offer for sale, import, and/or otherwise
 dispose of its contribution in the software or derivative works
 of the contribution in the software.

 3. Conditions and Limitations

 A) No Trademark License- This license does not grant you rights
 to use any contributors’ name, logo, or trademarks.
 B) If you bring a patent claim against any contributor over
 patents that you claim are infringed by the software, your
 patent license from such contributor is terminated with
 immediate effect.
 C) If you distribute any portion of the software, you must
 retain all copyright, patent, trademark, and attribution
 notices that are present in the software.
 D) If you distribute any portion of the software in source code
 form, you may do so only under this license by including a
 complete copy of this license with your distribution. If you
 distribute any portion of the software in compiled or object
 code form, you may only do so under a license that complies
 with this license.
 E) The software is licensed “as-is.” You bear all risks of
 using it. The contributors give no express warranties,
 guarantees, or conditions. You may have additional consumer
 rights under your local laws which this license cannot change.
 To the extent permitted under your local laws, the contributors
 exclude all implied warranties, including those of
 merchantability, fitness for a particular purpose and
 non-infringement.

 4. (F) Platform Limitation- The licenses granted in sections
 2.A & 2.B extend only to the software or derivative works that
 you create that run on a Holograph system product.

 ***************************************************************

*/

pragma solidity 0.8.13;

import "./abstract/Admin.sol";
import "./abstract/Initializable.sol";

import "./interface/CrossChainMessageInterface.sol";
import "./interface/HolographBridgeInterface.sol";
import "./interface/HolographERC20Interface.sol";
import "./interface/HolographInterface.sol";
import "./interface/HolographOperatorInterface.sol";
import "./interface/HolographRegistryInterface.sol";
import "./interface/InitializableInterface.sol";
import "./interface/HolographInterfacesInterface.sol";
import "./interface/Ownable.sol";

import "./struct/OperatorJob.sol";

/**
 * @title Holograph Operator
 * @author https://github.com/holographxyz
 * @notice Participate in the Holograph Protocol by becoming an Operator
 * @dev This contract allows operators to bond utility tokens and help execute operator jobs
 */
contract HolographOperator is Admin, Initializable, HolographOperatorInterface {
  /**
   * @dev bytes32(uint256(keccak256('eip1967.Holograph.bridge')) - 1)
   */
  bytes32 constant _bridgeSlot = 0xeb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9;
  /**
   * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1)
   */
  bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a;
  /**
   * @dev bytes32(uint256(keccak256('eip1967.Holograph.interfaces')) - 1)
   */
  bytes32 constant _interfacesSlot = 0xbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd1848827;
  /**
   * @dev bytes32(uint256(keccak256('eip1967.Holograph.jobNonce')) - 1)
   */
  bytes32 constant _jobNonceSlot = 0x1cda64803f3b43503042e00863791e8d996666552d5855a78d53ee1dd4b3286d;
  /**
   * @dev bytes32(uint256(keccak256('eip1967.Holograph.messagingModule')) - 1)
   */
  bytes32 constant _messagingModuleSlot = 0x54176250282e65985d205704ffce44a59efe61f7afd99e29fda50f55b48c061a;
  /**
   * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)
   */
  bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;
  /**
   * @dev bytes32(uint256(keccak256('eip1967.Holograph.utilityToken')) - 1)
   */
  bytes32 constant _utilityTokenSlot = 0xbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c37;
  /**
   * @dev bytes32(uint256(keccak256('eip1967.Holograph.minGasPrice')) - 1)
   */
  bytes32 constant _minGasPriceSlot = 0x264d744422f7427cd080572c35c848b6cd3a36da6b47519af89ef13098b12fc0;

  /**
   * @dev Internal number (in seconds), used for defining a window for operator to execute the job
   */
  uint256 private _blockTime;

  /**
   * @dev Minimum amount of tokens needed for bonding
   */
  uint256 private _baseBondAmount;

  /**
   * @dev The multiplier used for calculating bonding amount for pods
   */
  uint256 private _podMultiplier;

  /**
   * @dev The threshold used for limiting number of operators in a pod
   */
  uint256 private _operatorThreshold;

  /**
   * @dev The threshold step used for increasing bond amount once threshold is reached
   */
  uint256 private _operatorThresholdStep;

  /**
   * @dev The threshold divisor used for increasing bond amount once threshold is reached
   */
  uint256 private _operatorThresholdDivisor;

  /**
   * @dev Internal counter of all cross-chain messages received
   */
  uint256 private _inboundMessageCounter;

  /**
   * @dev Internal mapping of operator job details for a specific job hash
   */
  mapping(bytes32 => uint256) private _operatorJobs;

  /**
   * @dev Internal mapping of operator job details for a specific job hash
   */
  mapping(bytes32 => bool) private _failedJobs;

  /**
   * @dev Internal mapping of operator addresses, used for temp storage when defining an operator job
   */
  mapping(uint256 => address) private _operatorTempStorage;

  /**
   * @dev Internal index used for storing/referencing operator temp storage
   */
  uint32 private _operatorTempStorageCounter;

  /**
   * @dev Multi-dimensional array of available operators
   */
  address[][] private _operatorPods;

  /**
   * @dev Internal mapping of bonded operators, to prevent double bonding
   */
  mapping(address => uint256) private _bondedOperators;

  /**
   * @dev Internal mapping of bonded operators, to prevent double bonding
   */
  mapping(address => uint256) private _operatorPodIndex;

  /**
   * @dev Internal mapping of bonded operator amounts
   */
  mapping(address => uint256) private _bondedAmounts;

  /**
   * @dev Constructor is left empty and init is used instead
   */
  constructor() {}

  /**
   * @notice Used internally to initialize the contract instead of through a constructor
   * @dev This function is called by the deployer/factory when creating a contract
   * @param initPayload abi encoded payload to use for contract initilaization
   */
  function init(bytes memory initPayload) external override returns (bytes4) {
    require(!_isInitialized(), "HOLOGRAPH: already initialized");
    (
      address bridge,
      address holograph,
      address interfaces,
      address registry,
      address utilityToken,
      uint256 minGasPrice
    ) = abi.decode(initPayload, (address, address, address, address, address, uint256));
    assembly {
      sstore(_adminSlot, origin())
      sstore(_bridgeSlot, bridge)
      sstore(_holographSlot, holograph)
      sstore(_interfacesSlot, interfaces)
      sstore(_registrySlot, registry)
      sstore(_utilityTokenSlot, utilityToken)
      sstore(_minGasPriceSlot, minGasPrice)
    }
    _blockTime = 60; // 60 seconds allowed for execution
    unchecked {
      _baseBondAmount = 100 * (10 ** 18); // one single token unit * 100
    }
    // how much to increase bond amount per pod
    _podMultiplier = 2; // 1, 4, 16, 64
    // starting pod max amount
    _operatorThreshold = 1000;
    // how often to increase price per each operator
    _operatorThresholdStep = 10;
    // we want to multiply by decimals, but instead will have to divide
    _operatorThresholdDivisor = 100; // == * 0.01
    // set first operator for each pod as zero address
    _operatorPods = [[address(0)]];
    // mark zero address as bonded operator, to prevent abuse
    _bondedOperators[address(0)] = 1;
    _setInitialized();
    return InitializableInterface.init.selector;
  }

  /**
   * @notice Recover failed job
   * @dev If a job fails, it can be manually recovered
   * @param bridgeInRequestPayload the entire cross chain message payload
   */
  function recoverJob(bytes calldata bridgeInRequestPayload) external payable {
    bytes32 hash = keccak256(bridgeInRequestPayload);
    require(_failedJobs[hash], "HOLOGRAPH: invalid recovery job");
    (bool success, ) = _bridge().call{value: msg.value}(bridgeInRequestPayload);
    require(success, "HOLOGRAPH: recovery failed");
    delete (_failedJobs[hash]);
  }

  /**
   * @notice Execute an available operator job
   * @dev When making this call, if operating criteria is not met, the call will revert
   * @param bridgeInRequestPayload the entire cross chain message payload
   */
  function executeJob(bytes calldata bridgeInRequestPayload) external payable {
    /**
     * @dev derive the payload hash for use in mappings
     */
    bytes32 hash = keccak256(bridgeInRequestPayload);
    /**
     * @dev check that job exists
     */
    require(_operatorJobs[hash] > 0, "HOLOGRAPH: invalid job");
    uint256 gasLimit = 0;
    uint256 gasPrice = 0;
    assembly {
      /**
       * @dev extract gasLimit
       */
      gasLimit := calldataload(sub(add(bridgeInRequestPayload.offset, bridgeInRequestPayload.length), 0x40))
      /**
       * @dev extract gasPrice
       */
      gasPrice := calldataload(sub(add(bridgeInRequestPayload.offset, bridgeInRequestPayload.length), 0x20))
    }
    /**
     * @dev unpack bitwise packed operator job details
     */
    OperatorJob memory job = getJobDetails(hash);
    /**
     * @dev to prevent replay attacks, remove job from mapping
     */
    delete _operatorJobs[hash];
    /**
     * @dev operators of last resort are allowed, but they will not receive HLG rewards of any sort
     */
    bool isBonded = _bondedAmounts[msg.sender] != 0;
    /**
     * @dev check that a specific operator was selected for the job
     */
    if (job.operator != address(0)) {
      /**
       * @dev switch pod to index based value
       */
      uint256 pod = job.pod - 1;
      /**
       * @dev check if sender is not the selected primary operator
       */
      if (job.operator != msg.sender) {
        /**
         * @dev sender is not selected operator, need to check if allowed to do job
         */
        uint256 elapsedTime = block.timestamp - uint256(job.startTimestamp);
        uint256 timeDifference = elapsedTime / job.blockTimes;
        /**
         * @dev validate that initial selected operator time slot is still active
         */
        require(timeDifference > 0, "HOLOGRAPH: operator has time");
        /**
         * @dev check that the selected missed the time slot due to a gas spike
         */
        require(gasPrice >= tx.gasprice, "HOLOGRAPH: gas spike detected");
        /**
         * @dev check if time is within fallback operator slots
         */
        if (timeDifference < 6) {
          uint256 podIndex = uint256(job.fallbackOperators[timeDifference - 1]);
          /**
           * @dev do a quick sanity check to make sure operator did not leave from index or is a zero address
           */
          if (podIndex > 0 && podIndex < _operatorPods[pod].length) {
            address fallbackOperator = _operatorPods[pod][podIndex];
            /**
             * @dev ensure that sender is currently valid backup operator
             */
            require(fallbackOperator == msg.sender, "HOLOGRAPH: invalid fallback");
          } else {
            require(_bondedOperators[msg.sender] == job.pod, "HOLOGRAPH: pod only fallback");
          }
        }
        /**
         * @dev time to reward the current operator
         */
        uint256 amount = _getBaseBondAmount(pod);
        /**
         * @dev select operator that failed to do the job, is slashed the pod base fee
         */
        _bondedAmounts[job.operator] -= amount;
        /**
         * @dev only allow HLG rewards to go to bonded operators
         *      if operator is bonded, the slashed amount is sent to current operator
         *      otherwise it's sent to HolographTreasury, can be burned or distributed from there
         */
        _utilityToken().transfer((isBonded ? msg.sender : address(_holograph().getTreasury())), amount);
        /**
         * @dev check if slashed operator has enough tokens bonded to stay
         */
        if (_bondedAmounts[job.operator] >= amount) {
          /**
           * @dev enough bond amount leftover, put operator back in
           */
          _operatorPods[pod].push(job.operator);
          _operatorPodIndex[job.operator] = _operatorPods[pod].length - 1;
          _bondedOperators[job.operator] = job.pod;
        } else {
          /**
           * @dev slashed operator does not have enough tokens bonded, return remaining tokens only
           */
          uint256 leftovers = _bondedAmounts[job.operator];
          if (leftovers > 0) {
            _bondedAmounts[job.operator] = 0;
            _utilityToken().transfer(job.operator, leftovers);
          }
        }
      } else {
        /**
         * @dev the selected operator is executing the job
         */
        _operatorPods[pod].push(msg.sender);
        _operatorPodIndex[job.operator] = _operatorPods[pod].length - 1;
        _bondedOperators[msg.sender] = job.pod;
      }
    }
    /**
     * @dev every executed job (even if failed) increments total message counter by one
     */
    ++_inboundMessageCounter;
    /**
     * @dev reward operator (with HLG) for executing the job
     *      this is out of scope and is purposefully omitted from code
     *      currently no rewards are issued
     */
    //_utilityToken().transfer((isBonded ? msg.sender : address(_utilityToken())), (10**18));
    /**
     * @dev always emit an event at end of job, this helps other operators keep track of job status
     */
    emit FinishedOperatorJob(hash, msg.sender);
    /**
     * @dev ensure that there is enough has left for the job
     */
    require(gasleft() > gasLimit, "HOLOGRAPH: not enough gas left");
    /**
     * @dev execute the job
     */
    try
      HolographOperatorInterface(address(this)).nonRevertingBridgeCall{value: msg.value}(
        msg.sender,
        bridgeInRequestPayload
      )
    {
      /// @dev do nothing
    } catch {
      /// @dev return any payed funds in case of revert
      payable(msg.sender).transfer(msg.value);
      _failedJobs[hash] = true;
      emit FailedOperatorJob(hash);
    }
  }

  /*
   * @dev Purposefully made to be external so that Operator can call it during executeJob function
   *      Check the executeJob function to understand it's implementation
   */
  function nonRevertingBridgeCall(address msgSender, bytes calldata payload) external payable {
    require(msg.sender == address(this), "HOLOGRAPH: operator only call");
    assembly {
      /**
       * @dev remove gas price from end
       */
      calldatacopy(0, payload.offset, sub(payload.length, 0x20))
      /**
       * @dev hToken recipient is injected right before making the call
       */
      mstore(0x84, msgSender)
      /**
       * @dev make non-reverting call
       */
      let result := call(
        /// @dev gas limit is retrieved from last 32 bytes of payload in-memory value
        mload(sub(payload.length, 0x40)),
        /// @dev destination is bridge contract
        sload(_bridgeSlot),
        /// @dev any value is passed along
        callvalue(),
        /// @dev data is retrieved from 0 index memory position
        0,
        /// @dev everything except for last 32 bytes (gas limit) is sent
        sub(payload.length, 0x40),
        0,
        0
      )
      if eq(result, 0) {
        revert(0, 0)
      }
      return(0, 0)
    }
  }

  /**
   * @notice Receive a cross-chain message
   * @dev This function is restricted for use by Holograph Messaging Module only
   */
  function crossChainMessage(bytes calldata bridgeInRequestPayload) external payable {
    require(
      msg.sender == address(_messagingModule()) || msg.sender == 0xE9e30A0aD0d8Af5cF2606ea720052E28D6fcbAAF,
      "HOLOGRAPH: messaging only call"
    );
    uint256 gasPrice = 0;
    assembly {
      /**
       * @dev extract gasPrice
       */
      gasPrice := calldataload(sub(add(bridgeInRequestPayload.offset, bridgeInRequestPayload.length), 0x20))
    }
    bool underpriced = gasPrice < _minGasPrice();
    unchecked {
      bytes32 jobHash = keccak256(bridgeInRequestPayload);
      /**
       * @dev load and increment operator temp storage in one call
       */
      ++_operatorTempStorageCounter;
      /**
       * @dev use job hash, job nonce, block number, and block timestamp for generating a random number
       */
      uint256 random = uint256(keccak256(abi.encodePacked(jobHash, _jobNonce(), block.number, block.timestamp)));
      // use the left 128 bits of random number
      uint256 random1 = uint256(random >> 128);
      // use the right 128 bits of random number
      uint256 random2 = uint256(uint128(random));
      // combine the two new random numbers for use in additional pod operator selection logic
      random = uint256(keccak256(abi.encodePacked(random1 + random2)));
      /**
       * @dev divide by total number of pods, use modulus/remainder
       */
      uint256 pod = random1 % _operatorPods.length;
      /**
       * @dev identify the total number of available operators in pod
       */
      uint256 podSize = _operatorPods[pod].length;
      /**
       * @dev select a primary operator
       */
      uint256 operatorIndex = underpriced ? 0 : random2 % podSize;
      /**
       * @dev If operator index is 0, then it's open season! Anyone can execute this job. First come first serve
       *      pop operator to ensure that they cannot be selected for any other job until this one completes
       *      decrease pod size to accomodate popped operator
       */
      _operatorTempStorage[_operatorTempStorageCounter] = _operatorPods[pod][operatorIndex];
      _popOperator(pod, operatorIndex);
      if (podSize > 1) {
        podSize--;
      }
      _operatorJobs[jobHash] = uint256(
        ((pod + 1) << 248) |
          (uint256(_operatorTempStorageCounter) << 216) |
          (block.number << 176) |
          ((underpriced ? 0 : _randomBlockHash(random, podSize, 1)) << 160) |
          ((underpriced ? 0 : _randomBlockHash(random, podSize, 2)) << 144) |
          ((underpriced ? 0 : _randomBlockHash(random, podSize, 3)) << 128) |
          ((underpriced ? 0 : _randomBlockHash(random, podSize, 4)) << 112) |
          ((underpriced ? 0 : _randomBlockHash(random, podSize, 5)) << 96) |
          (block.timestamp << 16) |
          0
      ); // 80 next available bit position && so far 176 bits used with only 128 left
      /**
       * @dev emit event to signal to operators that a job has become available
       */
      emit AvailableOperatorJob(jobHash, bridgeInRequestPayload);
    }
  }

  /**
   * @notice Calculate the amount of gas needed to execute a bridgeInRequest
   * @dev Use this function to estimate the amount of gas that will be used by the bridgeInRequest function
   *      Set a specific gas limit when making this call, subtract return value, to get total gas used
   *      Only use this with a static call
   * @param bridgeInRequestPayload abi encoded bytes making up the bridgeInRequest payload
   * @return the gas amount remaining after the static call is returned
   */
  function jobEstimator(bytes calldata bridgeInRequestPayload) external payable returns (uint256) {
    assembly {
      calldatacopy(0, bridgeInRequestPayload.offset, sub(bridgeInRequestPayload.length, 0x40))
      /**
       * @dev bridgeInRequest doNotRevert is purposefully set to false so a rever would happen
       */
      mstore8(0xE3, 0x00)
      let result := call(gas(), sload(_bridgeSlot), callvalue(), 0, sub(bridgeInRequestPayload.length, 0x40), 0, 0)
      /**
       * @dev if for some reason the call does not revert, it is force reverted
       */
      if eq(result, 1) {
        returndatacopy(0, 0, returndatasize())
        revert(0, returndatasize())
      }
      /**
       * @dev remaining gas is set as the return value
       */
      mstore(0x00, gas())
      return(0x00, 0x20)
    }
  }

  /**
   * @notice Send cross chain bridge request message
   * @dev This function is restricted to only be callable by Holograph Bridge
   * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain
   * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain
   * @param toChain Holograph Chain ID where the beam is being sent to
   * @param nonce incremented number used to ensure job hashes are unique
   * @param holographableContract address of the contract for which the bridge request is being made
   * @param bridgeOutPayload bytes made up of the bridgeOutRequest payload
   */
  function send(
    uint256 gasLimit,
    uint256 gasPrice,
    uint32 toChain,
    address msgSender,
    uint256 nonce,
    address holographableContract,
    bytes calldata bridgeOutPayload
  ) external payable {
    require(msg.sender == _bridge(), "HOLOGRAPH: bridge only call");
    CrossChainMessageInterface messagingModule = _messagingModule();
    uint256 hlgFee = messagingModule.getHlgFee(toChain, gasLimit, gasPrice, bridgeOutPayload);
    address hToken = _registry().getHToken(_holograph().getHolographChainId());
    require(hlgFee < msg.value, "HOLOGRAPH: not enough value");
    payable(hToken).transfer(hlgFee);
    bytes memory encodedData = abi.encodeWithSelector(
      HolographBridgeInterface.bridgeInRequest.selector,
      /**
       * @dev job nonce is an incremented value that is assigned to each bridge request to guarantee unique hashes
       */
      nonce,
      /**
       * @dev including the current holograph chain id (origin chain)
       */
      _holograph().getHolographChainId(),
      /**
       * @dev holographable contract have the same address across all chains, so our destination address will be the same
       */
      holographableContract,
      /**
       * @dev get the current chain's hToken for native gas token
       */
      hToken,
      /**
       * @dev recipient will be defined when operator picks up the job
       */
      address(0),
      /**
       * @dev value is set to zero for now
       */
      hlgFee,
      /**
       * @dev specify that function call should not revert
       */
      true,
      /**
       * @dev attach actual holographableContract function call
       */
      bridgeOutPayload
    );
    /**
     * @dev add gas variables to the back for later extraction
     */
    encodedData = abi.encodePacked(encodedData, gasLimit, gasPrice);
    /**
     * @dev Send the data to the current Holograph Messaging Module
     *      This will be changed to dynamically select which messaging module to use based on destination network
     */
    messagingModule.send{value: msg.value - hlgFee}(
      gasLimit,
      gasPrice,
      toChain,
      msgSender,
      msg.value - hlgFee,
      encodedData
    );
    /**
     * @dev for easy indexing, an event is emitted with the payload hash for status tracking
     */
    emit CrossChainMessageSent(keccak256(encodedData));
  }

  /**
   * @notice Get the fees associated with sending specific payload
   * @dev Will provide exact costs on protocol and message side, combine the two to get total
   * @dev @param toChain holograph chain id of destination chain for payload
   * @dev @param gasLimit amount of gas to provide for executing payload on destination chain
   * @dev @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically
   * @dev @param crossChainPayload the entire packet being sent cross-chain
   * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain
   * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain
   * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be
   */
  function getMessageFee(uint32, uint256, uint256, bytes calldata) external view returns (uint256, uint256, uint256) {
    assembly {
      calldatacopy(0, 0, calldatasize())
      let result := staticcall(gas(), sload(_messagingModuleSlot), 0, calldatasize(), 0, 0)
      returndatacopy(0, 0, returndatasize())
      switch result
      case 0 {
        revert(0, returndatasize())
      }
      default {
        return(0, returndatasize())
      }
    }
  }

  /**
   * @notice Get the details for an available operator job
   * @dev The job hash is a keccak256 hash of the entire job payload
   * @param jobHash keccak256 hash of the job
   * @return an OperatorJob struct with details about a specific job
   */
  function getJobDetails(bytes32 jobHash) public view returns (OperatorJob memory) {
    uint256 packed = _operatorJobs[jobHash];
    /**
     * @dev The job is bitwise packed into a single 32 byte slot, this unpacks it before returning the struct
     */
    return
      OperatorJob(
        uint8(packed >> 248),
        uint16(_blockTime),
        _operatorTempStorage[uint32(packed >> 216)],
        uint40(packed >> 176),
        // TODO: move the bit-shifting around to have it be sequential
        uint64(packed >> 16),
        [
          uint16(packed >> 160),
          uint16(packed >> 144),
          uint16(packed >> 128),
          uint16(packed >> 112),
          uint16(packed >> 96)
        ]
      );
  }

  /**
   * @notice Get number of pods available
   * @dev This returns number of pods that have been opened via bonding
   */
  function getTotalPods() external view returns (uint256 totalPods) {
    return _operatorPods.length;
  }

  /**
   * @notice Get total number of operators in a pod
   * @dev Use in conjunction with paginated getPodOperators function
   * @param pod the pod to query
   * @return total operators in a pod
   */
  function getPodOperatorsLength(uint256 pod) external view returns (uint256) {
    require(_operatorPods.length >= pod, "HOLOGRAPH: pod does not exist");
    return _operatorPods[pod - 1].length;
  }

  /**
   * @notice Get list of operators in a pod
   * @dev Use paginated getPodOperators function instead if list gets too long
   * @param pod the pod to query
   * @return operators array list of operators in a pod
   */
  function getPodOperators(uint256 pod) external view returns (address[] memory operators) {
    require(_operatorPods.length >= pod, "HOLOGRAPH: pod does not exist");
    operators = _operatorPods[pod - 1];
  }

  /**
   * @notice Get paginated list of operators in a pod
   * @dev Use in conjunction with getPodOperatorsLength to know the total length of results
   * @param pod the pod to query
   * @param index the array index to start from
   * @param length the length of result set to be (will be shorter if reached end of array)
   * @return operators a paginated array of operators
   */
  function getPodOperators(
    uint256 pod,
    uint256 index,
    uint256 length
  ) external view returns (address[] memory operators) {
    require(_operatorPods.length >= pod, "HOLOGRAPH: pod does not exist");
    /**
     * @dev if pod 0 is selected, this will create a revert
     */
    pod--;
    /**
     * @dev get total length of pod operators
     */
    uint256 supply = _operatorPods[pod].length;
    /**
     * @dev check if length is out of bounds for this result set
     */
    if (index + length > supply) {
      /**
       * @dev adjust length to return remainder of the results
       */
      length = supply - index;
    }
    /**
     * @dev create in-memory array
     */
    operators = new address[](length);
    /**
     * @dev add operators to result set
     */
    for (uint256 i = 0; i < length; i++) {
      operators[i] = _operatorPods[pod][index + i];
    }
  }

  /**
   * @notice Check the base and current price for bonding to a particular pod
   * @dev Useful for understanding what is required for bonding to a pod
   * @param pod the pod to get bonding amounts for
   * @return base the base bond amount required for a pod
   * @return current the current bond amount required for a pod
   */
  function getPodBondAmounts(uint256 pod) external view returns (uint256 base, uint256 current) {
    base = _getBaseBondAmount(pod - 1);
    current = _getCurrentBondAmount(pod - 1);
  }

  /**
   * @notice Get an operator's currently bonded amount
   * @dev Useful for checking how much an operator has bonded
   * @param operator address of operator to check
   * @return amount total number of utility token bonded
   */
  function getBondedAmount(address operator) external view returns (uint256 amount) {
    return _bondedAmounts[operator];
  }

  /**
   * @notice Get an operator's currently bonded pod
   * @dev Useful for checking if an operator is currently bonded
   * @param operator address of operator to check
   * @return pod number that operator is bonded on, returns zero if not bonded or selected for job
   */
  function getBondedPod(address operator) external view returns (uint256 pod) {
    return _bondedOperators[operator];
  }

  /**
   * @notice Get an operator's currently bonded pod index
   * @dev Useful for checking if an operator is a fallback for active job
   * @param operator address of operator to check
   * @return index currently bonded pod's operator index, returns zero if not in pod or moved out for active job
   */
  function getBondedPodIndex(address operator) external view returns (uint256 index) {
    return _operatorPodIndex[operator];
  }

  /**
   * @notice Topup a bonded operator with more utility tokens
   * @dev Useful function if an operator got slashed and wants to add a safety buffer to not get unbonded
   *      This function will not work if operator has currently been selected for a job
   * @param operator address of operator to topup
   * @param amount utility token amount to add
   */
  function topupUtilityToken(address operator, uint256 amount) external {
    /**
     * @dev check that an operator is currently bonded
     */
    require(_bondedOperators[operator] != 0, "HOLOGRAPH: operator not bonded");
    unchecked {
      /**
       * @dev add the additional amount to operator
       */
      _bondedAmounts[operator] += amount;
    }
    /**
     * @dev transfer tokens last, to prevent reentrancy attacks
     */
    require(_utilityToken().transferFrom(msg.sender, address(this), amount), "HOLOGRAPH: token transfer failed");
  }

  /**
   * @notice Bond utility tokens and become an operator
   * @dev An operator can only bond to one pod at a time, per network
   * @param operator address of operator to bond (can be an ownable smart contract)
   * @param amount utility token amount to bond (can be greater than minimum)
   * @param pod number of pod to bond to (can be for one that does not exist yet)
   */
  function bondUtilityToken(address operator, uint256 amount, uint256 pod) external {
    /**
     * @dev an operator can only bond to one pod at any give time per network
     */
    require(_bondedOperators[operator] == 0 && _bondedAmounts[operator] == 0, "HOLOGRAPH: operator is bonded");
    if (_isContract(operator)) {
      require(Ownable(operator).owner() != address(0), "HOLOGRAPH: contract not ownable");
    }
    unchecked {
      /**
       * @dev get the current bonding minimum for selected pod
       */
      uint256 current = _getCurrentBondAmount(pod - 1);
      require(current <= amount, "HOLOGRAPH: bond amount too small");
      /**
       * @dev check if selected pod is greater than currently existing pods
       */
      if (_operatorPods.length < pod) {
        /**
         * @dev activate pod(s) up until the selected pod
         */
        for (uint256 i = _operatorPods.length; i < pod; i++) {
          /**
           * @dev add zero address into pod to mitigate empty pod issues
           */
          _operatorPods.push([address(0)]);
        }
      }
      /**
       * @dev prevent bonding to a pod with more than uint16 max value
       */
      require(_operatorPods[pod - 1].length < type(uint16).max, "HOLOGRAPH: too many operators");
      _operatorPods[pod - 1].push(operator);
      _operatorPodIndex[operator] = _operatorPods[pod - 1].length - 1;
      _bondedOperators[operator] = pod;
      _bondedAmounts[operator] = amount;
      /**
       * @dev transfer tokens last, to prevent reentrancy attacks
       */
      require(_utilityToken().transferFrom(msg.sender, address(this), amount), "HOLOGRAPH: token transfer failed");
    }
  }

  /**
   * @notice Unbond HLG utility tokens and stop being an operator
   * @dev A bonded operator selected for a job cannot unbond until they complete the job, or are slashed
   * @param operator address of operator to unbond
   * @param recipient address where to send the bonded tokens
   */
  function unbondUtilityToken(address operator, address recipient) external {
    /**
     * @dev validate that operator is currently bonded
     */
    require(_bondedOperators[operator] != 0, "HOLOGRAPH: operator not bonded");
    /**
     * @dev check if sender is not actual operator
     */
    if (msg.sender != operator) {
      /**
       * @dev check if operator is a smart contract
       */
      require(_isContract(operator), "HOLOGRAPH: operator not contract");
      /**
       * @dev check if smart contract is owned by sender
       */
      require(Ownable(operator).owner() == msg.sender, "HOLOGRAPH: sender not owner");
    }
    /**
     * @dev get current bonded amount by operator
     */
    uint256 amount = _bondedAmounts[operator];
    /**
     * @dev unset operator bond amount before making a transfer
     */
    _bondedAmounts[operator] = 0;
    /**
     * @dev remove all operator references
     */
    _popOperator(_bondedOperators[operator] - 1, _operatorPodIndex[operator]);
    /**
     * @dev transfer tokens to recipient
     */
    require(_utilityToken().transfer(recipient, amount), "HOLOGRAPH: token transfer failed");
  }

  /**
   * @notice Get the address of the Holograph Bridge module
   * @dev Used for beaming holographable assets cross-chain
   */
  function getBridge() external view returns (address bridge) {
    assembly {
      bridge := sload(_bridgeSlot)
    }
  }

  /**
   * @notice Update the Holograph Bridge module address
   * @param bridge address of the Holograph Bridge smart contract to use
   */
  function setBridge(address bridge) external onlyAdmin {
    assembly {
      sstore(_bridgeSlot, bridge)
    }
  }

  /**
   * @notice Get the Holograph Protocol contract
   * @dev Used for storing a reference to all the primary modules and variables of the protocol
   */
  function getHolograph() external view returns (address holograph) {
    assembly {
      holograph := sload(_holographSlot)
    }
  }

  /**
   * @notice Update the Holograph Protocol contract address
   * @param holograph address of the Holograph Protocol smart contract to use
   */
  function setHolograph(address holograph) external onlyAdmin {
    assembly {
      sstore(_holographSlot, holograph)
    }
  }

  /**
   * @notice Get the address of the Holograph Interfaces module
   * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules
   */
  function getInterfaces() external view returns (address interfaces) {
    assembly {
      interfaces := sload(_interfacesSlot)
    }
  }

  /**
   * @notice Update the Holograph Interfaces module address
   * @param interfaces address of the Holograph Interfaces smart contract to use
   */
  function setInterfaces(address interfaces) external onlyAdmin {
    assembly {
      sstore(_interfacesSlot, interfaces)
    }
  }

  /**
   * @notice Get the address of the Holograph Messaging Module
   * @dev All cross-chain message requests will get forwarded to this adress
   */
  function getMessagingModule() external view returns (address messagingModule) {
    assembly {
      messagingModule := sload(_messagingModuleSlot)
    }
  }

  /**
   * @notice Update the Holograph Messaging Module address
   * @param messagingModule address of the LayerZero Endpoint to use
   */
  function setMessagingModule(address messagingModule) external onlyAdmin {
    assembly {
      sstore(_messagingModuleSlot, messagingModule)
    }
  }

  /**
   * @notice Get the Holograph Registry module
   * @dev This module stores a reference for all deployed holographable smart contracts
   */
  function getRegistry() external view returns (address registry) {
    assembly {
      registry := sload(_registrySlot)
    }
  }

  /**
   * @notice Update the Holograph Registry module address
   * @param registry address of the Holograph Registry smart contract to use
   */
  function setRegistry(address registry) external onlyAdmin {
    assembly {
      sstore(_registrySlot, registry)
    }
  }

  /**
   * @notice Get the Holograph Utility Token address
   * @dev This is the official utility token of the Holograph Protocol
   */
  function getUtilityToken() external view returns (address utilityToken) {
    assembly {
      utilityToken := sload(_utilityTokenSlot)
    }
  }

  /**
   * @notice Update the Holograph Utility Token address
   * @param utilityToken address of the Holograph Utility Token smart contract to use
   */
  function setUtilityToken(address utilityToken) external onlyAdmin {
    assembly {
      sstore(_utilityTokenSlot, utilityToken)
    }
  }

  /**
   * @notice Get the Minimum Gas Price
   * @dev The minimum value required to execute a job without it being marked as under priced
   */
  function getMinGasPrice() external view returns (uint256 minGasPrice) {
    assembly {
      minGasPrice := sload(_minGasPriceSlot)
    }
  }

  /**
   * @notice Update the Minimum Gas Price
   * @param minGasPrice amount to set for minimum gas price
   */
  function setMinGasPrice(uint256 minGasPrice) external onlyAdmin {
    assembly {
      sstore(_minGasPriceSlot, minGasPrice)
    }
  }

  /**
   * @dev Internal function used for getting the Holograph Bridge Interface
   */
  function _bridge() private view returns (address bridge) {
    assembly {
      bridge := sload(_bridgeSlot)
    }
  }

  /**
   * @dev Internal function used for getting the Holograph Interface
   */
  function _holograph() private view returns (HolographInterface holograph) {
    assembly {
      holograph := sload(_holographSlot)
    }
  }

  /**
   * @dev Internal function used for getting the Holograph Interfaces Interface
   */
  function _interfaces() private view returns (HolographInterfacesInterface interfaces) {
    assembly {
      interfaces := sload(_interfacesSlot)
    }
  }

  /**
   * @dev Internal function used for getting the Holograph Messaging Module Interface
   */
  function _messagingModule() private view returns (CrossChainMessageInterface messagingModule) {
    assembly {
      messagingModule := sload(_messagingModuleSlot)
    }
  }

  /**
   * @dev Internal function used for getting the Holograph Registry Interface
   */
  function _registry() private view returns (HolographRegistryInterface registry) {
    assembly {
      registry := sload(_registrySlot)
    }
  }

  /**
   * @dev Internal function used for getting the Holograph Utility Token Interface
   */
  function _utilityToken() private view returns (HolographERC20Interface utilityToken) {
    assembly {
      utilityToken := sload(_utilityTokenSlot)
    }
  }

  /**
   * @dev Internal function used for getting the minimum gas price allowed
   */
  function _minGasPrice() private view returns (uint256 minGasPrice) {
    assembly {
      minGasPrice := sload(_minGasPriceSlot)
    }
  }

  /**
   * @dev Internal nonce, that increments on each call, used for randomness
   */
  function _jobNonce() private returns (uint256 jobNonce) {
    assembly {
      jobNonce := add(sload(_jobNonceSlot), 0x0000000000000000000000000000000000000000000000000000000000000001)
      sstore(_jobNonceSlot, jobNonce)
    }
  }

  /**
   * @dev Internal function used to remove an operator from a particular pod
   */
  function _popOperator(uint256 pod, uint256 operatorIndex) private {
    /**
     * @dev only pop the operator if it's not a zero address
     */
    if (operatorIndex > 0) {
      unchecked {
        address operator = _operatorPods[pod][operatorIndex];
        /**
         * @dev mark operator as no longer bonded
         */
        _bondedOperators[operator] = 0;
        /**
         * @dev remove pod reference for operator
         */
        _operatorPodIndex[operator] = 0;
        uint256 lastIndex = _operatorPods[pod].length - 1;
        if (lastIndex != operatorIndex) {
          /**
           * @dev if operator is not last index, move last index to operator's current index
           */
          _operatorPods[pod][operatorIndex] = _operatorPods[pod][lastIndex];
          _operatorPodIndex[_operatorPods[pod][operatorIndex]] = operatorIndex;
        }
        /**
         * @dev delete last index
         */
        delete _operatorPods[pod][lastIndex];
        /**
         * @dev shorten array length
         */
        _operatorPods[pod].pop();
      }
    }
  }

  /**
   * @dev Internal function used for calculating the base bonding amount for a pod
   */
  function _getBaseBondAmount(uint256 pod) private view returns (uint256) {
    return (_podMultiplier ** pod) * _baseBondAmount;
  }

  /**
   * @dev Internal function used for calculating the current bonding amount for a pod
   */
  function _getCurrentBondAmount(uint256 pod) private view returns (uint256) {
    uint256 current = (_podMultiplier ** pod) * _baseBondAmount;
    if (pod >= _operatorPods.length) {
      return current;
    }
    uint256 threshold = _operatorThreshold / (2 ** pod);
    uint256 position = _operatorPods[pod].length;
    if (position > threshold) {
      position -= threshold;
      //       current += (current / _operatorThresholdDivisor) * position;
      current += (current / _operatorThresholdDivisor) * (position / _operatorThresholdStep);
    }
    return current;
  }

  /**
   * @dev Internal function used for generating a random pod operator selection by using previously mined blocks
   */
  function _randomBlockHash(uint256 random, uint256 podSize, uint256 n) private view returns (uint256) {
    unchecked {
      return (random + uint256(blockhash(block.number - n))) % podSize;
    }
  }

  /**
   * @dev Internal function used for checking if a contract has been deployed at address
   */
  function _isContract(address contractAddress) private view returns (bool) {
    bytes32 codehash;
    assembly {
      codehash := extcodehash(contractAddress)
    }
    return (codehash != 0x0 && codehash != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470);
  }

  /**
   * @dev Purposefully left empty to ensure ether transfers use least amount of gas possible
   */
  receive() external payable {}

  /**
   * @dev Purposefully reverts to prevent any calls to undefined functions
   */
  fallback() external payable {
    revert();
  }
}

File 2 of 24 : Admin.sol
// SPDX-License-Identifier: UNLICENSED
/*

                         ┌───────────┐
                         │ HOLOGRAPH │
                         └───────────┘
╔═════════════════════════════════════════════════════════════╗
║                                                             ║
║                            / ^ \                            ║
║                            ~~*~~            ¸               ║
║                         [ '<>:<>' ]         │░░░            ║
║               ╔╗           _/"\_           ╔╣               ║
║             ┌─╬╬─┐          """          ┌─╬╬─┐             ║
║          ┌─┬┘ ╠╣ └┬─┐       \_/       ┌─┬┘ ╠╣ └┬─┐          ║
║       ┌─┬┘ │  ╠╣  │ └┬─┐           ┌─┬┘ │  ╠╣  │ └┬─┐       ║
║    ┌─┬┘ │  │  ╠╣  │  │ └┬─┐     ┌─┬┘ │  │  ╠╣  │  │ └┬─┐    ║
║ ┌─┬┘ │  │  │  ╠╣  │  │  │ └┬┐ ┌┬┘ │  │  │  ╠╣  │  │  │ └┬─┐ ║
╠┬┘ │  │  │  │  ╠╣  │  │  │  │└¤┘│  │  │  │  ╠╣  │  │  │  │ └┬╣
║│  │  │  │  │  ╠╣  │  │  │  │   │  │  │  │  ╠╣  │  │  │  │  │║
╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣
╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣
║               ╠╣                           ╠╣               ║
║               ╠╣                           ╠╣               ║
║    ,          ╠╣     ,        ,'      *    ╠╣               ║
║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║
╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝
     - one protocol, one bridge = infinite possibilities -


 ***************************************************************

 DISCLAIMER: U.S Patent Pending

 LICENSE: Holograph Limited Public License (H-LPL)

 https://holograph.xyz/licenses/h-lpl/1.0.0

 This license governs use of the accompanying software. If you
 use the software, you accept this license. If you do not accept
 the license, you are not permitted to use the software.

 1. Definitions

 The terms "reproduce," "reproduction," "derivative works," and
 "distribution" have the same meaning here as under U.S.
 copyright law. A "contribution" is the original software, or
 any additions or changes to the software. A "contributor" is
 any person that distributes its contribution under this
 license. "Licensed patents" are a contributor’s patent claims
 that read directly on its contribution.

 2. Grant of Rights

 A) Copyright Grant- Subject to the terms of this license,
 including the license conditions and limitations in sections 3
 and 4, each contributor grants you a non-exclusive, worldwide,
 royalty-free copyright license to reproduce its contribution,
 prepare derivative works of its contribution, and distribute
 its contribution or any derivative works that you create.
 B) Patent Grant- Subject to the terms of this license,
 including the license conditions and limitations in section 3,
 each contributor grants you a non-exclusive, worldwide,
 royalty-free license under its licensed patents to make, have
 made, use, sell, offer for sale, import, and/or otherwise
 dispose of its contribution in the software or derivative works
 of the contribution in the software.

 3. Conditions and Limitations

 A) No Trademark License- This license does not grant you rights
 to use any contributors’ name, logo, or trademarks.
 B) If you bring a patent claim against any contributor over
 patents that you claim are infringed by the software, your
 patent license from such contributor is terminated with
 immediate effect.
 C) If you distribute any portion of the software, you must
 retain all copyright, patent, trademark, and attribution
 notices that are present in the software.
 D) If you distribute any portion of the software in source code
 form, you may do so only under this license by including a
 complete copy of this license with your distribution. If you
 distribute any portion of the software in compiled or object
 code form, you may only do so under a license that complies
 with this license.
 E) The software is licensed “as-is.” You bear all risks of
 using it. The contributors give no express warranties,
 guarantees, or conditions. You may have additional consumer
 rights under your local laws which this license cannot change.
 To the extent permitted under your local laws, the contributors
 exclude all implied warranties, including those of
 merchantability, fitness for a particular purpose and
 non-infringement.

 4. (F) Platform Limitation- The licenses granted in sections
 2.A & 2.B extend only to the software or derivative works that
 you create that run on a Holograph system product.

 ***************************************************************

*/

pragma solidity 0.8.13;

abstract contract Admin {
  /**
   * @dev bytes32(uint256(keccak256('eip1967.Holograph.admin')) - 1)
   */
  bytes32 constant _adminSlot = 0x3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c9;

  modifier onlyAdmin() {
    require(msg.sender == getAdmin(), "HOLOGRAPH: admin only function");
    _;
  }

  constructor() {}

  function admin() public view returns (address) {
    return getAdmin();
  }

  function getAdmin() public view returns (address adminAddress) {
    assembly {
      adminAddress := sload(_adminSlot)
    }
  }

  function setAdmin(address adminAddress) public onlyAdmin {
    assembly {
      sstore(_adminSlot, adminAddress)
    }
  }

  function adminCall(address target, bytes calldata data) external payable onlyAdmin {
    assembly {
      calldatacopy(0, data.offset, data.length)
      let result := call(gas(), target, callvalue(), 0, data.length, 0, 0)
      returndatacopy(0, 0, returndatasize())
      switch result
      case 0 {
        revert(0, returndatasize())
      }
      default {
        return(0, returndatasize())
      }
    }
  }
}

File 3 of 24 : Initializable.sol
// SPDX-License-Identifier: UNLICENSED
/*

                         ┌───────────┐
                         │ HOLOGRAPH │
                         └───────────┘
╔═════════════════════════════════════════════════════════════╗
║                                                             ║
║                            / ^ \                            ║
║                            ~~*~~            ¸               ║
║                         [ '<>:<>' ]         │░░░            ║
║               ╔╗           _/"\_           ╔╣               ║
║             ┌─╬╬─┐          """          ┌─╬╬─┐             ║
║          ┌─┬┘ ╠╣ └┬─┐       \_/       ┌─┬┘ ╠╣ └┬─┐          ║
║       ┌─┬┘ │  ╠╣  │ └┬─┐           ┌─┬┘ │  ╠╣  │ └┬─┐       ║
║    ┌─┬┘ │  │  ╠╣  │  │ └┬─┐     ┌─┬┘ │  │  ╠╣  │  │ └┬─┐    ║
║ ┌─┬┘ │  │  │  ╠╣  │  │  │ └┬┐ ┌┬┘ │  │  │  ╠╣  │  │  │ └┬─┐ ║
╠┬┘ │  │  │  │  ╠╣  │  │  │  │└¤┘│  │  │  │  ╠╣  │  │  │  │ └┬╣
║│  │  │  │  │  ╠╣  │  │  │  │   │  │  │  │  ╠╣  │  │  │  │  │║
╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣
╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣
║               ╠╣                           ╠╣               ║
║               ╠╣                           ╠╣               ║
║    ,          ╠╣     ,        ,'      *    ╠╣               ║
║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║
╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝
     - one protocol, one bridge = infinite possibilities -


 ***************************************************************

 DISCLAIMER: U.S Patent Pending

 LICENSE: Holograph Limited Public License (H-LPL)

 https://holograph.xyz/licenses/h-lpl/1.0.0

 This license governs use of the accompanying software. If you
 use the software, you accept this license. If you do not accept
 the license, you are not permitted to use the software.

 1. Definitions

 The terms "reproduce," "reproduction," "derivative works," and
 "distribution" have the same meaning here as under U.S.
 copyright law. A "contribution" is the original software, or
 any additions or changes to the software. A "contributor" is
 any person that distributes its contribution under this
 license. "Licensed patents" are a contributor’s patent claims
 that read directly on its contribution.

 2. Grant of Rights

 A) Copyright Grant- Subject to the terms of this license,
 including the license conditions and limitations in sections 3
 and 4, each contributor grants you a non-exclusive, worldwide,
 royalty-free copyright license to reproduce its contribution,
 prepare derivative works of its contribution, and distribute
 its contribution or any derivative works that you create.
 B) Patent Grant- Subject to the terms of this license,
 including the license conditions and limitations in section 3,
 each contributor grants you a non-exclusive, worldwide,
 royalty-free license under its licensed patents to make, have
 made, use, sell, offer for sale, import, and/or otherwise
 dispose of its contribution in the software or derivative works
 of the contribution in the software.

 3. Conditions and Limitations

 A) No Trademark License- This license does not grant you rights
 to use any contributors’ name, logo, or trademarks.
 B) If you bring a patent claim against any contributor over
 patents that you claim are infringed by the software, your
 patent license from such contributor is terminated with
 immediate effect.
 C) If you distribute any portion of the software, you must
 retain all copyright, patent, trademark, and attribution
 notices that are present in the software.
 D) If you distribute any portion of the software in source code
 form, you may do so only under this license by including a
 complete copy of this license with your distribution. If you
 distribute any portion of the software in compiled or object
 code form, you may only do so under a license that complies
 with this license.
 E) The software is licensed “as-is.” You bear all risks of
 using it. The contributors give no express warranties,
 guarantees, or conditions. You may have additional consumer
 rights under your local laws which this license cannot change.
 To the extent permitted under your local laws, the contributors
 exclude all implied warranties, including those of
 merchantability, fitness for a particular purpose and
 non-infringement.

 4. (F) Platform Limitation- The licenses granted in sections
 2.A & 2.B extend only to the software or derivative works that
 you create that run on a Holograph system product.

 ***************************************************************

*/

pragma solidity 0.8.13;

import "../interface/InitializableInterface.sol";

/**
 * @title Initializable
 * @author https://github.com/holographxyz
 * @notice Use init instead of constructor
 * @dev This allows for use of init function to make one time initializations without the need for a constructor
 */
abstract contract Initializable is InitializableInterface {
  /**
   * @dev bytes32(uint256(keccak256('eip1967.Holograph.initialized')) - 1)
   */
  bytes32 constant _initializedSlot = 0x4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a01;

  /**
   * @dev Constructor is left empty and init is used instead
   */
  constructor() {}

  /**
   * @notice Used internally to initialize the contract instead of through a constructor
   * @dev This function is called by the deployer/factory when creating a contract
   * @param initPayload abi encoded payload to use for contract initilaization
   */
  function init(bytes memory initPayload) external virtual returns (bytes4);

  function _isInitialized() internal view returns (bool initialized) {
    assembly {
      initialized := sload(_initializedSlot)
    }
  }

  function _setInitialized() internal {
    assembly {
      sstore(_initializedSlot, 0x0000000000000000000000000000000000000000000000000000000000000001)
    }
  }
}

File 4 of 24 : ChainIdType.sol
// SPDX-License-Identifier: UNLICENSED
/*

                         ┌───────────┐
                         │ HOLOGRAPH │
                         └───────────┘
╔═════════════════════════════════════════════════════════════╗
║                                                             ║
║                            / ^ \                            ║
║                            ~~*~~            ¸               ║
║                         [ '<>:<>' ]         │░░░            ║
║               ╔╗           _/"\_           ╔╣               ║
║             ┌─╬╬─┐          """          ┌─╬╬─┐             ║
║          ┌─┬┘ ╠╣ └┬─┐       \_/       ┌─┬┘ ╠╣ └┬─┐          ║
║       ┌─┬┘ │  ╠╣  │ └┬─┐           ┌─┬┘ │  ╠╣  │ └┬─┐       ║
║    ┌─┬┘ │  │  ╠╣  │  │ └┬─┐     ┌─┬┘ │  │  ╠╣  │  │ └┬─┐    ║
║ ┌─┬┘ │  │  │  ╠╣  │  │  │ └┬┐ ┌┬┘ │  │  │  ╠╣  │  │  │ └┬─┐ ║
╠┬┘ │  │  │  │  ╠╣  │  │  │  │└¤┘│  │  │  │  ╠╣  │  │  │  │ └┬╣
║│  │  │  │  │  ╠╣  │  │  │  │   │  │  │  │  ╠╣  │  │  │  │  │║
╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣
╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣
║               ╠╣                           ╠╣               ║
║               ╠╣                           ╠╣               ║
║    ,          ╠╣     ,        ,'      *    ╠╣               ║
║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║
╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝
     - one protocol, one bridge = infinite possibilities -


 ***************************************************************

 DISCLAIMER: U.S Patent Pending

 LICENSE: Holograph Limited Public License (H-LPL)

 https://holograph.xyz/licenses/h-lpl/1.0.0

 This license governs use of the accompanying software. If you
 use the software, you accept this license. If you do not accept
 the license, you are not permitted to use the software.

 1. Definitions

 The terms "reproduce," "reproduction," "derivative works," and
 "distribution" have the same meaning here as under U.S.
 copyright law. A "contribution" is the original software, or
 any additions or changes to the software. A "contributor" is
 any person that distributes its contribution under this
 license. "Licensed patents" are a contributor’s patent claims
 that read directly on its contribution.

 2. Grant of Rights

 A) Copyright Grant- Subject to the terms of this license,
 including the license conditions and limitations in sections 3
 and 4, each contributor grants you a non-exclusive, worldwide,
 royalty-free copyright license to reproduce its contribution,
 prepare derivative works of its contribution, and distribute
 its contribution or any derivative works that you create.
 B) Patent Grant- Subject to the terms of this license,
 including the license conditions and limitations in section 3,
 each contributor grants you a non-exclusive, worldwide,
 royalty-free license under its licensed patents to make, have
 made, use, sell, offer for sale, import, and/or otherwise
 dispose of its contribution in the software or derivative works
 of the contribution in the software.

 3. Conditions and Limitations

 A) No Trademark License- This license does not grant you rights
 to use any contributors’ name, logo, or trademarks.
 B) If you bring a patent claim against any contributor over
 patents that you claim are infringed by the software, your
 patent license from such contributor is terminated with
 immediate effect.
 C) If you distribute any portion of the software, you must
 retain all copyright, patent, trademark, and attribution
 notices that are present in the software.
 D) If you distribute any portion of the software in source code
 form, you may do so only under this license by including a
 complete copy of this license with your distribution. If you
 distribute any portion of the software in compiled or object
 code form, you may only do so under a license that complies
 with this license.
 E) The software is licensed “as-is.” You bear all risks of
 using it. The contributors give no express warranties,
 guarantees, or conditions. You may have additional consumer
 rights under your local laws which this license cannot change.
 To the extent permitted under your local laws, the contributors
 exclude all implied warranties, including those of
 merchantability, fitness for a particular purpose and
 non-infringement.

 4. (F) Platform Limitation- The licenses granted in sections
 2.A & 2.B extend only to the software or derivative works that
 you create that run on a Holograph system product.

 ***************************************************************

*/

pragma solidity 0.8.13;

enum ChainIdType {
  UNDEFINED, //  0
  EVM, //        1
  HOLOGRAPH, //  2
  LAYERZERO, //  3
  HYPERLANE //   4
}

File 5 of 24 : InterfaceType.sol
// SPDX-License-Identifier: UNLICENSED
/*

                         ┌───────────┐
                         │ HOLOGRAPH │
                         └───────────┘
╔═════════════════════════════════════════════════════════════╗
║                                                             ║
║                            / ^ \                            ║
║                            ~~*~~            ¸               ║
║                         [ '<>:<>' ]         │░░░            ║
║               ╔╗           _/"\_           ╔╣               ║
║             ┌─╬╬─┐          """          ┌─╬╬─┐             ║
║          ┌─┬┘ ╠╣ └┬─┐       \_/       ┌─┬┘ ╠╣ └┬─┐          ║
║       ┌─┬┘ │  ╠╣  │ └┬─┐           ┌─┬┘ │  ╠╣  │ └┬─┐       ║
║    ┌─┬┘ │  │  ╠╣  │  │ └┬─┐     ┌─┬┘ │  │  ╠╣  │  │ └┬─┐    ║
║ ┌─┬┘ │  │  │  ╠╣  │  │  │ └┬┐ ┌┬┘ │  │  │  ╠╣  │  │  │ └┬─┐ ║
╠┬┘ │  │  │  │  ╠╣  │  │  │  │└¤┘│  │  │  │  ╠╣  │  │  │  │ └┬╣
║│  │  │  │  │  ╠╣  │  │  │  │   │  │  │  │  ╠╣  │  │  │  │  │║
╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣
╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣
║               ╠╣                           ╠╣               ║
║               ╠╣                           ╠╣               ║
║    ,          ╠╣     ,        ,'      *    ╠╣               ║
║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║
╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝
     - one protocol, one bridge = infinite possibilities -


 ***************************************************************

 DISCLAIMER: U.S Patent Pending

 LICENSE: Holograph Limited Public License (H-LPL)

 https://holograph.xyz/licenses/h-lpl/1.0.0

 This license governs use of the accompanying software. If you
 use the software, you accept this license. If you do not accept
 the license, you are not permitted to use the software.

 1. Definitions

 The terms "reproduce," "reproduction," "derivative works," and
 "distribution" have the same meaning here as under U.S.
 copyright law. A "contribution" is the original software, or
 any additions or changes to the software. A "contributor" is
 any person that distributes its contribution under this
 license. "Licensed patents" are a contributor’s patent claims
 that read directly on its contribution.

 2. Grant of Rights

 A) Copyright Grant- Subject to the terms of this license,
 including the license conditions and limitations in sections 3
 and 4, each contributor grants you a non-exclusive, worldwide,
 royalty-free copyright license to reproduce its contribution,
 prepare derivative works of its contribution, and distribute
 its contribution or any derivative works that you create.
 B) Patent Grant- Subject to the terms of this license,
 including the license conditions and limitations in section 3,
 each contributor grants you a non-exclusive, worldwide,
 royalty-free license under its licensed patents to make, have
 made, use, sell, offer for sale, import, and/or otherwise
 dispose of its contribution in the software or derivative works
 of the contribution in the software.

 3. Conditions and Limitations

 A) No Trademark License- This license does not grant you rights
 to use any contributors’ name, logo, or trademarks.
 B) If you bring a patent claim against any contributor over
 patents that you claim are infringed by the software, your
 patent license from such contributor is terminated with
 immediate effect.
 C) If you distribute any portion of the software, you must
 retain all copyright, patent, trademark, and attribution
 notices that are present in the software.
 D) If you distribute any portion of the software in source code
 form, you may do so only under this license by including a
 complete copy of this license with your distribution. If you
 distribute any portion of the software in compiled or object
 code form, you may only do so under a license that complies
 with this license.
 E) The software is licensed “as-is.” You bear all risks of
 using it. The contributors give no express warranties,
 guarantees, or conditions. You may have additional consumer
 rights under your local laws which this license cannot change.
 To the extent permitted under your local laws, the contributors
 exclude all implied warranties, including those of
 merchantability, fitness for a particular purpose and
 non-infringement.

 4. (F) Platform Limitation- The licenses granted in sections
 2.A & 2.B extend only to the software or derivative works that
 you create that run on a Holograph system product.

 ***************************************************************

*/

pragma solidity 0.8.13;

enum InterfaceType {
  UNDEFINED, // 0
  ERC20, //     1
  ERC721, //    2
  ERC1155, //   3
  ROYALTIES, // 4
  GENERIC //    5
}

File 6 of 24 : TokenUriType.sol
// SPDX-License-Identifier: UNLICENSED
/*

                         ┌───────────┐
                         │ HOLOGRAPH │
                         └───────────┘
╔═════════════════════════════════════════════════════════════╗
║                                                             ║
║                            / ^ \                            ║
║                            ~~*~~            ¸               ║
║                         [ '<>:<>' ]         │░░░            ║
║               ╔╗           _/"\_           ╔╣               ║
║             ┌─╬╬─┐          """          ┌─╬╬─┐             ║
║          ┌─┬┘ ╠╣ └┬─┐       \_/       ┌─┬┘ ╠╣ └┬─┐          ║
║       ┌─┬┘ │  ╠╣  │ └┬─┐           ┌─┬┘ │  ╠╣  │ └┬─┐       ║
║    ┌─┬┘ │  │  ╠╣  │  │ └┬─┐     ┌─┬┘ │  │  ╠╣  │  │ └┬─┐    ║
║ ┌─┬┘ │  │  │  ╠╣  │  │  │ └┬┐ ┌┬┘ │  │  │  ╠╣  │  │  │ └┬─┐ ║
╠┬┘ │  │  │  │  ╠╣  │  │  │  │└¤┘│  │  │  │  ╠╣  │  │  │  │ └┬╣
║│  │  │  │  │  ╠╣  │  │  │  │   │  │  │  │  ╠╣  │  │  │  │  │║
╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣
╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣
║               ╠╣                           ╠╣               ║
║               ╠╣                           ╠╣               ║
║    ,          ╠╣     ,        ,'      *    ╠╣               ║
║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║
╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝
     - one protocol, one bridge = infinite possibilities -


 ***************************************************************

 DISCLAIMER: U.S Patent Pending

 LICENSE: Holograph Limited Public License (H-LPL)

 https://holograph.xyz/licenses/h-lpl/1.0.0

 This license governs use of the accompanying software. If you
 use the software, you accept this license. If you do not accept
 the license, you are not permitted to use the software.

 1. Definitions

 The terms "reproduce," "reproduction," "derivative works," and
 "distribution" have the same meaning here as under U.S.
 copyright law. A "contribution" is the original software, or
 any additions or changes to the software. A "contributor" is
 any person that distributes its contribution under this
 license. "Licensed patents" are a contributor’s patent claims
 that read directly on its contribution.

 2. Grant of Rights

 A) Copyright Grant- Subject to the terms of this license,
 including the license conditions and limitations in sections 3
 and 4, each contributor grants you a non-exclusive, worldwide,
 royalty-free copyright license to reproduce its contribution,
 prepare derivative works of its contribution, and distribute
 its contribution or any derivative works that you create.
 B) Patent Grant- Subject to the terms of this license,
 including the license conditions and limitations in section 3,
 each contributor grants you a non-exclusive, worldwide,
 royalty-free license under its licensed patents to make, have
 made, use, sell, offer for sale, import, and/or otherwise
 dispose of its contribution in the software or derivative works
 of the contribution in the software.

 3. Conditions and Limitations

 A) No Trademark License- This license does not grant you rights
 to use any contributors’ name, logo, or trademarks.
 B) If you bring a patent claim against any contributor over
 patents that you claim are infringed by the software, your
 patent license from such contributor is terminated with
 immediate effect.
 C) If you distribute any portion of the software, you must
 retain all copyright, patent, trademark, and attribution
 notices that are present in the software.
 D) If you distribute any portion of the software in source code
 form, you may do so only under this license by including a
 complete copy of this license with your distribution. If you
 distribute any portion of the software in compiled or object
 code form, you may only do so under a license that complies
 with this license.
 E) The software is licensed “as-is.” You bear all risks of
 using it. The contributors give no express warranties,
 guarantees, or conditions. You may have additional consumer
 rights under your local laws which this license cannot change.
 To the extent permitted under your local laws, the contributors
 exclude all implied warranties, including those of
 merchantability, fitness for a particular purpose and
 non-infringement.

 4. (F) Platform Limitation- The licenses granted in sections
 2.A & 2.B extend only to the software or derivative works that
 you create that run on a Holograph system product.

 ***************************************************************

*/

pragma solidity 0.8.13;

enum TokenUriType {
  UNDEFINED, //   0
  IPFS, //        1
  HTTPS, //       2
  ARWEAVE //      3
}

File 7 of 24 : CrossChainMessageInterface.sol
// SPDX-License-Identifier: UNLICENSED
/*

                         ┌───────────┐
                         │ HOLOGRAPH │
                         └───────────┘
╔═════════════════════════════════════════════════════════════╗
║                                                             ║
║                            / ^ \                            ║
║                            ~~*~~            ¸               ║
║                         [ '<>:<>' ]         │░░░            ║
║               ╔╗           _/"\_           ╔╣               ║
║             ┌─╬╬─┐          """          ┌─╬╬─┐             ║
║          ┌─┬┘ ╠╣ └┬─┐       \_/       ┌─┬┘ ╠╣ └┬─┐          ║
║       ┌─┬┘ │  ╠╣  │ └┬─┐           ┌─┬┘ │  ╠╣  │ └┬─┐       ║
║    ┌─┬┘ │  │  ╠╣  │  │ └┬─┐     ┌─┬┘ │  │  ╠╣  │  │ └┬─┐    ║
║ ┌─┬┘ │  │  │  ╠╣  │  │  │ └┬┐ ┌┬┘ │  │  │  ╠╣  │  │  │ └┬─┐ ║
╠┬┘ │  │  │  │  ╠╣  │  │  │  │└¤┘│  │  │  │  ╠╣  │  │  │  │ └┬╣
║│  │  │  │  │  ╠╣  │  │  │  │   │  │  │  │  ╠╣  │  │  │  │  │║
╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣
╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣
║               ╠╣                           ╠╣               ║
║               ╠╣                           ╠╣               ║
║    ,          ╠╣     ,        ,'      *    ╠╣               ║
║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║
╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝
     - one protocol, one bridge = infinite possibilities -


 ***************************************************************

 DISCLAIMER: U.S Patent Pending

 LICENSE: Holograph Limited Public License (H-LPL)

 https://holograph.xyz/licenses/h-lpl/1.0.0

 This license governs use of the accompanying software. If you
 use the software, you accept this license. If you do not accept
 the license, you are not permitted to use the software.

 1. Definitions

 The terms "reproduce," "reproduction," "derivative works," and
 "distribution" have the same meaning here as under U.S.
 copyright law. A "contribution" is the original software, or
 any additions or changes to the software. A "contributor" is
 any person that distributes its contribution under this
 license. "Licensed patents" are a contributor’s patent claims
 that read directly on its contribution.

 2. Grant of Rights

 A) Copyright Grant- Subject to the terms of this license,
 including the license conditions and limitations in sections 3
 and 4, each contributor grants you a non-exclusive, worldwide,
 royalty-free copyright license to reproduce its contribution,
 prepare derivative works of its contribution, and distribute
 its contribution or any derivative works that you create.
 B) Patent Grant- Subject to the terms of this license,
 including the license conditions and limitations in section 3,
 each contributor grants you a non-exclusive, worldwide,
 royalty-free license under its licensed patents to make, have
 made, use, sell, offer for sale, import, and/or otherwise
 dispose of its contribution in the software or derivative works
 of the contribution in the software.

 3. Conditions and Limitations

 A) No Trademark License- This license does not grant you rights
 to use any contributors’ name, logo, or trademarks.
 B) If you bring a patent claim against any contributor over
 patents that you claim are infringed by the software, your
 patent license from such contributor is terminated with
 immediate effect.
 C) If you distribute any portion of the software, you must
 retain all copyright, patent, trademark, and attribution
 notices that are present in the software.
 D) If you distribute any portion of the software in source code
 form, you may do so only under this license by including a
 complete copy of this license with your distribution. If you
 distribute any portion of the software in compiled or object
 code form, you may only do so under a license that complies
 with this license.
 E) The software is licensed “as-is.” You bear all risks of
 using it. The contributors give no express warranties,
 guarantees, or conditions. You may have additional consumer
 rights under your local laws which this license cannot change.
 To the extent permitted under your local laws, the contributors
 exclude all implied warranties, including those of
 merchantability, fitness for a particular purpose and
 non-infringement.

 4. (F) Platform Limitation- The licenses granted in sections
 2.A & 2.B extend only to the software or derivative works that
 you create that run on a Holograph system product.

 ***************************************************************

*/

pragma solidity 0.8.13;

interface CrossChainMessageInterface {
  function send(
    uint256 gasLimit,
    uint256 gasPrice,
    uint32 toChain,
    address msgSender,
    uint256 msgValue,
    bytes calldata crossChainPayload
  ) external payable;

  function getMessageFee(
    uint32 toChain,
    uint256 gasLimit,
    uint256 gasPrice,
    bytes calldata crossChainPayload
  ) external view returns (uint256 hlgFee, uint256 msgFee, uint256 dstGasPrice);

  function getHlgFee(
    uint32 toChain,
    uint256 gasLimit,
    uint256 gasPrice,
    bytes calldata crossChainPayload
  ) external view returns (uint256 hlgFee);
}

File 8 of 24 : ERC165.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.8.13;

interface ERC165 {
  /// @notice Query if a contract implements an interface
  /// @param interfaceID The interface identifier, as specified in ERC-165
  /// @dev Interface identification is specified in ERC-165. This function
  ///  uses less than 30,000 gas.
  /// @return `true` if the contract implements `interfaceID` and
  ///  `interfaceID` is not 0xffffffff, `false` otherwise
  function supportsInterface(bytes4 interfaceID) external view returns (bool);
}

File 9 of 24 : ERC20.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.8.13;

interface ERC20 {
  function totalSupply() external view returns (uint256);

  function balanceOf(address _owner) external view returns (uint256 balance);

  function transfer(address _to, uint256 _value) external returns (bool success);

  function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);

  function approve(address _spender, uint256 _value) external returns (bool success);

  function allowance(address _owner, address _spender) external view returns (uint256 remaining);

  event Transfer(address indexed _from, address indexed _to, uint256 _value);

  event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}

File 10 of 24 : ERC20Burnable.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.8.13;

interface ERC20Burnable {
  function burn(uint256 amount) external;

  function burnFrom(address account, uint256 amount) external returns (bool);
}

File 11 of 24 : ERC20Metadata.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.8.13;

interface ERC20Metadata {
  function decimals() external view returns (uint8);

  function name() external view returns (string memory);

  function symbol() external view returns (string memory);
}

File 12 of 24 : ERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity 0.8.13;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface ERC20Permit {
  /**
   * @dev Sets `value` as the allowance of `spender` over ``account``'s tokens,
   * given ``account``'s signed approval.
   *
   * IMPORTANT: The same issues {IERC20-approve} has related to transaction
   * ordering also apply here.
   *
   * Emits an {Approval} event.
   *
   * Requirements:
   *
   * - `spender` cannot be the zero address.
   * - `deadline` must be a timestamp in the future.
   * - `v`, `r` and `s` must be a valid `secp256k1` signature from `account`
   * over the EIP712-formatted function arguments.
   * - the signature must use ``account``'s current nonce (see {nonces}).
   *
   * For more information on the signature format, see the
   * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
   * section].
   */
  function permit(
    address account,
    address spender,
    uint256 value,
    uint256 deadline,
    uint8 v,
    bytes32 r,
    bytes32 s
  ) external;

  /**
   * @dev Returns the current nonce for `account`. This value must be
   * included whenever a signature is generated for {permit}.
   *
   * Every successful call to {permit} increases ``account``'s nonce by one. This
   * prevents a signature from being used multiple times.
   */
  function nonces(address account) external view returns (uint256);

  /**
   * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
   */
  // solhint-disable-next-line func-name-mixedcase
  function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 13 of 24 : ERC20Receiver.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.8.13;

interface ERC20Receiver {
  function onERC20Received(
    address account,
    address recipient,
    uint256 amount,
    bytes memory data
  ) external returns (bytes4);
}

File 14 of 24 : ERC20Safer.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.8.13;

interface ERC20Safer {
  function safeTransfer(address recipient, uint256 amount) external returns (bool);

  function safeTransfer(address recipient, uint256 amount, bytes memory data) external returns (bool);

  function safeTransferFrom(address account, address recipient, uint256 amount) external returns (bool);

  function safeTransferFrom(
    address account,
    address recipient,
    uint256 amount,
    bytes memory data
  ) external returns (bool);
}

File 15 of 24 : Holographable.sol
// SPDX-License-Identifier: UNLICENSED
/*

                         ┌───────────┐
                         │ HOLOGRAPH │
                         └───────────┘
╔═════════════════════════════════════════════════════════════╗
║                                                             ║
║                            / ^ \                            ║
║                            ~~*~~            ¸               ║
║                         [ '<>:<>' ]         │░░░            ║
║               ╔╗           _/"\_           ╔╣               ║
║             ┌─╬╬─┐          """          ┌─╬╬─┐             ║
║          ┌─┬┘ ╠╣ └┬─┐       \_/       ┌─┬┘ ╠╣ └┬─┐          ║
║       ┌─┬┘ │  ╠╣  │ └┬─┐           ┌─┬┘ │  ╠╣  │ └┬─┐       ║
║    ┌─┬┘ │  │  ╠╣  │  │ └┬─┐     ┌─┬┘ │  │  ╠╣  │  │ └┬─┐    ║
║ ┌─┬┘ │  │  │  ╠╣  │  │  │ └┬┐ ┌┬┘ │  │  │  ╠╣  │  │  │ └┬─┐ ║
╠┬┘ │  │  │  │  ╠╣  │  │  │  │└¤┘│  │  │  │  ╠╣  │  │  │  │ └┬╣
║│  │  │  │  │  ╠╣  │  │  │  │   │  │  │  │  ╠╣  │  │  │  │  │║
╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣
╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣
║               ╠╣                           ╠╣               ║
║               ╠╣                           ╠╣               ║
║    ,          ╠╣     ,        ,'      *    ╠╣               ║
║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║
╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝
     - one protocol, one bridge = infinite possibilities -


 ***************************************************************

 DISCLAIMER: U.S Patent Pending

 LICENSE: Holograph Limited Public License (H-LPL)

 https://holograph.xyz/licenses/h-lpl/1.0.0

 This license governs use of the accompanying software. If you
 use the software, you accept this license. If you do not accept
 the license, you are not permitted to use the software.

 1. Definitions

 The terms "reproduce," "reproduction," "derivative works," and
 "distribution" have the same meaning here as under U.S.
 copyright law. A "contribution" is the original software, or
 any additions or changes to the software. A "contributor" is
 any person that distributes its contribution under this
 license. "Licensed patents" are a contributor’s patent claims
 that read directly on its contribution.

 2. Grant of Rights

 A) Copyright Grant- Subject to the terms of this license,
 including the license conditions and limitations in sections 3
 and 4, each contributor grants you a non-exclusive, worldwide,
 royalty-free copyright license to reproduce its contribution,
 prepare derivative works of its contribution, and distribute
 its contribution or any derivative works that you create.
 B) Patent Grant- Subject to the terms of this license,
 including the license conditions and limitations in section 3,
 each contributor grants you a non-exclusive, worldwide,
 royalty-free license under its licensed patents to make, have
 made, use, sell, offer for sale, import, and/or otherwise
 dispose of its contribution in the software or derivative works
 of the contribution in the software.

 3. Conditions and Limitations

 A) No Trademark License- This license does not grant you rights
 to use any contributors’ name, logo, or trademarks.
 B) If you bring a patent claim against any contributor over
 patents that you claim are infringed by the software, your
 patent license from such contributor is terminated with
 immediate effect.
 C) If you distribute any portion of the software, you must
 retain all copyright, patent, trademark, and attribution
 notices that are present in the software.
 D) If you distribute any portion of the software in source code
 form, you may do so only under this license by including a
 complete copy of this license with your distribution. If you
 distribute any portion of the software in compiled or object
 code form, you may only do so under a license that complies
 with this license.
 E) The software is licensed “as-is.” You bear all risks of
 using it. The contributors give no express warranties,
 guarantees, or conditions. You may have additional consumer
 rights under your local laws which this license cannot change.
 To the extent permitted under your local laws, the contributors
 exclude all implied warranties, including those of
 merchantability, fitness for a particular purpose and
 non-infringement.

 4. (F) Platform Limitation- The licenses granted in sections
 2.A & 2.B extend only to the software or derivative works that
 you create that run on a Holograph system product.

 ***************************************************************

*/

pragma solidity 0.8.13;

interface Holographable {
  function bridgeIn(uint32 fromChain, bytes calldata payload) external returns (bytes4);

  function bridgeOut(
    uint32 toChain,
    address sender,
    bytes calldata payload
  ) external returns (bytes4 selector, bytes memory data);
}

File 16 of 24 : HolographBridgeInterface.sol
// SPDX-License-Identifier: UNLICENSED
/*

                         ┌───────────┐
                         │ HOLOGRAPH │
                         └───────────┘
╔═════════════════════════════════════════════════════════════╗
║                                                             ║
║                            / ^ \                            ║
║                            ~~*~~            ¸               ║
║                         [ '<>:<>' ]         │░░░            ║
║               ╔╗           _/"\_           ╔╣               ║
║             ┌─╬╬─┐          """          ┌─╬╬─┐             ║
║          ┌─┬┘ ╠╣ └┬─┐       \_/       ┌─┬┘ ╠╣ └┬─┐          ║
║       ┌─┬┘ │  ╠╣  │ └┬─┐           ┌─┬┘ │  ╠╣  │ └┬─┐       ║
║    ┌─┬┘ │  │  ╠╣  │  │ └┬─┐     ┌─┬┘ │  │  ╠╣  │  │ └┬─┐    ║
║ ┌─┬┘ │  │  │  ╠╣  │  │  │ └┬┐ ┌┬┘ │  │  │  ╠╣  │  │  │ └┬─┐ ║
╠┬┘ │  │  │  │  ╠╣  │  │  │  │└¤┘│  │  │  │  ╠╣  │  │  │  │ └┬╣
║│  │  │  │  │  ╠╣  │  │  │  │   │  │  │  │  ╠╣  │  │  │  │  │║
╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣
╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣
║               ╠╣                           ╠╣               ║
║               ╠╣                           ╠╣               ║
║    ,          ╠╣     ,        ,'      *    ╠╣               ║
║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║
╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝
     - one protocol, one bridge = infinite possibilities -


 ***************************************************************

 DISCLAIMER: U.S Patent Pending

 LICENSE: Holograph Limited Public License (H-LPL)

 https://holograph.xyz/licenses/h-lpl/1.0.0

 This license governs use of the accompanying software. If you
 use the software, you accept this license. If you do not accept
 the license, you are not permitted to use the software.

 1. Definitions

 The terms "reproduce," "reproduction," "derivative works," and
 "distribution" have the same meaning here as under U.S.
 copyright law. A "contribution" is the original software, or
 any additions or changes to the software. A "contributor" is
 any person that distributes its contribution under this
 license. "Licensed patents" are a contributor’s patent claims
 that read directly on its contribution.

 2. Grant of Rights

 A) Copyright Grant- Subject to the terms of this license,
 including the license conditions and limitations in sections 3
 and 4, each contributor grants you a non-exclusive, worldwide,
 royalty-free copyright license to reproduce its contribution,
 prepare derivative works of its contribution, and distribute
 its contribution or any derivative works that you create.
 B) Patent Grant- Subject to the terms of this license,
 including the license conditions and limitations in section 3,
 each contributor grants you a non-exclusive, worldwide,
 royalty-free license under its licensed patents to make, have
 made, use, sell, offer for sale, import, and/or otherwise
 dispose of its contribution in the software or derivative works
 of the contribution in the software.

 3. Conditions and Limitations

 A) No Trademark License- This license does not grant you rights
 to use any contributors’ name, logo, or trademarks.
 B) If you bring a patent claim against any contributor over
 patents that you claim are infringed by the software, your
 patent license from such contributor is terminated with
 immediate effect.
 C) If you distribute any portion of the software, you must
 retain all copyright, patent, trademark, and attribution
 notices that are present in the software.
 D) If you distribute any portion of the software in source code
 form, you may do so only under this license by including a
 complete copy of this license with your distribution. If you
 distribute any portion of the software in compiled or object
 code form, you may only do so under a license that complies
 with this license.
 E) The software is licensed “as-is.” You bear all risks of
 using it. The contributors give no express warranties,
 guarantees, or conditions. You may have additional consumer
 rights under your local laws which this license cannot change.
 To the extent permitted under your local laws, the contributors
 exclude all implied warranties, including those of
 merchantability, fitness for a particular purpose and
 non-infringement.

 4. (F) Platform Limitation- The licenses granted in sections
 2.A & 2.B extend only to the software or derivative works that
 you create that run on a Holograph system product.

 ***************************************************************

*/

pragma solidity 0.8.13;

/**
 * @title Holograph Bridge
 * @author https://github.com/holographxyz
 * @notice Beam any holographable contracts and assets across blockchains
 * @dev The contract abstracts all the complexities of making bridge requests and uses a universal interface to bridge any type of holographable assets
 */
interface HolographBridgeInterface {
  /**
   * @notice Receive a beam from another chain
   * @dev This function can only be called by the Holograph Operator module
   * @param fromChain Holograph Chain ID where the brigeOutRequest was created
   * @param holographableContract address of the destination contract that the bridgeInRequest is targeted for
   * @param hToken address of the hToken contract that wrapped the origin chain native gas token
   * @param hTokenRecipient address of recipient for the hToken reward
   * @param hTokenValue exact amount of hToken reward in wei
   * @param doNotRevert boolean used to specify if the call should revert
   * @param bridgeInPayload actual abi encoded bytes of the data that the holographable contract bridgeIn function will receive
   */
  function bridgeInRequest(
    uint256 nonce,
    uint32 fromChain,
    address holographableContract,
    address hToken,
    address hTokenRecipient,
    uint256 hTokenValue,
    bool doNotRevert,
    bytes calldata bridgeInPayload
  ) external payable;

  /**
   * @notice Create a beam request for a destination chain
   * @dev This function works for deploying contracts and beaming supported holographable assets across chains
   * @param toChain Holograph Chain ID where the beam is being sent to
   * @param holographableContract address of the contract for which the bridge request is being made
   * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain
   * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain
   * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive
   */
  function bridgeOutRequest(
    uint32 toChain,
    address holographableContract,
    uint256 gasLimit,
    uint256 gasPrice,
    bytes calldata bridgeOutPayload
  ) external payable;

  /**
   * @notice Do not call this function, it will always revert
   * @dev Used by getBridgeOutRequestPayload function
   *      It is purposefully inverted to always revert on a successful call
   *      Marked as external and not private to allow use inside try/catch of getBridgeOutRequestPayload function
   *      If this function does not revert and returns a string, it is the actual revert reason
   * @param sender address of actual sender that is planning to make a bridgeOutRequest call
   * @param toChain holograph chain id of destination chain
   * @param holographableContract address of the contract for which the bridge request is being made
   * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive
   */
  function revertedBridgeOutRequest(
    address sender,
    uint32 toChain,
    address holographableContract,
    bytes calldata bridgeOutPayload
  ) external returns (string memory revertReason);

  /**
   * @notice Get the payload created by the bridgeOutRequest function
   * @dev Use this function to get the payload that will be generated by a bridgeOutRequest
   *      Only use this with a static call
   * @param toChain Holograph Chain ID where the beam is being sent to
   * @param holographableContract address of the contract for which the bridge request is being made
   * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain
   * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain
   * @param bridgeOutPayload actual abi encoded bytes of the data that the holographable contract bridgeOut function will receive
   * @return samplePayload bytes made up of the bridgeOutRequest payload
   */
  function getBridgeOutRequestPayload(
    uint32 toChain,
    address holographableContract,
    uint256 gasLimit,
    uint256 gasPrice,
    bytes calldata bridgeOutPayload
  ) external returns (bytes memory samplePayload);

  /**
   * @notice Get the fees associated with sending specific payload
   * @dev Will provide exact costs on protocol and message side, combine the two to get total
   * @param toChain holograph chain id of destination chain for payload
   * @param gasLimit amount of gas to provide for executing payload on destination chain
   * @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically
   * @param crossChainPayload the entire packet being sent cross-chain
   * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain
   * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain
   * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be
   */
  function getMessageFee(
    uint32 toChain,
    uint256 gasLimit,
    uint256 gasPrice,
    bytes calldata crossChainPayload
  ) external view returns (uint256 hlgFee, uint256 msgFee, uint256 dstGasPrice);

  /**
   * @notice Get the address of the Holograph Factory module
   * @dev Used for deploying holographable smart contracts
   */
  function getFactory() external view returns (address factory);

  /**
   * @notice Update the Holograph Factory module address
   * @param factory address of the Holograph Factory smart contract to use
   */
  function setFactory(address factory) external;

  /**
   * @notice Get the Holograph Protocol contract
   * @dev Used for storing a reference to all the primary modules and variables of the protocol
   */
  function getHolograph() external view returns (address holograph);

  /**
   * @notice Update the Holograph Protocol contract address
   * @param holograph address of the Holograph Protocol smart contract to use
   */
  function setHolograph(address holograph) external;

  /**
   * @notice Get the latest job nonce
   * @dev You can use the job nonce as a way to calculate total amount of bridge requests that have been made
   */
  function getJobNonce() external view returns (uint256 jobNonce);

  /**
   * @notice Get the address of the Holograph Operator module
   * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module
   */
  function getOperator() external view returns (address operator);

  /**
   * @notice Update the Holograph Operator module address
   * @param operator address of the Holograph Operator smart contract to use
   */
  function setOperator(address operator) external;

  /**
   * @notice Get the Holograph Registry module
   * @dev This module stores a reference for all deployed holographable smart contracts
   */
  function getRegistry() external view returns (address registry);

  /**
   * @notice Update the Holograph Registry module address
   * @param registry address of the Holograph Registry smart contract to use
   */
  function setRegistry(address registry) external;
}

File 17 of 24 : HolographERC20Interface.sol
// SPDX-License-Identifier: UNLICENSED
/*

                         ┌───────────┐
                         │ HOLOGRAPH │
                         └───────────┘
╔═════════════════════════════════════════════════════════════╗
║                                                             ║
║                            / ^ \                            ║
║                            ~~*~~            ¸               ║
║                         [ '<>:<>' ]         │░░░            ║
║               ╔╗           _/"\_           ╔╣               ║
║             ┌─╬╬─┐          """          ┌─╬╬─┐             ║
║          ┌─┬┘ ╠╣ └┬─┐       \_/       ┌─┬┘ ╠╣ └┬─┐          ║
║       ┌─┬┘ │  ╠╣  │ └┬─┐           ┌─┬┘ │  ╠╣  │ └┬─┐       ║
║    ┌─┬┘ │  │  ╠╣  │  │ └┬─┐     ┌─┬┘ │  │  ╠╣  │  │ └┬─┐    ║
║ ┌─┬┘ │  │  │  ╠╣  │  │  │ └┬┐ ┌┬┘ │  │  │  ╠╣  │  │  │ └┬─┐ ║
╠┬┘ │  │  │  │  ╠╣  │  │  │  │└¤┘│  │  │  │  ╠╣  │  │  │  │ └┬╣
║│  │  │  │  │  ╠╣  │  │  │  │   │  │  │  │  ╠╣  │  │  │  │  │║
╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣
╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣
║               ╠╣                           ╠╣               ║
║               ╠╣                           ╠╣               ║
║    ,          ╠╣     ,        ,'      *    ╠╣               ║
║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║
╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝
     - one protocol, one bridge = infinite possibilities -


 ***************************************************************

 DISCLAIMER: U.S Patent Pending

 LICENSE: Holograph Limited Public License (H-LPL)

 https://holograph.xyz/licenses/h-lpl/1.0.0

 This license governs use of the accompanying software. If you
 use the software, you accept this license. If you do not accept
 the license, you are not permitted to use the software.

 1. Definitions

 The terms "reproduce," "reproduction," "derivative works," and
 "distribution" have the same meaning here as under U.S.
 copyright law. A "contribution" is the original software, or
 any additions or changes to the software. A "contributor" is
 any person that distributes its contribution under this
 license. "Licensed patents" are a contributor’s patent claims
 that read directly on its contribution.

 2. Grant of Rights

 A) Copyright Grant- Subject to the terms of this license,
 including the license conditions and limitations in sections 3
 and 4, each contributor grants you a non-exclusive, worldwide,
 royalty-free copyright license to reproduce its contribution,
 prepare derivative works of its contribution, and distribute
 its contribution or any derivative works that you create.
 B) Patent Grant- Subject to the terms of this license,
 including the license conditions and limitations in section 3,
 each contributor grants you a non-exclusive, worldwide,
 royalty-free license under its licensed patents to make, have
 made, use, sell, offer for sale, import, and/or otherwise
 dispose of its contribution in the software or derivative works
 of the contribution in the software.

 3. Conditions and Limitations

 A) No Trademark License- This license does not grant you rights
 to use any contributors’ name, logo, or trademarks.
 B) If you bring a patent claim against any contributor over
 patents that you claim are infringed by the software, your
 patent license from such contributor is terminated with
 immediate effect.
 C) If you distribute any portion of the software, you must
 retain all copyright, patent, trademark, and attribution
 notices that are present in the software.
 D) If you distribute any portion of the software in source code
 form, you may do so only under this license by including a
 complete copy of this license with your distribution. If you
 distribute any portion of the software in compiled or object
 code form, you may only do so under a license that complies
 with this license.
 E) The software is licensed “as-is.” You bear all risks of
 using it. The contributors give no express warranties,
 guarantees, or conditions. You may have additional consumer
 rights under your local laws which this license cannot change.
 To the extent permitted under your local laws, the contributors
 exclude all implied warranties, including those of
 merchantability, fitness for a particular purpose and
 non-infringement.

 4. (F) Platform Limitation- The licenses granted in sections
 2.A & 2.B extend only to the software or derivative works that
 you create that run on a Holograph system product.

 ***************************************************************

*/

pragma solidity 0.8.13;

import "./ERC20.sol";
import "./ERC20Burnable.sol";
import "./ERC20Metadata.sol";
import "./ERC20Permit.sol";
import "./ERC20Receiver.sol";
import "./ERC20Safer.sol";
import "./ERC165.sol";
import "./Holographable.sol";

interface HolographERC20Interface is
  ERC165,
  ERC20,
  ERC20Burnable,
  ERC20Metadata,
  ERC20Receiver,
  ERC20Safer,
  ERC20Permit,
  Holographable
{
  function holographBridgeMint(address to, uint256 amount) external returns (bytes4);

  function sourceBurn(address from, uint256 amount) external;

  function sourceMint(address to, uint256 amount) external;

  function sourceMintBatch(address[] calldata wallets, uint256[] calldata amounts) external;

  function sourceTransfer(address from, address to, uint256 amount) external;

  function sourceTransfer(address payable destination, uint256 amount) external;

  function sourceExternalCall(address target, bytes calldata data) external;
}

File 18 of 24 : HolographInterface.sol
// SPDX-License-Identifier: UNLICENSED
/*

                         ┌───────────┐
                         │ HOLOGRAPH │
                         └───────────┘
╔═════════════════════════════════════════════════════════════╗
║                                                             ║
║                            / ^ \                            ║
║                            ~~*~~            ¸               ║
║                         [ '<>:<>' ]         │░░░            ║
║               ╔╗           _/"\_           ╔╣               ║
║             ┌─╬╬─┐          """          ┌─╬╬─┐             ║
║          ┌─┬┘ ╠╣ └┬─┐       \_/       ┌─┬┘ ╠╣ └┬─┐          ║
║       ┌─┬┘ │  ╠╣  │ └┬─┐           ┌─┬┘ │  ╠╣  │ └┬─┐       ║
║    ┌─┬┘ │  │  ╠╣  │  │ └┬─┐     ┌─┬┘ │  │  ╠╣  │  │ └┬─┐    ║
║ ┌─┬┘ │  │  │  ╠╣  │  │  │ └┬┐ ┌┬┘ │  │  │  ╠╣  │  │  │ └┬─┐ ║
╠┬┘ │  │  │  │  ╠╣  │  │  │  │└¤┘│  │  │  │  ╠╣  │  │  │  │ └┬╣
║│  │  │  │  │  ╠╣  │  │  │  │   │  │  │  │  ╠╣  │  │  │  │  │║
╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣
╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣
║               ╠╣                           ╠╣               ║
║               ╠╣                           ╠╣               ║
║    ,          ╠╣     ,        ,'      *    ╠╣               ║
║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║
╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝
     - one protocol, one bridge = infinite possibilities -


 ***************************************************************

 DISCLAIMER: U.S Patent Pending

 LICENSE: Holograph Limited Public License (H-LPL)

 https://holograph.xyz/licenses/h-lpl/1.0.0

 This license governs use of the accompanying software. If you
 use the software, you accept this license. If you do not accept
 the license, you are not permitted to use the software.

 1. Definitions

 The terms "reproduce," "reproduction," "derivative works," and
 "distribution" have the same meaning here as under U.S.
 copyright law. A "contribution" is the original software, or
 any additions or changes to the software. A "contributor" is
 any person that distributes its contribution under this
 license. "Licensed patents" are a contributor’s patent claims
 that read directly on its contribution.

 2. Grant of Rights

 A) Copyright Grant- Subject to the terms of this license,
 including the license conditions and limitations in sections 3
 and 4, each contributor grants you a non-exclusive, worldwide,
 royalty-free copyright license to reproduce its contribution,
 prepare derivative works of its contribution, and distribute
 its contribution or any derivative works that you create.
 B) Patent Grant- Subject to the terms of this license,
 including the license conditions and limitations in section 3,
 each contributor grants you a non-exclusive, worldwide,
 royalty-free license under its licensed patents to make, have
 made, use, sell, offer for sale, import, and/or otherwise
 dispose of its contribution in the software or derivative works
 of the contribution in the software.

 3. Conditions and Limitations

 A) No Trademark License- This license does not grant you rights
 to use any contributors’ name, logo, or trademarks.
 B) If you bring a patent claim against any contributor over
 patents that you claim are infringed by the software, your
 patent license from such contributor is terminated with
 immediate effect.
 C) If you distribute any portion of the software, you must
 retain all copyright, patent, trademark, and attribution
 notices that are present in the software.
 D) If you distribute any portion of the software in source code
 form, you may do so only under this license by including a
 complete copy of this license with your distribution. If you
 distribute any portion of the software in compiled or object
 code form, you may only do so under a license that complies
 with this license.
 E) The software is licensed “as-is.” You bear all risks of
 using it. The contributors give no express warranties,
 guarantees, or conditions. You may have additional consumer
 rights under your local laws which this license cannot change.
 To the extent permitted under your local laws, the contributors
 exclude all implied warranties, including those of
 merchantability, fitness for a particular purpose and
 non-infringement.

 4. (F) Platform Limitation- The licenses granted in sections
 2.A & 2.B extend only to the software or derivative works that
 you create that run on a Holograph system product.

 ***************************************************************

*/

pragma solidity 0.8.13;

/**
 * @title Holograph Protocol
 * @author https://github.com/holographxyz
 * @notice This is the primary Holograph Protocol smart contract
 * @dev This contract stores a reference to all the primary modules and variables of the protocol
 */
interface HolographInterface {
  /**
   * @notice Get the address of the Holograph Bridge module
   * @dev Used for beaming holographable assets cross-chain
   */
  function getBridge() external view returns (address bridge);

  /**
   * @notice Update the Holograph Bridge module address
   * @param bridge address of the Holograph Bridge smart contract to use
   */
  function setBridge(address bridge) external;

  /**
   * @notice Get the chain ID that the Protocol was deployed on
   * @dev Useful for checking if/when a hard fork occurs
   */
  function getChainId() external view returns (uint256 chainId);

  /**
   * @notice Update the chain ID
   * @dev Useful for updating once a hard fork has been mitigated
   * @param chainId EVM chain ID to use
   */
  function setChainId(uint256 chainId) external;

  /**
   * @notice Get the address of the Holograph Factory module
   * @dev Used for deploying holographable smart contracts
   */
  function getFactory() external view returns (address factory);

  /**
   * @notice Update the Holograph Factory module address
   * @param factory address of the Holograph Factory smart contract to use
   */
  function setFactory(address factory) external;

  /**
   * @notice Get the Holograph chain Id
   * @dev Holograph uses an internal chain id mapping
   */
  function getHolographChainId() external view returns (uint32 holographChainId);

  /**
   * @notice Update the Holograph chain ID
   * @dev Useful for updating once a hard fork was mitigated
   * @param holographChainId Holograph chain ID to use
   */
  function setHolographChainId(uint32 holographChainId) external;

  /**
   * @notice Get the address of the Holograph Interfaces module
   * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules
   */
  function getInterfaces() external view returns (address interfaces);

  /**
   * @notice Update the Holograph Interfaces module address
   * @param interfaces address of the Holograph Interfaces smart contract to use
   */
  function setInterfaces(address interfaces) external;

  /**
   * @notice Get the address of the Holograph Operator module
   * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module
   */
  function getOperator() external view returns (address operator);

  /**
   * @notice Update the Holograph Operator module address
   * @param operator address of the Holograph Operator smart contract to use
   */
  function setOperator(address operator) external;

  /**
   * @notice Get the Holograph Registry module
   * @dev This module stores a reference for all deployed holographable smart contracts
   */
  function getRegistry() external view returns (address registry);

  /**
   * @notice Update the Holograph Registry module address
   * @param registry address of the Holograph Registry smart contract to use
   */
  function setRegistry(address registry) external;

  /**
   * @notice Get the Holograph Treasury module
   * @dev All of the Holograph Protocol assets are stored and managed by this module
   */
  function getTreasury() external view returns (address treasury);

  /**
   * @notice Update the Holograph Treasury module address
   * @param treasury address of the Holograph Treasury smart contract to use
   */
  function setTreasury(address treasury) external;

  /**
   * @notice Get the Holograph Utility Token address
   * @dev This is the official utility token of the Holograph Protocol
   */
  function getUtilityToken() external view returns (address utilityToken);

  /**
   * @notice Update the Holograph Utility Token address
   * @param utilityToken address of the Holograph Utility Token smart contract to use
   */
  function setUtilityToken(address utilityToken) external;
}

File 19 of 24 : HolographInterfacesInterface.sol
// SPDX-License-Identifier: UNLICENSED
/*

                         ┌───────────┐
                         │ HOLOGRAPH │
                         └───────────┘
╔═════════════════════════════════════════════════════════════╗
║                                                             ║
║                            / ^ \                            ║
║                            ~~*~~            ¸               ║
║                         [ '<>:<>' ]         │░░░            ║
║               ╔╗           _/"\_           ╔╣               ║
║             ┌─╬╬─┐          """          ┌─╬╬─┐             ║
║          ┌─┬┘ ╠╣ └┬─┐       \_/       ┌─┬┘ ╠╣ └┬─┐          ║
║       ┌─┬┘ │  ╠╣  │ └┬─┐           ┌─┬┘ │  ╠╣  │ └┬─┐       ║
║    ┌─┬┘ │  │  ╠╣  │  │ └┬─┐     ┌─┬┘ │  │  ╠╣  │  │ └┬─┐    ║
║ ┌─┬┘ │  │  │  ╠╣  │  │  │ └┬┐ ┌┬┘ │  │  │  ╠╣  │  │  │ └┬─┐ ║
╠┬┘ │  │  │  │  ╠╣  │  │  │  │└¤┘│  │  │  │  ╠╣  │  │  │  │ └┬╣
║│  │  │  │  │  ╠╣  │  │  │  │   │  │  │  │  ╠╣  │  │  │  │  │║
╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣
╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣
║               ╠╣                           ╠╣               ║
║               ╠╣                           ╠╣               ║
║    ,          ╠╣     ,        ,'      *    ╠╣               ║
║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║
╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝
     - one protocol, one bridge = infinite possibilities -


 ***************************************************************

 DISCLAIMER: U.S Patent Pending

 LICENSE: Holograph Limited Public License (H-LPL)

 https://holograph.xyz/licenses/h-lpl/1.0.0

 This license governs use of the accompanying software. If you
 use the software, you accept this license. If you do not accept
 the license, you are not permitted to use the software.

 1. Definitions

 The terms "reproduce," "reproduction," "derivative works," and
 "distribution" have the same meaning here as under U.S.
 copyright law. A "contribution" is the original software, or
 any additions or changes to the software. A "contributor" is
 any person that distributes its contribution under this
 license. "Licensed patents" are a contributor’s patent claims
 that read directly on its contribution.

 2. Grant of Rights

 A) Copyright Grant- Subject to the terms of this license,
 including the license conditions and limitations in sections 3
 and 4, each contributor grants you a non-exclusive, worldwide,
 royalty-free copyright license to reproduce its contribution,
 prepare derivative works of its contribution, and distribute
 its contribution or any derivative works that you create.
 B) Patent Grant- Subject to the terms of this license,
 including the license conditions and limitations in section 3,
 each contributor grants you a non-exclusive, worldwide,
 royalty-free license under its licensed patents to make, have
 made, use, sell, offer for sale, import, and/or otherwise
 dispose of its contribution in the software or derivative works
 of the contribution in the software.

 3. Conditions and Limitations

 A) No Trademark License- This license does not grant you rights
 to use any contributors’ name, logo, or trademarks.
 B) If you bring a patent claim against any contributor over
 patents that you claim are infringed by the software, your
 patent license from such contributor is terminated with
 immediate effect.
 C) If you distribute any portion of the software, you must
 retain all copyright, patent, trademark, and attribution
 notices that are present in the software.
 D) If you distribute any portion of the software in source code
 form, you may do so only under this license by including a
 complete copy of this license with your distribution. If you
 distribute any portion of the software in compiled or object
 code form, you may only do so under a license that complies
 with this license.
 E) The software is licensed “as-is.” You bear all risks of
 using it. The contributors give no express warranties,
 guarantees, or conditions. You may have additional consumer
 rights under your local laws which this license cannot change.
 To the extent permitted under your local laws, the contributors
 exclude all implied warranties, including those of
 merchantability, fitness for a particular purpose and
 non-infringement.

 4. (F) Platform Limitation- The licenses granted in sections
 2.A & 2.B extend only to the software or derivative works that
 you create that run on a Holograph system product.

 ***************************************************************

*/

pragma solidity 0.8.13;

import "../enum/ChainIdType.sol";
import "../enum/InterfaceType.sol";
import "../enum/TokenUriType.sol";

interface HolographInterfacesInterface {
  function contractURI(
    string calldata name,
    string calldata imageURL,
    string calldata externalLink,
    uint16 bps,
    address contractAddress
  ) external pure returns (string memory);

  function getUriPrepend(TokenUriType uriType) external view returns (string memory prepend);

  function updateUriPrepend(TokenUriType uriType, string calldata prepend) external;

  function updateUriPrepends(TokenUriType[] calldata uriTypes, string[] calldata prepends) external;

  function getChainId(
    ChainIdType fromChainType,
    uint256 fromChainId,
    ChainIdType toChainType
  ) external view returns (uint256 toChainId);

  function updateChainIdMap(
    ChainIdType fromChainType,
    uint256 fromChainId,
    ChainIdType toChainType,
    uint256 toChainId
  ) external;

  function updateChainIdMaps(
    ChainIdType[] calldata fromChainType,
    uint256[] calldata fromChainId,
    ChainIdType[] calldata toChainType,
    uint256[] calldata toChainId
  ) external;

  function supportsInterface(InterfaceType interfaceType, bytes4 interfaceId) external view returns (bool);

  function updateInterface(InterfaceType interfaceType, bytes4 interfaceId, bool supported) external;

  function updateInterfaces(InterfaceType interfaceType, bytes4[] calldata interfaceIds, bool supported) external;
}

File 20 of 24 : HolographOperatorInterface.sol
// SPDX-License-Identifier: UNLICENSED
/*

                         ┌───────────┐
                         │ HOLOGRAPH │
                         └───────────┘
╔═════════════════════════════════════════════════════════════╗
║                                                             ║
║                            / ^ \                            ║
║                            ~~*~~            ¸               ║
║                         [ '<>:<>' ]         │░░░            ║
║               ╔╗           _/"\_           ╔╣               ║
║             ┌─╬╬─┐          """          ┌─╬╬─┐             ║
║          ┌─┬┘ ╠╣ └┬─┐       \_/       ┌─┬┘ ╠╣ └┬─┐          ║
║       ┌─┬┘ │  ╠╣  │ └┬─┐           ┌─┬┘ │  ╠╣  │ └┬─┐       ║
║    ┌─┬┘ │  │  ╠╣  │  │ └┬─┐     ┌─┬┘ │  │  ╠╣  │  │ └┬─┐    ║
║ ┌─┬┘ │  │  │  ╠╣  │  │  │ └┬┐ ┌┬┘ │  │  │  ╠╣  │  │  │ └┬─┐ ║
╠┬┘ │  │  │  │  ╠╣  │  │  │  │└¤┘│  │  │  │  ╠╣  │  │  │  │ └┬╣
║│  │  │  │  │  ╠╣  │  │  │  │   │  │  │  │  ╠╣  │  │  │  │  │║
╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣
╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣
║               ╠╣                           ╠╣               ║
║               ╠╣                           ╠╣               ║
║    ,          ╠╣     ,        ,'      *    ╠╣               ║
║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║
╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝
     - one protocol, one bridge = infinite possibilities -


 ***************************************************************

 DISCLAIMER: U.S Patent Pending

 LICENSE: Holograph Limited Public License (H-LPL)

 https://holograph.xyz/licenses/h-lpl/1.0.0

 This license governs use of the accompanying software. If you
 use the software, you accept this license. If you do not accept
 the license, you are not permitted to use the software.

 1. Definitions

 The terms "reproduce," "reproduction," "derivative works," and
 "distribution" have the same meaning here as under U.S.
 copyright law. A "contribution" is the original software, or
 any additions or changes to the software. A "contributor" is
 any person that distributes its contribution under this
 license. "Licensed patents" are a contributor’s patent claims
 that read directly on its contribution.

 2. Grant of Rights

 A) Copyright Grant- Subject to the terms of this license,
 including the license conditions and limitations in sections 3
 and 4, each contributor grants you a non-exclusive, worldwide,
 royalty-free copyright license to reproduce its contribution,
 prepare derivative works of its contribution, and distribute
 its contribution or any derivative works that you create.
 B) Patent Grant- Subject to the terms of this license,
 including the license conditions and limitations in section 3,
 each contributor grants you a non-exclusive, worldwide,
 royalty-free license under its licensed patents to make, have
 made, use, sell, offer for sale, import, and/or otherwise
 dispose of its contribution in the software or derivative works
 of the contribution in the software.

 3. Conditions and Limitations

 A) No Trademark License- This license does not grant you rights
 to use any contributors’ name, logo, or trademarks.
 B) If you bring a patent claim against any contributor over
 patents that you claim are infringed by the software, your
 patent license from such contributor is terminated with
 immediate effect.
 C) If you distribute any portion of the software, you must
 retain all copyright, patent, trademark, and attribution
 notices that are present in the software.
 D) If you distribute any portion of the software in source code
 form, you may do so only under this license by including a
 complete copy of this license with your distribution. If you
 distribute any portion of the software in compiled or object
 code form, you may only do so under a license that complies
 with this license.
 E) The software is licensed “as-is.” You bear all risks of
 using it. The contributors give no express warranties,
 guarantees, or conditions. You may have additional consumer
 rights under your local laws which this license cannot change.
 To the extent permitted under your local laws, the contributors
 exclude all implied warranties, including those of
 merchantability, fitness for a particular purpose and
 non-infringement.

 4. (F) Platform Limitation- The licenses granted in sections
 2.A & 2.B extend only to the software or derivative works that
 you create that run on a Holograph system product.

 ***************************************************************

*/

pragma solidity 0.8.13;

import "../struct/OperatorJob.sol";

interface HolographOperatorInterface {
  /**
   * @dev Event is emitted for every time that a valid job is available.
   */
  event AvailableOperatorJob(bytes32 jobHash, bytes payload);

  /**
   * @dev Event is emitted for every time that a job is completed.
   */
  event FinishedOperatorJob(bytes32 jobHash, address operator);

  /**
   * @dev Event is emitted every time a cross-chain message is sent
   */
  event CrossChainMessageSent(bytes32 messageHash);

  /**
   * @dev Event is emitted if an operator job execution fails
   */
  event FailedOperatorJob(bytes32 jobHash);

  /**
   * @notice Execute an available operator job
   * @dev When making this call, if operating criteria is not met, the call will revert
   * @param bridgeInRequestPayload the entire cross chain message payload
   */
  function executeJob(bytes calldata bridgeInRequestPayload) external payable;

  function nonRevertingBridgeCall(address msgSender, bytes calldata payload) external payable;

  /**
   * @notice Receive a cross-chain message
   * @dev This function is restricted for use by Holograph Messaging Module only
   */
  function crossChainMessage(bytes calldata bridgeInRequestPayload) external payable;

  /**
   * @notice Calculate the amount of gas needed to execute a bridgeInRequest
   * @dev Use this function to estimate the amount of gas that will be used by the bridgeInRequest function
   *      Set a specific gas limit when making this call, subtract return value, to get total gas used
   *      Only use this with a static call
   * @param bridgeInRequestPayload abi encoded bytes making up the bridgeInRequest payload
   * @return the gas amount remaining after the static call is returned
   */
  function jobEstimator(bytes calldata bridgeInRequestPayload) external payable returns (uint256);

  /**
   * @notice Send cross chain bridge request message
   * @dev This function is restricted to only be callable by Holograph Bridge
   * @param gasLimit maximum amount of gas to spend for executing the beam on destination chain
   * @param gasPrice maximum amount of gas price (in destination chain native gas token) to pay on destination chain
   * @param toChain Holograph Chain ID where the beam is being sent to
   * @param nonce incremented number used to ensure job hashes are unique
   * @param holographableContract address of the contract for which the bridge request is being made
   * @param bridgeOutPayload bytes made up of the bridgeOutRequest payload
   */
  function send(
    uint256 gasLimit,
    uint256 gasPrice,
    uint32 toChain,
    address msgSender,
    uint256 nonce,
    address holographableContract,
    bytes calldata bridgeOutPayload
  ) external payable;

  /**
   * @notice Get the fees associated with sending specific payload
   * @dev Will provide exact costs on protocol and message side, combine the two to get total
   * @param toChain holograph chain id of destination chain for payload
   * @param gasLimit amount of gas to provide for executing payload on destination chain
   * @param gasPrice maximum amount to pay for gas price, can be set to 0 and will be chose automatically
   * @param crossChainPayload the entire packet being sent cross-chain
   * @return hlgFee the amount (in wei) of native gas token that will cost for finalizing job on destiantion chain
   * @return msgFee the amount (in wei) of native gas token that will cost for sending message to destiantion chain
   * @return dstGasPrice the amount (in wei) that destination message maximum gas price will be
   */
  function getMessageFee(
    uint32 toChain,
    uint256 gasLimit,
    uint256 gasPrice,
    bytes calldata crossChainPayload
  ) external view returns (uint256 hlgFee, uint256 msgFee, uint256 dstGasPrice);

  /**
   * @notice Get the details for an available operator job
   * @dev The job hash is a keccak256 hash of the entire job payload
   * @param jobHash keccak256 hash of the job
   * @return an OperatorJob struct with details about a specific job
   */
  function getJobDetails(bytes32 jobHash) external view returns (OperatorJob memory);

  /**
   * @notice Get number of pods available
   * @dev This returns number of pods that have been opened via bonding
   */
  function getTotalPods() external view returns (uint256 totalPods);

  /**
   * @notice Get total number of operators in a pod
   * @dev Use in conjunction with paginated getPodOperators function
   * @param pod the pod to query
   * @return total operators in a pod
   */
  function getPodOperatorsLength(uint256 pod) external view returns (uint256);

  /**
   * @notice Get list of operators in a pod
   * @dev Use paginated getPodOperators function instead if list gets too long
   * @param pod the pod to query
   * @return operators array list of operators in a pod
   */
  function getPodOperators(uint256 pod) external view returns (address[] memory operators);

  /**
   * @notice Get paginated list of operators in a pod
   * @dev Use in conjunction with getPodOperatorsLength to know the total length of results
   * @param pod the pod to query
   * @param index the array index to start from
   * @param length the length of result set to be (will be shorter if reached end of array)
   * @return operators a paginated array of operators
   */
  function getPodOperators(
    uint256 pod,
    uint256 index,
    uint256 length
  ) external view returns (address[] memory operators);

  /**
   * @notice Check the base and current price for bonding to a particular pod
   * @dev Useful for understanding what is required for bonding to a pod
   * @param pod the pod to get bonding amounts for
   * @return base the base bond amount required for a pod
   * @return current the current bond amount required for a pod
   */
  function getPodBondAmounts(uint256 pod) external view returns (uint256 base, uint256 current);

  /**
   * @notice Get an operator's currently bonded amount
   * @dev Useful for checking how much an operator has bonded
   * @param operator address of operator to check
   * @return amount total number of utility token bonded
   */
  function getBondedAmount(address operator) external view returns (uint256 amount);

  /**
   * @notice Get an operator's currently bonded pod
   * @dev Useful for checking if an operator is currently bonded
   * @param operator address of operator to check
   * @return pod number that operator is bonded on, returns zero if not bonded or selected for job
   */
  function getBondedPod(address operator) external view returns (uint256 pod);

  /**
   * @notice Get an operator's currently bonded pod index
   * @dev Useful for checking if an operator is a fallback for active job
   * @param operator address of operator to check
   * @return index currently bonded pod's operator index, returns zero if not in pod or moved out for active job
   */
  function getBondedPodIndex(address operator) external view returns (uint256 index);

  /**
   * @notice Topup a bonded operator with more utility tokens
   * @dev Useful function if an operator got slashed and wants to add a safety buffer to not get unbonded
   * @param operator address of operator to topup
   * @param amount utility token amount to add
   */
  function topupUtilityToken(address operator, uint256 amount) external;

  /**
   * @notice Bond utility tokens and become an operator
   * @dev An operator can only bond to one pod at a time, per network
   * @param operator address of operator to bond (can be an ownable smart contract)
   * @param amount utility token amount to bond (can be greater than minimum)
   * @param pod number of pod to bond to (can be for one that does not exist yet)
   */
  function bondUtilityToken(address operator, uint256 amount, uint256 pod) external;

  /**
   * @notice Unbond HLG utility tokens and stop being an operator
   * @dev A bonded operator selected for a job cannot unbond until they complete the job, or are slashed
   * @param operator address of operator to unbond
   * @param recipient address where to send the bonded tokens
   */
  function unbondUtilityToken(address operator, address recipient) external;

  /**
   * @notice Get the address of the Holograph Bridge module
   * @dev Used for beaming holographable assets cross-chain
   */
  function getBridge() external view returns (address bridge);

  /**
   * @notice Update the Holograph Bridge module address
   * @param bridge address of the Holograph Bridge smart contract to use
   */
  function setBridge(address bridge) external;

  /**
   * @notice Get the Holograph Protocol contract
   * @dev Used for storing a reference to all the primary modules and variables of the protocol
   */
  function getHolograph() external view returns (address holograph);

  /**
   * @notice Update the Holograph Protocol contract address
   * @param holograph address of the Holograph Protocol smart contract to use
   */
  function setHolograph(address holograph) external;

  /**
   * @notice Get the address of the Holograph Interfaces module
   * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules
   */
  function getInterfaces() external view returns (address interfaces);

  /**
   * @notice Update the Holograph Interfaces module address
   * @param interfaces address of the Holograph Interfaces smart contract to use
   */
  function setInterfaces(address interfaces) external;

  /**
   * @notice Get the address of the Holograph Messaging Module
   * @dev All cross-chain message requests will get forwarded to this adress
   */
  function getMessagingModule() external view returns (address messagingModule);

  /**
   * @notice Update the Holograph Messaging Module address
   * @param messagingModule address of the LayerZero Endpoint to use
   */
  function setMessagingModule(address messagingModule) external;

  /**
   * @notice Get the Holograph Registry module
   * @dev This module stores a reference for all deployed holographable smart contracts
   */
  function getRegistry() external view returns (address registry);

  /**
   * @notice Update the Holograph Registry module address
   * @param registry address of the Holograph Registry smart contract to use
   */
  function setRegistry(address registry) external;

  /**
   * @notice Get the Holograph Utility Token address
   * @dev This is the official utility token of the Holograph Protocol
   */
  function getUtilityToken() external view returns (address utilityToken);

  /**
   * @notice Update the Holograph Utility Token address
   * @param utilityToken address of the Holograph Utility Token smart contract to use
   */
  function setUtilityToken(address utilityToken) external;

  /**
   * @notice Get the Minimum Gas Price
   * @dev This amount is used as the value that will define a job as underpriced is lower than
   */
  function getMinGasPrice() external view returns (uint256 minGasPrice);

  /**
   * @notice Update the Minimum Gas Price
   * @param minGasPrice amount to set for minimum gas price
   */
  function setMinGasPrice(uint256 minGasPrice) external;
}

File 21 of 24 : HolographRegistryInterface.sol
// SPDX-License-Identifier: UNLICENSED
/*

                         ┌───────────┐
                         │ HOLOGRAPH │
                         └───────────┘
╔═════════════════════════════════════════════════════════════╗
║                                                             ║
║                            / ^ \                            ║
║                            ~~*~~            ¸               ║
║                         [ '<>:<>' ]         │░░░            ║
║               ╔╗           _/"\_           ╔╣               ║
║             ┌─╬╬─┐          """          ┌─╬╬─┐             ║
║          ┌─┬┘ ╠╣ └┬─┐       \_/       ┌─┬┘ ╠╣ └┬─┐          ║
║       ┌─┬┘ │  ╠╣  │ └┬─┐           ┌─┬┘ │  ╠╣  │ └┬─┐       ║
║    ┌─┬┘ │  │  ╠╣  │  │ └┬─┐     ┌─┬┘ │  │  ╠╣  │  │ └┬─┐    ║
║ ┌─┬┘ │  │  │  ╠╣  │  │  │ └┬┐ ┌┬┘ │  │  │  ╠╣  │  │  │ └┬─┐ ║
╠┬┘ │  │  │  │  ╠╣  │  │  │  │└¤┘│  │  │  │  ╠╣  │  │  │  │ └┬╣
║│  │  │  │  │  ╠╣  │  │  │  │   │  │  │  │  ╠╣  │  │  │  │  │║
╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣
╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣
║               ╠╣                           ╠╣               ║
║               ╠╣                           ╠╣               ║
║    ,          ╠╣     ,        ,'      *    ╠╣               ║
║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║
╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝
     - one protocol, one bridge = infinite possibilities -


 ***************************************************************

 DISCLAIMER: U.S Patent Pending

 LICENSE: Holograph Limited Public License (H-LPL)

 https://holograph.xyz/licenses/h-lpl/1.0.0

 This license governs use of the accompanying software. If you
 use the software, you accept this license. If you do not accept
 the license, you are not permitted to use the software.

 1. Definitions

 The terms "reproduce," "reproduction," "derivative works," and
 "distribution" have the same meaning here as under U.S.
 copyright law. A "contribution" is the original software, or
 any additions or changes to the software. A "contributor" is
 any person that distributes its contribution under this
 license. "Licensed patents" are a contributor’s patent claims
 that read directly on its contribution.

 2. Grant of Rights

 A) Copyright Grant- Subject to the terms of this license,
 including the license conditions and limitations in sections 3
 and 4, each contributor grants you a non-exclusive, worldwide,
 royalty-free copyright license to reproduce its contribution,
 prepare derivative works of its contribution, and distribute
 its contribution or any derivative works that you create.
 B) Patent Grant- Subject to the terms of this license,
 including the license conditions and limitations in section 3,
 each contributor grants you a non-exclusive, worldwide,
 royalty-free license under its licensed patents to make, have
 made, use, sell, offer for sale, import, and/or otherwise
 dispose of its contribution in the software or derivative works
 of the contribution in the software.

 3. Conditions and Limitations

 A) No Trademark License- This license does not grant you rights
 to use any contributors’ name, logo, or trademarks.
 B) If you bring a patent claim against any contributor over
 patents that you claim are infringed by the software, your
 patent license from such contributor is terminated with
 immediate effect.
 C) If you distribute any portion of the software, you must
 retain all copyright, patent, trademark, and attribution
 notices that are present in the software.
 D) If you distribute any portion of the software in source code
 form, you may do so only under this license by including a
 complete copy of this license with your distribution. If you
 distribute any portion of the software in compiled or object
 code form, you may only do so under a license that complies
 with this license.
 E) The software is licensed “as-is.” You bear all risks of
 using it. The contributors give no express warranties,
 guarantees, or conditions. You may have additional consumer
 rights under your local laws which this license cannot change.
 To the extent permitted under your local laws, the contributors
 exclude all implied warranties, including those of
 merchantability, fitness for a particular purpose and
 non-infringement.

 4. (F) Platform Limitation- The licenses granted in sections
 2.A & 2.B extend only to the software or derivative works that
 you create that run on a Holograph system product.

 ***************************************************************

*/

pragma solidity 0.8.13;

interface HolographRegistryInterface {
  event HolographableContractEvent(address indexed _holographableContract, bytes _payload);

  function isHolographedContract(address smartContract) external view returns (bool);

  function isHolographedHashDeployed(bytes32 hash) external view returns (bool);

  function referenceContractTypeAddress(address contractAddress) external returns (bytes32);

  function getContractTypeAddress(bytes32 contractType) external view returns (address);

  function setContractTypeAddress(bytes32 contractType, address contractAddress) external;

  function getHolograph() external view returns (address holograph);

  function setHolograph(address holograph) external;

  function getHolographableContracts(uint256 index, uint256 length) external view returns (address[] memory contracts);

  function getHolographableContractsLength() external view returns (uint256);

  function getHolographedHashAddress(bytes32 hash) external view returns (address);

  function setHolographedHashAddress(bytes32 hash, address contractAddress) external;

  function getHToken(uint32 chainId) external view returns (address);

  function setHToken(uint32 chainId, address hToken) external;

  function getReservedContractTypeAddress(bytes32 contractType) external view returns (address contractTypeAddress);

  function setReservedContractTypeAddress(bytes32 hash, bool reserved) external;

  function setReservedContractTypeAddresses(bytes32[] calldata hashes, bool[] calldata reserved) external;

  function getUtilityToken() external view returns (address utilityToken);

  function setUtilityToken(address utilityToken) external;

  function holographableEvent(bytes calldata payload) external;
}

File 22 of 24 : InitializableInterface.sol
// SPDX-License-Identifier: UNLICENSED
/*

                         ┌───────────┐
                         │ HOLOGRAPH │
                         └───────────┘
╔═════════════════════════════════════════════════════════════╗
║                                                             ║
║                            / ^ \                            ║
║                            ~~*~~            ¸               ║
║                         [ '<>:<>' ]         │░░░            ║
║               ╔╗           _/"\_           ╔╣               ║
║             ┌─╬╬─┐          """          ┌─╬╬─┐             ║
║          ┌─┬┘ ╠╣ └┬─┐       \_/       ┌─┬┘ ╠╣ └┬─┐          ║
║       ┌─┬┘ │  ╠╣  │ └┬─┐           ┌─┬┘ │  ╠╣  │ └┬─┐       ║
║    ┌─┬┘ │  │  ╠╣  │  │ └┬─┐     ┌─┬┘ │  │  ╠╣  │  │ └┬─┐    ║
║ ┌─┬┘ │  │  │  ╠╣  │  │  │ └┬┐ ┌┬┘ │  │  │  ╠╣  │  │  │ └┬─┐ ║
╠┬┘ │  │  │  │  ╠╣  │  │  │  │└¤┘│  │  │  │  ╠╣  │  │  │  │ └┬╣
║│  │  │  │  │  ╠╣  │  │  │  │   │  │  │  │  ╠╣  │  │  │  │  │║
╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣
╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣
║               ╠╣                           ╠╣               ║
║               ╠╣                           ╠╣               ║
║    ,          ╠╣     ,        ,'      *    ╠╣               ║
║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║
╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝
     - one protocol, one bridge = infinite possibilities -


 ***************************************************************

 DISCLAIMER: U.S Patent Pending

 LICENSE: Holograph Limited Public License (H-LPL)

 https://holograph.xyz/licenses/h-lpl/1.0.0

 This license governs use of the accompanying software. If you
 use the software, you accept this license. If you do not accept
 the license, you are not permitted to use the software.

 1. Definitions

 The terms "reproduce," "reproduction," "derivative works," and
 "distribution" have the same meaning here as under U.S.
 copyright law. A "contribution" is the original software, or
 any additions or changes to the software. A "contributor" is
 any person that distributes its contribution under this
 license. "Licensed patents" are a contributor’s patent claims
 that read directly on its contribution.

 2. Grant of Rights

 A) Copyright Grant- Subject to the terms of this license,
 including the license conditions and limitations in sections 3
 and 4, each contributor grants you a non-exclusive, worldwide,
 royalty-free copyright license to reproduce its contribution,
 prepare derivative works of its contribution, and distribute
 its contribution or any derivative works that you create.
 B) Patent Grant- Subject to the terms of this license,
 including the license conditions and limitations in section 3,
 each contributor grants you a non-exclusive, worldwide,
 royalty-free license under its licensed patents to make, have
 made, use, sell, offer for sale, import, and/or otherwise
 dispose of its contribution in the software or derivative works
 of the contribution in the software.

 3. Conditions and Limitations

 A) No Trademark License- This license does not grant you rights
 to use any contributors’ name, logo, or trademarks.
 B) If you bring a patent claim against any contributor over
 patents that you claim are infringed by the software, your
 patent license from such contributor is terminated with
 immediate effect.
 C) If you distribute any portion of the software, you must
 retain all copyright, patent, trademark, and attribution
 notices that are present in the software.
 D) If you distribute any portion of the software in source code
 form, you may do so only under this license by including a
 complete copy of this license with your distribution. If you
 distribute any portion of the software in compiled or object
 code form, you may only do so under a license that complies
 with this license.
 E) The software is licensed “as-is.” You bear all risks of
 using it. The contributors give no express warranties,
 guarantees, or conditions. You may have additional consumer
 rights under your local laws which this license cannot change.
 To the extent permitted under your local laws, the contributors
 exclude all implied warranties, including those of
 merchantability, fitness for a particular purpose and
 non-infringement.

 4. (F) Platform Limitation- The licenses granted in sections
 2.A & 2.B extend only to the software or derivative works that
 you create that run on a Holograph system product.

 ***************************************************************

*/

pragma solidity 0.8.13;

/**
 * @title Initializable
 * @author https://github.com/holographxyz
 * @notice Use init instead of constructor
 * @dev This allows for use of init function to make one time initializations without the need of a constructor
 */
interface InitializableInterface {
  /**
   * @notice Used internally to initialize the contract instead of through a constructor
   * @dev This function is called by the deployer/factory when creating a contract
   * @param initPayload abi encoded payload to use for contract initilaization
   */
  function init(bytes memory initPayload) external returns (bytes4);
}

File 23 of 24 : Ownable.sol
// SPDX-License-Identifier: UNLICENSED
/*

                         ┌───────────┐
                         │ HOLOGRAPH │
                         └───────────┘
╔═════════════════════════════════════════════════════════════╗
║                                                             ║
║                            / ^ \                            ║
║                            ~~*~~            ¸               ║
║                         [ '<>:<>' ]         │░░░            ║
║               ╔╗           _/"\_           ╔╣               ║
║             ┌─╬╬─┐          """          ┌─╬╬─┐             ║
║          ┌─┬┘ ╠╣ └┬─┐       \_/       ┌─┬┘ ╠╣ └┬─┐          ║
║       ┌─┬┘ │  ╠╣  │ └┬─┐           ┌─┬┘ │  ╠╣  │ └┬─┐       ║
║    ┌─┬┘ │  │  ╠╣  │  │ └┬─┐     ┌─┬┘ │  │  ╠╣  │  │ └┬─┐    ║
║ ┌─┬┘ │  │  │  ╠╣  │  │  │ └┬┐ ┌┬┘ │  │  │  ╠╣  │  │  │ └┬─┐ ║
╠┬┘ │  │  │  │  ╠╣  │  │  │  │└¤┘│  │  │  │  ╠╣  │  │  │  │ └┬╣
║│  │  │  │  │  ╠╣  │  │  │  │   │  │  │  │  ╠╣  │  │  │  │  │║
╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣
╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣
║               ╠╣                           ╠╣               ║
║               ╠╣                           ╠╣               ║
║    ,          ╠╣     ,        ,'      *    ╠╣               ║
║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║
╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝
     - one protocol, one bridge = infinite possibilities -


 ***************************************************************

 DISCLAIMER: U.S Patent Pending

 LICENSE: Holograph Limited Public License (H-LPL)

 https://holograph.xyz/licenses/h-lpl/1.0.0

 This license governs use of the accompanying software. If you
 use the software, you accept this license. If you do not accept
 the license, you are not permitted to use the software.

 1. Definitions

 The terms "reproduce," "reproduction," "derivative works," and
 "distribution" have the same meaning here as under U.S.
 copyright law. A "contribution" is the original software, or
 any additions or changes to the software. A "contributor" is
 any person that distributes its contribution under this
 license. "Licensed patents" are a contributor’s patent claims
 that read directly on its contribution.

 2. Grant of Rights

 A) Copyright Grant- Subject to the terms of this license,
 including the license conditions and limitations in sections 3
 and 4, each contributor grants you a non-exclusive, worldwide,
 royalty-free copyright license to reproduce its contribution,
 prepare derivative works of its contribution, and distribute
 its contribution or any derivative works that you create.
 B) Patent Grant- Subject to the terms of this license,
 including the license conditions and limitations in section 3,
 each contributor grants you a non-exclusive, worldwide,
 royalty-free license under its licensed patents to make, have
 made, use, sell, offer for sale, import, and/or otherwise
 dispose of its contribution in the software or derivative works
 of the contribution in the software.

 3. Conditions and Limitations

 A) No Trademark License- This license does not grant you rights
 to use any contributors’ name, logo, or trademarks.
 B) If you bring a patent claim against any contributor over
 patents that you claim are infringed by the software, your
 patent license from such contributor is terminated with
 immediate effect.
 C) If you distribute any portion of the software, you must
 retain all copyright, patent, trademark, and attribution
 notices that are present in the software.
 D) If you distribute any portion of the software in source code
 form, you may do so only under this license by including a
 complete copy of this license with your distribution. If you
 distribute any portion of the software in compiled or object
 code form, you may only do so under a license that complies
 with this license.
 E) The software is licensed “as-is.” You bear all risks of
 using it. The contributors give no express warranties,
 guarantees, or conditions. You may have additional consumer
 rights under your local laws which this license cannot change.
 To the extent permitted under your local laws, the contributors
 exclude all implied warranties, including those of
 merchantability, fitness for a particular purpose and
 non-infringement.

 4. (F) Platform Limitation- The licenses granted in sections
 2.A & 2.B extend only to the software or derivative works that
 you create that run on a Holograph system product.

 ***************************************************************

*/

pragma solidity 0.8.13;

interface Ownable {
  event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

  function owner() external view returns (address);

  function transferOwnership(address _newOwner) external;

  function isOwner() external view returns (bool);

  function isOwner(address wallet) external view returns (bool);
}

File 24 of 24 : OperatorJob.sol
// SPDX-License-Identifier: UNLICENSED
/*

                         ┌───────────┐
                         │ HOLOGRAPH │
                         └───────────┘
╔═════════════════════════════════════════════════════════════╗
║                                                             ║
║                            / ^ \                            ║
║                            ~~*~~            ¸               ║
║                         [ '<>:<>' ]         │░░░            ║
║               ╔╗           _/"\_           ╔╣               ║
║             ┌─╬╬─┐          """          ┌─╬╬─┐             ║
║          ┌─┬┘ ╠╣ └┬─┐       \_/       ┌─┬┘ ╠╣ └┬─┐          ║
║       ┌─┬┘ │  ╠╣  │ └┬─┐           ┌─┬┘ │  ╠╣  │ └┬─┐       ║
║    ┌─┬┘ │  │  ╠╣  │  │ └┬─┐     ┌─┬┘ │  │  ╠╣  │  │ └┬─┐    ║
║ ┌─┬┘ │  │  │  ╠╣  │  │  │ └┬┐ ┌┬┘ │  │  │  ╠╣  │  │  │ └┬─┐ ║
╠┬┘ │  │  │  │  ╠╣  │  │  │  │└¤┘│  │  │  │  ╠╣  │  │  │  │ └┬╣
║│  │  │  │  │  ╠╣  │  │  │  │   │  │  │  │  ╠╣  │  │  │  │  │║
╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣
╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣
║               ╠╣                           ╠╣               ║
║               ╠╣                           ╠╣               ║
║    ,          ╠╣     ,        ,'      *    ╠╣               ║
║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║
╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝
     - one protocol, one bridge = infinite possibilities -


 ***************************************************************

 DISCLAIMER: U.S Patent Pending

 LICENSE: Holograph Limited Public License (H-LPL)

 https://holograph.xyz/licenses/h-lpl/1.0.0

 This license governs use of the accompanying software. If you
 use the software, you accept this license. If you do not accept
 the license, you are not permitted to use the software.

 1. Definitions

 The terms "reproduce," "reproduction," "derivative works," and
 "distribution" have the same meaning here as under U.S.
 copyright law. A "contribution" is the original software, or
 any additions or changes to the software. A "contributor" is
 any person that distributes its contribution under this
 license. "Licensed patents" are a contributor’s patent claims
 that read directly on its contribution.

 2. Grant of Rights

 A) Copyright Grant- Subject to the terms of this license,
 including the license conditions and limitations in sections 3
 and 4, each contributor grants you a non-exclusive, worldwide,
 royalty-free copyright license to reproduce its contribution,
 prepare derivative works of its contribution, and distribute
 its contribution or any derivative works that you create.
 B) Patent Grant- Subject to the terms of this license,
 including the license conditions and limitations in section 3,
 each contributor grants you a non-exclusive, worldwide,
 royalty-free license under its licensed patents to make, have
 made, use, sell, offer for sale, import, and/or otherwise
 dispose of its contribution in the software or derivative works
 of the contribution in the software.

 3. Conditions and Limitations

 A) No Trademark License- This license does not grant you rights
 to use any contributors’ name, logo, or trademarks.
 B) If you bring a patent claim against any contributor over
 patents that you claim are infringed by the software, your
 patent license from such contributor is terminated with
 immediate effect.
 C) If you distribute any portion of the software, you must
 retain all copyright, patent, trademark, and attribution
 notices that are present in the software.
 D) If you distribute any portion of the software in source code
 form, you may do so only under this license by including a
 complete copy of this license with your distribution. If you
 distribute any portion of the software in compiled or object
 code form, you may only do so under a license that complies
 with this license.
 E) The software is licensed “as-is.” You bear all risks of
 using it. The contributors give no express warranties,
 guarantees, or conditions. You may have additional consumer
 rights under your local laws which this license cannot change.
 To the extent permitted under your local laws, the contributors
 exclude all implied warranties, including those of
 merchantability, fitness for a particular purpose and
 non-infringement.

 4. (F) Platform Limitation- The licenses granted in sections
 2.A & 2.B extend only to the software or derivative works that
 you create that run on a Holograph system product.

 ***************************************************************

*/

pragma solidity 0.8.13;

struct OperatorJob {
  uint8 pod;
  uint16 blockTimes;
  address operator;
  uint40 startBlock;
  uint64 startTimestamp;
  uint16[5] fallbackOperators;
}

/*

uint		Digits	Max value
-----------------------------
uint8		3		255
uint16		5		65,535
uint24		8		16,777,215
uint32		10		4,294,967,295
uint40		13		1,099,511,627,775
uint48		15		281,474,976,710,655
uint56		17		72,057,594,037,927,935
uint64		20		18,446,744,073,709,551,615
uint72		22		4,722,366,482,869,645,213,695
uint80		25		1,208,925,819,614,629,174,706,175
uint88		27		309,485,009,821,345,068,724,781,055
uint96		29		79,228,162,514,264,337,593,543,950,335
...
uint128		39		340,282,366,920,938,463,463,374,607,431,768,211,455
...
uint256		78		115,792,089,237,316,195,423,570,985,008,687,907,853,269,984,665,640,564,039,457,584,007,913,129,639,935

*/

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 999999
  },
  "metadata": {
    "bytecodeHash": "none",
    "useLiteralContent": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "remappings": [
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "erc721a-upgradeable/=erc721a-upgradeable/",
    "forge-std/=lib/forge-std/src/"
  ],
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"jobHash","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"payload","type":"bytes"}],"name":"AvailableOperatorJob","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"messageHash","type":"bytes32"}],"name":"CrossChainMessageSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"jobHash","type":"bytes32"}],"name":"FailedOperatorJob","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"jobHash","type":"bytes32"},{"indexed":false,"internalType":"address","name":"operator","type":"address"}],"name":"FinishedOperatorJob","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"adminCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"pod","type":"uint256"}],"name":"bondUtilityToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"bridgeInRequestPayload","type":"bytes"}],"name":"crossChainMessage","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes","name":"bridgeInRequestPayload","type":"bytes"}],"name":"executeJob","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"getAdmin","outputs":[{"internalType":"address","name":"adminAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"getBondedAmount","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"getBondedPod","outputs":[{"internalType":"uint256","name":"pod","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"getBondedPodIndex","outputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBridge","outputs":[{"internalType":"address","name":"bridge","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getHolograph","outputs":[{"internalType":"address","name":"holograph","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getInterfaces","outputs":[{"internalType":"address","name":"interfaces","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"jobHash","type":"bytes32"}],"name":"getJobDetails","outputs":[{"components":[{"internalType":"uint8","name":"pod","type":"uint8"},{"internalType":"uint16","name":"blockTimes","type":"uint16"},{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint40","name":"startBlock","type":"uint40"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"uint16[5]","name":"fallbackOperators","type":"uint16[5]"}],"internalType":"struct OperatorJob","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"","type":"uint32"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"getMessageFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMessagingModule","outputs":[{"internalType":"address","name":"messagingModule","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMinGasPrice","outputs":[{"internalType":"uint256","name":"minGasPrice","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"pod","type":"uint256"}],"name":"getPodBondAmounts","outputs":[{"internalType":"uint256","name":"base","type":"uint256"},{"internalType":"uint256","name":"current","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"pod","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"length","type":"uint256"}],"name":"getPodOperators","outputs":[{"internalType":"address[]","name":"operators","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"pod","type":"uint256"}],"name":"getPodOperators","outputs":[{"internalType":"address[]","name":"operators","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"pod","type":"uint256"}],"name":"getPodOperatorsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRegistry","outputs":[{"internalType":"address","name":"registry","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalPods","outputs":[{"internalType":"uint256","name":"totalPods","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getUtilityToken","outputs":[{"internalType":"address","name":"utilityToken","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"initPayload","type":"bytes"}],"name":"init","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"bridgeInRequestPayload","type":"bytes"}],"name":"jobEstimator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"msgSender","type":"address"},{"internalType":"bytes","name":"payload","type":"bytes"}],"name":"nonRevertingBridgeCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes","name":"bridgeInRequestPayload","type":"bytes"}],"name":"recoverJob","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"gasLimit","type":"uint256"},{"internalType":"uint256","name":"gasPrice","type":"uint256"},{"internalType":"uint32","name":"toChain","type":"uint32"},{"internalType":"address","name":"msgSender","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"address","name":"holographableContract","type":"address"},{"internalType":"bytes","name":"bridgeOutPayload","type":"bytes"}],"name":"send","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"adminAddress","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bridge","type":"address"}],"name":"setBridge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"holograph","type":"address"}],"name":"setHolograph","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"interfaces","type":"address"}],"name":"setInterfaces","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"messagingModule","type":"address"}],"name":"setMessagingModule","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"minGasPrice","type":"uint256"}],"name":"setMinGasPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"registry","type":"address"}],"name":"setRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"utilityToken","type":"address"}],"name":"setUtilityToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"topupUtilityToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"recipient","type":"address"}],"name":"unbondUtilityToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b50614bf5806100206000396000f3fe6080604052600436106102885760003560e01c80636e9960c31161015357806390ac1866116100cb578063d2197bd31161007f578063ebac15f911610064578063ebac15f914610819578063f851a4401461084d578063ff1370d91461086257600080fd5b8063d2197bd3146107e4578063da8292d9146107f957600080fd5b8063a91ee0dc116100b0578063a91ee0dc1461079e578063b24b2afc146107be578063bf64a82d146107d157600080fd5b806390ac18661461073b57806391e0d46b1461075b57600080fd5b80637868674d116101225780638dd14802116101075780638dd14802146106b85780639013ae08146106d8578063905eceed146106f857600080fd5b80637868674d146106785780638b432e4e1461069857600080fd5b80636e9960c3146105ce578063704b6c0214610602578063761b48ec14610622578063778fd1d11461066557600080fd5b80633fb58819116102015780634ddf47d4116101b55780635ab1bd531161019a5780635ab1bd5314610567578063612a33721461059b578063696af2bf146105bb57600080fd5b80634ddf47d41461050357806357a781221461055457600080fd5b80634827ae0c116101e65780634827ae0c1461046657806348dfc8b71461049a578063493b07ef146104ce57600080fd5b80633fb588191461041f578063409aad691461045357600080fd5b806321cb8f371161025857806325d5cac81161023d57806325d5cac8146103b257806327aa01f5146103d25780632b4a75b4146103ff57600080fd5b806321cb8f371461037d578063254e10621461039f57600080fd5b8062626679146102945780630b239c4e146102ee5780630fffbaf31461031c57806311a33bda1461035057600080fd5b3661028f57005b600080fd5b3480156102a057600080fd5b507fbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c37545b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156102fa57600080fd5b5061030e610309366004614097565b61089d565b6040519081526020016102e5565b34801561032857600080fd5b507feb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9546102c4565b34801561035c57600080fd5b5061037061036b366004614097565b610940565b6040516102e591906140b0565b34801561038957600080fd5b5061039d61039836600461416f565b610a19565b005b61039d6103ad3660046141e4565b610bfd565b3480156103be57600080fd5b5061039d6103cd366004614226565b6110b5565b3480156103de57600080fd5b506103f26103ed366004614243565b61118f565b6040516102e5919061426f565b34801561040b57600080fd5b5061039d61041a366004614226565b611352565b34801561042b57600080fd5b507f264d744422f7427cd080572c35c848b6cd3a36da6b47519af89ef13098b12fc05461030e565b61039d6104613660046142db565b61142c565b34801561047257600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a546102c4565b3480156104a657600080fd5b507f54176250282e65985d205704ffce44a59efe61f7afd99e29fda50f55b48c061a546102c4565b3480156104da57600080fd5b506104ee6104e9366004614097565b611a0f565b604080519283526020830191909152016102e5565b34801561050f57600080fd5b5061052361051e3660046143a2565b611a41565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016102e5565b61039d6105623660046141e4565b611cc9565b34801561057357600080fd5b507fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7546102c4565b3480156105a757600080fd5b5061039d6105b6366004614471565b611e98565b61039d6105c93660046144aa565b61224f565b3480156105da57600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c9546102c4565b34801561060e57600080fd5b5061039d61061d366004614226565b612300565b34801561062e57600080fd5b5061030e61063d366004614226565b73ffffffffffffffffffffffffffffffffffffffff166000908152600e602052604090205490565b61039d6106733660046141e4565b6123da565b34801561068457600080fd5b506103f2610693366004614097565b612ebc565b3480156106a457600080fd5b5061039d6106b33660046144ff565b612fbf565b3480156106c457600080fd5b5061039d6106d3366004614226565b613529565b3480156106e457600080fd5b5061039d6106f3366004614226565b613603565b34801561070457600080fd5b5061030e610713366004614226565b73ffffffffffffffffffffffffffffffffffffffff166000908152600d602052604090205490565b34801561074757600080fd5b5061039d610756366004614097565b6136dd565b34801561076757600080fd5b5061030e610776366004614226565b73ffffffffffffffffffffffffffffffffffffffff166000908152600c602052604090205490565b3480156107aa57600080fd5b5061039d6107b9366004614226565b6137b7565b61030e6107cc3660046141e4565b613891565b61039d6107df3660046144aa565b6138eb565b3480156107f057600080fd5b50600b5461030e565b34801561080557600080fd5b5061039d610814366004614226565b6139c6565b34801561082557600080fd5b507fbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd1848827546102c4565b34801561085957600080fd5b506102c4613aa0565b34801561086e57600080fd5b5061088261087d366004614534565b613acf565b604080519384526020840192909252908201526060016102e5565b600b54600090821115610911576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f484f4c4f47524150483a20706f6420646f6573206e6f7420657869737400000060448201526064015b60405180910390fd5b600b61091e6001846145cd565b8154811061092e5761092e6145e4565b60009182526020909120015492915050565b610948613f0d565b50600090815260076020908152604080832054815160c08101835260f882901c8152845461ffff9081168286015263ffffffff60d884901c16865260098552948390205473ffffffffffffffffffffffffffffffffffffffff168184015264ffffffffff60b083901c1660608083019190915267ffffffffffffffff601084901c16608080840191909152845160a0818101875285811c89168252609086901c89169782019790975284821c881695810195909552607084901c87168583015292901c909416908201529082015290565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c60205260408120549003610aa7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a206f70657261746f72206e6f7420626f6e64656400006044820152606401610908565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600e602052604090208054820190557fbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c37546040517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526044810183905273ffffffffffffffffffffffffffffffffffffffff91909116906323b872dd906064016020604051808303816000875af1158015610b6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b939190614613565b610bf9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f47524150483a20746f6b656e207472616e73666572206661696c65646044820152606401610908565b5050565b7f54176250282e65985d205704ffce44a59efe61f7afd99e29fda50f55b48c061a5473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610c6b575073e9e30a0ad0d8af5cf2606ea720052e28d6fcbaaf33145b610cd1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a206d6573736167696e67206f6e6c792063616c6c00006044820152606401610908565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820101356000610d217f264d744422f7427cd080572c35c848b6cd3a36da6b47519af89ef13098b12fc05490565b8210905060008484604051610d37929190614635565b604051908190039020600a805463ffffffff808216600101167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000009091161790559050600081610dac7f1cda64803f3b43503042e00863791e8d996666552d5855a78d53ee1dd4b3286d80546001019081905590565b60408051602081019390935282015243606082015242608082015260a001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905280516020918201209250608083901c916fffffffffffffffffffffffffffffffff841691610e2f91838501910190815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190528051602090910120600b549093506000908381610e7c57610e7c614645565b0690506000600b8281548110610e9457610e946145e4565b6000918252602082200154915087610ebb57818481610eb557610eb5614645565b06610ebe565b60005b9050600b8381548110610ed357610ed36145e4565b906000526020600020018181548110610eee57610eee6145e4565b6000918252602080832090910154600a5463ffffffff1683526009909152604090912080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055610f5d8382613b14565b6001821115610f8c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909101905b4260101b606089610fa857610fa388856005613dd2565b610fab565b60005b901b60708a610fc557610fc089866004613dd2565b610fc8565b60005b901b60808b610fe257610fdd8a876003613dd2565b610fe5565b60005b901b60908c610fff57610ffa8b886002613dd2565b611002565b60005b901b60a08d61101c576110178c896001613dd2565b61101f565b60005b901b60b043901b60d8600a60009054906101000a900463ffffffff1663ffffffff16901b60f88b600101901b171717171717171760001760076000898152602001908152602001600020819055507f4422a85db963f113e500bc4ada8f9e9f1a7bcd57cbec6907fbb2bf6aaf5878ff878c8c6040516110a0939291906146bd565b60405180910390a15050505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461116b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e00006044820152606401610908565b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55565b600b546060908411156111fe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f484f4c4f47524150483a20706f6420646f6573206e6f742065786973740000006044820152606401610908565b83611208816146e0565b9450506000600b8581548110611220576112206145e4565b6000918252602090912001549050806112398486614715565b111561124c5761124984826145cd565b92505b8267ffffffffffffffff81111561126557611265614373565b60405190808252806020026020018201604052801561128e578160200160208202803683370190505b50915060005b8381101561134957600b86815481106112af576112af6145e4565b9060005260206000200181866112c59190614715565b815481106112d5576112d56145e4565b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16838281518110611312576113126145e4565b73ffffffffffffffffffffffffffffffffffffffff90921660209283029190910190910152806113418161472d565b915050611294565b50509392505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611408576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e00006044820152606401610908565b7f54176250282e65985d205704ffce44a59efe61f7afd99e29fda50f55b48c061a55565b7feb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146114e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f484f4c4f47524150483a20627269646765206f6e6c792063616c6c00000000006044820152606401610908565b600061150c7f54176250282e65985d205704ffce44a59efe61f7afd99e29fda50f55b48c061a5490565b905060008173ffffffffffffffffffffffffffffffffffffffff16638c19a89f898c8c88886040518663ffffffff1660e01b8152600401611551959493929190614765565b602060405180830381865afa15801561156e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611592919061479c565b905060006115be7fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e75490565b73ffffffffffffffffffffffffffffffffffffffff1663949d53a76116017fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a5490565b73ffffffffffffffffffffffffffffffffffffffff1663381b5f466040518163ffffffff1660e01b8152600401602060405180830381865afa15801561164b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061166f91906147b5565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815263ffffffff919091166004820152602401602060405180830381865afa1580156116c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ed91906147d2565b9050348210611758576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f484f4c4f47524150483a206e6f7420656e6f7567682076616c756500000000006044820152606401610908565b60405173ffffffffffffffffffffffffffffffffffffffff82169083156108fc029084906000818181858888f1935050505015801561179b573d6000803e3d6000fd5b5060007f16f1be7000000000000000000000000000000000000000000000000000000000886117e87fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a5490565b73ffffffffffffffffffffffffffffffffffffffff1663381b5f466040518163ffffffff1660e01b8152600401602060405180830381865afa158015611832573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061185691906147b5565b898560008860018d8d604051602401611877999897969594939291906147ef565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090951694909417909352519092506119099183918f918f910161488e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052905073ffffffffffffffffffffffffffffffffffffffff8416630a0542ef61195f85346145cd565b8e8e8e8e61196d8a346145cd565b886040518863ffffffff1660e01b815260040161198f969594939291906148b5565b6000604051808303818588803b1580156119a857600080fd5b505af11580156119bc573d6000803e3d6000fd5b50505050507f0f5759b4182507dcfc771071166f98d7ca331262e5134eaa74b676adce2138b781805190602001206040516119f991815260200190565b60405180910390a1505050505050505050505050565b600080611a25611a206001856145cd565b613df2565b9150611a3a611a356001856145cd565b613e15565b9050915091565b6000611a6b7f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b15611ad2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a20616c726561647920696e697469616c697a656400006044820152606401610908565b60008060008060008087806020019051810190611aef9190614945565b327f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c9557feb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f98690557fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a8590557fbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd18488278490557fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e78390557fbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c378290557f264d744422f7427cd080572c35c848b6cd3a36da6b47519af89ef13098b12fc0819055603c600090815568056bc75e2d631000006001908155600280556103e8600355600a60045560646005556040805180820190915260208101928352918252969c50949a5092985090965094509250611c4591600b9190613f49565b5060008052600c60205260017f13649b2456f1b42fef0f0040b3aaeabcd21a76a0f3f5defd4f583839455116e855611c9c60017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d400000000000000000000000000000000000000000000000000000000979650505050505050565b60008282604051611cdb929190614635565b604080519182900390912060008181526008602052919091205490915060ff16611d61576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f484f4c4f47524150483a20696e76616c6964207265636f76657279206a6f62006044820152606401610908565b6000611d8b7feb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f95490565b73ffffffffffffffffffffffffffffffffffffffff16348585604051611db2929190614635565b60006040518083038185875af1925050503d8060008114611def576040519150601f19603f3d011682016040523d82523d6000602084013e611df4565b606091505b5050905080611e5f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f484f4c4f47524150483a207265636f76657279206661696c65640000000000006044820152606401610908565b50600090815260086020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555050565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c60205260408120549003611f26576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a206f70657261746f72206e6f7420626f6e64656400006044820152606401610908565b3373ffffffffffffffffffffffffffffffffffffffff8316146120b557611f4c82613ed3565b611fb2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f47524150483a206f70657261746f72206e6f7420636f6e74726163746044820152606401610908565b3373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612014573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061203891906147d2565b73ffffffffffffffffffffffffffffffffffffffff16146120b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f484f4c4f47524150483a2073656e646572206e6f74206f776e657200000000006044820152606401610908565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600e60209081526040808320805490849055600c90925290912054612127906120fc906001906145cd565b73ffffffffffffffffffffffffffffffffffffffff85166000908152600d6020526040902054613b14565b7fbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c37546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015260248201849052919091169063a9059cbb906044016020604051808303816000875af11580156121c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121e49190614613565b61224a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f47524150483a20746f6b656e207472616e73666572206661696c65646044820152606401610908565b505050565b3330146122b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f484f4c4f47524150483a206f70657261746f72206f6e6c792063616c6c0000006044820152606401610908565b602081038260003782608452600080604083036000347feb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9546040870351f18061039d57600080fd5b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146123b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e00006044820152606401610908565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b600082826040516123ec929190614635565b604051809103902090506000600760008381526020019081526020016000205411612473576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f484f4c4f47524150483a20696e76616c6964206a6f62000000000000000000006044820152606401610908565b8183017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0013560006124c984610940565b6000858152600760209081526040808320839055338352600e90915290819020549082015191925015159073ffffffffffffffffffffffffffffffffffffffff1615612cef578151600090612520906001906149c2565b60ff1690503373ffffffffffffffffffffffffffffffffffffffff16836040015173ffffffffffffffffffffffffffffffffffffffff1614612c28576000836080015167ffffffffffffffff164261257891906145cd565b90506000846020015161ffff168261259091906149e5565b9050600081116125fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f484f4c4f47524150483a206f70657261746f72206861732074696d65000000006044820152606401610908565b3a861015612666576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f484f4c4f47524150483a20676173207370696b652064657465637465640000006044820152606401610908565b60068110156128125760a08501516000906126826001846145cd565b60058110612692576126926145e4565b602002015161ffff1690506000811180156126ca5750600b84815481106126bb576126bb6145e4565b60009182526020909120015481105b15612792576000600b85815481106126e4576126e46145e4565b9060005260206000200182815481106126ff576126ff6145e4565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905033811461278c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f484f4c4f47524150483a20696e76616c69642066616c6c6261636b00000000006044820152606401610908565b50612810565b8551336000908152600c602052604090205460ff90911614612810576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f484f4c4f47524150483a20706f64206f6e6c792066616c6c6261636b000000006044820152606401610908565b505b600061281d84613df2565b905080600e6000886040015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461287291906145cd565b90915550507fbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c375473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8661294e577fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a5473ffffffffffffffffffffffffffffffffffffffff16633b19e84a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612925573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061294991906147d2565b612950565b335b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602481018490526044016020604051808303816000875af11580156129c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129e69190614613565b5060408087015173ffffffffffffffffffffffffffffffffffffffff166000908152600e60205220548111612b0457600b8481548110612a2857612a286145e4565b6000918252602080832060408a01519201805460018082018355918552919093200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055600b805486908110612aa057612aa06145e4565b600091825260209091200154612ab691906145cd565b6040808801805173ffffffffffffffffffffffffffffffffffffffff9081166000908152600d6020908152848220959095558a5192519091168152600c909352912060ff9091169055612c20565b60408087015173ffffffffffffffffffffffffffffffffffffffff166000908152600e60205220548015612c1e5760408781015173ffffffffffffffffffffffffffffffffffffffff166000908152600e602052908120557fbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c375460408089015190517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff91821660048201526024810184905291169063a9059cbb906044016020604051808303816000875af1158015612bf8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c1c9190614613565b505b505b505050612ced565b600b8181548110612c3b57612c3b6145e4565b60009182526020808320909101805460018181018355918452919092200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001633179055600b805483908110612c9557612c956145e4565b600091825260209091200154612cab91906145cd565b60408085015173ffffffffffffffffffffffffffffffffffffffff166000908152600d6020908152828220939093558551338252600c9093522060ff90911690555b505b600660008154612cfe9061472d565b90915550604080518681523360208201527ffc3963369d694e97f35e33cc03fcd382bfa4dbb688ae43d318fcf344f479425e910160405180910390a1835a11612da3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a206e6f7420656e6f75676820676173206c65667400006044820152606401610908565b6040517f696af2bf000000000000000000000000000000000000000000000000000000008152309063696af2bf903490612de59033908c908c90600401614a20565b6000604051808303818588803b158015612dfe57600080fd5b505af193505050508015612e10575060015b612eb35760405133903480156108fc02916000818181858888f19350505050158015612e40573d6000803e3d6000fd5b506000858152600860205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055517f26dc03e6c4feb5e9d33804dc1646860c976c3aeabb458f4719c53dcbadbf44b590612eaa9087815260200190565b60405180910390a15b50505050505050565b600b54606090821115612f2b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f484f4c4f47524150483a20706f6420646f6573206e6f742065786973740000006044820152606401610908565b600b612f386001846145cd565b81548110612f4857612f486145e4565b90600052602060002001805480602002602001604051908101604052809291908181526020018280548015612fb357602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311612f88575b50505050509050919050565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600c6020526040902054158015613015575073ffffffffffffffffffffffffffffffffffffffff83166000908152600e6020526040902054155b61307b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f484f4c4f47524150483a206f70657261746f7220697320626f6e6465640000006044820152606401610908565b61308483613ed3565b1561318d57600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156130ec573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061311091906147d2565b73ffffffffffffffffffffffffffffffffffffffff160361318d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f484f4c4f47524150483a20636f6e7472616374206e6f74206f776e61626c65006044820152606401610908565b600061319b60018303613e15565b905082811115613207576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f47524150483a20626f6e6420616d6f756e7420746f6f20736d616c6c6044820152606401610908565b600b5482111561327657600b545b828110156132745760408051602081019091526000808252600b8054600181810183559190925261326b927f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db99092019190613fa0565b50600101613215565b505b61ffff8016600b6001840381548110613291576132916145e4565b60009182526020909120015410613304576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f484f4c4f47524150483a20746f6f206d616e79206f70657261746f72730000006044820152606401610908565b600b600183038154811061331a5761331a6145e4565b6000918252602080832091909101805460018082018355918452919092200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8716179055600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85019081106133ad576133ad6145e4565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff88168352600d8252604080842094909103909355600c8152828220859055600e90522083905561341e7fbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c375490565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526044810185905273ffffffffffffffffffffffffffffffffffffffff91909116906323b872dd906064016020604051808303816000875af1158015613499573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134bd9190614613565b613523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f47524150483a20746f6b656e207472616e73666572206661696c65646044820152606401610908565b50505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146135df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e00006044820152606401610908565b7feb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f955565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146136b9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e00006044820152606401610908565b7fbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c3755565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614613793576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e00006044820152606401610908565b7f264d744422f7427cd080572c35c848b6cd3a36da6b47519af89ef13098b12fc055565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461386d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e00006044820152606401610908565b7fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e755565b60006040820383600037600060e353600080604084036000347feb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9545af1600181036138e0573d6000803e3d6000fd5b505a60005260206000f35b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146139a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e00006044820152606401610908565b808260003760008082600034875af13d6000803e8080156139c1573d6000f35b3d6000fd5b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614613a7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e00006044820152606401610908565b7fbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd184882755565b6000613aca7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b600080600036600080376000803660007f54176250282e65985d205704ffce44a59efe61f7afd99e29fda50f55b48c061a545afa3d6000803e8080156139c1573d6000f35b8015610bf9576000600b8381548110613b2f57613b2f6145e4565b906000526020600020018281548110613b4a57613b4a6145e4565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16808352600c82526040808420849055600d909252908220829055600b805491935060019186908110613ba257613ba26145e4565b600091825260209091200154039050828114613ce857600b8481548110613bcb57613bcb6145e4565b906000526020600020018181548110613be657613be66145e4565b600091825260209091200154600b805473ffffffffffffffffffffffffffffffffffffffff9092169186908110613c1f57613c1f6145e4565b906000526020600020018481548110613c3a57613c3a6145e4565b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600d6000600b8781548110613c9a57613c9a6145e4565b906000526020600020018681548110613cb557613cb56145e4565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040019020555b600b8481548110613cfb57613cfb6145e4565b906000526020600020018181548110613d1657613d166145e4565b600091825260209091200180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055600b805485908110613d5b57613d5b6145e4565b90600052602060002001805480613d7457613d74614a50565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905501905550505050565b6000824383900340850181613de957613de9614645565b06949350505050565b600060015482600254613e059190614b9f565b613e0f9190614bab565b92915050565b60008060015483600254613e299190614b9f565b613e339190614bab565b600b549091508310613e455792915050565b6000613e52846002614b9f565b600354613e5f91906149e5565b90506000600b8581548110613e7657613e766145e4565b600091825260209091200154905081811115613eca57613e9682826145cd565b905060045481613ea691906149e5565b600554613eb390856149e5565b613ebd9190614bab565b613ec79084614715565b92505b50909392505050565b6000813f8015801590613f0657507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708114155b9392505050565b6040805160c08101825260008082526020820181905291810182905260608101829052608081019190915260a08101613f44614026565b905290565b828054828255906000526020600020908101928215613f90579160200282015b82811115613f90578251613f809083906001613fa0565b5091602001919060010190613f69565b50613f9c929150614044565b5090565b82805482825590600052602060002090810192821561401a579160200282015b8281111561401a57825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602090920191600190910190613fc0565b50613f9c929150614061565b6040518060a001604052806005906020820280368337509192915050565b80821115613f9c5760006140588282614076565b50600101614044565b5b80821115613f9c5760008155600101614062565b50805460008255906000526020600020908101906140949190614061565b50565b6000602082840312156140a957600080fd5b5035919050565b60006101408201905060ff835116825260208084015161ffff8082168386015273ffffffffffffffffffffffffffffffffffffffff604087015116604086015264ffffffffff606087015116606086015267ffffffffffffffff608087015116608086015260a0860151915060a0850160005b6005811015614142578351831682529284019290840190600101614123565b505050505092915050565b73ffffffffffffffffffffffffffffffffffffffff8116811461409457600080fd5b6000806040838503121561418257600080fd5b823561418d8161414d565b946020939093013593505050565b60008083601f8401126141ad57600080fd5b50813567ffffffffffffffff8111156141c557600080fd5b6020830191508360208285010111156141dd57600080fd5b9250929050565b600080602083850312156141f757600080fd5b823567ffffffffffffffff81111561420e57600080fd5b61421a8582860161419b565b90969095509350505050565b60006020828403121561423857600080fd5b8135613f068161414d565b60008060006060848603121561425857600080fd5b505081359360208301359350604090920135919050565b6020808252825182820181905260009190848201906040850190845b818110156142bd57835173ffffffffffffffffffffffffffffffffffffffff168352928401929184019160010161428b565b50909695505050505050565b63ffffffff8116811461409457600080fd5b60008060008060008060008060e0898b0312156142f757600080fd5b88359750602089013596506040890135614310816142c9565b955060608901356143208161414d565b94506080890135935060a08901356143378161414d565b925060c089013567ffffffffffffffff81111561435357600080fd5b61435f8b828c0161419b565b999c989b5096995094979396929594505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000602082840312156143b457600080fd5b813567ffffffffffffffff808211156143cc57600080fd5b818401915084601f8301126143e057600080fd5b8135818111156143f2576143f2614373565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561443857614438614373565b8160405282815287602084870101111561445157600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806040838503121561448457600080fd5b823561448f8161414d565b9150602083013561449f8161414d565b809150509250929050565b6000806000604084860312156144bf57600080fd5b83356144ca8161414d565b9250602084013567ffffffffffffffff8111156144e657600080fd5b6144f28682870161419b565b9497909650939450505050565b60008060006060848603121561451457600080fd5b833561451f8161414d565b95602085013595506040909401359392505050565b60008060008060006080868803121561454c57600080fd5b8535614557816142c9565b94506020860135935060408601359250606086013567ffffffffffffffff81111561458157600080fd5b61458d8882890161419b565b969995985093965092949392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000828210156145df576145df61459e565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006020828403121561462557600080fd5b81518015158114613f0657600080fd5b8183823760009101908152919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b8381526040602082015260006146d7604083018486614674565b95945050505050565b6000816146ef576146ef61459e565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b600082198211156147285761472861459e565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361475e5761475e61459e565b5060010190565b63ffffffff86168152846020820152836040820152608060608201526000614791608083018486614674565b979650505050505050565b6000602082840312156147ae57600080fd5b5051919050565b6000602082840312156147c757600080fd5b8151613f06816142c9565b6000602082840312156147e457600080fd5b8151613f068161414d565b60006101008b835263ffffffff8b16602084015273ffffffffffffffffffffffffffffffffffffffff808b166040850152808a1660608501528089166080850152508660a084015285151560c08401528060e08401526148528184018587614674565b9c9b505050505050505050505050565b60005b8381101561487d578181015183820152602001614865565b838111156135235750506000910152565b600084516148a0818460208901614862565b91909101928352506020820152604001919050565b86815285602082015263ffffffff8516604082015273ffffffffffffffffffffffffffffffffffffffff8416606082015282608082015260c060a0820152600082518060c084015261490e8160e0850160208701614862565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160e001979650505050505050565b60008060008060008060c0878903121561495e57600080fd5b86516149698161414d565b602088015190965061497a8161414d565b604088015190955061498b8161414d565b606088015190945061499c8161414d565b60808801519093506149ad8161414d565b8092505060a087015190509295509295509295565b600060ff821660ff8416808210156149dc576149dc61459e565b90039392505050565b600082614a1b577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b73ffffffffffffffffffffffffffffffffffffffff841681526040602082015260006146d7604083018486614674565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600181815b80851115614ad857817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115614abe57614abe61459e565b80851615614acb57918102915b93841c9390800290614a84565b509250929050565b600082614aef57506001613e0f565b81614afc57506000613e0f565b8160018114614b125760028114614b1c57614b38565b6001915050613e0f565b60ff841115614b2d57614b2d61459e565b50506001821b613e0f565b5060208310610133831016604e8410600b8410161715614b5b575081810a613e0f565b614b658383614a7f565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115614b9757614b9761459e565b029392505050565b6000613f068383614ae0565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614be357614be361459e565b50029056fea164736f6c634300080d000a

Deployed Bytecode

0x6080604052600436106102885760003560e01c80636e9960c31161015357806390ac1866116100cb578063d2197bd31161007f578063ebac15f911610064578063ebac15f914610819578063f851a4401461084d578063ff1370d91461086257600080fd5b8063d2197bd3146107e4578063da8292d9146107f957600080fd5b8063a91ee0dc116100b0578063a91ee0dc1461079e578063b24b2afc146107be578063bf64a82d146107d157600080fd5b806390ac18661461073b57806391e0d46b1461075b57600080fd5b80637868674d116101225780638dd14802116101075780638dd14802146106b85780639013ae08146106d8578063905eceed146106f857600080fd5b80637868674d146106785780638b432e4e1461069857600080fd5b80636e9960c3146105ce578063704b6c0214610602578063761b48ec14610622578063778fd1d11461066557600080fd5b80633fb58819116102015780634ddf47d4116101b55780635ab1bd531161019a5780635ab1bd5314610567578063612a33721461059b578063696af2bf146105bb57600080fd5b80634ddf47d41461050357806357a781221461055457600080fd5b80634827ae0c116101e65780634827ae0c1461046657806348dfc8b71461049a578063493b07ef146104ce57600080fd5b80633fb588191461041f578063409aad691461045357600080fd5b806321cb8f371161025857806325d5cac81161023d57806325d5cac8146103b257806327aa01f5146103d25780632b4a75b4146103ff57600080fd5b806321cb8f371461037d578063254e10621461039f57600080fd5b8062626679146102945780630b239c4e146102ee5780630fffbaf31461031c57806311a33bda1461035057600080fd5b3661028f57005b600080fd5b3480156102a057600080fd5b507fbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c37545b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156102fa57600080fd5b5061030e610309366004614097565b61089d565b6040519081526020016102e5565b34801561032857600080fd5b507feb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9546102c4565b34801561035c57600080fd5b5061037061036b366004614097565b610940565b6040516102e591906140b0565b34801561038957600080fd5b5061039d61039836600461416f565b610a19565b005b61039d6103ad3660046141e4565b610bfd565b3480156103be57600080fd5b5061039d6103cd366004614226565b6110b5565b3480156103de57600080fd5b506103f26103ed366004614243565b61118f565b6040516102e5919061426f565b34801561040b57600080fd5b5061039d61041a366004614226565b611352565b34801561042b57600080fd5b507f264d744422f7427cd080572c35c848b6cd3a36da6b47519af89ef13098b12fc05461030e565b61039d6104613660046142db565b61142c565b34801561047257600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a546102c4565b3480156104a657600080fd5b507f54176250282e65985d205704ffce44a59efe61f7afd99e29fda50f55b48c061a546102c4565b3480156104da57600080fd5b506104ee6104e9366004614097565b611a0f565b604080519283526020830191909152016102e5565b34801561050f57600080fd5b5061052361051e3660046143a2565b611a41565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016102e5565b61039d6105623660046141e4565b611cc9565b34801561057357600080fd5b507fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7546102c4565b3480156105a757600080fd5b5061039d6105b6366004614471565b611e98565b61039d6105c93660046144aa565b61224f565b3480156105da57600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c9546102c4565b34801561060e57600080fd5b5061039d61061d366004614226565b612300565b34801561062e57600080fd5b5061030e61063d366004614226565b73ffffffffffffffffffffffffffffffffffffffff166000908152600e602052604090205490565b61039d6106733660046141e4565b6123da565b34801561068457600080fd5b506103f2610693366004614097565b612ebc565b3480156106a457600080fd5b5061039d6106b33660046144ff565b612fbf565b3480156106c457600080fd5b5061039d6106d3366004614226565b613529565b3480156106e457600080fd5b5061039d6106f3366004614226565b613603565b34801561070457600080fd5b5061030e610713366004614226565b73ffffffffffffffffffffffffffffffffffffffff166000908152600d602052604090205490565b34801561074757600080fd5b5061039d610756366004614097565b6136dd565b34801561076757600080fd5b5061030e610776366004614226565b73ffffffffffffffffffffffffffffffffffffffff166000908152600c602052604090205490565b3480156107aa57600080fd5b5061039d6107b9366004614226565b6137b7565b61030e6107cc3660046141e4565b613891565b61039d6107df3660046144aa565b6138eb565b3480156107f057600080fd5b50600b5461030e565b34801561080557600080fd5b5061039d610814366004614226565b6139c6565b34801561082557600080fd5b507fbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd1848827546102c4565b34801561085957600080fd5b506102c4613aa0565b34801561086e57600080fd5b5061088261087d366004614534565b613acf565b604080519384526020840192909252908201526060016102e5565b600b54600090821115610911576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f484f4c4f47524150483a20706f6420646f6573206e6f7420657869737400000060448201526064015b60405180910390fd5b600b61091e6001846145cd565b8154811061092e5761092e6145e4565b60009182526020909120015492915050565b610948613f0d565b50600090815260076020908152604080832054815160c08101835260f882901c8152845461ffff9081168286015263ffffffff60d884901c16865260098552948390205473ffffffffffffffffffffffffffffffffffffffff168184015264ffffffffff60b083901c1660608083019190915267ffffffffffffffff601084901c16608080840191909152845160a0818101875285811c89168252609086901c89169782019790975284821c881695810195909552607084901c87168583015292901c909416908201529082015290565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c60205260408120549003610aa7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a206f70657261746f72206e6f7420626f6e64656400006044820152606401610908565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600e602052604090208054820190557fbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c37546040517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526044810183905273ffffffffffffffffffffffffffffffffffffffff91909116906323b872dd906064016020604051808303816000875af1158015610b6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b939190614613565b610bf9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f47524150483a20746f6b656e207472616e73666572206661696c65646044820152606401610908565b5050565b7f54176250282e65985d205704ffce44a59efe61f7afd99e29fda50f55b48c061a5473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610c6b575073e9e30a0ad0d8af5cf2606ea720052e28d6fcbaaf33145b610cd1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a206d6573736167696e67206f6e6c792063616c6c00006044820152606401610908565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820101356000610d217f264d744422f7427cd080572c35c848b6cd3a36da6b47519af89ef13098b12fc05490565b8210905060008484604051610d37929190614635565b604051908190039020600a805463ffffffff808216600101167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000009091161790559050600081610dac7f1cda64803f3b43503042e00863791e8d996666552d5855a78d53ee1dd4b3286d80546001019081905590565b60408051602081019390935282015243606082015242608082015260a001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529082905280516020918201209250608083901c916fffffffffffffffffffffffffffffffff841691610e2f91838501910190815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190528051602090910120600b549093506000908381610e7c57610e7c614645565b0690506000600b8281548110610e9457610e946145e4565b6000918252602082200154915087610ebb57818481610eb557610eb5614645565b06610ebe565b60005b9050600b8381548110610ed357610ed36145e4565b906000526020600020018181548110610eee57610eee6145e4565b6000918252602080832090910154600a5463ffffffff1683526009909152604090912080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055610f5d8382613b14565b6001821115610f8c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909101905b4260101b606089610fa857610fa388856005613dd2565b610fab565b60005b901b60708a610fc557610fc089866004613dd2565b610fc8565b60005b901b60808b610fe257610fdd8a876003613dd2565b610fe5565b60005b901b60908c610fff57610ffa8b886002613dd2565b611002565b60005b901b60a08d61101c576110178c896001613dd2565b61101f565b60005b901b60b043901b60d8600a60009054906101000a900463ffffffff1663ffffffff16901b60f88b600101901b171717171717171760001760076000898152602001908152602001600020819055507f4422a85db963f113e500bc4ada8f9e9f1a7bcd57cbec6907fbb2bf6aaf5878ff878c8c6040516110a0939291906146bd565b60405180910390a15050505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461116b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e00006044820152606401610908565b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55565b600b546060908411156111fe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f484f4c4f47524150483a20706f6420646f6573206e6f742065786973740000006044820152606401610908565b83611208816146e0565b9450506000600b8581548110611220576112206145e4565b6000918252602090912001549050806112398486614715565b111561124c5761124984826145cd565b92505b8267ffffffffffffffff81111561126557611265614373565b60405190808252806020026020018201604052801561128e578160200160208202803683370190505b50915060005b8381101561134957600b86815481106112af576112af6145e4565b9060005260206000200181866112c59190614715565b815481106112d5576112d56145e4565b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16838281518110611312576113126145e4565b73ffffffffffffffffffffffffffffffffffffffff90921660209283029190910190910152806113418161472d565b915050611294565b50509392505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611408576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e00006044820152606401610908565b7f54176250282e65985d205704ffce44a59efe61f7afd99e29fda50f55b48c061a55565b7feb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146114e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f484f4c4f47524150483a20627269646765206f6e6c792063616c6c00000000006044820152606401610908565b600061150c7f54176250282e65985d205704ffce44a59efe61f7afd99e29fda50f55b48c061a5490565b905060008173ffffffffffffffffffffffffffffffffffffffff16638c19a89f898c8c88886040518663ffffffff1660e01b8152600401611551959493929190614765565b602060405180830381865afa15801561156e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611592919061479c565b905060006115be7fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e75490565b73ffffffffffffffffffffffffffffffffffffffff1663949d53a76116017fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a5490565b73ffffffffffffffffffffffffffffffffffffffff1663381b5f466040518163ffffffff1660e01b8152600401602060405180830381865afa15801561164b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061166f91906147b5565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815263ffffffff919091166004820152602401602060405180830381865afa1580156116c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ed91906147d2565b9050348210611758576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f484f4c4f47524150483a206e6f7420656e6f7567682076616c756500000000006044820152606401610908565b60405173ffffffffffffffffffffffffffffffffffffffff82169083156108fc029084906000818181858888f1935050505015801561179b573d6000803e3d6000fd5b5060007f16f1be7000000000000000000000000000000000000000000000000000000000886117e87fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a5490565b73ffffffffffffffffffffffffffffffffffffffff1663381b5f466040518163ffffffff1660e01b8152600401602060405180830381865afa158015611832573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061185691906147b5565b898560008860018d8d604051602401611877999897969594939291906147ef565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090951694909417909352519092506119099183918f918f910161488e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052905073ffffffffffffffffffffffffffffffffffffffff8416630a0542ef61195f85346145cd565b8e8e8e8e61196d8a346145cd565b886040518863ffffffff1660e01b815260040161198f969594939291906148b5565b6000604051808303818588803b1580156119a857600080fd5b505af11580156119bc573d6000803e3d6000fd5b50505050507f0f5759b4182507dcfc771071166f98d7ca331262e5134eaa74b676adce2138b781805190602001206040516119f991815260200190565b60405180910390a1505050505050505050505050565b600080611a25611a206001856145cd565b613df2565b9150611a3a611a356001856145cd565b613e15565b9050915091565b6000611a6b7f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b15611ad2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a20616c726561647920696e697469616c697a656400006044820152606401610908565b60008060008060008087806020019051810190611aef9190614945565b327f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c9557feb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f98690557fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a8590557fbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd18488278490557fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e78390557fbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c378290557f264d744422f7427cd080572c35c848b6cd3a36da6b47519af89ef13098b12fc0819055603c600090815568056bc75e2d631000006001908155600280556103e8600355600a60045560646005556040805180820190915260208101928352918252969c50949a5092985090965094509250611c4591600b9190613f49565b5060008052600c60205260017f13649b2456f1b42fef0f0040b3aaeabcd21a76a0f3f5defd4f583839455116e855611c9c60017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d400000000000000000000000000000000000000000000000000000000979650505050505050565b60008282604051611cdb929190614635565b604080519182900390912060008181526008602052919091205490915060ff16611d61576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f484f4c4f47524150483a20696e76616c6964207265636f76657279206a6f62006044820152606401610908565b6000611d8b7feb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f95490565b73ffffffffffffffffffffffffffffffffffffffff16348585604051611db2929190614635565b60006040518083038185875af1925050503d8060008114611def576040519150601f19603f3d011682016040523d82523d6000602084013e611df4565b606091505b5050905080611e5f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f484f4c4f47524150483a207265636f76657279206661696c65640000000000006044820152606401610908565b50600090815260086020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555050565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c60205260408120549003611f26576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a206f70657261746f72206e6f7420626f6e64656400006044820152606401610908565b3373ffffffffffffffffffffffffffffffffffffffff8316146120b557611f4c82613ed3565b611fb2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f47524150483a206f70657261746f72206e6f7420636f6e74726163746044820152606401610908565b3373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612014573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061203891906147d2565b73ffffffffffffffffffffffffffffffffffffffff16146120b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f484f4c4f47524150483a2073656e646572206e6f74206f776e657200000000006044820152606401610908565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600e60209081526040808320805490849055600c90925290912054612127906120fc906001906145cd565b73ffffffffffffffffffffffffffffffffffffffff85166000908152600d6020526040902054613b14565b7fbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c37546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015260248201849052919091169063a9059cbb906044016020604051808303816000875af11580156121c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121e49190614613565b61224a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f47524150483a20746f6b656e207472616e73666572206661696c65646044820152606401610908565b505050565b3330146122b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f484f4c4f47524150483a206f70657261746f72206f6e6c792063616c6c0000006044820152606401610908565b602081038260003782608452600080604083036000347feb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9546040870351f18061039d57600080fd5b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146123b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e00006044820152606401610908565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b600082826040516123ec929190614635565b604051809103902090506000600760008381526020019081526020016000205411612473576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f484f4c4f47524150483a20696e76616c6964206a6f62000000000000000000006044820152606401610908565b8183017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0013560006124c984610940565b6000858152600760209081526040808320839055338352600e90915290819020549082015191925015159073ffffffffffffffffffffffffffffffffffffffff1615612cef578151600090612520906001906149c2565b60ff1690503373ffffffffffffffffffffffffffffffffffffffff16836040015173ffffffffffffffffffffffffffffffffffffffff1614612c28576000836080015167ffffffffffffffff164261257891906145cd565b90506000846020015161ffff168261259091906149e5565b9050600081116125fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f484f4c4f47524150483a206f70657261746f72206861732074696d65000000006044820152606401610908565b3a861015612666576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f484f4c4f47524150483a20676173207370696b652064657465637465640000006044820152606401610908565b60068110156128125760a08501516000906126826001846145cd565b60058110612692576126926145e4565b602002015161ffff1690506000811180156126ca5750600b84815481106126bb576126bb6145e4565b60009182526020909120015481105b15612792576000600b85815481106126e4576126e46145e4565b9060005260206000200182815481106126ff576126ff6145e4565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905033811461278c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f484f4c4f47524150483a20696e76616c69642066616c6c6261636b00000000006044820152606401610908565b50612810565b8551336000908152600c602052604090205460ff90911614612810576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f484f4c4f47524150483a20706f64206f6e6c792066616c6c6261636b000000006044820152606401610908565b505b600061281d84613df2565b905080600e6000886040015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461287291906145cd565b90915550507fbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c375473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8661294e577fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a5473ffffffffffffffffffffffffffffffffffffffff16633b19e84a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612925573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061294991906147d2565b612950565b335b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602481018490526044016020604051808303816000875af11580156129c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129e69190614613565b5060408087015173ffffffffffffffffffffffffffffffffffffffff166000908152600e60205220548111612b0457600b8481548110612a2857612a286145e4565b6000918252602080832060408a01519201805460018082018355918552919093200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055600b805486908110612aa057612aa06145e4565b600091825260209091200154612ab691906145cd565b6040808801805173ffffffffffffffffffffffffffffffffffffffff9081166000908152600d6020908152848220959095558a5192519091168152600c909352912060ff9091169055612c20565b60408087015173ffffffffffffffffffffffffffffffffffffffff166000908152600e60205220548015612c1e5760408781015173ffffffffffffffffffffffffffffffffffffffff166000908152600e602052908120557fbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c375460408089015190517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff91821660048201526024810184905291169063a9059cbb906044016020604051808303816000875af1158015612bf8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c1c9190614613565b505b505b505050612ced565b600b8181548110612c3b57612c3b6145e4565b60009182526020808320909101805460018181018355918452919092200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001633179055600b805483908110612c9557612c956145e4565b600091825260209091200154612cab91906145cd565b60408085015173ffffffffffffffffffffffffffffffffffffffff166000908152600d6020908152828220939093558551338252600c9093522060ff90911690555b505b600660008154612cfe9061472d565b90915550604080518681523360208201527ffc3963369d694e97f35e33cc03fcd382bfa4dbb688ae43d318fcf344f479425e910160405180910390a1835a11612da3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a206e6f7420656e6f75676820676173206c65667400006044820152606401610908565b6040517f696af2bf000000000000000000000000000000000000000000000000000000008152309063696af2bf903490612de59033908c908c90600401614a20565b6000604051808303818588803b158015612dfe57600080fd5b505af193505050508015612e10575060015b612eb35760405133903480156108fc02916000818181858888f19350505050158015612e40573d6000803e3d6000fd5b506000858152600860205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055517f26dc03e6c4feb5e9d33804dc1646860c976c3aeabb458f4719c53dcbadbf44b590612eaa9087815260200190565b60405180910390a15b50505050505050565b600b54606090821115612f2b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f484f4c4f47524150483a20706f6420646f6573206e6f742065786973740000006044820152606401610908565b600b612f386001846145cd565b81548110612f4857612f486145e4565b90600052602060002001805480602002602001604051908101604052809291908181526020018280548015612fb357602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311612f88575b50505050509050919050565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600c6020526040902054158015613015575073ffffffffffffffffffffffffffffffffffffffff83166000908152600e6020526040902054155b61307b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f484f4c4f47524150483a206f70657261746f7220697320626f6e6465640000006044820152606401610908565b61308483613ed3565b1561318d57600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156130ec573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061311091906147d2565b73ffffffffffffffffffffffffffffffffffffffff160361318d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f484f4c4f47524150483a20636f6e7472616374206e6f74206f776e61626c65006044820152606401610908565b600061319b60018303613e15565b905082811115613207576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f47524150483a20626f6e6420616d6f756e7420746f6f20736d616c6c6044820152606401610908565b600b5482111561327657600b545b828110156132745760408051602081019091526000808252600b8054600181810183559190925261326b927f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db99092019190613fa0565b50600101613215565b505b61ffff8016600b6001840381548110613291576132916145e4565b60009182526020909120015410613304576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f484f4c4f47524150483a20746f6f206d616e79206f70657261746f72730000006044820152606401610908565b600b600183038154811061331a5761331a6145e4565b6000918252602080832091909101805460018082018355918452919092200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8716179055600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85019081106133ad576133ad6145e4565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff88168352600d8252604080842094909103909355600c8152828220859055600e90522083905561341e7fbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c375490565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526044810185905273ffffffffffffffffffffffffffffffffffffffff91909116906323b872dd906064016020604051808303816000875af1158015613499573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134bd9190614613565b613523576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f484f4c4f47524150483a20746f6b656e207472616e73666572206661696c65646044820152606401610908565b50505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146135df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e00006044820152606401610908565b7feb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f955565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146136b9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e00006044820152606401610908565b7fbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c3755565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614613793576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e00006044820152606401610908565b7f264d744422f7427cd080572c35c848b6cd3a36da6b47519af89ef13098b12fc055565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461386d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e00006044820152606401610908565b7fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e755565b60006040820383600037600060e353600080604084036000347feb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9545af1600181036138e0573d6000803e3d6000fd5b505a60005260206000f35b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146139a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e00006044820152606401610908565b808260003760008082600034875af13d6000803e8080156139c1573d6000f35b3d6000fd5b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614613a7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e00006044820152606401610908565b7fbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd184882755565b6000613aca7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b600080600036600080376000803660007f54176250282e65985d205704ffce44a59efe61f7afd99e29fda50f55b48c061a545afa3d6000803e8080156139c1573d6000f35b8015610bf9576000600b8381548110613b2f57613b2f6145e4565b906000526020600020018281548110613b4a57613b4a6145e4565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16808352600c82526040808420849055600d909252908220829055600b805491935060019186908110613ba257613ba26145e4565b600091825260209091200154039050828114613ce857600b8481548110613bcb57613bcb6145e4565b906000526020600020018181548110613be657613be66145e4565b600091825260209091200154600b805473ffffffffffffffffffffffffffffffffffffffff9092169186908110613c1f57613c1f6145e4565b906000526020600020018481548110613c3a57613c3a6145e4565b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600d6000600b8781548110613c9a57613c9a6145e4565b906000526020600020018681548110613cb557613cb56145e4565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040019020555b600b8481548110613cfb57613cfb6145e4565b906000526020600020018181548110613d1657613d166145e4565b600091825260209091200180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055600b805485908110613d5b57613d5b6145e4565b90600052602060002001805480613d7457613d74614a50565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905501905550505050565b6000824383900340850181613de957613de9614645565b06949350505050565b600060015482600254613e059190614b9f565b613e0f9190614bab565b92915050565b60008060015483600254613e299190614b9f565b613e339190614bab565b600b549091508310613e455792915050565b6000613e52846002614b9f565b600354613e5f91906149e5565b90506000600b8581548110613e7657613e766145e4565b600091825260209091200154905081811115613eca57613e9682826145cd565b905060045481613ea691906149e5565b600554613eb390856149e5565b613ebd9190614bab565b613ec79084614715565b92505b50909392505050565b6000813f8015801590613f0657507fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708114155b9392505050565b6040805160c08101825260008082526020820181905291810182905260608101829052608081019190915260a08101613f44614026565b905290565b828054828255906000526020600020908101928215613f90579160200282015b82811115613f90578251613f809083906001613fa0565b5091602001919060010190613f69565b50613f9c929150614044565b5090565b82805482825590600052602060002090810192821561401a579160200282015b8281111561401a57825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602090920191600190910190613fc0565b50613f9c929150614061565b6040518060a001604052806005906020820280368337509192915050565b80821115613f9c5760006140588282614076565b50600101614044565b5b80821115613f9c5760008155600101614062565b50805460008255906000526020600020908101906140949190614061565b50565b6000602082840312156140a957600080fd5b5035919050565b60006101408201905060ff835116825260208084015161ffff8082168386015273ffffffffffffffffffffffffffffffffffffffff604087015116604086015264ffffffffff606087015116606086015267ffffffffffffffff608087015116608086015260a0860151915060a0850160005b6005811015614142578351831682529284019290840190600101614123565b505050505092915050565b73ffffffffffffffffffffffffffffffffffffffff8116811461409457600080fd5b6000806040838503121561418257600080fd5b823561418d8161414d565b946020939093013593505050565b60008083601f8401126141ad57600080fd5b50813567ffffffffffffffff8111156141c557600080fd5b6020830191508360208285010111156141dd57600080fd5b9250929050565b600080602083850312156141f757600080fd5b823567ffffffffffffffff81111561420e57600080fd5b61421a8582860161419b565b90969095509350505050565b60006020828403121561423857600080fd5b8135613f068161414d565b60008060006060848603121561425857600080fd5b505081359360208301359350604090920135919050565b6020808252825182820181905260009190848201906040850190845b818110156142bd57835173ffffffffffffffffffffffffffffffffffffffff168352928401929184019160010161428b565b50909695505050505050565b63ffffffff8116811461409457600080fd5b60008060008060008060008060e0898b0312156142f757600080fd5b88359750602089013596506040890135614310816142c9565b955060608901356143208161414d565b94506080890135935060a08901356143378161414d565b925060c089013567ffffffffffffffff81111561435357600080fd5b61435f8b828c0161419b565b999c989b5096995094979396929594505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000602082840312156143b457600080fd5b813567ffffffffffffffff808211156143cc57600080fd5b818401915084601f8301126143e057600080fd5b8135818111156143f2576143f2614373565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561443857614438614373565b8160405282815287602084870101111561445157600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806040838503121561448457600080fd5b823561448f8161414d565b9150602083013561449f8161414d565b809150509250929050565b6000806000604084860312156144bf57600080fd5b83356144ca8161414d565b9250602084013567ffffffffffffffff8111156144e657600080fd5b6144f28682870161419b565b9497909650939450505050565b60008060006060848603121561451457600080fd5b833561451f8161414d565b95602085013595506040909401359392505050565b60008060008060006080868803121561454c57600080fd5b8535614557816142c9565b94506020860135935060408601359250606086013567ffffffffffffffff81111561458157600080fd5b61458d8882890161419b565b969995985093965092949392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000828210156145df576145df61459e565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006020828403121561462557600080fd5b81518015158114613f0657600080fd5b8183823760009101908152919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b8381526040602082015260006146d7604083018486614674565b95945050505050565b6000816146ef576146ef61459e565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b600082198211156147285761472861459e565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361475e5761475e61459e565b5060010190565b63ffffffff86168152846020820152836040820152608060608201526000614791608083018486614674565b979650505050505050565b6000602082840312156147ae57600080fd5b5051919050565b6000602082840312156147c757600080fd5b8151613f06816142c9565b6000602082840312156147e457600080fd5b8151613f068161414d565b60006101008b835263ffffffff8b16602084015273ffffffffffffffffffffffffffffffffffffffff808b166040850152808a1660608501528089166080850152508660a084015285151560c08401528060e08401526148528184018587614674565b9c9b505050505050505050505050565b60005b8381101561487d578181015183820152602001614865565b838111156135235750506000910152565b600084516148a0818460208901614862565b91909101928352506020820152604001919050565b86815285602082015263ffffffff8516604082015273ffffffffffffffffffffffffffffffffffffffff8416606082015282608082015260c060a0820152600082518060c084015261490e8160e0850160208701614862565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160e001979650505050505050565b60008060008060008060c0878903121561495e57600080fd5b86516149698161414d565b602088015190965061497a8161414d565b604088015190955061498b8161414d565b606088015190945061499c8161414d565b60808801519093506149ad8161414d565b8092505060a087015190509295509295509295565b600060ff821660ff8416808210156149dc576149dc61459e565b90039392505050565b600082614a1b577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b73ffffffffffffffffffffffffffffffffffffffff841681526040602082015260006146d7604083018486614674565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600181815b80851115614ad857817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115614abe57614abe61459e565b80851615614acb57918102915b93841c9390800290614a84565b509250929050565b600082614aef57506001613e0f565b81614afc57506000613e0f565b8160018114614b125760028114614b1c57614b38565b6001915050613e0f565b60ff841115614b2d57614b2d61459e565b50506001821b613e0f565b5060208310610133831016604e8410600b8410161715614b5b575081810a613e0f565b614b658383614a7f565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115614b9757614b9761459e565b029392505050565b6000613f068383614ae0565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614be357614be361459e565b50029056fea164736f6c634300080d000a

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.