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 | |||
---|---|---|---|---|---|---|
107834217 | 626 days ago | 0.00044286125796 ETH | ||||
107834217 | 626 days ago | 0.00044286125796 ETH | ||||
107834110 | 626 days ago | 0.000368300266904 ETH | ||||
107834110 | 626 days ago | 0.000368300266904 ETH | ||||
107834095 | 626 days ago | 0.00037912150079 ETH | ||||
107834095 | 626 days ago | 0.00037912150079 ETH | ||||
107834008 | 626 days ago | 0.000371113055904 ETH | ||||
107834008 | 626 days ago | 0.000371113055904 ETH | ||||
107833953 | 626 days ago | 0.000704685393532 ETH | ||||
107833953 | 626 days ago | 0.000704685393532 ETH | ||||
107833855 | 626 days ago | 0.000258023240258 ETH | ||||
107833855 | 626 days ago | 0.000258023240258 ETH | ||||
107833806 | 626 days ago | 0.000441534364847 ETH | ||||
107833806 | 626 days ago | 0.000441534364847 ETH | ||||
107833740 | 626 days ago | 0.000370118941749 ETH | ||||
107833740 | 626 days ago | 0.000370118941749 ETH | ||||
107833706 | 626 days ago | 0.000245234828051 ETH | ||||
107833706 | 626 days ago | 0.000245234828051 ETH | ||||
107833570 | 626 days ago | 0.000195388999863 ETH | ||||
107833570 | 626 days ago | 0.000195388999863 ETH | ||||
107833455 | 626 days ago | 0.000450027624033 ETH | ||||
107833455 | 626 days ago | 0.000450027624033 ETH | ||||
107833453 | 626 days ago | 0.00053014489307 ETH | ||||
107833453 | 626 days ago | 0.00053014489307 ETH | ||||
107833359 | 626 days ago | 0.000258023240258 ETH |
Loading...
Loading
Contract Name:
LayerZeroModule
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 "../enum/ChainIdType.sol"; import "../interface/CrossChainMessageInterface.sol"; import "../interface/HolographOperatorInterface.sol"; import "../interface/InitializableInterface.sol"; import "../interface/HolographInterfacesInterface.sol"; import "../interface/LayerZeroModuleInterface.sol"; import "../interface/LayerZeroOverrides.sol"; import "../struct/GasParameters.sol"; import "./OVM_GasPriceOracle.sol"; /** * @title Holograph LayerZero Module * @author https://github.com/holographxyz * @notice Holograph module for enabling LayerZero cross-chain messaging * @dev This contract abstracts all of the LayerZero specific logic into an isolated module */ contract LayerZeroModule is Admin, Initializable, CrossChainMessageInterface, LayerZeroModuleInterface { /** * @dev bytes32(uint256(keccak256('eip1967.Holograph.bridge')) - 1) */ bytes32 constant _bridgeSlot = 0xeb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9; /** * @dev bytes32(uint256(keccak256('eip1967.Holograph.interfaces')) - 1) */ bytes32 constant _interfacesSlot = 0xbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd1848827; /** * @dev bytes32(uint256(keccak256('eip1967.Holograph.lZEndpoint')) - 1) */ bytes32 constant _lZEndpointSlot = 0x56825e447adf54cdde5f04815fcf9b1dd26ef9d5c053625147c18b7c13091686; /** * @dev bytes32(uint256(keccak256('eip1967.Holograph.operator')) - 1) */ bytes32 constant _operatorSlot = 0x7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f; /** * @dev bytes32(uint256(keccak256('eip1967.Holograph.gasParameters')) - 1) */ bytes32 constant _gasParametersSlot = 0x15eee82a0af3c04e4b65c3842105c973a6b0fb2a68728bf035809e13b38ce8cf; /** * @dev bytes32(uint256(keccak256('eip1967.Holograph.gasParameters')) - 1) */ bytes32 constant _optimismGasPriceOracleSlot = 0x46043c284a96474ab4a54c741ea0d0fce54e98eea878b99d4b85808fa6f71a5f; /** * @dev Constructor is left empty and init is used instead */ constructor() {} /** * @notice Used internally to initialize the contract instead of through a constructor * @dev This function is called by the deployer/factory when creating a contract * @param initPayload abi encoded payload to use for contract initilaization */ function init(bytes memory initPayload) external override returns (bytes4) { require(!_isInitialized(), "HOLOGRAPH: already initialized"); ( address bridge, address interfaces, address operator, address optimismGasPriceOracle, uint32[] memory chainIds, GasParameters[] memory gasParameters ) = abi.decode(initPayload, (address, address, address, address, uint32[], GasParameters[])); assembly { sstore(_adminSlot, origin()) sstore(_bridgeSlot, bridge) sstore(_interfacesSlot, interfaces) sstore(_operatorSlot, operator) sstore(_optimismGasPriceOracleSlot, optimismGasPriceOracle) } require(chainIds.length == gasParameters.length, "HOLOGRAPH: wrong array lengths"); for (uint256 i = 0; i < chainIds.length; i++) { _setGasParameters(chainIds[i], gasParameters[i]); } _setInitialized(); return InitializableInterface.init.selector; } /** * @notice Receive cross-chain message from LayerZero * @dev This function only allows calls from the configured LayerZero endpoint address */ function lzReceive( uint16 /* _srcChainId*/, bytes calldata _srcAddress, uint64 /* _nonce*/, bytes calldata _payload ) external payable { assembly { /** * @dev check if msg.sender is LayerZero Endpoint */ switch eq(sload(_lZEndpointSlot), caller()) case 0 { /** * @dev this is the assembly version of -> revert("HOLOGRAPH: LZ only endpoint"); */ mstore(0x80, 0x08c379a000000000000000000000000000000000000000000000000000000000) mstore(0xa0, 0x0000002000000000000000000000000000000000000000000000000000000000) mstore(0xc0, 0x0000001b484f4c4f47524150483a204c5a206f6e6c7920656e64706f696e7400) mstore(0xe0, 0x0000000000000000000000000000000000000000000000000000000000000000) revert(0x80, 0xc4) } let ptr := mload(0x40) calldatacopy(add(ptr, 0x0c), _srcAddress.offset, _srcAddress.length) /** * @dev check if LZ from address is same as address(this) */ switch eq(mload(ptr), address()) case 0 { /** * @dev this is the assembly version of -> revert("HOLOGRAPH: unauthorized sender"); */ mstore(0x80, 0x08c379a000000000000000000000000000000000000000000000000000000000) mstore(0xa0, 0x0000002000000000000000000000000000000000000000000000000000000000) mstore(0xc0, 0x0000001e484f4c4f47524150483a20756e617574686f72697a65642073656e64) mstore(0xe0, 0x6572000000000000000000000000000000000000000000000000000000000000) revert(0x80, 0xc4) } } /** * @dev if validation has passed, submit payload to Holograph Operator for converting into an operator job */ _operator().crossChainMessage(_payload); } /** * @dev Need to add an extra function to get LZ gas amount needed for their internal cross-chain message verification */ function send( uint256 /* gasLimit*/, uint256 /* gasPrice*/, uint32 toChain, address msgSender, uint256 msgValue, bytes calldata crossChainPayload ) external payable { require(msg.sender == address(_operator()), "HOLOGRAPH: operator only call"); LayerZeroOverrides lZEndpoint; assembly { lZEndpoint := sload(_lZEndpointSlot) } GasParameters memory gasParameters = _gasParameters(toChain); // need to recalculate the gas amounts for LZ to deliver message lZEndpoint.send{value: msgValue}( uint16(_interfaces().getChainId(ChainIdType.HOLOGRAPH, uint256(toChain), ChainIdType.LAYERZERO)), abi.encodePacked(address(this), address(this)), crossChainPayload, payable(msgSender), address(this), abi.encodePacked( uint16(1), uint256(gasParameters.msgBaseGas + (crossChainPayload.length * gasParameters.msgGasPerByte)) ) ); } function getMessageFee( uint32 toChain, uint256 gasLimit, uint256 gasPrice, bytes calldata crossChainPayload ) external view returns (uint256 hlgFee, uint256 msgFee, uint256 dstGasPrice) { uint16 lzDestChain = uint16( _interfaces().getChainId(ChainIdType.HOLOGRAPH, uint256(toChain), ChainIdType.LAYERZERO) ); LayerZeroOverrides lz; assembly { lz := sload(_lZEndpointSlot) } // convert holograph chain id to lz chain id (uint128 dstPriceRatio, uint128 dstGasPriceInWei) = _getPricing(lz, lzDestChain); if (gasPrice == 0) { gasPrice = dstGasPriceInWei; } GasParameters memory gasParameters = _gasParameters(toChain); require(gasPrice > gasParameters.minGasPrice, "HOLOGRAPH: gas price too low"); bytes memory adapterParams = abi.encodePacked( uint16(1), uint256(gasParameters.msgBaseGas + (crossChainPayload.length * gasParameters.msgGasPerByte)) ); gasLimit = gasLimit + gasParameters.jobBaseGas + (crossChainPayload.length * gasParameters.jobGasPerByte); gasLimit = gasLimit + (gasLimit / 10); require(gasLimit < gasParameters.maxGasLimit, "HOLOGRAPH: gas limit over max"); (uint256 nativeFee, ) = lz.estimateFees(lzDestChain, address(this), crossChainPayload, false, adapterParams); hlgFee = ((gasPrice * gasLimit) * dstPriceRatio) / (10 ** 20); /* * @dev toChain is a ChainIdType.HOLOGRAPH, which can be found at https://github.com/holographxyz/networks/blob/main/src/networks.ts * chainId 7 == optimism * chainId 4000000015 == optimismTestnetGoerli */ if (toChain == uint32(7) || toChain == uint32(4000000015)) { hlgFee += (_optimismGasPriceOracle().getL1Fee(crossChainPayload) * dstPriceRatio) / (10 ** 20); } msgFee = nativeFee; dstGasPrice = (dstGasPriceInWei * dstPriceRatio) / (10 ** 20); } function getHlgFee( uint32 toChain, uint256 gasLimit, uint256 gasPrice, bytes calldata crossChainPayload ) external view returns (uint256 hlgFee) { LayerZeroOverrides lz; assembly { lz := sload(_lZEndpointSlot) } uint16 lzDestChain = uint16( _interfaces().getChainId(ChainIdType.HOLOGRAPH, uint256(toChain), ChainIdType.LAYERZERO) ); (uint128 dstPriceRatio, uint128 dstGasPriceInWei) = _getPricing(lz, lzDestChain); if (gasPrice == 0) { gasPrice = dstGasPriceInWei; } GasParameters memory gasParameters = _gasParameters(toChain); require(gasPrice > gasParameters.minGasPrice, "HOLOGRAPH: gas price too low"); gasLimit = gasLimit + gasParameters.jobBaseGas + (crossChainPayload.length * gasParameters.jobGasPerByte); gasLimit = gasLimit + (gasLimit / 10); require(gasLimit < gasParameters.maxGasLimit, "HOLOGRAPH: gas limit over max"); hlgFee = ((gasPrice * gasLimit) * dstPriceRatio) / (10 ** 20); /* * @dev toChain is a ChainIdType.HOLOGRAPH, which can be found at https://github.com/holographxyz/networks/blob/main/src/networks.ts * chainId 7 == optimism * chainId 4000000015 == optimismTestnetGoerli */ if (toChain == uint32(7) || toChain == uint32(4000000015)) { hlgFee += (_optimismGasPriceOracle().getL1Fee(crossChainPayload) * dstPriceRatio) / (10 ** 20); } } function _getPricing( LayerZeroOverrides lz, uint16 lzDestChain ) private view returns (uint128 dstPriceRatio, uint128 dstGasPriceInWei) { return LayerZeroOverrides(LayerZeroOverrides(lz.defaultSendLibrary()).getAppConfig(lzDestChain, address(this)).relayer) .dstPriceLookup(lzDestChain); } /** * @notice Get the address of the Holograph Bridge module * @dev Used for beaming holographable assets cross-chain */ function getBridge() external view returns (address bridge) { assembly { bridge := sload(_bridgeSlot) } } /** * @notice Update the Holograph Bridge module address * @param bridge address of the Holograph Bridge smart contract to use */ function setBridge(address bridge) external onlyAdmin { assembly { sstore(_bridgeSlot, bridge) } } /** * @notice Get the address of the Holograph Interfaces module * @dev Holograph uses this contract to store data that needs to be accessed by a large portion of the modules */ function getInterfaces() external view returns (address interfaces) { assembly { interfaces := sload(_interfacesSlot) } } /** * @notice Update the Holograph Interfaces module address * @param interfaces address of the Holograph Interfaces smart contract to use */ function setInterfaces(address interfaces) external onlyAdmin { assembly { sstore(_interfacesSlot, interfaces) } } /** * @notice Get the address of the approved LayerZero Endpoint * @dev All lzReceive function calls allow only requests from this address */ function getLZEndpoint() external view returns (address lZEndpoint) { assembly { lZEndpoint := sload(_lZEndpointSlot) } } /** * @notice Update the approved LayerZero Endpoint address * @param lZEndpoint address of the LayerZero Endpoint to use */ function setLZEndpoint(address lZEndpoint) external onlyAdmin { assembly { sstore(_lZEndpointSlot, lZEndpoint) } } /** * @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 address of the Optimism Gas Price Oracle module * @dev Allows to properly calculate the L1 security fee for Optimism bridge transactions */ function getOptimismGasPriceOracle() external view returns (address optimismGasPriceOracle) { assembly { optimismGasPriceOracle := sload(_optimismGasPriceOracleSlot) } } /** * @notice Update the Optimism Gas Price Oracle module address * @param optimismGasPriceOracle address of the Optimism Gas Price Oracle smart contract to use */ function setOptimismGasPriceOracle(address optimismGasPriceOracle) external onlyAdmin { assembly { sstore(_optimismGasPriceOracleSlot, optimismGasPriceOracle) } } /** * @dev Internal function used for getting the Holograph Bridge Interface */ function _bridge() private view returns (address bridge) { assembly { bridge := sload(_bridgeSlot) } } /** * @dev Internal function used for getting the Holograph Interfaces Interface */ function _interfaces() private view returns (HolographInterfacesInterface interfaces) { assembly { interfaces := sload(_interfacesSlot) } } /** * @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 Optimism Gas Price Oracle Interface */ function _optimismGasPriceOracle() private view returns (OVM_GasPriceOracle optimismGasPriceOracle) { assembly { optimismGasPriceOracle := sload(_optimismGasPriceOracleSlot) } } /** * @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(); } /** * @notice Get the default or chain-specific GasParameters * @param chainId the Holograph ChainId to get gas parameters for, set to 0 for default */ function getGasParameters(uint32 chainId) external view returns (GasParameters memory gasParameters) { return _gasParameters(chainId); } /** * @notice Update the default or chain-specific GasParameters * @param chainId the Holograph ChainId to set gas parameters for, set to 0 for default * @param gasParameters struct of all the gas parameters to set */ function setGasParameters(uint32 chainId, GasParameters memory gasParameters) external onlyAdmin { _setGasParameters(chainId, gasParameters); } /** * @notice Update the default or chain-specific GasParameters * @param chainIds array of Holograph ChainId to set gas parameters for * @param gasParameters array of all the gas parameters to set */ function setGasParameters(uint32[] memory chainIds, GasParameters[] memory gasParameters) external onlyAdmin { require(chainIds.length == gasParameters.length, "HOLOGRAPH: wrong array lengths"); for (uint256 i = 0; i < chainIds.length; i++) { _setGasParameters(chainIds[i], gasParameters[i]); } } /** * @notice Internal function for setting the default or chain-specific GasParameters * @param chainId the Holograph ChainId to set gas parameters for, set to 0 for default * @param gasParameters struct of all the gas parameters to set */ function _setGasParameters(uint32 chainId, GasParameters memory gasParameters) private { bytes32 slot = chainId == 0 ? _gasParametersSlot : keccak256(abi.encode(chainId, _gasParametersSlot)); assembly { let pos := gasParameters for { let i := 0 } lt(i, 6) { i := add(i, 1) } { sstore(add(slot, i), mload(pos)) pos := add(pos, 32) } } } /** * @dev Internal function used for getting the default or chain-specific GasParameters * @param chainId the Holograph ChainId to get gas parameters for, set to 0 for default */ function _gasParameters(uint32 chainId) private view returns (GasParameters memory gasParameters) { bytes32 slot = chainId == 0 ? _gasParametersSlot : keccak256(abi.encode(chainId, _gasParametersSlot)); assembly { let pos := gasParameters for { let i := 0 } lt(i, 6) { i := add(i, 1) } { mstore(pos, sload(add(slot, i))) pos := add(pos, 32) } } } }
// SPDX-License-Identifier: UNLICENSED /* ┌───────────┐ │ HOLOGRAPH │ └───────────┘ ╔═════════════════════════════════════════════════════════════╗ ║ ║ ║ / ^ \ ║ ║ ~~*~~ ¸ ║ ║ [ '<>:<>' ] │░░░ ║ ║ ╔╗ _/"\_ ╔╣ ║ ║ ┌─╬╬─┐ """ ┌─╬╬─┐ ║ ║ ┌─┬┘ ╠╣ └┬─┐ \_/ ┌─┬┘ ╠╣ └┬─┐ ║ ║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║ ║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║ ║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║ ╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣ ║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║ ╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣ ╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣ ║ ╠╣ ╠╣ ║ ║ ╠╣ ╠╣ ║ ║ , ╠╣ , ,' * ╠╣ ║ ║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║ ╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝ - one protocol, one bridge = infinite possibilities - *************************************************************** DISCLAIMER: U.S Patent Pending LICENSE: Holograph Limited Public License (H-LPL) https://holograph.xyz/licenses/h-lpl/1.0.0 This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, you are not permitted to use the software. 1. Definitions The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law. A "contribution" is the original software, or any additions or changes to the software. A "contributor" is any person that distributes its contribution under this license. "Licensed patents" are a contributor’s patent claims that read directly on its contribution. 2. Grant of Rights A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in sections 3 and 4, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. 3. Conditions and Limitations A) No Trademark License- This license does not grant you rights to use any contributors’ name, logo, or trademarks. B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor is terminated with immediate effect. C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software. D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. E) The software is licensed “as-is.” You bear all risks of using it. The contributors give no express warranties, guarantees, or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude all implied warranties, including those of merchantability, fitness for a particular purpose and non-infringement. 4. (F) Platform Limitation- The licenses granted in sections 2.A & 2.B extend only to the software or derivative works that you create that run on a Holograph system product. *************************************************************** */ pragma solidity 0.8.13; abstract contract Admin { /** * @dev bytes32(uint256(keccak256('eip1967.Holograph.admin')) - 1) */ bytes32 constant _adminSlot = 0x3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c9; modifier onlyAdmin() { require(msg.sender == getAdmin(), "HOLOGRAPH: admin only function"); _; } constructor() {} function admin() public view returns (address) { return getAdmin(); } function getAdmin() public view returns (address adminAddress) { assembly { adminAddress := sload(_adminSlot) } } function setAdmin(address adminAddress) public onlyAdmin { assembly { sstore(_adminSlot, adminAddress) } } function adminCall(address target, bytes calldata data) external payable onlyAdmin { assembly { calldatacopy(0, data.offset, data.length) let result := call(gas(), target, callvalue(), 0, data.length, 0, 0) returndatacopy(0, 0, returndatasize()) switch result case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } }
// SPDX-License-Identifier: UNLICENSED /* ┌───────────┐ │ HOLOGRAPH │ └───────────┘ ╔═════════════════════════════════════════════════════════════╗ ║ ║ ║ / ^ \ ║ ║ ~~*~~ ¸ ║ ║ [ '<>:<>' ] │░░░ ║ ║ ╔╗ _/"\_ ╔╣ ║ ║ ┌─╬╬─┐ """ ┌─╬╬─┐ ║ ║ ┌─┬┘ ╠╣ └┬─┐ \_/ ┌─┬┘ ╠╣ └┬─┐ ║ ║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║ ║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║ ║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║ ╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣ ║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║ ╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣ ╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣ ║ ╠╣ ╠╣ ║ ║ ╠╣ ╠╣ ║ ║ , ╠╣ , ,' * ╠╣ ║ ║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║ ╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝ - one protocol, one bridge = infinite possibilities - *************************************************************** DISCLAIMER: U.S Patent Pending LICENSE: Holograph Limited Public License (H-LPL) https://holograph.xyz/licenses/h-lpl/1.0.0 This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, you are not permitted to use the software. 1. Definitions The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law. A "contribution" is the original software, or any additions or changes to the software. A "contributor" is any person that distributes its contribution under this license. "Licensed patents" are a contributor’s patent claims that read directly on its contribution. 2. Grant of Rights A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in sections 3 and 4, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. 3. Conditions and Limitations A) No Trademark License- This license does not grant you rights to use any contributors’ name, logo, or trademarks. B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor is terminated with immediate effect. C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software. D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. E) The software is licensed “as-is.” You bear all risks of using it. The contributors give no express warranties, guarantees, or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude all implied warranties, including those of merchantability, fitness for a particular purpose and non-infringement. 4. (F) Platform Limitation- The licenses granted in sections 2.A & 2.B extend only to the software or derivative works that you create that run on a Holograph system product. *************************************************************** */ pragma solidity 0.8.13; import "../interface/InitializableInterface.sol"; /** * @title Initializable * @author https://github.com/holographxyz * @notice Use init instead of constructor * @dev This allows for use of init function to make one time initializations without the need for a constructor */ abstract contract Initializable is InitializableInterface { /** * @dev bytes32(uint256(keccak256('eip1967.Holograph.initialized')) - 1) */ bytes32 constant _initializedSlot = 0x4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a01; /** * @dev Constructor is left empty and init is used instead */ constructor() {} /** * @notice Used internally to initialize the contract instead of through a constructor * @dev This function is called by the deployer/factory when creating a contract * @param initPayload abi encoded payload to use for contract initilaization */ function init(bytes memory initPayload) external virtual returns (bytes4); function _isInitialized() internal view returns (bool initialized) { assembly { initialized := sload(_initializedSlot) } } function _setInitialized() internal { assembly { sstore(_initializedSlot, 0x0000000000000000000000000000000000000000000000000000000000000001) } } }
// SPDX-License-Identifier: UNLICENSED /* ┌───────────┐ │ HOLOGRAPH │ └───────────┘ ╔═════════════════════════════════════════════════════════════╗ ║ ║ ║ / ^ \ ║ ║ ~~*~~ ¸ ║ ║ [ '<>:<>' ] │░░░ ║ ║ ╔╗ _/"\_ ╔╣ ║ ║ ┌─╬╬─┐ """ ┌─╬╬─┐ ║ ║ ┌─┬┘ ╠╣ └┬─┐ \_/ ┌─┬┘ ╠╣ └┬─┐ ║ ║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║ ║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║ ║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║ ╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣ ║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║ ╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣ ╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣ ║ ╠╣ ╠╣ ║ ║ ╠╣ ╠╣ ║ ║ , ╠╣ , ,' * ╠╣ ║ ║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║ ╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝ - one protocol, one bridge = infinite possibilities - *************************************************************** DISCLAIMER: U.S Patent Pending LICENSE: Holograph Limited Public License (H-LPL) https://holograph.xyz/licenses/h-lpl/1.0.0 This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, you are not permitted to use the software. 1. Definitions The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law. A "contribution" is the original software, or any additions or changes to the software. A "contributor" is any person that distributes its contribution under this license. "Licensed patents" are a contributor’s patent claims that read directly on its contribution. 2. Grant of Rights A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in sections 3 and 4, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. 3. Conditions and Limitations A) No Trademark License- This license does not grant you rights to use any contributors’ name, logo, or trademarks. B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor is terminated with immediate effect. C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software. D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. E) The software is licensed “as-is.” You bear all risks of using it. The contributors give no express warranties, guarantees, or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude all implied warranties, including those of merchantability, fitness for a particular purpose and non-infringement. 4. (F) Platform Limitation- The licenses granted in sections 2.A & 2.B extend only to the software or derivative works that you create that run on a Holograph system product. *************************************************************** */ pragma solidity 0.8.13; enum ChainIdType { UNDEFINED, // 0 EVM, // 1 HOLOGRAPH, // 2 LAYERZERO, // 3 HYPERLANE // 4 }
// SPDX-License-Identifier: UNLICENSED /* ┌───────────┐ │ HOLOGRAPH │ └───────────┘ ╔═════════════════════════════════════════════════════════════╗ ║ ║ ║ / ^ \ ║ ║ ~~*~~ ¸ ║ ║ [ '<>:<>' ] │░░░ ║ ║ ╔╗ _/"\_ ╔╣ ║ ║ ┌─╬╬─┐ """ ┌─╬╬─┐ ║ ║ ┌─┬┘ ╠╣ └┬─┐ \_/ ┌─┬┘ ╠╣ └┬─┐ ║ ║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║ ║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║ ║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║ ╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣ ║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║ ╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣ ╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣ ║ ╠╣ ╠╣ ║ ║ ╠╣ ╠╣ ║ ║ , ╠╣ , ,' * ╠╣ ║ ║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║ ╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝ - one protocol, one bridge = infinite possibilities - *************************************************************** DISCLAIMER: U.S Patent Pending LICENSE: Holograph Limited Public License (H-LPL) https://holograph.xyz/licenses/h-lpl/1.0.0 This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, you are not permitted to use the software. 1. Definitions The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law. A "contribution" is the original software, or any additions or changes to the software. A "contributor" is any person that distributes its contribution under this license. "Licensed patents" are a contributor’s patent claims that read directly on its contribution. 2. Grant of Rights A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in sections 3 and 4, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. 3. Conditions and Limitations A) No Trademark License- This license does not grant you rights to use any contributors’ name, logo, or trademarks. B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor is terminated with immediate effect. C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software. D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. E) The software is licensed “as-is.” You bear all risks of using it. The contributors give no express warranties, guarantees, or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude all implied warranties, including those of merchantability, fitness for a particular purpose and non-infringement. 4. (F) Platform Limitation- The licenses granted in sections 2.A & 2.B extend only to the software or derivative works that you create that run on a Holograph system product. *************************************************************** */ pragma solidity 0.8.13; enum InterfaceType { UNDEFINED, // 0 ERC20, // 1 ERC721, // 2 ERC1155, // 3 ROYALTIES, // 4 GENERIC // 5 }
// SPDX-License-Identifier: UNLICENSED /* ┌───────────┐ │ HOLOGRAPH │ └───────────┘ ╔═════════════════════════════════════════════════════════════╗ ║ ║ ║ / ^ \ ║ ║ ~~*~~ ¸ ║ ║ [ '<>:<>' ] │░░░ ║ ║ ╔╗ _/"\_ ╔╣ ║ ║ ┌─╬╬─┐ """ ┌─╬╬─┐ ║ ║ ┌─┬┘ ╠╣ └┬─┐ \_/ ┌─┬┘ ╠╣ └┬─┐ ║ ║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║ ║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║ ║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║ ╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣ ║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║ ╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣ ╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣ ║ ╠╣ ╠╣ ║ ║ ╠╣ ╠╣ ║ ║ , ╠╣ , ,' * ╠╣ ║ ║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║ ╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝ - one protocol, one bridge = infinite possibilities - *************************************************************** DISCLAIMER: U.S Patent Pending LICENSE: Holograph Limited Public License (H-LPL) https://holograph.xyz/licenses/h-lpl/1.0.0 This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, you are not permitted to use the software. 1. Definitions The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law. A "contribution" is the original software, or any additions or changes to the software. A "contributor" is any person that distributes its contribution under this license. "Licensed patents" are a contributor’s patent claims that read directly on its contribution. 2. Grant of Rights A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in sections 3 and 4, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. 3. Conditions and Limitations A) No Trademark License- This license does not grant you rights to use any contributors’ name, logo, or trademarks. B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor is terminated with immediate effect. C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software. D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. E) The software is licensed “as-is.” You bear all risks of using it. The contributors give no express warranties, guarantees, or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude all implied warranties, including those of merchantability, fitness for a particular purpose and non-infringement. 4. (F) Platform Limitation- The licenses granted in sections 2.A & 2.B extend only to the software or derivative works that you create that run on a Holograph system product. *************************************************************** */ pragma solidity 0.8.13; enum TokenUriType { UNDEFINED, // 0 IPFS, // 1 HTTPS, // 2 ARWEAVE // 3 }
// SPDX-License-Identifier: UNLICENSED /* ┌───────────┐ │ HOLOGRAPH │ └───────────┘ ╔═════════════════════════════════════════════════════════════╗ ║ ║ ║ / ^ \ ║ ║ ~~*~~ ¸ ║ ║ [ '<>:<>' ] │░░░ ║ ║ ╔╗ _/"\_ ╔╣ ║ ║ ┌─╬╬─┐ """ ┌─╬╬─┐ ║ ║ ┌─┬┘ ╠╣ └┬─┐ \_/ ┌─┬┘ ╠╣ └┬─┐ ║ ║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║ ║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║ ║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║ ╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣ ║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║ ╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣ ╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣ ║ ╠╣ ╠╣ ║ ║ ╠╣ ╠╣ ║ ║ , ╠╣ , ,' * ╠╣ ║ ║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║ ╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝ - one protocol, one bridge = infinite possibilities - *************************************************************** DISCLAIMER: U.S Patent Pending LICENSE: Holograph Limited Public License (H-LPL) https://holograph.xyz/licenses/h-lpl/1.0.0 This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, you are not permitted to use the software. 1. Definitions The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law. A "contribution" is the original software, or any additions or changes to the software. A "contributor" is any person that distributes its contribution under this license. "Licensed patents" are a contributor’s patent claims that read directly on its contribution. 2. Grant of Rights A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in sections 3 and 4, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. 3. Conditions and Limitations A) No Trademark License- This license does not grant you rights to use any contributors’ name, logo, or trademarks. B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor is terminated with immediate effect. C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software. D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. E) The software is licensed “as-is.” You bear all risks of using it. The contributors give no express warranties, guarantees, or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude all implied warranties, including those of merchantability, fitness for a particular purpose and non-infringement. 4. (F) Platform Limitation- The licenses granted in sections 2.A & 2.B extend only to the software or derivative works that you create that run on a Holograph system product. *************************************************************** */ pragma solidity 0.8.13; interface CrossChainMessageInterface { function send( uint256 gasLimit, uint256 gasPrice, uint32 toChain, address msgSender, uint256 msgValue, bytes calldata crossChainPayload ) external payable; function getMessageFee( uint32 toChain, uint256 gasLimit, uint256 gasPrice, bytes calldata crossChainPayload ) external view returns (uint256 hlgFee, uint256 msgFee, uint256 dstGasPrice); function getHlgFee( uint32 toChain, uint256 gasLimit, uint256 gasPrice, bytes calldata crossChainPayload ) external view returns (uint256 hlgFee); }
// SPDX-License-Identifier: UNLICENSED /* ┌───────────┐ │ HOLOGRAPH │ └───────────┘ ╔═════════════════════════════════════════════════════════════╗ ║ ║ ║ / ^ \ ║ ║ ~~*~~ ¸ ║ ║ [ '<>:<>' ] │░░░ ║ ║ ╔╗ _/"\_ ╔╣ ║ ║ ┌─╬╬─┐ """ ┌─╬╬─┐ ║ ║ ┌─┬┘ ╠╣ └┬─┐ \_/ ┌─┬┘ ╠╣ └┬─┐ ║ ║ ┌─┬┘ │ ╠╣ │ └┬─┐ ┌─┬┘ │ ╠╣ │ └┬─┐ ║ ║ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ┌─┬┘ │ │ ╠╣ │ │ └┬─┐ ║ ║ ┌─┬┘ │ │ │ ╠╣ │ │ │ └┬┐ ┌┬┘ │ │ │ ╠╣ │ │ │ └┬─┐ ║ ╠┬┘ │ │ │ │ ╠╣ │ │ │ │└¤┘│ │ │ │ ╠╣ │ │ │ │ └┬╣ ║│ │ │ │ │ ╠╣ │ │ │ │ │ │ │ │ ╠╣ │ │ │ │ │║ ╠╩══╩══╩══╩══╩══╬╬══╩══╩══╩══╩═══╩══╩══╩══╩══╬╬══╩══╩══╩══╩══╩╣ ╠┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╬╬┴┴┴┴┴┴┴┴┴┴┴┴┴┴┴╣ ║ ╠╣ ╠╣ ║ ║ ╠╣ ╠╣ ║ ║ , ╠╣ , ,' * ╠╣ ║ ║~~~~~^~~~~~~~~┌╬╬┐~~~^~~~~~~~~^^~~~~~~~~^~~┌╬╬┐~~~~~~~^~~~~~~║ ╚══════════════╩╩╩╩═════════════════════════╩╩╩╩══════════════╝ - one protocol, one bridge = infinite possibilities - *************************************************************** DISCLAIMER: U.S Patent Pending LICENSE: Holograph Limited Public License (H-LPL) https://holograph.xyz/licenses/h-lpl/1.0.0 This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, you are not permitted to use the software. 1. Definitions The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law. A "contribution" is the original software, or any additions or changes to the software. A "contributor" is any person that distributes its contribution under this license. "Licensed patents" are a contributor’s patent claims that read directly on its contribution. 2. Grant of Rights A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in sections 3 and 4, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. 3. Conditions and Limitations A) No Trademark License- This license does not grant you rights to use any contributors’ name, logo, or trademarks. B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor is terminated with immediate effect. C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software. D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. E) The software is licensed “as-is.” You bear all risks of using it. The contributors give no express warranties, guarantees, or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude all implied warranties, including those of merchantability, fitness for a particular purpose and non-infringement. 4. (F) Platform Limitation- The licenses granted in sections 2.A & 2.B extend only to the software or derivative works that you create that run on a Holograph system product. *************************************************************** */ pragma solidity 0.8.13; import "../enum/ChainIdType.sol"; import "../enum/InterfaceType.sol"; import "../enum/TokenUriType.sol"; interface HolographInterfacesInterface { function contractURI( string calldata name, string calldata imageURL, string calldata externalLink, uint16 bps, address contractAddress ) external pure returns (string memory); function getUriPrepend(TokenUriType uriType) external view returns (string memory prepend); function updateUriPrepend(TokenUriType uriType, string calldata prepend) external; function updateUriPrepends(TokenUriType[] calldata uriTypes, string[] calldata prepends) external; function getChainId( ChainIdType fromChainType, uint256 fromChainId, ChainIdType toChainType ) external view returns (uint256 toChainId); function updateChainIdMap( ChainIdType fromChainType, uint256 fromChainId, ChainIdType toChainType, uint256 toChainId ) external; function updateChainIdMaps( ChainIdType[] calldata fromChainType, uint256[] calldata fromChainId, ChainIdType[] calldata toChainType, uint256[] calldata toChainId ) external; function supportsInterface(InterfaceType interfaceType, bytes4 interfaceId) external view returns (bool); function updateInterface(InterfaceType interfaceType, bytes4 interfaceId, bool supported) external; function updateInterfaces(InterfaceType interfaceType, bytes4[] calldata interfaceIds, bool supported) external; }
// 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; /** * @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; interface LayerZeroModuleInterface { function lzReceive( uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload ) external payable; function getInterfaces() external view returns (address interfaces); function setInterfaces(address interfaces) external; function getLZEndpoint() external view returns (address lZEndpoint); function setLZEndpoint(address lZEndpoint) external; function getOperator() external view returns (address operator); function setOperator(address operator) 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 LayerZeroOverrides { // @dev defaultAppConfig struct struct ApplicationConfiguration { uint16 inboundProofLibraryVersion; uint64 inboundBlockConfirmations; address relayer; uint16 outboundProofType; uint64 outboundBlockConfirmations; address oracle; } struct DstPrice { uint128 dstPriceRatio; // 10^10 uint128 dstGasPriceInWei; } struct DstConfig { uint128 dstNativeAmtCap; uint64 baseGas; uint64 gasPerByte; } // @dev using this to retrieve UltraLightNodeV2 address function defaultSendLibrary() external view returns (address); // @dev using this to extract defaultAppConfig function getAppConfig( uint16 destinationChainId, address userApplicationAddress ) external view returns (ApplicationConfiguration memory); // @dev using this to extract defaultAppConfig directly from storage slot function defaultAppConfig( uint16 destinationChainId ) external view returns ( uint16 inboundProofLibraryVersion, uint64 inboundBlockConfirmations, address relayer, uint16 outboundProofType, uint64 outboundBlockConfirmations, address oracle ); // @dev access the mapping to get base price fee function dstPriceLookup( uint16 destinationChainId ) external view returns (uint128 dstPriceRatio, uint128 dstGasPriceInWei); // @dev access the mapping to get base gas and gas per byte function dstConfigLookup( uint16 destinationChainId, uint16 outboundProofType ) external view returns (uint128 dstNativeAmtCap, uint64 baseGas, uint64 gasPerByte); // @dev send message to LayerZero Endpoint function send( uint16 _dstChainId, bytes calldata _destination, bytes calldata _payload, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams ) external payable; // @dev estimate LayerZero message cost function estimateFees( uint16 _dstChainId, address _userApplication, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParam ) external view returns (uint256 nativeFee, uint256 zroFee); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.13; import "../abstract/Admin.sol"; import "../abstract/Initializable.sol"; /** * @title OVM_GasPriceOracle * @dev This contract exposes the current l2 gas price, a measure of how congested the network * currently is. This measure is used by the Sequencer to determine what fee to charge for * transactions. When the system is more congested, the l2 gas price will increase and fees * will also increase as a result. * * All public variables are set while generating the initial L2 state. The * constructor doesn't run in practice as the L2 state generation script uses * the deployed bytecode instead of running the initcode. */ contract OVM_GasPriceOracle is Admin, Initializable { // Current L2 gas price uint256 public gasPrice; // Current L1 base fee uint256 public l1BaseFee; // Amortized cost of batch submission per transaction uint256 public overhead; // Value to scale the fee up by uint256 public scalar; // Number of decimals of the scalar uint256 public decimals; /** * @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"); (uint256 _gasPrice, uint256 _l1BaseFee, uint256 _overhead, uint256 _scalar, uint256 _decimals) = abi.decode( initPayload, (uint256, uint256, uint256, uint256, uint256) ); gasPrice = _gasPrice; l1BaseFee = _l1BaseFee; overhead = _overhead; scalar = _scalar; decimals = _decimals; assembly { sstore(_adminSlot, origin()) } _setInitialized(); return InitializableInterface.init.selector; } event GasPriceUpdated(uint256); event L1BaseFeeUpdated(uint256); event OverheadUpdated(uint256); event ScalarUpdated(uint256); event DecimalsUpdated(uint256); /** * Allows the owner to modify the l2 gas price. * @param _gasPrice New l2 gas price. */ function setGasPrice(uint256 _gasPrice) external onlyAdmin { gasPrice = _gasPrice; emit GasPriceUpdated(_gasPrice); } /** * Allows the owner to modify the l1 base fee. * @param _baseFee New l1 base fee */ function setL1BaseFee(uint256 _baseFee) external onlyAdmin { l1BaseFee = _baseFee; emit L1BaseFeeUpdated(_baseFee); } /** * Allows the owner to modify the overhead. * @param _overhead New overhead */ function setOverhead(uint256 _overhead) external onlyAdmin { overhead = _overhead; emit OverheadUpdated(_overhead); } /** * Allows the owner to modify the scalar. * @param _scalar New scalar */ function setScalar(uint256 _scalar) external onlyAdmin { scalar = _scalar; emit ScalarUpdated(_scalar); } /** * Allows the owner to modify the decimals. * @param _decimals New decimals */ function setDecimals(uint256 _decimals) external onlyAdmin { decimals = _decimals; emit DecimalsUpdated(_decimals); } /** * Computes the L1 portion of the fee * based on the size of the RLP encoded tx * and the current l1BaseFee * @param _data Unsigned RLP encoded tx, 6 elements * @return L1 fee that should be paid for the tx */ function getL1Fee(bytes memory _data) external view returns (uint256) { uint256 l1GasUsed = getL1GasUsed(_data); uint256 l1Fee = l1GasUsed * l1BaseFee; uint256 divisor = 10 ** decimals; uint256 unscaled = l1Fee * scalar; uint256 scaled = unscaled / divisor; return scaled; } /** * Computes the amount of L1 gas used for a transaction * The overhead represents the per batch gas overhead of * posting both transaction and state roots to L1 given larger * batch sizes. * 4 gas for 0 byte * https://github.com/ethereum/go-ethereum/blob/9ada4a2e2c415e6b0b51c50e901336872e028872/params/protocol_params.go#L33 * 16 gas for non zero byte * https://github.com/ethereum/go-ethereum/blob/9ada4a2e2c415e6b0b51c50e901336872e028872/params/protocol_params.go#L87 * This will need to be updated if calldata gas prices change * Account for the transaction being unsigned * Padding is added to account for lack of signature on transaction * 1 byte for RLP V prefix * 1 byte for V * 1 byte for RLP R prefix * 32 bytes for R * 1 byte for RLP S prefix * 32 bytes for S * Total: 68 bytes of padding * @param _data Unsigned RLP encoded tx, 6 elements * @return Amount of L1 gas used for a transaction */ function getL1GasUsed(bytes memory _data) public view returns (uint256) { uint256 total = 0; for (uint256 i = 0; i < _data.length; i++) { if (_data[i] == 0) { total += 4; } else { total += 16; } } uint256 unsigned = total + overhead; return unsigned + (68 * 16); } }
// 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 GasParameters { uint256 msgBaseGas; uint256 msgGasPerByte; uint256 jobBaseGas; uint256 jobGasPerByte; uint256 minGasPrice; uint256 maxGasLimit; }
// 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 */
{ "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
Contract ABI
API[{"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":[],"name":"getAdmin","outputs":[{"internalType":"address","name":"adminAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBridge","outputs":[{"internalType":"address","name":"bridge","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"chainId","type":"uint32"}],"name":"getGasParameters","outputs":[{"components":[{"internalType":"uint256","name":"msgBaseGas","type":"uint256"},{"internalType":"uint256","name":"msgGasPerByte","type":"uint256"},{"internalType":"uint256","name":"jobBaseGas","type":"uint256"},{"internalType":"uint256","name":"jobGasPerByte","type":"uint256"},{"internalType":"uint256","name":"minGasPrice","type":"uint256"},{"internalType":"uint256","name":"maxGasLimit","type":"uint256"}],"internalType":"struct GasParameters","name":"gasParameters","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"toChain","type":"uint32"},{"internalType":"uint256","name":"gasLimit","type":"uint256"},{"internalType":"uint256","name":"gasPrice","type":"uint256"},{"internalType":"bytes","name":"crossChainPayload","type":"bytes"}],"name":"getHlgFee","outputs":[{"internalType":"uint256","name":"hlgFee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getInterfaces","outputs":[{"internalType":"address","name":"interfaces","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLZEndpoint","outputs":[{"internalType":"address","name":"lZEndpoint","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"toChain","type":"uint32"},{"internalType":"uint256","name":"gasLimit","type":"uint256"},{"internalType":"uint256","name":"gasPrice","type":"uint256"},{"internalType":"bytes","name":"crossChainPayload","type":"bytes"}],"name":"getMessageFee","outputs":[{"internalType":"uint256","name":"hlgFee","type":"uint256"},{"internalType":"uint256","name":"msgFee","type":"uint256"},{"internalType":"uint256","name":"dstGasPrice","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOperator","outputs":[{"internalType":"address","name":"operator","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOptimismGasPriceOracle","outputs":[{"internalType":"address","name":"optimismGasPriceOracle","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":"uint16","name":"","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"internalType":"uint64","name":"","type":"uint64"},{"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"lzReceive","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint32","name":"toChain","type":"uint32"},{"internalType":"address","name":"msgSender","type":"address"},{"internalType":"uint256","name":"msgValue","type":"uint256"},{"internalType":"bytes","name":"crossChainPayload","type":"bytes"}],"name":"send","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"adminAddress","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"bridge","type":"address"}],"name":"setBridge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32[]","name":"chainIds","type":"uint32[]"},{"components":[{"internalType":"uint256","name":"msgBaseGas","type":"uint256"},{"internalType":"uint256","name":"msgGasPerByte","type":"uint256"},{"internalType":"uint256","name":"jobBaseGas","type":"uint256"},{"internalType":"uint256","name":"jobGasPerByte","type":"uint256"},{"internalType":"uint256","name":"minGasPrice","type":"uint256"},{"internalType":"uint256","name":"maxGasLimit","type":"uint256"}],"internalType":"struct GasParameters[]","name":"gasParameters","type":"tuple[]"}],"name":"setGasParameters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"chainId","type":"uint32"},{"components":[{"internalType":"uint256","name":"msgBaseGas","type":"uint256"},{"internalType":"uint256","name":"msgGasPerByte","type":"uint256"},{"internalType":"uint256","name":"jobBaseGas","type":"uint256"},{"internalType":"uint256","name":"jobGasPerByte","type":"uint256"},{"internalType":"uint256","name":"minGasPrice","type":"uint256"},{"internalType":"uint256","name":"maxGasLimit","type":"uint256"}],"internalType":"struct GasParameters","name":"gasParameters","type":"tuple"}],"name":"setGasParameters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"interfaces","type":"address"}],"name":"setInterfaces","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"lZEndpoint","type":"address"}],"name":"setLZEndpoint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"optimismGasPriceOracle","type":"address"}],"name":"setOptimismGasPriceOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405234801561001057600080fd5b50612d47806100206000396000f3fe6080604052600436106101785760003560e01c80638dd14802116100cb578063da8292d91161007f578063f0478d2011610059578063f0478d20146104d7578063f851a4401461050b578063ff1370d91461052057600080fd5b8063da8292d91461044f578063e7f43c681461046f578063ebac15f9146104a357600080fd5b80639ce82792116100b05780639ce82792146103fc578063b3ab15fb1461041c578063bf64a82d1461043c57600080fd5b80638dd14802146103bc578063960a4270146103dc57600080fd5b80634b40f1bf1161012d5780636ec7fad7116101075780636ec7fad714610302578063704b6c021461036e5780638c19a89f1461038e57600080fd5b80634b40f1bf1461025d5780634ddf47d41461027d5780636e9960c3146102ce57600080fd5b80630e95b6501161015e5780630e95b650146101af5780630fffbaf3146101cf57806336c5ab401461022957600080fd5b80621d3567146101875780630a0542ef1461019c57600080fd5b3661018257600080fd5b600080fd5b61019a610195366004612102565b61055b565b005b61019a6101aa3660046121cd565b610731565b3480156101bb57600080fd5b5061019a6101ca3660046123eb565b6109f7565b3480156101db57600080fd5b507feb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9545b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561023557600080fd5b507f56825e447adf54cdde5f04815fcf9b1dd26ef9d5c053625147c18b7c13091686546101ff565b34801561026957600080fd5b5061019a6102783660046124ad565b610b77565b34801561028957600080fd5b5061029d6102983660046124d1565b610c51565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610220565b3480156102da57600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c9546101ff565b34801561030e57600080fd5b5061032261031d366004612584565b610eaf565b6040516102209190600060c082019050825182526020830151602083015260408301516040830152606083015160608301526080830151608083015260a083015160a083015292915050565b34801561037a57600080fd5b5061019a6103893660046124ad565b610ef7565b34801561039a57600080fd5b506103ae6103a93660046125a1565b610fd1565b604051908152602001610220565b3480156103c857600080fd5b5061019a6103d73660046124ad565b61134c565b3480156103e857600080fd5b5061019a6103f736600461260b565b611426565b34801561040857600080fd5b5061019a6104173660046124ad565b6114ea565b34801561042857600080fd5b5061019a6104373660046124ad565b6115c4565b61019a61044a366004612641565b61169e565b34801561045b57600080fd5b5061019a61046a3660046124ad565b611780565b34801561047b57600080fd5b507f7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f546101ff565b3480156104af57600080fd5b507fbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd1848827546101ff565b3480156104e357600080fd5b507f46043c284a96474ab4a54c741ea0d0fce54e98eea878b99d4b85808fa6f71a5f546101ff565b34801561051757600080fd5b506101ff61185a565b34801561052c57600080fd5b5061054061053b3660046125a1565b611889565b60408051938452602084019290925290820152606001610220565b7f56825e447adf54cdde5f04815fcf9b1dd26ef9d5c053625147c18b7c13091686543314806105f5577f08c379a0000000000000000000000000000000000000000000000000000000006080527c200000000000000000000000000000000000000000000000000000000060a0527c1b484f4c4f47524150483a204c5a206f6e6c7920656e64706f696e740060c052600060e05260c46080fd5b506040518486600c8301378051301480610699577f08c379a0000000000000000000000000000000000000000000000000000000006080527c200000000000000000000000000000000000000000000000000000000060a0527c1e484f4c4f47524150483a20756e617574686f72697a65642073656e6460c0527f657200000000000000000000000000000000000000000000000000000000000060e05260c46080fd5b50507f7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f5473ffffffffffffffffffffffffffffffffffffffff1663254e106283836040518363ffffffff1660e01b81526004016106f79291906126df565b600060405180830381600087803b15801561071157600080fd5b505af1158015610725573d6000803e3d6000fd5b50505050505050505050565b7f7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f5473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f484f4c4f47524150483a206f70657261746f72206f6e6c792063616c6c00000060448201526064015b60405180910390fd5b7f56825e447adf54cdde5f04815fcf9b1dd26ef9d5c053625147c18b7c1309168654600061081987611d55565b90508173ffffffffffffffffffffffffffffffffffffffff1663c5803100866108607fbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd18488275490565b73ffffffffffffffffffffffffffffffffffffffff166320fc06ea60028c63ffffffff1660036040518463ffffffff1660e01b81526004016108a493929190612736565b602060405180830381865afa1580156108c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e59190612757565b6040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660208201819052603482015260480160405160208183030381529060405288888c3060018a602001518e8e9050610945919061279f565b8b5161095191906127dc565b60405160f09290921b7fffff00000000000000000000000000000000000000000000000000000000000016602083015260228201526042016040516020818303038152906040526040518963ffffffff1660e01b81526004016109ba979695949392919061285f565b6000604051808303818588803b1580156109d357600080fd5b505af11580156109e7573d6000803e3d6000fd5b5050505050505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016107e3565b8051825114610b18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2077726f6e67206172726179206c656e67746873000060448201526064016107e3565b60005b8251811015610b7257610b60838281518110610b3957610b396128d5565b6020026020010151838381518110610b5357610b536128d5565b6020026020010151611e3f565b80610b6a81612904565b915050610b1b565b505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c2d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016107e3565b7f56825e447adf54cdde5f04815fcf9b1dd26ef9d5c053625147c18b7c1309168655565b6000610c7b7f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b15610ce2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a20616c726561647920696e697469616c697a6564000060448201526064016107e3565b60008060008060008087806020019051810190610cff91906129e1565b955095509550955095509550327f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955857feb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f955847fbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd184882755837f7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f55827f46043c284a96474ab4a54c741ea0d0fce54e98eea878b99d4b85808fa6f71a5f558051825114610e25576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2077726f6e67206172726179206c656e67746873000060448201526064016107e3565b60005b8251811015610e5857610e46838281518110610b3957610b396128d5565b80610e5081612904565b915050610e28565b50610e8260017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d400000000000000000000000000000000000000000000000000000000979650505050505050565b610ee86040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b610ef182611d55565b92915050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610fad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016107e3565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b7f56825e447adf54cdde5f04815fcf9b1dd26ef9d5c053625147c18b7c13091686546000908161101f7fbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd18488275490565b73ffffffffffffffffffffffffffffffffffffffff166320fc06ea60028a63ffffffff1660036040518463ffffffff1660e01b815260040161106393929190612736565b602060405180830381865afa158015611080573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a49190612757565b90506000806110b38484611ee8565b91509150876000036110d557806fffffffffffffffffffffffffffffffff1697505b60006110e08b611d55565b90508060800151891161114f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f484f4c4f47524150483a2067617320707269636520746f6f206c6f770000000060448201526064016107e3565b606081015161115e908861279f565b604082015161116d908c6127dc565b61117791906127dc565b9950611184600a8b612b23565b61118e908b6127dc565b99508060a001518a106111fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f484f4c4f47524150483a20676173206c696d6974206f766572206d617800000060448201526064016107e3565b68056bc75e2d631000006fffffffffffffffffffffffffffffffff84166112248c8c61279f565b61122e919061279f565b6112389190612b23565b955063ffffffff8b1660071480611258575063ffffffff8b1663ee6b280f145b1561133e5768056bc75e2d63100000836fffffffffffffffffffffffffffffffff166112a27f46043c284a96474ab4a54c741ea0d0fce54e98eea878b99d4b85808fa6f71a5f5490565b73ffffffffffffffffffffffffffffffffffffffff166349948e0e8b8b6040518363ffffffff1660e01b81526004016112dc9291906126df565b602060405180830381865afa1580156112f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061131d9190612757565b611327919061279f565b6113319190612b23565b61133b90876127dc565b95505b505050505095945050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611402576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016107e3565b7feb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f955565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146114dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016107e3565b6114e68282611e3f565b5050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146115a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016107e3565b7f46043c284a96474ab4a54c741ea0d0fce54e98eea878b99d4b85808fa6f71a5f55565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461167a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016107e3565b7f7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f55565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611754576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016107e3565b808260003760008082600034875af13d6000803e808015611774573d6000f35b3d6000fd5b5050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611836576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016107e3565b7fbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd184882755565b60006118847f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b6000806000806118b77fbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd18488275490565b73ffffffffffffffffffffffffffffffffffffffff166320fc06ea60028b63ffffffff1660036040518463ffffffff1660e01b81526004016118fb93929190612736565b602060405180830381865afa158015611918573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061193c9190612757565b7f56825e447adf54cdde5f04815fcf9b1dd26ef9d5c053625147c18b7c130916865490915060008061196e8385611ee8565b915091508960000361199057806fffffffffffffffffffffffffffffffff1699505b600061199b8d611d55565b905080608001518b11611a0a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f484f4c4f47524150483a2067617320707269636520746f6f206c6f770000000060448201526064016107e3565b6020810151600090600190611a1f908c61279f565b8351611a2b91906127dc565b60405160f09290921b7fffff0000000000000000000000000000000000000000000000000000000000001660208301526022820152604201604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526060830151909150611aa3908b61279f565b6040830151611ab2908f6127dc565b611abc91906127dc565b9c50611ac9600a8e612b23565b611ad3908e6127dc565b9c508160a001518d10611b42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f484f4c4f47524150483a20676173206c696d6974206f766572206d617800000060448201526064016107e3565b60008573ffffffffffffffffffffffffffffffffffffffff166340a7bb1088308f8f6000886040518763ffffffff1660e01b8152600401611b8896959493929190612b37565b6040805180830381865afa158015611ba4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bc89190612b98565b50905068056bc75e2d63100000856fffffffffffffffffffffffffffffffff168f8f611bf4919061279f565b611bfe919061279f565b611c089190612b23565b995063ffffffff8f1660071480611c28575063ffffffff8f1663ee6b280f145b15611d0e5768056bc75e2d63100000856fffffffffffffffffffffffffffffffff16611c727f46043c284a96474ab4a54c741ea0d0fce54e98eea878b99d4b85808fa6f71a5f5490565b73ffffffffffffffffffffffffffffffffffffffff166349948e0e8f8f6040518363ffffffff1660e01b8152600401611cac9291906126df565b602060405180830381865afa158015611cc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ced9190612757565b611cf7919061279f565b611d019190612b23565b611d0b908b6127dc565b99505b97508768056bc75e2d63100000611d258686612bbc565b611d2f9190612bf4565b6fffffffffffffffffffffffffffffffff16975050505050505050955095509592505050565b611d8e6040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b600063ffffffff831615611df2576040805163ffffffff851660208201527f15eee82a0af3c04e4b65c3842105c973a6b0fb2a68728bf035809e13b38ce8cf9181019190915260600160405160208183030381529060405280519060200120611e14565b7f15eee82a0af3c04e4b65c3842105c973a6b0fb2a68728bf035809e13b38ce8cf5b90508160005b6006811015611e3757828101548252602090910190600101611e1a565b505050919050565b600063ffffffff831615611ea3576040805163ffffffff851660208201527f15eee82a0af3c04e4b65c3842105c973a6b0fb2a68728bf035809e13b38ce8cf9181019190915260600160405160208183030381529060405280519060200120611ec5565b7f15eee82a0af3c04e4b65c3842105c973a6b0fb2a68728bf035809e13b38ce8cf5b90508160005b600681101561177957815183820155602090910190600101611ecb565b6000808373ffffffffffffffffffffffffffffffffffffffff16634afb422b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f5a9190612c23565b6040517fa466222200000000000000000000000000000000000000000000000000000000815261ffff8516600482015230602482015273ffffffffffffffffffffffffffffffffffffffff919091169063a46622229060440160c060405180830381865afa158015611fd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ff49190612c40565b60409081015190517f765a8a5400000000000000000000000000000000000000000000000000000000815261ffff8516600482015273ffffffffffffffffffffffffffffffffffffffff9091169063765a8a54906024016040805180830381865afa158015612067573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061208b9190612d10565b915091505b9250929050565b61ffff811681146120a757600080fd5b50565b60008083601f8401126120bc57600080fd5b50813567ffffffffffffffff8111156120d457600080fd5b60208301915083602082850101111561209057600080fd5b67ffffffffffffffff811681146120a757600080fd5b6000806000806000806080878903121561211b57600080fd5b863561212681612097565b9550602087013567ffffffffffffffff8082111561214357600080fd5b61214f8a838b016120aa565b909750955060408901359150612164826120ec565b9093506060880135908082111561217a57600080fd5b5061218789828a016120aa565b979a9699509497509295939492505050565b63ffffffff811681146120a757600080fd5b73ffffffffffffffffffffffffffffffffffffffff811681146120a757600080fd5b600080600080600080600060c0888a0312156121e857600080fd5b8735965060208801359550604088013561220181612199565b94506060880135612211816121ab565b93506080880135925060a088013567ffffffffffffffff81111561223457600080fd5b6122408a828b016120aa565b989b979a50959850939692959293505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160c0810167ffffffffffffffff811182821017156122a5576122a5612253565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156122f2576122f2612253565b604052919050565b600067ffffffffffffffff82111561231457612314612253565b5060051b60200190565b600060c0828403121561233057600080fd5b612338612282565b9050813581526020820135602082015260408201356040820152606082013560608201526080820135608082015260a082013560a082015292915050565b600082601f83011261238757600080fd5b8135602061239c612397836122fa565b6122ab565b82815260c092830285018201928282019190878511156123bb57600080fd5b8387015b858110156123de576123d1898261231e565b84529284019281016123bf565b5090979650505050505050565b600080604083850312156123fe57600080fd5b823567ffffffffffffffff8082111561241657600080fd5b818501915085601f83011261242a57600080fd5b8135602061243a612397836122fa565b82815260059290921b8401810191818101908984111561245957600080fd5b948201945b8386101561248057853561247181612199565b8252948201949082019061245e565b9650508601359250508082111561249657600080fd5b506124a385828601612376565b9150509250929050565b6000602082840312156124bf57600080fd5b81356124ca816121ab565b9392505050565b600060208083850312156124e457600080fd5b823567ffffffffffffffff808211156124fc57600080fd5b818501915085601f83011261251057600080fd5b81358181111561252257612522612253565b612552847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016122ab565b9150808252868482850101111561256857600080fd5b8084840185840137600090820190930192909252509392505050565b60006020828403121561259657600080fd5b81356124ca81612199565b6000806000806000608086880312156125b957600080fd5b85356125c481612199565b94506020860135935060408601359250606086013567ffffffffffffffff8111156125ee57600080fd5b6125fa888289016120aa565b969995985093965092949392505050565b60008060e0838503121561261e57600080fd5b823561262981612199565b9150612638846020850161231e565b90509250929050565b60008060006040848603121561265657600080fd5b8335612661816121ab565b9250602084013567ffffffffffffffff81111561267d57600080fd5b612689868287016120aa565b9497909650939450505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b6020815260006126f3602083018486612696565b949350505050565b60058110612732577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b6060810161274482866126fb565b8360208301526126f360408301846126fb565b60006020828403121561276957600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156127d7576127d7612770565b500290565b600082198211156127ef576127ef612770565b500190565b6000815180845260005b8181101561281a576020818501810151868301820152016127fe565b8181111561282c576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b61ffff8816815260c06020820152600061287c60c08301896127f4565b828103604084015261288f81888a612696565b73ffffffffffffffffffffffffffffffffffffffff87811660608601528616608085015283810360a085015290506128c781856127f4565b9a9950505050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361293557612935612770565b5060010190565b600082601f83011261294d57600080fd5b8151602061295d612397836122fa565b82815260c0928302850182019282820191908785111561297c57600080fd5b8387015b858110156123de5781818a0312156129985760008081fd5b6129a0612282565b81518152858201518682015260408083015190820152606080830151908201526080808301519082015260a080830151908201528452928401928101612980565b60008060008060008060c087890312156129fa57600080fd5b8651612a05816121ab565b80965050602080880151612a18816121ab565b6040890151909650612a29816121ab565b6060890151909550612a3a816121ab565b608089015190945067ffffffffffffffff80821115612a5857600080fd5b818a0191508a601f830112612a6c57600080fd5b8151612a7a612397826122fa565b81815260059190911b8301840190848101908d831115612a9957600080fd5b938501935b82851015612ac0578451612ab181612199565b82529385019390850190612a9e565b60a08d01519097509450505080831115612ad957600080fd5b5050612ae789828a0161293c565b9150509295509295509295565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082612b3257612b32612af4565b500490565b61ffff8716815273ffffffffffffffffffffffffffffffffffffffff8616602082015260a060408201526000612b7160a083018688612696565b84151560608401528281036080840152612b8b81856127f4565b9998505050505050505050565b60008060408385031215612bab57600080fd5b505080516020909101519092909150565b60006fffffffffffffffffffffffffffffffff80831681851681830481118215151615612beb57612beb612770565b02949350505050565b60006fffffffffffffffffffffffffffffffff80841680612c1757612c17612af4565b92169190910492915050565b600060208284031215612c3557600080fd5b81516124ca816121ab565b600060c08284031215612c5257600080fd5b60405160c0810181811067ffffffffffffffff82111715612c7557612c75612253565b6040528251612c8381612097565b81526020830151612c93816120ec565b60208201526040830151612ca6816121ab565b60408201526060830151612cb981612097565b60608201526080830151612ccc816120ec565b608082015260a0830151612cdf816121ab565b60a08201529392505050565b80516fffffffffffffffffffffffffffffffff81168114612d0b57600080fd5b919050565b60008060408385031215612d2357600080fd5b612d2c83612ceb565b915061263860208401612ceb56fea164736f6c634300080d000a
Deployed Bytecode
0x6080604052600436106101785760003560e01c80638dd14802116100cb578063da8292d91161007f578063f0478d2011610059578063f0478d20146104d7578063f851a4401461050b578063ff1370d91461052057600080fd5b8063da8292d91461044f578063e7f43c681461046f578063ebac15f9146104a357600080fd5b80639ce82792116100b05780639ce82792146103fc578063b3ab15fb1461041c578063bf64a82d1461043c57600080fd5b80638dd14802146103bc578063960a4270146103dc57600080fd5b80634b40f1bf1161012d5780636ec7fad7116101075780636ec7fad714610302578063704b6c021461036e5780638c19a89f1461038e57600080fd5b80634b40f1bf1461025d5780634ddf47d41461027d5780636e9960c3146102ce57600080fd5b80630e95b6501161015e5780630e95b650146101af5780630fffbaf3146101cf57806336c5ab401461022957600080fd5b80621d3567146101875780630a0542ef1461019c57600080fd5b3661018257600080fd5b600080fd5b61019a610195366004612102565b61055b565b005b61019a6101aa3660046121cd565b610731565b3480156101bb57600080fd5b5061019a6101ca3660046123eb565b6109f7565b3480156101db57600080fd5b507feb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f9545b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561023557600080fd5b507f56825e447adf54cdde5f04815fcf9b1dd26ef9d5c053625147c18b7c13091686546101ff565b34801561026957600080fd5b5061019a6102783660046124ad565b610b77565b34801561028957600080fd5b5061029d6102983660046124d1565b610c51565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610220565b3480156102da57600080fd5b507f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c9546101ff565b34801561030e57600080fd5b5061032261031d366004612584565b610eaf565b6040516102209190600060c082019050825182526020830151602083015260408301516040830152606083015160608301526080830151608083015260a083015160a083015292915050565b34801561037a57600080fd5b5061019a6103893660046124ad565b610ef7565b34801561039a57600080fd5b506103ae6103a93660046125a1565b610fd1565b604051908152602001610220565b3480156103c857600080fd5b5061019a6103d73660046124ad565b61134c565b3480156103e857600080fd5b5061019a6103f736600461260b565b611426565b34801561040857600080fd5b5061019a6104173660046124ad565b6114ea565b34801561042857600080fd5b5061019a6104373660046124ad565b6115c4565b61019a61044a366004612641565b61169e565b34801561045b57600080fd5b5061019a61046a3660046124ad565b611780565b34801561047b57600080fd5b507f7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f546101ff565b3480156104af57600080fd5b507fbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd1848827546101ff565b3480156104e357600080fd5b507f46043c284a96474ab4a54c741ea0d0fce54e98eea878b99d4b85808fa6f71a5f546101ff565b34801561051757600080fd5b506101ff61185a565b34801561052c57600080fd5b5061054061053b3660046125a1565b611889565b60408051938452602084019290925290820152606001610220565b7f56825e447adf54cdde5f04815fcf9b1dd26ef9d5c053625147c18b7c13091686543314806105f5577f08c379a0000000000000000000000000000000000000000000000000000000006080527c200000000000000000000000000000000000000000000000000000000060a0527c1b484f4c4f47524150483a204c5a206f6e6c7920656e64706f696e740060c052600060e05260c46080fd5b506040518486600c8301378051301480610699577f08c379a0000000000000000000000000000000000000000000000000000000006080527c200000000000000000000000000000000000000000000000000000000060a0527c1e484f4c4f47524150483a20756e617574686f72697a65642073656e6460c0527f657200000000000000000000000000000000000000000000000000000000000060e05260c46080fd5b50507f7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f5473ffffffffffffffffffffffffffffffffffffffff1663254e106283836040518363ffffffff1660e01b81526004016106f79291906126df565b600060405180830381600087803b15801561071157600080fd5b505af1158015610725573d6000803e3d6000fd5b50505050505050505050565b7f7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f5473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f484f4c4f47524150483a206f70657261746f72206f6e6c792063616c6c00000060448201526064015b60405180910390fd5b7f56825e447adf54cdde5f04815fcf9b1dd26ef9d5c053625147c18b7c1309168654600061081987611d55565b90508173ffffffffffffffffffffffffffffffffffffffff1663c5803100866108607fbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd18488275490565b73ffffffffffffffffffffffffffffffffffffffff166320fc06ea60028c63ffffffff1660036040518463ffffffff1660e01b81526004016108a493929190612736565b602060405180830381865afa1580156108c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e59190612757565b6040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003060601b1660208201819052603482015260480160405160208183030381529060405288888c3060018a602001518e8e9050610945919061279f565b8b5161095191906127dc565b60405160f09290921b7fffff00000000000000000000000000000000000000000000000000000000000016602083015260228201526042016040516020818303038152906040526040518963ffffffff1660e01b81526004016109ba979695949392919061285f565b6000604051808303818588803b1580156109d357600080fd5b505af11580156109e7573d6000803e3d6000fd5b5050505050505050505050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016107e3565b8051825114610b18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2077726f6e67206172726179206c656e67746873000060448201526064016107e3565b60005b8251811015610b7257610b60838281518110610b3957610b396128d5565b6020026020010151838381518110610b5357610b536128d5565b6020026020010151611e3f565b80610b6a81612904565b915050610b1b565b505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c2d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016107e3565b7f56825e447adf54cdde5f04815fcf9b1dd26ef9d5c053625147c18b7c1309168655565b6000610c7b7f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a015490565b15610ce2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a20616c726561647920696e697469616c697a6564000060448201526064016107e3565b60008060008060008087806020019051810190610cff91906129e1565b955095509550955095509550327f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955857feb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f955847fbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd184882755837f7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f55827f46043c284a96474ab4a54c741ea0d0fce54e98eea878b99d4b85808fa6f71a5f558051825114610e25576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2077726f6e67206172726179206c656e67746873000060448201526064016107e3565b60005b8251811015610e5857610e46838281518110610b3957610b396128d5565b80610e5081612904565b915050610e28565b50610e8260017f4e5f991bca30eca2d4643aaefa807e88f96a4a97398933d572a3c0d973004a0155565b507f4ddf47d400000000000000000000000000000000000000000000000000000000979650505050505050565b610ee86040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b610ef182611d55565b92915050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610fad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016107e3565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c955565b7f56825e447adf54cdde5f04815fcf9b1dd26ef9d5c053625147c18b7c13091686546000908161101f7fbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd18488275490565b73ffffffffffffffffffffffffffffffffffffffff166320fc06ea60028a63ffffffff1660036040518463ffffffff1660e01b815260040161106393929190612736565b602060405180830381865afa158015611080573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a49190612757565b90506000806110b38484611ee8565b91509150876000036110d557806fffffffffffffffffffffffffffffffff1697505b60006110e08b611d55565b90508060800151891161114f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f484f4c4f47524150483a2067617320707269636520746f6f206c6f770000000060448201526064016107e3565b606081015161115e908861279f565b604082015161116d908c6127dc565b61117791906127dc565b9950611184600a8b612b23565b61118e908b6127dc565b99508060a001518a106111fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f484f4c4f47524150483a20676173206c696d6974206f766572206d617800000060448201526064016107e3565b68056bc75e2d631000006fffffffffffffffffffffffffffffffff84166112248c8c61279f565b61122e919061279f565b6112389190612b23565b955063ffffffff8b1660071480611258575063ffffffff8b1663ee6b280f145b1561133e5768056bc75e2d63100000836fffffffffffffffffffffffffffffffff166112a27f46043c284a96474ab4a54c741ea0d0fce54e98eea878b99d4b85808fa6f71a5f5490565b73ffffffffffffffffffffffffffffffffffffffff166349948e0e8b8b6040518363ffffffff1660e01b81526004016112dc9291906126df565b602060405180830381865afa1580156112f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061131d9190612757565b611327919061279f565b6113319190612b23565b61133b90876127dc565b95505b505050505095945050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611402576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016107e3565b7feb87cbb21687feb327e3d58c6c16d552231d12c7a0e8115042a4165fac8a77f955565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146114dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016107e3565b6114e68282611e3f565b5050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146115a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016107e3565b7f46043c284a96474ab4a54c741ea0d0fce54e98eea878b99d4b85808fa6f71a5f55565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461167a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016107e3565b7f7caba557ad34138fa3b7e43fb574e0e6cc10481c3073e0dffbc560db81b5c60f55565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611754576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016107e3565b808260003760008082600034875af13d6000803e808015611774573d6000f35b3d6000fd5b5050505050565b7f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611836576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f484f4c4f47524150483a2061646d696e206f6e6c792066756e6374696f6e000060448201526064016107e3565b7fbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd184882755565b60006118847f3f106594dc74eeef980dae234cde8324dc2497b13d27a0c59e55bd2ca10a07c95490565b905090565b6000806000806118b77fbd3084b8c09da87ad159c247a60e209784196be2530cecbbd8f337fdd18488275490565b73ffffffffffffffffffffffffffffffffffffffff166320fc06ea60028b63ffffffff1660036040518463ffffffff1660e01b81526004016118fb93929190612736565b602060405180830381865afa158015611918573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061193c9190612757565b7f56825e447adf54cdde5f04815fcf9b1dd26ef9d5c053625147c18b7c130916865490915060008061196e8385611ee8565b915091508960000361199057806fffffffffffffffffffffffffffffffff1699505b600061199b8d611d55565b905080608001518b11611a0a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f484f4c4f47524150483a2067617320707269636520746f6f206c6f770000000060448201526064016107e3565b6020810151600090600190611a1f908c61279f565b8351611a2b91906127dc565b60405160f09290921b7fffff0000000000000000000000000000000000000000000000000000000000001660208301526022820152604201604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526060830151909150611aa3908b61279f565b6040830151611ab2908f6127dc565b611abc91906127dc565b9c50611ac9600a8e612b23565b611ad3908e6127dc565b9c508160a001518d10611b42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f484f4c4f47524150483a20676173206c696d6974206f766572206d617800000060448201526064016107e3565b60008573ffffffffffffffffffffffffffffffffffffffff166340a7bb1088308f8f6000886040518763ffffffff1660e01b8152600401611b8896959493929190612b37565b6040805180830381865afa158015611ba4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bc89190612b98565b50905068056bc75e2d63100000856fffffffffffffffffffffffffffffffff168f8f611bf4919061279f565b611bfe919061279f565b611c089190612b23565b995063ffffffff8f1660071480611c28575063ffffffff8f1663ee6b280f145b15611d0e5768056bc75e2d63100000856fffffffffffffffffffffffffffffffff16611c727f46043c284a96474ab4a54c741ea0d0fce54e98eea878b99d4b85808fa6f71a5f5490565b73ffffffffffffffffffffffffffffffffffffffff166349948e0e8f8f6040518363ffffffff1660e01b8152600401611cac9291906126df565b602060405180830381865afa158015611cc9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ced9190612757565b611cf7919061279f565b611d019190612b23565b611d0b908b6127dc565b99505b97508768056bc75e2d63100000611d258686612bbc565b611d2f9190612bf4565b6fffffffffffffffffffffffffffffffff16975050505050505050955095509592505050565b611d8e6040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b600063ffffffff831615611df2576040805163ffffffff851660208201527f15eee82a0af3c04e4b65c3842105c973a6b0fb2a68728bf035809e13b38ce8cf9181019190915260600160405160208183030381529060405280519060200120611e14565b7f15eee82a0af3c04e4b65c3842105c973a6b0fb2a68728bf035809e13b38ce8cf5b90508160005b6006811015611e3757828101548252602090910190600101611e1a565b505050919050565b600063ffffffff831615611ea3576040805163ffffffff851660208201527f15eee82a0af3c04e4b65c3842105c973a6b0fb2a68728bf035809e13b38ce8cf9181019190915260600160405160208183030381529060405280519060200120611ec5565b7f15eee82a0af3c04e4b65c3842105c973a6b0fb2a68728bf035809e13b38ce8cf5b90508160005b600681101561177957815183820155602090910190600101611ecb565b6000808373ffffffffffffffffffffffffffffffffffffffff16634afb422b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f5a9190612c23565b6040517fa466222200000000000000000000000000000000000000000000000000000000815261ffff8516600482015230602482015273ffffffffffffffffffffffffffffffffffffffff919091169063a46622229060440160c060405180830381865afa158015611fd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ff49190612c40565b60409081015190517f765a8a5400000000000000000000000000000000000000000000000000000000815261ffff8516600482015273ffffffffffffffffffffffffffffffffffffffff9091169063765a8a54906024016040805180830381865afa158015612067573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061208b9190612d10565b915091505b9250929050565b61ffff811681146120a757600080fd5b50565b60008083601f8401126120bc57600080fd5b50813567ffffffffffffffff8111156120d457600080fd5b60208301915083602082850101111561209057600080fd5b67ffffffffffffffff811681146120a757600080fd5b6000806000806000806080878903121561211b57600080fd5b863561212681612097565b9550602087013567ffffffffffffffff8082111561214357600080fd5b61214f8a838b016120aa565b909750955060408901359150612164826120ec565b9093506060880135908082111561217a57600080fd5b5061218789828a016120aa565b979a9699509497509295939492505050565b63ffffffff811681146120a757600080fd5b73ffffffffffffffffffffffffffffffffffffffff811681146120a757600080fd5b600080600080600080600060c0888a0312156121e857600080fd5b8735965060208801359550604088013561220181612199565b94506060880135612211816121ab565b93506080880135925060a088013567ffffffffffffffff81111561223457600080fd5b6122408a828b016120aa565b989b979a50959850939692959293505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160c0810167ffffffffffffffff811182821017156122a5576122a5612253565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156122f2576122f2612253565b604052919050565b600067ffffffffffffffff82111561231457612314612253565b5060051b60200190565b600060c0828403121561233057600080fd5b612338612282565b9050813581526020820135602082015260408201356040820152606082013560608201526080820135608082015260a082013560a082015292915050565b600082601f83011261238757600080fd5b8135602061239c612397836122fa565b6122ab565b82815260c092830285018201928282019190878511156123bb57600080fd5b8387015b858110156123de576123d1898261231e565b84529284019281016123bf565b5090979650505050505050565b600080604083850312156123fe57600080fd5b823567ffffffffffffffff8082111561241657600080fd5b818501915085601f83011261242a57600080fd5b8135602061243a612397836122fa565b82815260059290921b8401810191818101908984111561245957600080fd5b948201945b8386101561248057853561247181612199565b8252948201949082019061245e565b9650508601359250508082111561249657600080fd5b506124a385828601612376565b9150509250929050565b6000602082840312156124bf57600080fd5b81356124ca816121ab565b9392505050565b600060208083850312156124e457600080fd5b823567ffffffffffffffff808211156124fc57600080fd5b818501915085601f83011261251057600080fd5b81358181111561252257612522612253565b612552847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016122ab565b9150808252868482850101111561256857600080fd5b8084840185840137600090820190930192909252509392505050565b60006020828403121561259657600080fd5b81356124ca81612199565b6000806000806000608086880312156125b957600080fd5b85356125c481612199565b94506020860135935060408601359250606086013567ffffffffffffffff8111156125ee57600080fd5b6125fa888289016120aa565b969995985093965092949392505050565b60008060e0838503121561261e57600080fd5b823561262981612199565b9150612638846020850161231e565b90509250929050565b60008060006040848603121561265657600080fd5b8335612661816121ab565b9250602084013567ffffffffffffffff81111561267d57600080fd5b612689868287016120aa565b9497909650939450505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b6020815260006126f3602083018486612696565b949350505050565b60058110612732577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b6060810161274482866126fb565b8360208301526126f360408301846126fb565b60006020828403121561276957600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156127d7576127d7612770565b500290565b600082198211156127ef576127ef612770565b500190565b6000815180845260005b8181101561281a576020818501810151868301820152016127fe565b8181111561282c576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b61ffff8816815260c06020820152600061287c60c08301896127f4565b828103604084015261288f81888a612696565b73ffffffffffffffffffffffffffffffffffffffff87811660608601528616608085015283810360a085015290506128c781856127f4565b9a9950505050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361293557612935612770565b5060010190565b600082601f83011261294d57600080fd5b8151602061295d612397836122fa565b82815260c0928302850182019282820191908785111561297c57600080fd5b8387015b858110156123de5781818a0312156129985760008081fd5b6129a0612282565b81518152858201518682015260408083015190820152606080830151908201526080808301519082015260a080830151908201528452928401928101612980565b60008060008060008060c087890312156129fa57600080fd5b8651612a05816121ab565b80965050602080880151612a18816121ab565b6040890151909650612a29816121ab565b6060890151909550612a3a816121ab565b608089015190945067ffffffffffffffff80821115612a5857600080fd5b818a0191508a601f830112612a6c57600080fd5b8151612a7a612397826122fa565b81815260059190911b8301840190848101908d831115612a9957600080fd5b938501935b82851015612ac0578451612ab181612199565b82529385019390850190612a9e565b60a08d01519097509450505080831115612ad957600080fd5b5050612ae789828a0161293c565b9150509295509295509295565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082612b3257612b32612af4565b500490565b61ffff8716815273ffffffffffffffffffffffffffffffffffffffff8616602082015260a060408201526000612b7160a083018688612696565b84151560608401528281036080840152612b8b81856127f4565b9998505050505050505050565b60008060408385031215612bab57600080fd5b505080516020909101519092909150565b60006fffffffffffffffffffffffffffffffff80831681851681830481118215151615612beb57612beb612770565b02949350505050565b60006fffffffffffffffffffffffffffffffff80841680612c1757612c17612af4565b92169190910492915050565b600060208284031215612c3557600080fd5b81516124ca816121ab565b600060c08284031215612c5257600080fd5b60405160c0810181811067ffffffffffffffff82111715612c7557612c75612253565b6040528251612c8381612097565b81526020830151612c93816120ec565b60208201526040830151612ca6816121ab565b60408201526060830151612cb981612097565b60608201526080830151612ccc816120ec565b608082015260a0830151612cdf816121ab565b60a08201529392505050565b80516fffffffffffffffffffffffffffffffff81168114612d0b57600080fd5b919050565b60008060408385031215612d2357600080fd5b612d2c83612ceb565b915061263860208401612ceb56fea164736f6c634300080d000a
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ 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.