ETH Price: $2,284.91 (-3.71%)

Contract Diff Checker

Contract Name:
Holograph

Contract Source Code:

// 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())
      }
    }
  }
}

// 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)
    }
  }
}

// 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/InitializableInterface.sol";
import "./interface/HolographInterface.sol";

/**
 * @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
 */
contract Holograph is Admin, Initializable, HolographInterface {
  /**
   * @dev bytes32(uint256(keccak256('eip1967.Holograph.bridge')) - 1)
   */
  bytes32 constant _bridgeSlot = 0xeb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9;
  /**
   * @dev bytes32(uint256(keccak256('eip1967.Holograph.chainId')) - 1)
   */
  bytes32 constant _chainIdSlot = 0x7651bfc11f7485d07ab2b41c1312e2007c8cb7efb0f7352a6dee4a1153eebab2;
  /**
   * @dev bytes32(uint256(keccak256('eip1967.Holograph.factory')) - 1)
   */
  bytes32 constant _factorySlot = 0xa49f20855ba576e09d13c8041c8039fa655356ea27f6c40f1ec46a4301cd5b23;
  /**
   * @dev bytes32(uint256(keccak256('eip1967.Holograph.holographChainId')) - 1)
   */
  bytes32 constant _holographChainIdSlot = 0xd840a780c26e07edc6e1ee2eaa6f134ed5488dbd762614116653cee8542a3844;
  /**
   * @dev bytes32(uint256(keccak256('eip1967.Holograph.interfaces')) - 1)
   */
  bytes32 constant _interfacesSlot = 0xbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd1848827;
  /**
   * @dev bytes32(uint256(keccak256('eip1967.Holograph.operator')) - 1)
   */
  bytes32 constant _operatorSlot = 0x7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f;
  /**
   * @dev bytes32(uint256(keccak256('eip1967.Holograph.registry')) - 1)
   */
  bytes32 constant _registrySlot = 0xce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7;
  /**
   * @dev bytes32(uint256(keccak256('eip1967.Holograph.treasury')) - 1)
   */
  bytes32 constant _treasurySlot = 0x4215e7a38d75164ca078bbd61d0992cdeb1ba16f3b3ead5944966d3e4080e8b6;
  /**
   * @dev bytes32(uint256(keccak256('eip1967.Holograph.utilityToken')) - 1)
   */
  bytes32 constant _utilityTokenSlot = 0xbf76518d46db472b71aa7677a0908b8016f3dee568415ffa24055f9a670f9c37;

  /**
   * @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");
    (
      uint32 holographChainId,
      address bridge,
      address factory,
      address interfaces,
      address operator,
      address registry,
      address treasury,
      address utilityToken
    ) = abi.decode(initPayload, (uint32, address, address, address, address, address, address, address));
    assembly {
      sstore(_adminSlot, origin())
      sstore(_chainIdSlot, chainid())
      sstore(_holographChainIdSlot, holographChainId)
      sstore(_bridgeSlot, bridge)
      sstore(_factorySlot, factory)
      sstore(_interfacesSlot, interfaces)
      sstore(_operatorSlot, operator)
      sstore(_registrySlot, registry)
      sstore(_treasurySlot, treasury)
      sstore(_utilityTokenSlot, utilityToken)
    }
    _setInitialized();
    return InitializableInterface.init.selector;
  }

  /**
   * @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 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) {
    assembly {
      chainId := sload(_chainIdSlot)
    }
  }

  /**
   * @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 onlyAdmin {
    assembly {
      sstore(_chainIdSlot, chainId)
    }
  }

  /**
   * @notice Get the address of the Holograph Factory module
   * @dev Used for deploying holographable smart contracts
   */
  function getFactory() external view returns (address factory) {
    assembly {
      factory := sload(_factorySlot)
    }
  }

  /**
   * @notice Update the Holograph Factory module address
   * @param factory address of the Holograph Factory smart contract to use
   */
  function setFactory(address factory) external onlyAdmin {
    assembly {
      sstore(_factorySlot, factory)
    }
  }

  /**
   * @notice Get the Holograph chain Id
   * @dev Holograph uses an internal chain id mapping
   */
  function getHolographChainId() external view returns (uint32 holographChainId) {
    assembly {
      holographChainId := sload(_holographChainIdSlot)
    }
  }

  /**
   * @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 onlyAdmin {
    assembly {
      sstore(_holographChainIdSlot, holographChainId)
    }
  }

  /**
   * @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 Operator module
   * @dev All cross-chain Holograph Bridge beams are handled by the Holograph Operator module
   */
  function getOperator() external view returns (address operator) {
    assembly {
      operator := sload(_operatorSlot)
    }
  }

  /**
   * @notice Update the Holograph Operator module address
   * @param operator address of the Holograph Operator smart contract to use
   */
  function setOperator(address operator) external onlyAdmin {
    assembly {
      sstore(_operatorSlot, operator)
    }
  }

  /**
   * @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 Treasury module
   * @dev All of the Holograph Protocol assets are stored and managed by this module
   */
  function getTreasury() external view returns (address treasury) {
    assembly {
      treasury := sload(_treasurySlot)
    }
  }

  /**
   * @notice Update the Holograph Treasury module address
   * @param treasury address of the Holograph Treasury smart contract to use
   */
  function setTreasury(address treasury) external onlyAdmin {
    assembly {
      sstore(_treasurySlot, treasury)
    }
  }

  /**
   * @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)
    }
  }

  /**
   * @dev Purposefully reverts to prevent having any type of ether transfered into the contract
   */
  receive() external payable {
    revert();
  }

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

// 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;
}

// 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);
}

Please enter a contract address above to load the contract details and source code.

Context size (optional):