Overview
ETH Balance
0 ETH
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
107558340 | 503 days ago | 0.0005161 ETH | ||||
107558316 | 503 days ago | 0.000337783201072 ETH | ||||
107558126 | 503 days ago | 0.000717432869907 ETH | ||||
107558083 | 503 days ago | 0.000813296515628 ETH | ||||
107558008 | 503 days ago | 0.000337580492314 ETH | ||||
107557932 | 503 days ago | 0.000337580492314 ETH | ||||
107557814 | 503 days ago | 0.000337580492314 ETH | ||||
107557787 | 503 days ago | 0 ETH | ||||
107557684 | 503 days ago | 0.000337580492314 ETH | ||||
107557408 | 503 days ago | 0 ETH | ||||
107557159 | 503 days ago | 0.000337575559302 ETH | ||||
107556963 | 503 days ago | 0.000337580492314 ETH | ||||
107556961 | 503 days ago | 0.000337580492314 ETH | ||||
107556951 | 503 days ago | 0.000334593553536 ETH | ||||
107556908 | 503 days ago | 0.000718718955854 ETH | ||||
107556878 | 503 days ago | 0 ETH | ||||
107556782 | 503 days ago | 0.000491441316648 ETH | ||||
107556732 | 503 days ago | 0.000813296515628 ETH | ||||
107556662 | 503 days ago | 0.000491441316648 ETH | ||||
107556620 | 503 days ago | 0.0002987 ETH | ||||
107556548 | 503 days ago | 0.000337578025808 ETH | ||||
107556541 | 503 days ago | 0.000894710911143 ETH | ||||
107556496 | 503 days ago | 0.000491441316648 ETH | ||||
107556329 | 503 days ago | 0.00072668222154 ETH | ||||
107556299 | 503 days ago | 0.000337213899779 ETH |
Loading...
Loading
Contract Name:
HolographBridge
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
Yes with 999999 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// 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/HolographERC20Interface.sol"; import "./interface/Holographable.sol"; import "./interface/HolographInterface.sol"; import "./interface/HolographBridgeInterface.sol"; import "./interface/HolographFactoryInterface.sol"; import "./interface/HolographOperatorInterface.sol"; import "./interface/HolographRegistryInterface.sol"; import "./interface/InitializableInterface.sol"; /** * @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 */ contract HolographBridge is Admin, Initializable, HolographBridgeInterface { /** * @dev bytes32(uint256(keccak256('eip1967.Holograph.factory')) - 1) */ bytes32 constant _factorySlot = 0xa49f20855ba576e09d13c8041c8039fa655356ea27f6c40f1ec46a4301cd5b23; /** * @dev bytes32(uint256(keccak256('eip1967.Holograph.holograph')) - 1) */ bytes32 constant _holographSlot = 0xb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a; /** * @dev bytes32(uint256(keccak256('eip1967.Holograph.jobNonce')) - 1) */ bytes32 constant _jobNonceSlot = 0x1cda64803f3b43503042e00863791e8d996666552d5855a78d53ee1dd4b3286d; /** * @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 Allow calls only from Holograph Operator contract */ modifier onlyOperator() { require(msg.sender == address(_operator()), "HOLOGRAPH: operator only call"); _; } /** * @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 factory, address holograph, address operator, address registry) = abi.decode( initPayload, (address, address, address, address) ); assembly { sstore(_adminSlot, origin()) sstore(_factorySlot, factory) sstore(_holographSlot, holograph) sstore(_operatorSlot, operator) sstore(_registrySlot, registry) } _setInitialized(); return InitializableInterface.init.selector; } /** * @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 onlyOperator { /** * @dev check that the target contract is either Holograph Factory or a deployed holographable contract */ require( _registry().isHolographedContract(holographableContract) || address(_factory()) == holographableContract, "HOLOGRAPH: not holographed" ); /** * @dev make a bridgeIn function call to the holographable contract */ bytes4 selector = Holographable(holographableContract).bridgeIn(fromChain, bridgeInPayload); /** * @dev ensure returned selector is bridgeIn function signature, to guarantee that the function was called and succeeded */ require(selector == Holographable.bridgeIn.selector, "HOLOGRAPH: bridge in failed"); /** * @dev check if a specific reward amount was assigned to this request */ if (hTokenValue > 0 && hTokenRecipient != address(0)) { /** * @dev mint the specific hToken amount for hToken recipient * this value is equivalent to amount that is deposited on origin chain's hToken contract * recipient can beam the asset to origin chain and unwrap for native gas token at any time */ require( HolographERC20Interface(hToken).holographBridgeMint(hTokenRecipient, hTokenValue) == HolographERC20Interface.holographBridgeMint.selector, "HOLOGRAPH: hToken mint failed" ); } /** * @dev allow the call to revert on demand, for example use case, look into the Holograph Operator's jobEstimator function */ require(doNotRevert, "HOLOGRAPH: reverted"); } /** * @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 { /** * @dev check that the target contract is either Holograph Factory or a deployed holographable contract */ require( _registry().isHolographedContract(holographableContract) || address(_factory()) == holographableContract, "HOLOGRAPH: not holographed" ); /** * @dev make a bridgeOut function call to the holographable contract */ (bytes4 selector, bytes memory returnedPayload) = Holographable(holographableContract).bridgeOut( toChain, msg.sender, bridgeOutPayload ); /** * @dev ensure returned selector is bridgeOut function signature, to guarantee that the function was called and succeeded */ require(selector == Holographable.bridgeOut.selector, "HOLOGRAPH: bridge out failed"); /** * @dev pass the request, along with all data, to Holograph Operator, to handle the cross-chain messaging logic */ _operator().send{value: msg.value}( gasLimit, gasPrice, toChain, msg.sender, _jobNonce(), holographableContract, returnedPayload ); } /** * @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) { /** * @dev make a bridgeOut function call to the holographable contract inside of a try/catch */ try Holographable(holographableContract).bridgeOut(toChain, sender, bridgeOutPayload) returns ( bytes4 selector, bytes memory payload ) { /** * @dev ensure returned selector is bridgeOut function signature, to guarantee that the function was called and succeeded */ if (selector != Holographable.bridgeOut.selector) { /** * @dev if selector does not match, then it means the request failed */ return "HOLOGRAPH: bridge out failed"; } assembly { /** * @dev the entire payload is sent back in a revert */ revert(add(payload, 0x20), mload(payload)) } } catch Error(string memory reason) { return reason; } catch { return "HOLOGRAPH: unknown error"; } } /** * @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) { /** * @dev check that the target contract is either Holograph Factory or a deployed holographable contract */ require( _registry().isHolographedContract(holographableContract) || address(_factory()) == holographableContract, "HOLOGRAPH: not holographed" ); bytes memory payload; /** * @dev the revertedBridgeOutRequest function is wrapped into a try/catch function */ try this.revertedBridgeOutRequest(msg.sender, toChain, holographableContract, bridgeOutPayload) returns ( string memory revertReason ) { /** * @dev a non reverted result is actually a revert */ revert(revertReason); } catch (bytes memory realResponse) { /** * @dev a revert is actually success, so the return data is stored as payload */ payload = realResponse; } uint256 jobNonce; assembly { jobNonce := sload(_jobNonceSlot) } /** * @dev extract hlgFee from operator */ uint256 fee = 0; if (gasPrice < type(uint256).max && gasLimit < type(uint256).max) { (uint256 hlgFee, , uint256 dstGasPrice) = _operator().getMessageFee( toChain, gasLimit, gasPrice, bridgeOutPayload ); if (gasPrice == 0) { gasPrice = dstGasPrice; } fee = hlgFee; } /** * @dev the data is abi encoded into actual bridgeOutRequest payload bytes */ bytes memory encodedData = abi.encodeWithSelector( HolographBridgeInterface.bridgeInRequest.selector, /** * @dev the latest job nonce is incremented by one */ jobNonce + 1, _holograph().getHolographChainId(), holographableContract, _registry().getHToken(_holograph().getHolographChainId()), address(0), fee, true, payload ); /** * @dev this abi encodes the data just like in Holograph Operator */ samplePayload = abi.encodePacked(encodedData, gasLimit, gasPrice); } /** * @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(_operatorSlot), 0, calldatasize(), 0, 0) returndatacopy(0, 0, returndatasize()) switch result case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /** * @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 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 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) { assembly { jobNonce := sload(_jobNonceSlot) } } /** * @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) } } /** * @dev Internal function used for getting the Holograph Factory Interface */ function _factory() private view returns (HolographFactoryInterface factory) { assembly { factory := sload(_factorySlot) } } /** * @dev Internal function used for getting the Holograph Interface */ function _holograph() private view returns (HolographInterface holograph) { assembly { holograph := sload(_holographSlot) } } /** * @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 for getting the Holograph Operator Interface */ function _operator() private view returns (HolographOperatorInterface operator) { assembly { operator := sload(_operatorSlot) } } /** * @dev Internal function used for getting the Holograph Registry Interface */ function _registry() private view returns (HolographRegistryInterface registry) { assembly { registry := sload(_registrySlot) } } /** * @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; 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 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); }
// 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); }
// 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); }
// 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); }
// 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); }
// 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); }
// 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); }
// 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); }
// 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; }
// 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; }
// 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/DeploymentConfig.sol"; import "../struct/Verification.sol"; /** * @title Holograph Factory * @author https://github.com/holographxyz * @notice Deploy holographable contracts * @dev The contract provides methods that allow for the creation of Holograph Protocol compliant smart contracts, that are capable of minting holographable assets */ interface HolographFactoryInterface { /** * @dev This event is fired every time that a bridgeable contract is deployed. */ event BridgeableContractDeployed(address indexed contractAddress, bytes32 indexed hash); /** * @notice Deploy a holographable smart contract * @dev Using this function allows to deploy smart contracts that have the same address across all EVM chains * @param config contract deployement configurations * @param signature that was created by the wallet that created the original payload * @param signer address of wallet that created the payload */ function deployHolographableContract( DeploymentConfig memory config, Verification memory signature, address signer ) 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 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; }
// 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; 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; }
// 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 { 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; }
// 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); }
// 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 DeploymentConfig { bytes32 contractType; uint32 chainType; bytes32 salt; bytes byteCode; bytes initCode; }
// 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 */
// 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 Verification { bytes32 r; bytes32 s; uint8 v; }
{ "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
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"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":"uint256","name":"","type":"uint256"},{"internalType":"uint32","name":"fromChain","type":"uint32"},{"internalType":"address","name":"holographableContract","type":"address"},{"internalType":"address","name":"hToken","type":"address"},{"internalType":"address","name":"hTokenRecipient","type":"address"},{"internalType":"uint256","name":"hTokenValue","type":"uint256"},{"internalType":"bool","name":"doNotRevert","type":"bool"},{"internalType":"bytes","name":"bridgeInPayload","type":"bytes"}],"name":"bridgeInRequest","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint32","name":"toChain","type":"uint32"},{"internalType":"address","name":"holographableContract","type":"address"},{"internalType":"uint256","name":"gasLimit","type":"uint256"},{"internalType":"uint256","name":"gasPrice","type":"uint256"},{"internalType":"bytes","name":"bridgeOutPayload","type":"bytes"}],"name":"bridgeOutRequest","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"getAdmin","outputs":[{"internalType":"address","name":"adminAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"toChain","type":"uint32"},{"internalType":"address","name":"holographableContract","type":"address"},{"internalType":"uint256","name":"gasLimit","type":"uint256"},{"internalType":"uint256","name":"gasPrice","type":"uint256"},{"internalType":"bytes","name":"bridgeOutPayload","type":"bytes"}],"name":"getBridgeOutRequestPayload","outputs":[{"internalType":"bytes","name":"samplePayload","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getFactory","outputs":[{"internalType":"address","name":"factory","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getHolograph","outputs":[{"internalType":"address","name":"holograph","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getJobNonce","outputs":[{"internalType":"uint256","name":"jobNonce","type":"uint256"}],"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":"getOperator","outputs":[{"internalType":"address","name":"operator","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRegistry","outputs":[{"internalType":"address","name":"registry","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":"address","name":"sender","type":"address"},{"internalType":"uint32","name":"toChain","type":"uint32"},{"internalType":"address","name":"holographableContract","type":"address"},{"internalType":"bytes","name":"bridgeOutPayload","type":"bytes"}],"name":"revertedBridgeOutRequest","outputs":[{"internalType":"string","name":"revertReason","type":"string"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"adminAddress","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"factory","type":"address"}],"name":"setFactory","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"holograph","type":"address"}],"name":"setHolograph","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"registry","type":"address"}],"name":"setRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405234801561001057600080fd5b50612754806100206000396000f3fe6080604052600436106101485760003560e01c80636e9960c3116100c0578063bf64a82d11610074578063e7f43c6811610059578063e7f43c6814610403578063f851a44014610437578063ff1370d91461044c57600080fd5b8063bf64a82d146103dd578063e5585666146103f057600080fd5b806388cc58e4116100a557806388cc58e414610369578063a91ee0dc1461039d578063b3ab15fb146103bd57600080fd5b80636e9960c314610315578063704b6c021461034957600080fd5b8063565ff49e116101175780635bb47808116100fc5780635bb47808146102985780636200d9fc146102b8578063636ee68b146102f557600080fd5b8063565ff49e146102375780635ab1bd531461026457600080fd5b806316f1be701461015757806325d5cac81461016c5780634827ae0c1461018c5780634ddf47d4146101e657600080fd5b3661015257600080fd5b600080fd5b61016a610165366004611da9565b610487565b005b34801561017857600080fd5b5061016a610187366004611e60565b6109c5565b34801561019857600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156101f257600080fd5b50610206610201366004611f44565b610a9f565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101dd565b34801561024357600080fd5b50610257610252366004611fca565b610c55565b6040516101dd91906120c0565b34801561027057600080fd5b507fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7546101bc565b3480156102a457600080fd5b5061016a6102b3366004611e60565b610e15565b3480156102c457600080fd5b507f1cda64803f3b43503042e00863791e8d996666552d5855a78d53ee1dd4b3286d546040519081526020016101dd565b34801561030157600080fd5b506102576103103660046120d3565b610eef565b34801561032157600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c9546101bc565b34801561035557600080fd5b5061016a610364366004611e60565b61159e565b34801561037557600080fd5b507fa49f20855ba576e09d13c8041c8039fa655356ea27f6c40f1ec46a4301cd5b23546101bc565b3480156103a957600080fd5b5061016a6103b8366004611e60565b611678565b3480156103c957600080fd5b5061016a6103d8366004611e60565b611752565b61016a6103eb36600461214f565b61182c565b61016a6103fe3660046120d3565b611907565b34801561040f57600080fd5b507f7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f546101bc565b34801561044357600080fd5b506101bc611ca7565b34801561045857600080fd5b5061046c6104673660046121a4565b611cd6565b604080519384526020840192909252908201526060016101dd565b7f7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f5473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610542576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f484f4c4f47524150483a206f70657261746f72206f6e6c792063616c6c00000060448201526064015b60405180910390fd5b7fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7546040517f44b25fff00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff898116600483015291909116906344b25fff90602401602060405180830381865afa1580156105d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f691906121f1565b8061065357508673ffffffffffffffffffffffffffffffffffffffff1661063b7fa49f20855ba576e09d13c8041c8039fa655356ea27f6c40f1ec46a4301cd5b235490565b73ffffffffffffffffffffffffffffffffffffffff16145b6106b9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f484f4c4f47524150483a206e6f7420686f6c6f677261706865640000000000006044820152606401610539565b6040517f08a1eb2000000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8916906308a1eb2090610712908c9087908790600401612257565b6020604051808303816000875af1158015610731573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075591906122ac565b90507fffffffff0000000000000000000000000000000000000000000000000000000081167f08a1eb200000000000000000000000000000000000000000000000000000000014610802576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f484f4c4f47524150483a2062726964676520696e206661696c656400000000006044820152606401610539565b600085118015610827575073ffffffffffffffffffffffffffffffffffffffff861615155b15610952576040517ffad66f920000000000000000000000000000000000000000000000000000000080825273ffffffffffffffffffffffffffffffffffffffff88811660048401526024830188905290919089169063fad66f92906044016020604051808303816000875af11580156108a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c991906122ac565b7fffffffff000000000000000000000000000000000000000000000000000000001614610952576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f484f4c4f47524150483a2068546f6b656e206d696e74206661696c65640000006044820152606401610539565b836109b9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f484f4c4f47524150483a207265766572746564000000000000000000000000006044820152606401610539565b50505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e00006044820152606401610539565b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55565b6000610ac97f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b15610b30576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a20616c726561647920696e697469616c697a656400006044820152606401610539565b60008060008085806020019051810190610b4a91906122c7565b9350935093509350327f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955837fa49f20855ba576e09d13c8041c8039fa655356ea27f6c40f1ec46a4301cd5b2355827fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55817f7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f55807fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e755610c2a60017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d40000000000000000000000000000000000000000000000000000000095945050505050565b6040517fb7e0366100000000000000000000000000000000000000000000000000000000815260609073ffffffffffffffffffffffffffffffffffffffff85169063b7e0366190610cb09088908a9088908890600401612326565b6000604051808303816000875af1925050508015610d0e57506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610d0b91908101906123b0565b60015b610d7c57610d1a612412565b806308c379a003610d405750610d2e61242e565b80610d395750610d42565b9050610e0c565b505b5060408051808201909152601881527f484f4c4f47524150483a20756e6b6e6f776e206572726f7200000000000000006020820152610e0c565b7fffffffff0000000000000000000000000000000000000000000000000000000082167fb7e036610000000000000000000000000000000000000000000000000000000014610e04576040518060400160405280601c81526020017f484f4c4f47524150483a20627269646765206f7574206661696c65640000000081525092505050610e0c565b805160208201fd5b95945050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ecb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e00006044820152606401610539565b7fa49f20855ba576e09d13c8041c8039fa655356ea27f6c40f1ec46a4301cd5b2355565b6060610f197fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e75490565b6040517f44b25fff00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff888116600483015291909116906344b25fff90602401602060405180830381865afa158015610f87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fab91906121f1565b8061100857508573ffffffffffffffffffffffffffffffffffffffff16610ff07fa49f20855ba576e09d13c8041c8039fa655356ea27f6c40f1ec46a4301cd5b235490565b73ffffffffffffffffffffffffffffffffffffffff16145b61106e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f484f4c4f47524150483a206e6f7420686f6c6f677261706865640000000000006044820152606401610539565b6040517f565ff49e000000000000000000000000000000000000000000000000000000008152606090309063565ff49e906110b59033908c908c908a908a906004016124d6565b6000604051808303816000875af192505050801561111357506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526111109190810190612527565b60015b61114e573d808015611141576040519150601f19603f3d011682016040523d82523d6000602084013e611146565b606091505b509050611182565b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161053991906120c0565b7f1cda64803f3b43503042e00863791e8d996666552d5855a78d53ee1dd4b3286d5460007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff871080156111f457507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff88105b156112ba576000806112247f7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f5490565b73ffffffffffffffffffffffffffffffffffffffff1663ff1370d98d8c8c8c8c6040518663ffffffff1660e01b8152600401611264959493929190612578565b606060405180830381865afa158015611281573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112a591906125a4565b9250509150886000036112b6578098505b5090505b60007f16f1be70000000000000000000000000000000000000000000000000000000006112e88460016125d2565b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a5473ffffffffffffffffffffffffffffffffffffffff1663381b5f466040518163ffffffff1660e01b8152600401602060405180830381865afa158015611354573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113789190612611565b8c6113a17fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e75490565b73ffffffffffffffffffffffffffffffffffffffff1663949d53a76113e47fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a5490565b73ffffffffffffffffffffffffffffffffffffffff1663381b5f466040518163ffffffff1660e01b8152600401602060405180830381865afa15801561142e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114529190612611565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815263ffffffff919091166004820152602401602060405180830381865afa1580156114ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114d0919061262e565b60008760018b6040516024016114ed98979695949392919061264b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909516949094179093525190925061157f9183918c918c91016126bc565b6040516020818303038152906040529450505050509695505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611654576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e00006044820152606401610539565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461172e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e00006044820152606401610539565b7fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e755565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611808576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e00006044820152606401610539565b7f7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f55565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146118e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e00006044820152606401610539565b808260003760008082600034875af13d6000803e808015611902573d6000f35b3d6000fd5b7fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7546040517f44b25fff00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff878116600483015291909116906344b25fff90602401602060405180830381865afa158015611997573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119bb91906121f1565b80611a1857508473ffffffffffffffffffffffffffffffffffffffff16611a007fa49f20855ba576e09d13c8041c8039fa655356ea27f6c40f1ec46a4301cd5b235490565b73ffffffffffffffffffffffffffffffffffffffff16145b611a7e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f484f4c4f47524150483a206e6f7420686f6c6f677261706865640000000000006044820152606401610539565b6000808673ffffffffffffffffffffffffffffffffffffffff1663b7e03661893387876040518563ffffffff1660e01b8152600401611ac09493929190612326565b6000604051808303816000875af1158015611adf573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052611b2591908101906123b0565b90925090507fffffffff0000000000000000000000000000000000000000000000000000000082167fb7e036610000000000000000000000000000000000000000000000000000000014611bd5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f484f4c4f47524150483a20627269646765206f7574206661696c6564000000006044820152606401610539565b7f7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f5473ffffffffffffffffffffffffffffffffffffffff1663409aad693488888c33611c477f1cda64803f3b43503042e00863791e8d996666552d5855a78d53ee1dd4b3286d80546001019081905590565b8e896040518963ffffffff1660e01b8152600401611c6b97969594939291906126e3565b6000604051808303818588803b158015611c8457600080fd5b505af1158015611c98573d6000803e3d6000fd5b50505050505050505050505050565b6000611cd17f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b600080600036600080376000803660007f7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f545afa3d6000803e808015611902573d6000f35b63ffffffff81168114611d2d57600080fd5b50565b73ffffffffffffffffffffffffffffffffffffffff81168114611d2d57600080fd5b8015158114611d2d57600080fd5b60008083601f840112611d7257600080fd5b50813567ffffffffffffffff811115611d8a57600080fd5b602083019150836020828501011115611da257600080fd5b9250929050565b60008060008060008060008060006101008a8c031215611dc857600080fd5b8935985060208a0135611dda81611d1b565b975060408a0135611dea81611d30565b965060608a0135611dfa81611d30565b955060808a0135611e0a81611d30565b945060a08a0135935060c08a0135611e2181611d52565b925060e08a013567ffffffffffffffff811115611e3d57600080fd5b611e498c828d01611d60565b915080935050809150509295985092959850929598565b600060208284031215611e7257600080fd5b8135611e7d81611d30565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f830116810181811067ffffffffffffffff82111715611ef757611ef7611e84565b6040525050565b600067ffffffffffffffff821115611f1857611f18611e84565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600060208284031215611f5657600080fd5b813567ffffffffffffffff811115611f6d57600080fd5b8201601f81018413611f7e57600080fd5b8035611f8981611efe565b604051611f968282611eb3565b828152866020848601011115611fab57600080fd5b8260208501602083013760009281016020019290925250949350505050565b600080600080600060808688031215611fe257600080fd5b8535611fed81611d30565b94506020860135611ffd81611d1b565b9350604086013561200d81611d30565b9250606086013567ffffffffffffffff81111561202957600080fd5b61203588828901611d60565b969995985093965092949392505050565b60005b83811015612061578181015183820152602001612049565b83811115612070576000848401525b50505050565b6000815180845261208e816020860160208601612046565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611e7d6020830184612076565b60008060008060008060a087890312156120ec57600080fd5b86356120f781611d1b565b9550602087013561210781611d30565b94506040870135935060608701359250608087013567ffffffffffffffff81111561213157600080fd5b61213d89828a01611d60565b979a9699509497509295939492505050565b60008060006040848603121561216457600080fd5b833561216f81611d30565b9250602084013567ffffffffffffffff81111561218b57600080fd5b61219786828701611d60565b9497909650939450505050565b6000806000806000608086880312156121bc57600080fd5b85356121c781611d1b565b94506020860135935060408601359250606086013567ffffffffffffffff81111561202957600080fd5b60006020828403121561220357600080fd5b8151611e7d81611d52565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b63ffffffff84168152604060208201526000610e0c60408301848661220e565b80517fffffffff00000000000000000000000000000000000000000000000000000000811681146122a757600080fd5b919050565b6000602082840312156122be57600080fd5b611e7d82612277565b600080600080608085870312156122dd57600080fd5b84516122e881611d30565b60208601519094506122f981611d30565b604086015190935061230a81611d30565b606086015190925061231b81611d30565b939692955090935050565b63ffffffff8516815273ffffffffffffffffffffffffffffffffffffffff8416602082015260606040820152600061236260608301848661220e565b9695505050505050565b600061237783611efe565b6040516123848282611eb3565b80925084815285858501111561239957600080fd5b6123a7856020830186612046565b50509392505050565b600080604083850312156123c357600080fd5b6123cc83612277565b9150602083015167ffffffffffffffff8111156123e857600080fd5b8301601f810185136123f957600080fd5b6124088582516020840161236c565b9150509250929050565b600060033d111561242b5760046000803e5060005160e01c5b90565b600060443d101561243c5790565b6040517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc803d016004833e81513d67ffffffffffffffff816024840111818411171561248a57505050505090565b82850191508151818111156124a25750505050505090565b843d87010160208285010111156124bc5750505050505090565b6124cb60208286010187611eb3565b509095945050505050565b600073ffffffffffffffffffffffffffffffffffffffff808816835263ffffffff871660208401528086166040840152506080606083015261251c60808301848661220e565b979650505050505050565b60006020828403121561253957600080fd5b815167ffffffffffffffff81111561255057600080fd5b8201601f8101841361256157600080fd5b6125708482516020840161236c565b949350505050565b63ffffffff8616815284602082015283604082015260806060820152600061251c60808301848661220e565b6000806000606084860312156125b957600080fd5b8351925060208401519150604084015190509250925092565b6000821982111561260c577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b60006020828403121561262357600080fd5b8151611e7d81611d1b565b60006020828403121561264057600080fd5b8151611e7d81611d30565b60006101008a835263ffffffff8a16602084015273ffffffffffffffffffffffffffffffffffffffff808a16604085015280891660608501528088166080850152508560a084015284151560c08401528060e08401526126ad81840185612076565b9b9a5050505050505050505050565b600084516126ce818460208901612046565b91909101928352506020820152604001919050565b87815286602082015263ffffffff86166040820152600073ffffffffffffffffffffffffffffffffffffffff808716606084015285608084015280851660a08401525060e060c083015261273a60e0830184612076565b999850505050505050505056fea164736f6c634300080d000a
Deployed Bytecode
0x6080604052600436106101485760003560e01c80636e9960c3116100c0578063bf64a82d11610074578063e7f43c6811610059578063e7f43c6814610403578063f851a44014610437578063ff1370d91461044c57600080fd5b8063bf64a82d146103dd578063e5585666146103f057600080fd5b806388cc58e4116100a557806388cc58e414610369578063a91ee0dc1461039d578063b3ab15fb146103bd57600080fd5b80636e9960c314610315578063704b6c021461034957600080fd5b8063565ff49e116101175780635bb47808116100fc5780635bb47808146102985780636200d9fc146102b8578063636ee68b146102f557600080fd5b8063565ff49e146102375780635ab1bd531461026457600080fd5b806316f1be701461015757806325d5cac81461016c5780634827ae0c1461018c5780634ddf47d4146101e657600080fd5b3661015257600080fd5b600080fd5b61016a610165366004611da9565b610487565b005b34801561017857600080fd5b5061016a610187366004611e60565b6109c5565b34801561019857600080fd5b507fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a545b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156101f257600080fd5b50610206610201366004611f44565b610a9f565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101dd565b34801561024357600080fd5b50610257610252366004611fca565b610c55565b6040516101dd91906120c0565b34801561027057600080fd5b507fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7546101bc565b3480156102a457600080fd5b5061016a6102b3366004611e60565b610e15565b3480156102c457600080fd5b507f1cda64803f3b43503042e00863791e8d996666552d5855a78d53ee1dd4b3286d546040519081526020016101dd565b34801561030157600080fd5b506102576103103660046120d3565b610eef565b34801561032157600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c9546101bc565b34801561035557600080fd5b5061016a610364366004611e60565b61159e565b34801561037557600080fd5b507fa49f20855ba576e09d13c8041c8039fa655356ea27f6c40f1ec46a4301cd5b23546101bc565b3480156103a957600080fd5b5061016a6103b8366004611e60565b611678565b3480156103c957600080fd5b5061016a6103d8366004611e60565b611752565b61016a6103eb36600461214f565b61182c565b61016a6103fe3660046120d3565b611907565b34801561040f57600080fd5b507f7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f546101bc565b34801561044357600080fd5b506101bc611ca7565b34801561045857600080fd5b5061046c6104673660046121a4565b611cd6565b604080519384526020840192909252908201526060016101dd565b7f7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f5473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610542576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f484f4c4f47524150483a206f70657261746f72206f6e6c792063616c6c00000060448201526064015b60405180910390fd5b7fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7546040517f44b25fff00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff898116600483015291909116906344b25fff90602401602060405180830381865afa1580156105d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f691906121f1565b8061065357508673ffffffffffffffffffffffffffffffffffffffff1661063b7fa49f20855ba576e09d13c8041c8039fa655356ea27f6c40f1ec46a4301cd5b235490565b73ffffffffffffffffffffffffffffffffffffffff16145b6106b9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f484f4c4f47524150483a206e6f7420686f6c6f677261706865640000000000006044820152606401610539565b6040517f08a1eb2000000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8916906308a1eb2090610712908c9087908790600401612257565b6020604051808303816000875af1158015610731573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075591906122ac565b90507fffffffff0000000000000000000000000000000000000000000000000000000081167f08a1eb200000000000000000000000000000000000000000000000000000000014610802576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f484f4c4f47524150483a2062726964676520696e206661696c656400000000006044820152606401610539565b600085118015610827575073ffffffffffffffffffffffffffffffffffffffff861615155b15610952576040517ffad66f920000000000000000000000000000000000000000000000000000000080825273ffffffffffffffffffffffffffffffffffffffff88811660048401526024830188905290919089169063fad66f92906044016020604051808303816000875af11580156108a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c991906122ac565b7fffffffff000000000000000000000000000000000000000000000000000000001614610952576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f484f4c4f47524150483a2068546f6b656e206d696e74206661696c65640000006044820152606401610539565b836109b9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f484f4c4f47524150483a207265766572746564000000000000000000000000006044820152606401610539565b50505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e00006044820152606401610539565b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55565b6000610ac97f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b15610b30576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a20616c726561647920696e697469616c697a656400006044820152606401610539565b60008060008085806020019051810190610b4a91906122c7565b9350935093509350327f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955837fa49f20855ba576e09d13c8041c8039fa655356ea27f6c40f1ec46a4301cd5b2355827fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a55817f7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f55807fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e755610c2a60017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d40000000000000000000000000000000000000000000000000000000095945050505050565b6040517fb7e0366100000000000000000000000000000000000000000000000000000000815260609073ffffffffffffffffffffffffffffffffffffffff85169063b7e0366190610cb09088908a9088908890600401612326565b6000604051808303816000875af1925050508015610d0e57506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610d0b91908101906123b0565b60015b610d7c57610d1a612412565b806308c379a003610d405750610d2e61242e565b80610d395750610d42565b9050610e0c565b505b5060408051808201909152601881527f484f4c4f47524150483a20756e6b6e6f776e206572726f7200000000000000006020820152610e0c565b7fffffffff0000000000000000000000000000000000000000000000000000000082167fb7e036610000000000000000000000000000000000000000000000000000000014610e04576040518060400160405280601c81526020017f484f4c4f47524150483a20627269646765206f7574206661696c65640000000081525092505050610e0c565b805160208201fd5b95945050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ecb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e00006044820152606401610539565b7fa49f20855ba576e09d13c8041c8039fa655356ea27f6c40f1ec46a4301cd5b2355565b6060610f197fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e75490565b6040517f44b25fff00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff888116600483015291909116906344b25fff90602401602060405180830381865afa158015610f87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fab91906121f1565b8061100857508573ffffffffffffffffffffffffffffffffffffffff16610ff07fa49f20855ba576e09d13c8041c8039fa655356ea27f6c40f1ec46a4301cd5b235490565b73ffffffffffffffffffffffffffffffffffffffff16145b61106e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f484f4c4f47524150483a206e6f7420686f6c6f677261706865640000000000006044820152606401610539565b6040517f565ff49e000000000000000000000000000000000000000000000000000000008152606090309063565ff49e906110b59033908c908c908a908a906004016124d6565b6000604051808303816000875af192505050801561111357506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526111109190810190612527565b60015b61114e573d808015611141576040519150601f19603f3d011682016040523d82523d6000602084013e611146565b606091505b509050611182565b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161053991906120c0565b7f1cda64803f3b43503042e00863791e8d996666552d5855a78d53ee1dd4b3286d5460007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff871080156111f457507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff88105b156112ba576000806112247f7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f5490565b73ffffffffffffffffffffffffffffffffffffffff1663ff1370d98d8c8c8c8c6040518663ffffffff1660e01b8152600401611264959493929190612578565b606060405180830381865afa158015611281573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112a591906125a4565b9250509150886000036112b6578098505b5090505b60007f16f1be70000000000000000000000000000000000000000000000000000000006112e88460016125d2565b7fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a5473ffffffffffffffffffffffffffffffffffffffff1663381b5f466040518163ffffffff1660e01b8152600401602060405180830381865afa158015611354573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113789190612611565b8c6113a17fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e75490565b73ffffffffffffffffffffffffffffffffffffffff1663949d53a76113e47fb4107f746e9496e8452accc7de63d1c5e14c19f510932daa04077cd49e8bd77a5490565b73ffffffffffffffffffffffffffffffffffffffff1663381b5f466040518163ffffffff1660e01b8152600401602060405180830381865afa15801561142e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114529190612611565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815263ffffffff919091166004820152602401602060405180830381865afa1580156114ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114d0919061262e565b60008760018b6040516024016114ed98979695949392919061264b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909516949094179093525190925061157f9183918c918c91016126bc565b6040516020818303038152906040529450505050509695505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611654576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e00006044820152606401610539565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461172e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e00006044820152606401610539565b7fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e755565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611808576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e00006044820152606401610539565b7f7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f55565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146118e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e00006044820152606401610539565b808260003760008082600034875af13d6000803e808015611902573d6000f35b3d6000fd5b7fce8e75d5c5227ce29a4ee170160bb296e5dea6934b80a9bd723f7ef1e7c850e7546040517f44b25fff00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff878116600483015291909116906344b25fff90602401602060405180830381865afa158015611997573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119bb91906121f1565b80611a1857508473ffffffffffffffffffffffffffffffffffffffff16611a007fa49f20855ba576e09d13c8041c8039fa655356ea27f6c40f1ec46a4301cd5b235490565b73ffffffffffffffffffffffffffffffffffffffff16145b611a7e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f484f4c4f47524150483a206e6f7420686f6c6f677261706865640000000000006044820152606401610539565b6000808673ffffffffffffffffffffffffffffffffffffffff1663b7e03661893387876040518563ffffffff1660e01b8152600401611ac09493929190612326565b6000604051808303816000875af1158015611adf573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052611b2591908101906123b0565b90925090507fffffffff0000000000000000000000000000000000000000000000000000000082167fb7e036610000000000000000000000000000000000000000000000000000000014611bd5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f484f4c4f47524150483a20627269646765206f7574206661696c6564000000006044820152606401610539565b7f7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f5473ffffffffffffffffffffffffffffffffffffffff1663409aad693488888c33611c477f1cda64803f3b43503042e00863791e8d996666552d5855a78d53ee1dd4b3286d80546001019081905590565b8e896040518963ffffffff1660e01b8152600401611c6b97969594939291906126e3565b6000604051808303818588803b158015611c8457600080fd5b505af1158015611c98573d6000803e3d6000fd5b50505050505050505050505050565b6000611cd17f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b600080600036600080376000803660007f7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f545afa3d6000803e808015611902573d6000f35b63ffffffff81168114611d2d57600080fd5b50565b73ffffffffffffffffffffffffffffffffffffffff81168114611d2d57600080fd5b8015158114611d2d57600080fd5b60008083601f840112611d7257600080fd5b50813567ffffffffffffffff811115611d8a57600080fd5b602083019150836020828501011115611da257600080fd5b9250929050565b60008060008060008060008060006101008a8c031215611dc857600080fd5b8935985060208a0135611dda81611d1b565b975060408a0135611dea81611d30565b965060608a0135611dfa81611d30565b955060808a0135611e0a81611d30565b945060a08a0135935060c08a0135611e2181611d52565b925060e08a013567ffffffffffffffff811115611e3d57600080fd5b611e498c828d01611d60565b915080935050809150509295985092959850929598565b600060208284031215611e7257600080fd5b8135611e7d81611d30565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f830116810181811067ffffffffffffffff82111715611ef757611ef7611e84565b6040525050565b600067ffffffffffffffff821115611f1857611f18611e84565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600060208284031215611f5657600080fd5b813567ffffffffffffffff811115611f6d57600080fd5b8201601f81018413611f7e57600080fd5b8035611f8981611efe565b604051611f968282611eb3565b828152866020848601011115611fab57600080fd5b8260208501602083013760009281016020019290925250949350505050565b600080600080600060808688031215611fe257600080fd5b8535611fed81611d30565b94506020860135611ffd81611d1b565b9350604086013561200d81611d30565b9250606086013567ffffffffffffffff81111561202957600080fd5b61203588828901611d60565b969995985093965092949392505050565b60005b83811015612061578181015183820152602001612049565b83811115612070576000848401525b50505050565b6000815180845261208e816020860160208601612046565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611e7d6020830184612076565b60008060008060008060a087890312156120ec57600080fd5b86356120f781611d1b565b9550602087013561210781611d30565b94506040870135935060608701359250608087013567ffffffffffffffff81111561213157600080fd5b61213d89828a01611d60565b979a9699509497509295939492505050565b60008060006040848603121561216457600080fd5b833561216f81611d30565b9250602084013567ffffffffffffffff81111561218b57600080fd5b61219786828701611d60565b9497909650939450505050565b6000806000806000608086880312156121bc57600080fd5b85356121c781611d1b565b94506020860135935060408601359250606086013567ffffffffffffffff81111561202957600080fd5b60006020828403121561220357600080fd5b8151611e7d81611d52565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b63ffffffff84168152604060208201526000610e0c60408301848661220e565b80517fffffffff00000000000000000000000000000000000000000000000000000000811681146122a757600080fd5b919050565b6000602082840312156122be57600080fd5b611e7d82612277565b600080600080608085870312156122dd57600080fd5b84516122e881611d30565b60208601519094506122f981611d30565b604086015190935061230a81611d30565b606086015190925061231b81611d30565b939692955090935050565b63ffffffff8516815273ffffffffffffffffffffffffffffffffffffffff8416602082015260606040820152600061236260608301848661220e565b9695505050505050565b600061237783611efe565b6040516123848282611eb3565b80925084815285858501111561239957600080fd5b6123a7856020830186612046565b50509392505050565b600080604083850312156123c357600080fd5b6123cc83612277565b9150602083015167ffffffffffffffff8111156123e857600080fd5b8301601f810185136123f957600080fd5b6124088582516020840161236c565b9150509250929050565b600060033d111561242b5760046000803e5060005160e01c5b90565b600060443d101561243c5790565b6040517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc803d016004833e81513d67ffffffffffffffff816024840111818411171561248a57505050505090565b82850191508151818111156124a25750505050505090565b843d87010160208285010111156124bc5750505050505090565b6124cb60208286010187611eb3565b509095945050505050565b600073ffffffffffffffffffffffffffffffffffffffff808816835263ffffffff871660208401528086166040840152506080606083015261251c60808301848661220e565b979650505050505050565b60006020828403121561253957600080fd5b815167ffffffffffffffff81111561255057600080fd5b8201601f8101841361256157600080fd5b6125708482516020840161236c565b949350505050565b63ffffffff8616815284602082015283604082015260806060820152600061251c60808301848661220e565b6000806000606084860312156125b957600080fd5b8351925060208401519150604084015190509250925092565b6000821982111561260c577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b60006020828403121561262357600080fd5b8151611e7d81611d1b565b60006020828403121561264057600080fd5b8151611e7d81611d30565b60006101008a835263ffffffff8a16602084015273ffffffffffffffffffffffffffffffffffffffff808a16604085015280891660608501528088166080850152508560a084015284151560c08401528060e08401526126ad81840185612076565b9b9a5050505050505050505050565b600084516126ce818460208901612046565b91909101928352506020820152604001919050565b87815286602082015263ffffffff86166040820152600073ffffffffffffffffffffffffffffffffffffffff808716606084015285608084015280851660a08401525060e060c083015261273a60e0830184612076565b999850505050505050505056fea164736f6c634300080d000a
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.